Changes

Jump to navigation Jump to search
17 bytes removed ,  19:53, 1 September 2012
no edit summary
The options listed on this page influence the way how database [[Commands|commands]] are executed and XQuery expressions are evaluated. Options are divided into [[#global options|global]] options, which are valid for all BaseX instances, and local options, which are specific to a client or session. Values of options are either ''strings'', ''numbers'' or ''booleans''.
* Values can be changed with the [[Commands#SET|SET]] command and requested with the [[Commands#GET|GET]] command. All values are ''statically bound'' Various ways exist to a database session; they stay valid until they are changed once again by another operation. If an option is of type boolean, access and if no value is specified, its existing value will be inverted.change options:
* The current value of an option can be requested with the [[Commands#GET|GET]] and changed with the [[Commands#SET|SET]] command. All values are ''static'': they stay valid until they are changed once again by another operation. If an option is of type ''boolean'', and if no value is specified, its existing value will be inverted. * {{Version|7.4}}: Initial values for options can now also be specified via system properties, which can e.g. be passed on with the [http://docs.oracle.com/javase/1.4.2/docs/tooldocs/windows/java.html#options -D flag] on command line, or using [http://docs.oracle.com/javase/6/docs/api/java/lang/System.html#setProperty(java.lang.String,%20java.lang.String) System.setProperty()] before creating a BaseX instance. The specified keys needs to be prefixed with {{Code|org.basex.}}. An example:
<pre class="brush:bash">
</pre>
* Options can also be set in the prolog of an XQuery expressionsexpression. In the option declaration, keys options need to be prefixed with {{Code|db:}}bound to the [[Database Module]] namespace. All values will be reset after the evaluation of a query:
<pre class="brush:xquery">
declare option db:key chop 'valuefalse';
...
</pre>
* {{Version|7.4}}: Options can be locally set in XQuery via pragma expressions. Note that, at least for now, local pragmas will have no effect on most [[Update|update operations]], as these will be evaluated at the very end of a query. The following query preserves whitespaces from the parsed XML stringAnother example:
<pre class="brush:xquery">
Bureaucrats, editor, reviewer, Administrators
12,250

edits

Navigation menu