Database Module
Revision as of 11:56, 6 December 2010 by 134.34.226.134 (talk)
This module contains methods to list and open databases, explicitly apply available index structures, or get information on the database structure. All functions are introduced with the db:
prefix.
db:system
Signatures |
|
Summary |
Lists information on the database system. |
Rules |
This function returns general information on the database system, such as the database path and current database settings. |
db:list
Signatures |
|
Summary |
Lists all databases. |
Rules |
This function returns a xs:string sequence with the names of all databases. |
db:open
Signatures |
|
Summary |
Returns documents from a database. |
Rules |
This function opens the documents of the database specified by $name . The name of the database may be extended by a collection path. |
Examples |
The expression db:open("docs") returns all documents from the database named docs .The expression db:open("docs/one") returns all documents from the database named docs in the subpath one . |
Errors |
[BASX0003] is raised if the database is not found. |
db:open-pre
Signatures |
|
Summary |
Returns a specific database node. |
Rules |
This function opens the database specified by $name and returns the node with the pre value specified by $pre . |
Examples |
The expression db:open-pre("docs", 0) returns the first database node from the database named docs . |
Errors |
[BASX0004] is raised if the specified |
db:open-id
Signatures |
|
Summary |
Returns a specific database node. |
Rules |
This function opens the database specified by $name and returns the node with the id value specified by $id .In contrast to the pre value, the id will remain valid after update operations. |
Errors |
[BASX0004] is raised if the specified |
db:text-index
Signatures |
|
Summary |
Returns results from a text index request. |
Rules |
This function accesses the text index and returns all text nodes that have $string as string value. |
Errors |
[BASX0001] is raised if the index is not available. |
db:attribute-index
Signatures |
|
Summary |
Returns results from a attribute index request. |
Rules |
This function accesses the attribute index and returns all attribute nodes that have $string as string value.If $name is specified, the resulting attribute nodes are filtered by their attribute name. |
Errors |
[BASX0001] is raised if the index is not available. |
db:fulltext-index
Signatures |
|
Summary |
Returns results from a full-text index request. |
Rules |
This function accesses the full-text index and returns all text nodes that contain $text . |
Errors |
[BASX0001] is raised if the index is not available. |
db:info
Signatures |
|
Summary |
Returns database information. |
Rules |
This function returns information on the database that is referenced by the current context item. |
Errors |
[BASX0002] is raised if the context item does not represent a database node. |
db:index-info
Signatures |
|
Summary |
Returns database index information. |
Rules |
This function returns information on an index of the database that is referenced by the current context item.
|
Errors |
[BASX0001] is raised if the specified index is not available. |