<database/>
A datasource that answers requests by querying a SQL
database. It uses a number of QueryDataSources, each one of which responds
in specific circumstances.
-
Implemented by:
-
thinkmap.datasource.database.DatabaseDataSource
Simple Attributes
| debug |
| description: |
Set to true to enable debug output.
|
| type: |
boolean
|
| required: |
No
|
|
| default: |
false
|
Complex Attributes
| <dataSource/> |
| description: |
Set the SQL datasource this uses.
|
| type: |
javax.sql.DataSource
|
| required: |
Yes
|
|
|
|
| <edge/> | Define an edge entity.
|
|
Simple Attributes
| bidirectional |
| description: |
Set whether or not this edge is bidirectional
|
| type: |
boolean
|
| required: |
No
|
|
| default: |
true
|
| from |
| description: |
Set the NodeEntityModel representing this edge's source.
|
| type: |
String
|
| required: |
Yes
|
|
| generateRelatedQuery |
| description: |
Set to false if this edge should not generate a related query.
|
| type: |
boolean
|
| required: |
No
|
|
| default: |
True (will generate a related query)
|
| maxResults |
| description: |
Set the maximum number of entities that should be returned.
|
| type: |
int
|
| required: |
No
|
|
| default: |
No maximum
|
| name |
| description: |
Set the name of this EntityModel. This is the Entity's type.
|
| type: |
String
|
| required: |
Yes
|
|
| orderBy |
| description: |
Set the ORDER BY expression, for example 'index asc'. This is useful when
the number of results is limited with maxResults .
Be aware that thinkmap joins more than one table in the SQL it generates; it
may thus be nececessary to include the fully-qualified table name in the
order by expression.
|
| type: |
String
|
| required: |
No
|
|
| default: |
No ORDER BY expression
|
| parent |
| description: |
Set the parent entity type of this entity.
|
| type: |
String
|
| required: |
No
|
|
| table |
| description: |
Set the name of the table represented by this EntityModel.
|
| type: |
String
|
| required: |
No
|
|
| to |
| description: |
Set the NodeEntityModel representing this edge's sink.
|
| type: |
String
|
| required: |
Yes
|
|
| <column/> | EdgeColumnModel adds edge-specific information to ColumnModel.
|
|
Simple Attributes
| alias |
| description: |
Sets the name of the property that this column will produce. If none is
specified, then the name will be the same as the column name.
|
| type: |
String
|
| required: |
No
|
|
| bindColumn |
| description: |
Set the node column that the value in this edge column must bind to.
This is used to determine which node will connect to the edge. In a
database, this is a foreign key column mapping.
|
| type: |
String
|
| required: |
No
|
|
| bindTo |
| description: |
Set the foreign key table mapping for this column.
|
| type: |
String
|
| required: |
No
|
|
| key |
| description: |
Set whether or not the column represented by this column is an
ID key.
|
| type: |
boolean
|
| required: |
No
|
|
| name |
| description: |
Set the name of this column
|
| type: |
String
|
| required: |
No
|
|
| property |
| description: |
Set whether or not this column should be used as a property in the
datasource.
|
| type: |
boolean
|
| required: |
No
|
|
| default: |
False
|
| type |
| description: |
Set the type of data this column represents.
|
| type: |
Class
|
| required: |
Yes
|
|
|
|
| <node/> | Define a node entity.
|
|
Simple Attributes
| cache |
| description: |
|
| type: |
boolean
|
| required: |
No
|
|
| generateEntityQuery |
| description: |
Set to false if this node should not generate a query for entity.
|
| type: |
boolean
|
| required: |
No
|
|
| default: |
True (generate queries)
|
| generateIdQuery |
| description: |
DEPRECATED. Please use generateEntityQuery instead.
|
| type: |
boolean
|
| required: |
No
|
|
| generateListQuery |
| description: |
Set to false if this node should not generate a query for list requests.
|
| type: |
boolean
|
| required: |
No
|
|
| default: |
True (will generate q query for list requests)
|
| maxResults |
| description: |
Set the maximum number of entities that should be returned.
|
| type: |
int
|
| required: |
No
|
|
| default: |
No maximum
|
| name |
| description: |
Set the name of this EntityModel. This is the Entity's type.
|
| type: |
String
|
| required: |
Yes
|
|
| orderBy |
| description: |
Set the ORDER BY expression, for example index ASC . This is useful when
the number of results is limited with maxResults .
In a related request, the edge's ORDER BY (if any) will take precedence over the node's.
|
| type: |
String
|
| required: |
No
|
|
| default: |
No ORDER BY expression
|
| parent |
| description: |
Set the parent entity type of this entity.
|
| type: |
String
|
| required: |
No
|
|
| table |
| description: |
Set the name of the table represented by this EntityModel.
|
| type: |
String
|
| required: |
No
|
|
| <column/> | NodeColumnModel adds node-specific information to ColumnModel.
|
|
Simple Attributes
| alias |
| description: |
Sets the name of the property that this column will produce. If none is
specified, then the name will be the same as the column name.
|
| type: |
String
|
| required: |
No
|
|
| key |
| description: |
Set whether or not the column represented by this column is an
ID key.
|
| type: |
boolean
|
| required: |
No
|
|
| name |
| description: |
Set the name of this column
|
| type: |
String
|
| required: |
No
|
|
| property |
| description: |
Set whether or not this column should be used as a property in the
datasource.
|
| type: |
boolean
|
| required: |
No
|
|
| default: |
False
|
| type |
| description: |
Set the type of data this column represents.
|
| type: |
Class
|
| required: |
Yes
|
|
|
|
| <call/> | A modification of QueryDataSource that supports stored procedures, in particular with Oracle,
and in particular out parameters.
|
|
|
| <query/> | A query DataSource handles a query, working in concert with others to make
a database DataSource work.
|
|
|