Changes

Jump to navigation Jump to search
43 bytes removed ,  20:28, 18 July 2022
no edit summary
!Description
|-
|[[{{Function|Database Module#db:open|db:open]]}}
|{{Code|db:open("db", "path/to/docs")}}
|Returns all documents that are found in the database {{Code|db}} at the (optional) path {{Code|path/to/docs}}.
!Description
|-
|[[{{Function|Database Module#db:name|db:name]]}}
|{{Code|db:name($node)}}
|Returns the name of the database in which the specified {{Code|$node}} is stored.
|-
|[[{{Function|Database Module#db:path|db:path]]}}
|{{Code|db:path($node)}}
|Returns the path of the database document in which the specified {{Code|$node}} is stored.
==Binary Files==
The <code>[[Commands#RETRIEVE|RETRIEVE]]</code> command and the <code>[[{{Function|Database Module#db:get-binary|db:get-binary]]</code> }} function can be used to return files in their native byte representation.
If the API you use does not support binary output (this is e.g. the case for various [[Clients|Client]] language bindings), you need to convert your binary data to its string representation before returning it to the client:
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu