Changes

Jump to navigation Jump to search
460 bytes added ,  18:26, 20 August 2018
=Option Declarations=
 
==Database Options==
[[Options|Local database options]] can be set in the prolog of an XQuery main module. In the option declaration, options need to be bound to the [[Database Module]] namespace. All values will be reset after the evaluation of a query:
declare option db:chop 'false';
doc('doc.xml')
</pre>
 
==XQuery Locks==
 
If [[Transactions#XQuery_Locks|XQuery Locks]] are defined in the query prolog of a module, access to functions of this module locks will be controlled by the central transaction management.
 
If the following XQuery code is called by two clients in parallel, the queries will be evaluated one after another:
 
<pre class="brush:xquery">
declare option basex:write-lock 'FILES';
file:write('config.xml', <config/>)
</pre>
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu