Changes

Jump to navigation Jump to search
1,238 bytes added ,  10:58, 15 January 2020
no edit summary
==db:dir==
 
{{Mark|Introduced with Version 9.2:}}
{| width='100%'
==db:open-pre==
 
{{Mark|Updated with Version 9.3}}: Support for multiple integers.
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|db:open-pre|$db as xs:string, $pre pres as xs:integer*|node()*}}
|-
| '''Summary'''
|Opens the database {{Code|$db}} and returns the node all distinct nodes with the specified pre values {{Code|$prepres}} valuein document order.<br/>The [[Node Storage#PRE Value|PRE value]] provides very fast access to an existing database node, but it will change whenever a node with a smaller ''pre'' values is added to or deleted from a database.
|-
| '''Errors'''
==db:open-id==
 
{{Mark|Updated with Version 9.3}}: Support for multiple integers.
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|db:open-id|$db as xs:string, $id ids as xs:integer*|node()*}}
|-
| '''Summary'''
|Opens the database {{Code|$db}} and returns the node all distinct nodes with the specified {{Code|$idids}} valuein document order.<br />Each database node has a ''persistent'' [[Node Storage#ID Value|ID value]]. Access to the node id can be sped up by turning on the {{Option|UPDINDEX}} option.
|-
| '''Errors'''
|-
| '''Summary'''
|Returns the ''pre'' values of the nodes supplied by specified {{Code|$nodes}}, which must all be [[#Database Nodes|database nodes]].<br/>The [[Node Storage#PRE Value|PRE value]] provides very fast access to an existing database node, but it will change whenever a node with a smaller ''pre'' values is added to or deleted from a database.
|-
| '''Errors'''
|-
| '''Summary'''
|Returns the ''id'' values of the nodes supplied by specified {{Code|$nodes}}, which must all be [[#Database Nodes|database nodes]].<br/>Each database node has a ''persistent'' [[Node Storage#ID Value|ID value]]. Access to the node id can be sped up by turning on the {{Option|UPDINDEX}} option.
|-
| '''Errors'''
|-
| '''Summary'''
|Returns all text nodes of the database {{Code|$db}} that whose values are located in between the {{Code|$min}} and {{Code|$max}} strings and that are stored in the text index.
|-
| '''Errors'''
==db:add==
 
{{Mark|Updated with Version 9.3:}} Allow empty {{Code|$path}} argument.
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|db:add|$db as xs:string, $input as item()|empty-sequence()}}<br/>{{Func|db:add|$db as xs:string, $input as item(), $path as xs:string?|empty-sequence()}}<br/>{{Func|db:add|$db as xs:string, $input as item(), $path as xs:string?, $options as map(*)?|empty-sequence()|empty-sequence()}}
|-
| '''Summary'''
|Adds documents specified by {{Code|$input}} to the database {{Code|$db}} with the specified {{Code|$path}}:
* A document with the same path may occur more than once in a database. If you want to enforce single instances, use [[#db:replace|db:replace]] instead.
* See [[#db:create|db:create]] for more details on the input argumentand path arguments.
* The parsing behavior can be controlled via {{Code|$options}}:
** allowed options are {{Option|ADDCACHE}} and the [[Options#Parsing|parsing]] and [[Options#XML Parsing|XML parsing]] options, all in lower case
* {{Code|db:drop-backup("DB")}} drops all backups of the database {{Code|DB}}.
* {{Code|db:drop-backup("DB-2014-03-13-17-36-44")}} drops the specific backup file {{Code|DB-2014-03-13-17-36-44.zip}} of the database {{Code|DB}}.
|}
 
==db:alter-backup==
 
{{Mark|Introduced with Version 9.3:}}
 
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|db:alter-backup|$name as xs:string, $new-name as xs:string|empty-sequence()}}
|-
| '''Summary'''
|Renames all backups of the database with the specified {{Code|$name}} to {{Code|$new-name}}. The directory inside the archive will be renamed as well. If the given {{Code|$name}} points to a specific backup file, only this specific backup file will be renamed.
|-
| '''Errors'''
|{{Error|backup|#Errors}} No backup file found.<br/>{{Error|name|#Errors}} invalid database name.<br/>{{Error|conflict|#Errors}} the same database was addressed more than once.
|-
| '''Examples'''
|
* {{Code|db:alter-backup("DB", "DB2)}} renames all backups of the database {{Code|DB}} to {{Code|DB2}}.
|}
=Changelog=
 
;Version 9.3
 
* Added: [[#db:alter-backup|db:alter-backup]]
* Updated: [[#db:open-id|db:open-id]], [[#db:open-pre|db:open-pre]]: support for multiple integers
;Version 9.2
* Added: [[#db:dir|db:dir]]
* Updated: [[#db:add|db:add]]: {{Code|$path}} allow empty path argument
;Version 9.0
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu