Changes

Jump to navigation Jump to search
126 bytes removed ,  15:30, 10 April 2019
no edit summary
* {{Code|query}}: Evaluate an XQuery expression. If a database or database path is specified in the URL, it is used as initial query context.
* {{Code|command}}: Execute a single [[Commands|database command]].
* {{Code|run}}: Evaluate an XQuery file or command script located on the server. The file path is resolved against the directory specified by <code>[[Options#WEBPATH{{Option|RESTPATH]]</code> }} (before, it was resolved against <code>[[Options#WEBPATH{{Option|WEBPATH]]</code>}}).
; Examples
The name of the root element determines how the body will be evaluated:
* {{Code|commands}} (new since {{Version|9.0}}!): Run [[Commands#Command Scripts|Command Script]]
* {{Code|query}}: Execute XQuery expression
* {{Code|run}}: Run server-side file (query or command script)
* {{Code|command}}: Execute single command
With {{Version|9.0}}, The root element may be bound to the optional REST namespace of the root element has become optional. Existing command scripts can be sent to the server without any modifications:
* Create an empty database and return database information:
</pre>
* Bind value to the {{Code|$person}} variable and run query <code>find-person.xq</code>, which must be located in the directory specified by <code>[[Options#WEBPATH{{Option|WEBPATH]]</code>}}:
<pre class="brush:xml">
<run>
;Version 9.0
* Added: Support for command scripts in the [[#POST Method|POST_MethodPOST Method]].* Updated: The REST namespace in the [[#POST Method|POST_MethodPOST Method]] has become optional.
;Version 8.1
* Added: Support for input-specific content-type parameters
* Updated: The [[#GET Method|run operation]] now resolves file paths against the [[Options#RESTPATH{{Option|RESTPATH]] }} option.
;Version 8.0
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu