|
* {{Code|db:node-pre(doc("input"))}} returns {{Code|0}} if the database {{Code|input}} contains a single document.
|}
==db:name==
{{Mark|Added with Version 7.7}}:
{| width='100%'
|-
| width='90' | '''Signatures'''
|{{Func|db:name|$node as node()|xs:string}}
|-
| '''Summary'''
|Returns the name of the database in which the specified [[#Database Nodes|database node]] {{Code|$node}} is stored.
|-
| '''Errors'''
|{{Error|BXDB0001|#Errors}} {{Code|$nodes}} contains a node which is not stored in a database.
|}
==db:path==
{{Mark|Added with Version 7.7}}:
{| width='100%'
|-
| width='90' | '''Signatures'''
|{{Func|db:path|$node as node()|xs:string}}
|-
| '''Summary'''
|Returns the path of the database document in which the specified [[#Database Nodes|database node]] {{Code|$node}} is stored.
|-
| '''Errors'''
|{{Error|BXDB0001|#Errors}} {{Code|$nodes}} contains a node which is not stored in a database.
|}
=Helper Functions=
==db:name==
{{Mark|Added with Version 7.7}}:
{| width='100%'
|-
| width='90' | '''Signatures'''
|{{Func|db:name|$node as node()|xs:string}}
|-
| '''Summary'''
|Returns the name of the database in which the specified [[#Database Nodes|database node]] {{Code|$node}} is stored.
|-
| '''Errors'''
|{{Error|BXDB0001|#Errors}} {{Code|$nodes}} contains a node which is not stored in a database.
|}
==db:path==
{{Mark|Added with Version 7.7}}:
{| width='100%'
|-
| width='90' | '''Signatures'''
|{{Func|db:path|$node as node()|xs:string}}
|-
| '''Summary'''
|Returns the path of the database document in which the specified [[#Database Nodes|database node]] {{Code|$node}} is stored.
|-
| '''Errors'''
|{{Error|BXDB0001|#Errors}} {{Code|$nodes}} contains a node which is not stored in a database.
|}
==db:exists==