Database Functions
This module contains functions for processing databases from within XQuery. Existing databases can be opened and listed, its contents can be directly accessed, documents can be added to and removed, etc.
All functions and errors in this module are assigned to the
http://basex.org/modules/db
namespace, which is statically bound to the
db
prefix.
In BaseX, two internal representations exist for XML nodes:
- Database nodes are:
- stored in a persistent database on disk,
- nodes of a document that has been generated temporarily with
fn:doc
, fn:parse-xml
and other functions, or
- the result of a main-memory update.
- Fragments are similar to DOM structures. They are created when XQuery node constructors are used (
<a/>
, element a {}
, etc.).
Fragments require less memory for small XML structures, but database nodes are more efficient for larger amounts of data. A fragment node can be converted to a database node by applying a main-memory update with an empty body to a node:
<xml>hello world</xml> update { }
Various functions in this module are
updating. Updating functions will not be immediately executed, but queued on the
Pending Update List, and processed after the remaining query has been evaluated. This means that the order in which the functions are specified in the query often does not reflect the order in which they will eventually be executed.
Signature | db:system() as element(system) |
---|
Summary | Returns general information about the database system, the current values of all global and local Options. The INFO command produces similar output. |
---|
Signature | db:option(
$name as xs:string
) as xs:string |
---|
Summary | Returns the current value of a global or local Option with the specified $name . The SHOW OPTIONS command returns similar output. |
---|
Errors | option | The specified option is unknown. |
|
---|
Examples | db:option('dbpath') Return the database path string.
db:option('serializer') Return a map with the current serialization parameters.
declare option db:stripws 'true';
db:option('stripws') Return the locally assigned value. |
---|
Added: New function.
Signature | db:option-map(
$name as xs:string
) as map(xs:string, item()) |
---|
Summary | Returns all global and local Option in a map. The SHOW OPTIONS command returns similar output. |
---|
Errors | option | The specified option is unknown. |
|
---|
Examples | db:option-map() Return all options.
db:option-map()?serializer?json?format Returns the format for serializing JSON data. |
---|
Signature | db:info(
$database as xs:string
) as element(database) |
---|
Summary | Returns meta information on the specified $database . The output is similar to the INFO DB command. |
---|
Errors | open | The addressed database does not exist or could not be opened. |
|
---|
Signature | db:property(
$database as xs:string,
$name as xs:string
) as xs:anyAtomicType |
---|
Summary | Returns the value of a property with the specified $name in the specified $database . The available properties are the ones returned by db:info . |
---|
Errors | property | The specified database property is unknown. |
|
---|
Examples | db:property('db', 'size') Return the number of bytes occupied by the database db .
db:property('xmark', 'textindex') Indicate if the xmark database has a text index.
db:property('discogs', 'uptodate') Indicate if the database statistics and index structures of the discogs database are up-to-date. |
---|
Added: New function.
Signature | db:property-map(
$database as xs:string
) as map(xs:string, item()) |
---|
Summary | Returns the all properties of the specified $database in a map. The available properties are the ones returned by db:info . |
---|
Errors | property | The specified database property is unknown. |
|
---|
Examples | db:property-map('db') Return all properties of the database db .
db:property-map('xmark')?textindex Indicate if the xmark database has a text index. |
---|
Signature | db:list(
$database as xs:string := (),
$path as xs:string := ()
) as xs:string* |
---|
Summary | Without arguments, the names of all databases are returned that are accessible to the current user. If $database is specified, paths to all resources of this database are returned. The results can be restricted to resources starting with the specified $path . |
---|
Errors | open | The addressed database does not exist or could not be opened. |
|
---|
Examples | db:list('docs') Return the names of all documents of a database named docs . |
---|
Signature | db:list-details(
$database as xs:string := (),
$path as xs:string := ()
) as element()* |
---|
Summary | Without arguments, an element is returned for each database that is accessible to the current user:
- An element has a value, which is the name of the database, and several attributes, which contain the number of stored resources, the modification date, the database size on disk (measured in bytes), and a path to the original database input.
If $database is specified, an element for each resource in this database is returned:
- An element has a value, which is the name of the resource, and several attributes, which contain the content type, the modification date, the raw flag (which indicates if the resource is binary or XML), and the size of a resource.
- The value of the size attribute depends on the resource type: for documents, it represents the number of nodes; for binary data, it represents the file size (measured in bytes).
- The results can be restricted to resources starting with the specified
$path .
|
---|
Errors | open | The addressed database does not exist or could not be opened. |
|
---|
Examples | db:list-details('shop') Return the names plus additional info on all resources of a database named shop . |
---|
Signature | db:dir(
$database as xs:string,
$path as xs:string
) as element()* |
---|
Summary | Returns metadata on all directories and resources of a $database in the specified $path . Two types of elements are returned:
resource represents a resource. The element value is the directory path; content type, modification date, raw flag (which indicates if the resource is binary or XML), and size of the resource are returned as attributes.dir represents a directory. The element value is the directory path; the modification date is returned in an attribute.
The directories are not stored in the internal database layout. Instead, they result implicitly from the paths of stored resources.
|
---|
Errors | open | The addressed database does not exist or could not be opened. | path | The specified database path is invalid. |
|
---|
Examples | db:dir('shop', 'books') Return all entries of the books directory of a shop database. |
---|
Signature | db:get(
$database as xs:string,
$path as xs:string := ()
) as document-node()* |
---|
Summary | Returns all documents from the specified $database , or only documents matching the specified $path . |
---|
Errors | open | The addressed database does not exist or could not be opened. |
|
---|
Examples | db:get('docs') Return all documents from the database named docs .
db:get('db', 'one') Return all documents from the database named db located in the path one .
for $i in 1 to 3
return db:get('db' || $i)//item Return all item elements from the databases db1 , db2 and db3 . |
---|
Signature | db:get-pre(
$database as xs:string,
$values as xs:integer*
) as node()* |
---|
Summary | Returns all nodes from a $database with the specified PRE values in distinct document order.
The PRE value provides very fast access to an existing database node, but it will change whenever a node with a smaller pre value is added to or deleted from a database.
|
---|
Errors | open | The addressed database does not exist or could not be opened. | range | The addressed database ID or PRE value is out of range. |
|
---|
Examples | db:get-pre('docs', 0) Return the first node that is stored in the database docs . |
---|
Signature | db:get-id(
$database as xs:string,
$values as xs:integer*
) as node()* |
---|
Summary | Returns all nodes from a $database with the specified ID $values in distinct document order.
Each database node has a persistent ID value. Access to the node ID can be sped up by turning on the UPDINDEX option.
|
---|
Errors | open | The addressed database does not exist or could not be opened. | range | The addressed database ID or PRE value is out of range. |
|
---|
Signature | db:get-binary(
$database as xs:string,
$path as xs:string
) as (map(*)|xs:base64Binary) |
---|
Summary | Returns a map with the paths and binary items of all resources in the specified $database . A single xs:base64Binary item is returned if a $path is specified. All items are lazy, i.e., the actual data will only be retrieved if it is processed. |
---|
Errors | mainmem | The addressed database is not persistent (stored on disk). | open | The addressed database does not exist or could not be opened. |
|
---|
Examples | db:get-binary('DB', 'music/01.mp3') Return the specified audio file as raw data.
db:get-binary('DB', 'music/01.mp3'))
=> stream:materialize() Materialize the streamable result in main-memory before returning it.
db:get-binary('DB', 'info.txt')
=> convert:binary-to-string('UTF-8') Convert a binary database resource as UTF-8 text and returns a string. |
---|
Signature | db:get-value(
$database as xs:string,
$path as xs:string
) as (map(*)|item()*) |
---|
Summary | Returns a map with the paths and values of all resources in the specified $database . A single value is returned if a $path is specified. |
---|
Errors | mainmem | The addressed database is not persistent (stored on disk). | open | The addressed database does not exist or could not be opened. |
|
---|
Examples | db:get-value('DB', 'sequence') Return the value for the sequence value resource. |
---|
Signature | db:node-pre(
$nodes as node()*
) as xs:integer* |
---|
Summary | Returns the PRE values of the specified $nodes , which must all be Database Nodes.
The PRE value provides very fast access to an existing database node, but it will change whenever a node with a smaller pre value is added to or deleted from a database.
|
---|
Errors | |
---|
Examples | db:node-pre(doc('input')) Return 0 if the database input contains a single document. |
---|
Signature | db:node-id(
$nodes as node()*
) as xs:integer* |
---|
Summary | Returns the ID values of the specified $nodes , which must all be Database Nodes.
Each database node has a persistent ID value. Access to the node id can be sped up by turning on the UPDINDEX option.
|
---|
Errors | |
---|
Signature | db:export(
$database as xs:string,
$path as xs:string,
$options as (element(output:serialization-parameters)|map(*))? := ()
) as empty-sequence() |
---|
Summary | Exports the specified $database to the specified file $path . Existing files will be overwritten.
The $options argument contains serialization parameters (see fn:serialize ).
|
---|
Errors | open | The addressed database does not exist or could not be opened. |
|
---|
Examples | db:export('DB', '/home/john/xml/texts', { 'method': 'text' }) Export all files as text.
let $target := '/home/john/xml/target'
for $doc in db:get('DB', 'collection')
let $path := $target || db:path($doc)
return (
file:create-dir(file:parent($path)),
file:write($path, $doc)
) Export parts of the database. |
---|
Signature | db:text(
$database as xs:string,
$values as xs:string*
) as text()* |
---|
Summary | Returns all text nodes of a $database that match one of the specified $values and that are stored in the text index. |
---|
Errors | no-index | The database lacks an index structure required by the called function. | open | The addressed database does not exist or could not be opened. |
|
---|
Examples | db:text('DB', 'QUERY')/.. Return the parents of all text nodes of the database DB that match the string QUERY . |
---|
Signature | db:text-range(
$database as xs:string,
$min as xs:string,
$max as xs:string
) as text()* |
---|
Summary | Returns all text nodes of a $database whose values are larger than or equal to $min and smaller than or equal to $max and that are stored in the text index. |
---|
Errors | no-index | The database lacks an index structure required by the called function. | open | The addressed database does not exist or could not be opened. |
|
---|
Examples | db:text-range('DB', '2000', '2001') Return all text nodes of the database DB that are found in between 2000 and 2001 . |
---|
Signature | db:attribute(
$database as xs:string,
$values as xs:string*,
$name as xs:string := ()
) as attribute()* |
---|
Summary | Returns all attribute nodes of a $database that match one of the specified $values and that are stored in the attribute index.
If $name is specified, the resulting attribute nodes are filtered by their attribute name.
|
---|
Errors | no-index | The database lacks an index structure required by the called function. | open | The addressed database does not exist or could not be opened. |
|
---|
Examples | db:attribute('DB', 'QUERY', 'id')/.. Return the parents of all id attribute nodes of the database DB that have QUERY as string value. |
---|
Signature | db:attribute-range(
$database as xs:string,
$min as xs:string,
$max as xs:string,
$name as xs:string := ()
) as attribute()* |
---|
Summary | Returns all attributes of a $database whose values are larger than or equal to $min and smaller than or equal to $max and that are stored in the attribute index. |
---|
Errors | no-index | The database lacks an index structure required by the called function. | open | The addressed database does not exist or could not be opened. |
|
---|
Examples | db:attribute-range('DB', 'id456', 'id473', 'id') Return all @id attributes of the database DB that have a string value in between id456 and id473 . |
---|
Signature | db:token(
$database as xs:string,
$tokens as xs:string*,
$name as xs:string := ()
) as attribute()* |
---|
Summary | Returns all attribute nodes of a $database the values of which contain one of the specified $tokens .
If $name is specified, the resulting attribute nodes are filtered by their attribute name.
|
---|
Errors | no-index | The database lacks an index structure required by the called function. | open | The addressed database does not exist or could not be opened. |
|
---|
Examples | db:token('DB', 'row', 'class')/parent::div Return all div nodes of database DB with a class attribute that contains the token row . |
---|
All functions in this section are Updating Functions.
Signature | db:create(
$database as xs:string,
$inputs as item()* := (),
$paths as xs:string* := (),
$options as map(*)? := {}
) as empty-sequence() |
---|
Summary | Creates a new $database and adds the supplied $inputs to the specified $paths :
- The inputs may be strings or nodes:
- nodes may be of any type except for attributes
- strings can be a URI pointing to a file/directory or an XML string (which is detected by the leading
< character)
- a path must be specified if the input is not a file or directory reference
- The parsing and indexing behavior can be controlled via
$options :
- An existing database will be overwritten.
- Database creation takes place after most other update operations (see Pending Update List). As a consequence, a newly created database cannot be addressed in the same query.
|
---|
Errors | args | The number of specified inputs and paths differs. | conflict | Multiple update operations point to the same target. | lock | A database cannot be updated because it is opened by another process. | name | The name of the specified database is invalid. |
|
---|
Examples | db:create('DB') Create the empty database DB .
db:create('DB', '/home/dir/doc.xml') Create the database DB and adds the document /home/dir/doc.xml as initial content.
db:create('DB', <a/>, 'doc.xml') Create the database DB and adds the document with root a under the name doc.xml .
db:create('DB', '/home/dir/', 'docs/dir') Create the database DB and adds the documents in /home/dir to the database under the path docs/dir .
db:create('DB', file:list('.'), (), { 'ftindex': true() }) Add all files of the current working directory to a new database, preserving relative filesystem paths and creating a full-text index. |
---|
Signature | db:add(
$database as xs:string,
$input as item(),
$path as xs:string? := (),
$options as map(*)? := {}
) as empty-sequence() |
---|
Summary | Adds the specified $input to a $database with the specified $path :
- A document with the same path may occur more than once in a database. If you want to enforce single instances, use
db:put instead.
- See
db:create for more details on the input and path arguments.
- The parsing behavior can be controlled via
$options :
- Allowed options are
ADDCACHE and the parsing and XML parsing options, all in lower case.
- Parsing options will only impact string input (URIs, XML strings) because nodes have already been parsed.
|
---|
Errors | open | The addressed database does not exist or could not be opened. |
|
---|
Examples | db:add("DB", "/home/dir/doc.xml") Add the file /home/dir/doc.xml to the database DB .
db:add('DB', <a/>, 'doc.xml') Add a document node to the database DB under the name doc.xml .
db:add('DB', '/home/dir', 'docs/dir', { 'addcache': true() }) Add all documents in /home/dir to the database DB under the path docs/dir . To reduce memory consumption, the files will be cached before being added to the database. |
---|
Signature | db:put(
$database as xs:string,
$input as item(),
$path as xs:string,
$options as map(*)? := {}
) as empty-sequence() |
---|
Summary | Replaces a resource, specified by $path , in a $database with the contents of $input , or adds it as a new resource:
- The parsing behavior can be controlled via
$options :
- Allowed options are
ADDCACHE and the parsing and XML parsing options, all in lower case.
- Parsing options will only impact string input (URIs, XML strings), because nodes have already been parsed.
- See
db:create for more details on the input argument.
|
---|
Errors | open | The addressed database does not exist or could not be opened. | target | Path points to an invalid target. |
|
---|
Examples | db:put('DB', '/home/dir/doc.xml', 'docs/dir/doc.xml') Replace the content of the document docs/dir/doc.xml in the database DB with the content of the file /home/dir/doc.xml .
db:put('DB', <a/>, 'docs/dir/doc.xml') Replace the content of the document docs/dir/doc.xml in the database DB .
let $source := '/home/john/xml/source'
for $file in file:list($source, true())
let $path := $source || $file
where not(file:is-dir($path))
return db:put('db', doc($path), $file) Import files from a directory to a database. |
---|
Signature | db:put-binary(
$database as xs:string,
$input as item(),
$path as xs:string
) as empty-sequence() |
---|
Summary | Stores a binary resource specified by $input in a $database at the specified $path . Existing resources are overwritten. |
---|
Errors | mainmem | The addressed database is not persistent (stored on disk). | open | The addressed database does not exist or could not be opened. |
|
---|
Examples | db:put-binary('DB', file:read-binary('video.mov'), 'video/sample.mov') Store the addressed video file at the specified location.
let $db := 'db'
let $src-path := 'src/'
let $trg-path := 'trg/'
for $src in db:list($db, $src-path)
where db:type($db, $src) = 'binary'
let $trg := $trg-path || substring-after($src, $src-path)
return db:put-binary($db, db:get-binary($db, $src), $trg) Copy the binary resources of one database into another. |
---|
Signature | db:put-value(
$database as xs:string,
$input as item()*,
$path as xs:string
) as empty-sequence() |
---|
Summary | Stores an $input value in a $database at the specified $path . Existing resources are overwritten. The value can be an arbitrary sequence of atomic items, nodes, maps, and arrays. |
---|
Errors | mainmem | The addressed database is not persistent (stored on disk). | open | The addressed database does not exist or could not be opened. |
|
---|
Examples | db:put-value('DB', 1 to 10000, 'sequence') Store a numeric range in the database.
db:put-value(
'factbook',
map:merge(
for $country in db:get('factbook')//country
return map:entry($country/@name, $country//city/name ! string())),
'cities'
) A map with countries and associated cities is stored in a database. The value resource can e.g. be used as index in future queries. |
---|
Signature | db:delete(
$database as xs:string,
$path as xs:string
) as empty-sequence() |
---|
Summary | Deletes resource(s), specified by $path , from the specified $database . |
---|
Errors | open | The addressed database does not exist or could not be opened. | path | The specified database path is invalid. |
|
---|
Examples | db:delete('DB', 'docs/dir/doc.xml') Delete the resource docs/dir/doc.xml from DB .
db:delete('DB', 'docs/dir') Delete all resources from DB in the specified path docs/dir . |
---|
Signature | db:copy(
$database as xs:string,
$new-name as xs:string
) as empty-sequence() |
---|
Summary | Creates a copy of $database , which will be called $new-name . |
---|
Errors | conflict | Multiple update operations point to the same target. | lock | A database cannot be updated because it is opened by another process. | name | The name of the specified database is invalid. | open | The addressed database does not exist or could not be opened. |
|
---|
Signature | db:alter(
$database as xs:string,
$new-name as xs:string
) as empty-sequence() |
---|
Summary | Renames a $database to $new-name . |
---|
Errors | conflict | Multiple update operations point to the same target. | lock | A database cannot be updated because it is opened by another process. | name | The name of the specified database is invalid. | open | The addressed database does not exist or could not be opened. |
|
---|
Signature | db:optimize(
$database as xs:string,
$all as xs:boolean? := false(),
$options as map(*)? := {}
) as empty-sequence() |
---|
Summary | Optimizes the metadata and indexes of a $database :
- If
$all is true , the complete database will be rebuilt. - The
$options argument can be used to control indexing. The syntax is identical to the db:create function: Allowed options are all indexing and full-text indexing options. UPDINDEX is only supported if $all is true .
|
---|
Errors | open | The addressed database does not exist or could not be opened. |
|
---|
Examples | db:optimize('DB') Optimize the database structures of the database DB .
db:optimize('DB', true(), { 'ftindex': true() }) Optimize all database structures of the database DB and create a full-text index. |
---|
Signature | db:rename(
$database as xs:string,
$source as xs:string,
$target as xs:string
) as empty-sequence() |
---|
Summary | Moves all resources(s) of a $database , which are found in the supplied $source path, to the supplied $target path. The paths may point to single resources or directories. No updates will take place if a non-existing source path is supplied. |
---|
Errors | open | The addressed database does not exist or could not be opened. | path | The specified database path is invalid. |
|
---|
Examples | db:rename('DB', 'docs/dir/doc.xml', 'docs/dir/newdoc.xml') Rename the resource docs/dir/doc.xml to docs/dir/newdoc.xml in the database DB .
db:rename('DB', 'docs/dir', 'docs/newdir') Move all resources in the database DB from docs/dir to docs/newdir . |
---|
Signature | db:flush(
$database as xs:string
) as empty-sequence() |
---|
Summary | Explicitly flushes the buffers of a $database . This command is only useful if AUTOFLUSH has been set to false . |
---|
Errors | open | The addressed database does not exist or could not be opened. |
|
---|
Signature | db:drop(
$database as xs:string
) as empty-sequence() |
---|
Summary | Drops a $database and all connected resources. |
---|
Errors | conflict | Multiple update operations point to the same target. | lock | A database cannot be updated because it is opened by another process. | open | The addressed database does not exist or could not be opened. |
|
---|
Examples | db:drop('DB') Drop the database DB . |
---|
All functions in this section except for db:backups
are Updating Functions.
Backups can be created for databases and general data. General data includes:
Signature | db:create-backup(
$database as xs:string,
$options as map(*)? := {}
) as empty-sequence() |
---|
Summary | Creates a backup of a $database . If no name is supplied, general data will be backed up. The following $options are available:
option | default | description |
---|
comment | – |
A comment string can be attached to the backup.
| compress | true() |
By disabling compression, the backup will be created faster, but it will take more space on disk.
|
|
---|
Errors | conflict | Multiple update operations point to the same target. | name | The name of the specified database is invalid. | open | The addressed database does not exist or could not be opened. |
|
---|
Examples | db:create-backup('DB', { 'compress': false() }) Create a backup of the database DB without compressing its entries. |
---|
Signature | db:drop-backup(
$name as xs:string
) as empty-sequence() |
---|
Summary | Drops all backups of the database with the specified $name . If the name ends with a timestamp, only the specified backup file will be deleted. If no name is supplied, backups with general data are addressed. |
---|
Errors | backup | | conflict | Multiple update operations point to the same target. | name | The name of the specified database is invalid. |
|
---|
Examples | db:drop-backup('DB') Drop all backups of the database DB .
db:drop-backup('DB-2014-03-13-17-36-44') Drop the specific backup file DB-2014-03-13-17-36-44.zip of the database DB . |
---|
Signature | db:alter-backup(
$name as xs:string,
$new-name as xs:string
) as empty-sequence() |
---|
Summary | Renames all backups of the database with the specified $name to $new-name . If the name ends with a date, only the specified backup file will be renamed. |
---|
Errors | backup | | conflict | Multiple update operations point to the same target. | name | The name of the specified database is invalid. |
|
---|
Examples | db:alter-backup('DB', 'DB2') Rename all backups of the database DB to DB2 . |
---|
Signature | db:restore(
$name as xs:string
) as empty-sequence() |
---|
Summary | Restores the database with the specified $name . The $name may include the timestamp of the backup file. If no name is supplied, general data will be restored, and a restart is required to make the restored general data available. |
---|
Errors | conflict | Multiple update operations point to the same target. | lock | A database cannot be updated because it is opened by another process. | name | The name of the specified database is invalid. | no-backup | No backup exists for a database. |
|
---|
Examples | db:restore('DB') Restore the database DB .
db:restore('DB-2014-03-13-18-05-45') Restore the database DB from the backup file with the given timestamp. |
---|
Signature | db:backups(
$database as xs:string := ()
) as element(backup)* |
---|
Summary | Returns an element sequence containing all available database backups with timestamp, file size and comment.
If a $database is specified, the sequence will be restricted to the backups matching this database.
|
---|
Examples | db:backups('factbook') Return all backups that have been made from the factbook database. |
---|
Signature | db:name(
$node as node()
) as xs:string |
---|
Summary | Returns the name of the database in which the specified database node $node is stored. |
---|
Errors | |
---|
Signature | db:path(
$node as node()
) as xs:string |
---|
Summary | Returns the path of the database document in which the specified database node $node is stored. |
---|
Errors | |
---|
Signature | db:exists(
$database as xs:string,
$path as xs:string := ()
) as xs:boolean |
---|
Summary | Checks if a $database exists, or a resource located at $path in this database. |
---|
Examples | db:exists('DB') Return true if the database DB exists.
db:exists('DB', 'resource') Return true if resource exists in this database. |
---|
Signature | db:type(
$database as xs:string,
$path as xs:string
) as xs:string |
---|
Summary | Returns the type (xml , binary , value ) of a resource in a $database at the specified $path . |
---|
Errors | open | The addressed database does not exist or could not be opened. |
|
---|
Examples | db:type('DB', 'factbook.xml') Return xml if the specified resource is an XML document. |
---|
Signature | db:content-type(
$database as xs:string,
$path as xs:string
) as xs:string |
---|
Summary | Retrieves the content-type of a resource in a $database at the specified $path .
The file extension is used to recognize the content-type of a resource stored in the database.
application/xml will be returned for any XML document stored in the database, regardless of its file name extension.
|
---|
Errors | open | The addressed database does not exist or could not be opened. |
|
---|
Examples | db:content-type('DB', 'docs/doc01.pdf') Return application/pdf .
db:content-type('DB', 'docs/doc01.xml') Return application/xml .
db:content-type('DB', 'docs/doc01') Return application/xml if db:is-xml('DB', 'docs/doc01') returns true . |
---|
Code | Description |
---|
args | The number of specified inputs and paths differs. |
conflict | Multiple update operations point to the same target. |
lock | A database cannot be updated because it is opened by another process. |
mainmem | The addressed database is not persistent (stored on disk). |
name | The name of the specified database is invalid. |
no-backup | No backup exists for a database. |
no-index | The database lacks an index structure required by the called function. |
node | The referenced XML node is no database node. |
open | The addressed database does not exist or could not be opened. |
option | The specified option is unknown. |
path | The specified database path is invalid. |
property | The specified database property is unknown. |
range | The addressed database ID or PRE value is out of range. |
target | Path points to an invalid target. |
Version 12.0Version 10.0Version 9.2- Added:
db:dir
- Updated:
db:add
: $path
allow empty path argument
Version 9.0Version 8.6Version 8.4Version 8.3- Updated:
db:list-details
: attributes with name of database and date of backup added to results. - Updated:
db:backups
now include attributes with name of database and date of backup. - Updated: Value Indexes: raise error if no index exists.
Version 8.2- Added:
db:output-cache
- Removed:
db:event
Version 7.9Version 7.8.2Version 7.8Version 7.7Version 7.6- Updated:
db:create
: allow more than one input and path.
Version 7.5Version 7.3Version 7.2.1Version 7.1Version 7.0
⚡Generated with XQuery