|}
==db:retrievenode-id==
{| width='100%'
|-
| width='90' | '''Signatures'''
|{{Func|db:retrievenode-id|$db nodes as xs:string, $path as xs:stringnode()*|xs:base64Binaryinteger*}}
|-
| '''Summary'''
|Returns a binary database resource addressed the ''id'' values of the nodes supplied by the database {{Code|$db}} and {{Code|$pathnodes}} as , which must all be [[Streaming Module#Database Nodes|streamabledatabase nodes]] {{Code|xs:base64Binary}}.<br/>Each database node has a persistent ''id'', which remains valid after update operations. If so far no updates have been performed, the ''pre'' value is equal to the ''id'' value and can be requested instead, which provides access to database nodes in constant time.
|-
| '''Errors'''
|{{Error|BXDB0003BXDB0001|#Errors}} the database is not ''persistent'' (stored on disk).<br/>{{Error|FODC0002Code|XQuery Errors#Functions Errors$nodes}} the addressed resource cannot be retrieved.<br/>{{Error|FODC0007|XQuery Errors#Functions Errors}} the specified path contains a node which is invalid.|-| '''Examples'''|* {{Code|declare option output:method 'raw';<br/>db:retrieve("DB", "music/01.mp3")}} returns the specified audio file as raw data.* <code><nowiki>stream:materialize(db:retrieve("DB", "music/01.mp3"))</nowiki></code> returns not stored in a materialized representation of the streamable resultdatabase.
|}
==db:node-idpre==
{| width='100%'
|-
| width='90' | '''Signatures'''
|{{Func|db:node-idpre|$nodes as node()*|xs:integer*}}
|-
| '''Summary'''
|Returns the ''idpre'' values of the nodes supplied by {{Code|$nodes}}, which must all be [[#Database Nodes|database nodes]].<br/>Each database node has a persistent ''id'', which remains valid after update operations. If so far no updates have been performed, the The ''pre'' value provides access to a database node in constant time, but it is equal to the ''idtransient'' value and can be requested instead, which provides access to i.e., it may change when database nodes in constant timeupdates are performed.
|-
| '''Errors'''
|{{Error|BXDB0001|#Errors}} {{Code|$nodes}} contains a node which is not stored in a database.
|-
| '''Examples'''
|
* {{Code|db:node-pre(doc("input"))}} returns {{Code|0}} if the database {{Code|input}} contains a single document.
|}
==db:node-preretrieve==
{| width='100%'
|-
| width='90' | '''Signatures'''
|{{Func|db:node-preretrieve|$nodes db as node()*xs:string, $path as xs:string|xs:integer*base64Binary}}
|-
| '''Summary'''
|Returns a binary database resource addressed by the ''pre'' values of the nodes supplied by database {{Code|$db}} and {{Code|$nodespath}}, which must all be as [[#Database NodesStreaming Module|database nodesstreamable]]. <br/>The ''pre'' value provides access to a database node in constant time, but it is ''transient'', i.e., it may change when database updates are performed{{Code|xs:base64Binary}}.
|-
| '''Errors'''
|{{Error|BXDB0001BXDB0003|#Errors}} the database is not ''persistent'' (stored on disk).<br/>{{Error|FODC0002|XQuery Errors#Functions Errors}} the addressed resource cannot be retrieved.<br/>{{CodeError|$nodesFODC0007|XQuery Errors#Functions Errors}} contains a node which the specified path is not stored in a databaseinvalid.
|-
| '''Examples'''
|
* {{Code|declare option output:method 'raw';<br/>db:node-pre(docretrieve("inputDB", "music/01.mp3"))}} returns {{Code|0}} if the database {{Code|input}} contains specified audio file as raw data.* <code><nowiki>stream:materialize(db:retrieve("DB", "music/01.mp3"))</nowiki></code> returns a single documentmaterialized representation of the streamable result.
|}