Changes

Jump to navigation Jump to search
101 bytes removed ,  14:25, 23 June 2020
no edit summary
==XQuery Locks==
If [[Transactions#XQuery_Locks|XQuery Locks]] locks are defined declared in the query prolog of a modulevia the {{Code|basex:lock}} option, 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: <syntaxhighlight lang="xquery">declare option basex:write-lock 'CONFIGLOCK';file:write('configSee [[Transaction Management#Options|Transaction Management]] for further details.xml', <config/>)</syntaxhighlight>
=Pragmas=
This pragma can be helpful when debugging your code.
In analogy with option declarations and function annotations, XQuery locks can also set via pragmas. See [[TransactionsTransaction Management#XQuery_LocksOptions|XQuery LocksTransaction Management]] can also set via pragmas:for details and examples.
<syntaxhighlight lang="xquery">
==Database Pragmas==
All [[Options|local Local database options]] can also be assigned via pragmas. Some examples:
* Enforce query to be rewritten for index access. This can e. g. be helpful if the name of a database is not static (see [[Indexes#Enforce Rewritings|Enforce Rewritings]] for more examples):
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu