Changes

Jump to navigation Jump to search
830 bytes removed ,  18:39, 1 December 2023
m
Text replacement - "syntaxhighlight" to "pre"
Lines starting with <code>#</code> are interpreted as comments and are skipped. With the following script, a database is created, two documents are added to it, and a query is performed:
<syntaxhighlight pre lang="xml">
CREATE DB test
ADD TO embedded.xml <root>embedded</root>
XQUERY <hits>{ count(//text()) }</hits>
CLOSE
</syntaxhighlightpre>
===XML Syntax===
The XML syntax provides more flexibility here. Multiple commands can be enclosed by a {{Code|<commands/>}} root element. Some commands, such as {{Command|ADD}}, allow you to directly embed XML documents. If you want to embed XML in XQuery expressions, entities should be encoded, or the {{Code|CDATA}} syntax should be used:
<syntaxhighlight pre lang="xml">
<commands>
<create-db name='test'/>
<close/>
</commands>
</syntaxhighlightpre>
==Glob Syntax==
|- valign="top"
| '''Summary'''
|Creates a new database with the specified {{Code|name}} and, optionally, an initial {{Code|input}}, and opens it. An existing database will be overwritten.<br />The input can be a file or directory path to XML documents, a remote URL, or a string containing XML:
* {{Code|name}} must be a [[#Valid Names|valid database name]]
* database creation can be controlled by setting [[Options#Create Options|Create Options]]
==OPEN==
 
{{Announce|Updated with Version 10:}} {{Code|path}} argument dropped.
{| width='100%'
==DIR==
 
{{Announce|Introduced with Version 10.}}
{| width='100%'
=Backups=
 
{{Announce|Introduced with Version 10:}} Support for general data ([[User Management|registered users]], [[Job Module#Services|scheduled services]] and [[Store Module|key-value stores]]).
==CREATE BACKUP==
 
{{Announce|Updated with Version 10:}} Support for comments.
{| width='100%'
==GET==
 
{{Announce|Introduced with Version 10.}} The old {{Code|GET}} command has been renamed to {{Command|SHOW OPTIONS}}.
{| width='100%'
==BINARY GET==
 
{{Announce|Updated with Version 10:}} Renamed (before: {{Code|RETRIEVE}}).
{| width='100%'
==PUT==
 
{{Announce|Updated with Version 10:}} Renamed (before: {{Code|REPLACE}}).
{| width='100%'
==BINARY PUT==
 
{{Announce|Updated with Version 10:}} Renamed (before: {{Code|STORE}}).
{| width='100%'
==SHOW OPTIONS==
 
{{Announce|Updated with Version 10:}} Renamed (before: {{Code|GET}}).
{| width='100%'
;Version 7.0
* Added: {{Command|FLUSH}}, {{CommandCode|RETRIEVE}}, {{CommandCode|STORE}}.
* Updated: {{Command|ADD}}: simplified arguments.
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu