Changes

Jump to navigation Jump to search
No change in size ,  21:19, 19 July 2022
no edit summary
* {{Code|db:create("DB", "/home/dir/", "docs/dir")}} creates the database {{Code|DB}} and adds the documents in {{Code|/home/dir}} to the database under the path {{Code|docs/dir}}.
* <code>db:create("DB", file:list('.'), (), map { 'ftindex': true() })</code> adds all files of the current working directory to a new database, preserving relative filesystem paths and creating a full-text index.
|}
 
==db:drop==
 
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|db:drop|$db as xs:string|empty-sequence()}}
|-
| '''Summary'''
|Drops the database {{Code|$db}} and all connected resources.
|-
| '''Errors'''
|{{Error|open|#Errors}} the addressed database does not exist or could not be opened.<br/>{{Error|lock|#Errors}} a database is opened by another process.<br/>{{Error|conflict|#Errors}} the same database was addressed more than once.
|-
| '''Examples'''
|
* {{Code|db:drop("DB")}} drops the database {{Code|DB}}.
|}
| '''Errors'''
|{{Error|open|#Errors}} the addressed database does not exist or could not be opened.
|}
 
==db:drop==
 
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|db:drop|$db as xs:string|empty-sequence()}}
|-
| '''Summary'''
|Drops the database {{Code|$db}} and all connected resources.
|-
| '''Errors'''
|{{Error|open|#Errors}} the addressed database does not exist or could not be opened.<br/>{{Error|lock|#Errors}} a database is opened by another process.<br/>{{Error|conflict|#Errors}} the same database was addressed more than once.
|-
| '''Examples'''
|
* {{Code|db:drop("DB")}} drops the database {{Code|DB}}.
|}
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu