Changes

Jump to navigation Jump to search
1,365 bytes added ,  17:37, 24 April 2017
This page is linked from the [[Getting Started]] Section.
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 Two kinds of options are either ''strings'', ''numbers'' or ''booleans''.exist:
The {{Code|.basex}} * '''[[Configuration#Configuration FilesGlobal Options|configuration fileGlobal Options]] ''' are valid for all BaseX instances in the same JVM. This is parsed by every new local BaseX instanceparticularly relevant if you are working with the client/server architecture. It contains * '''Local options''' (all global options and, optionally, local options at the end of the fileremaining ones) are specific to a client or session.
Values of options are either ''strings'', ''numbers'' or ''booleans''. Options are ''static'' and not bound to a single operation (for example, the next command). Various ways exist to access and change options:
* The current value of an option can be requested with the {{Command|GET}} command. Local options can be changed via {{Command|SET}}. All values are ''static'': They stay valid until they are (all global options, except for {{Option|DEBUG}}, can only be changed once again by another operationat startup time). If an option is of type ''boolean'', and if no value is specified, its current value will be inverted. * The {{Code|.basex}} [[Configuration#Configuration Files|configuration file]] is parsed by every new local BaseX instance. It contains all global options. Local options can be specified at the end of the file after the {{Code|Local Options}} comment: <pre class="brush:perl"># General OptionsDEBUG = false... # Local OptionsCHOP = false</pre>
* Initial values for global options can 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 need to be prefixed with {{Code|org.basex.}}. An example:
===LOGPATH===
 
{{Mark|Updated with Version 8.5}}:
{| width='100%'
===FAIRLOCK===
 
{{Mark|Introduced with Version 8.6:}}
{| width='100%'
|-
| '''Default'''
|{{Code|truefalse}}
|-
| '''Summary'''
|Defines the locking strategy:
* If enabledBy default, read and write transactions will be treated equally (first in, first out). This non-fair is the default strategy, as it avoids starvation of update operationsused.* If disabled, read Read transactions will be favored, and transactions that access no databases can be evaluated, even if the limit of parallel transactions (specified via {{Option|PARALLEL}} has been reached. This prevents update operations from blocking all other requests (for example, the DBA can further be used to see which jobs are running, even if the queue is full).* If fair locking is enabled, read and write transactions will be treated equally (first in, first out). This avoids starvation of update operations, and it should be used if the prompt evaluation of update operations is critical.
|}
===CACHETIMEOUT===
 
{{Mark|Introduced with Version 8.5:}}
{| width='100%'
|-
| '''Summary'''
|Represents a password, which is used for accessing the server or an HTTP service:
* The default value will be overwritten if a client specifies its own credentials.
* If the default value is empty, login will only be possible if the client specifies credentials.
===AUTHMETHOD===
 
{{Mark|Updated with Version 8.5}}: {{Code|custom}} value added.
{| width='100%'
|}
===CACHERESTXQPARSERESTXQ=== {{Mark|Introduced with Version 8.6}}: replacing {{Code|CACHERESTXQ}}.
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|CACHERESTXQPARSERESTXQ}}
|-
| '''Default'''
|{{Code|false3}}
|-
| '''Summary'''
|Disables Timeout after which the timestamp check when RESTXQ directory will be parsed for changes:* If {{Code|0}} is specified, the directory will be parsed every time a RESTXQ function is called.* A positive value defines the idle time in seconds after which parsing will be enforced. The default value is {{Code|3}}: Changes in the RESTXQ directory will be detected after 3 seconds without RESTXQ filesfunction calls.* Monitoring is completely disabled if a negative value is specified.  See [[RESTXQ#Preliminaries|RESTXQ Preliminaries]] for more details.
|}
|-
| '''Summary'''
|If this option is turned on, new databases will be exclusively created in main memory. :* Most queries will be evaluated faster in main -memory mode, but all data is lost if the BaseX instance in which the database was created is shut down. The value of this option * It is not possible to store binary resources in a main-memory database.* A main-memory database will be assigned once have no disk representation. However, it is possible to export the database via the {{Command|EXPORT}} command, and create a new databasefrom the exported file in a second step.* This option will not be available for [[Database Module#db:create|db:create]], and cannot because the database would not be changed accessible anymore after thatdatabase creation, i. e., outside the query scope.
|}
|-
| '''Summary'''
|Defines a [[Parsers|parser]] for importing new files to the database. Currently, 'XML', 'JSON', 'CSV', 'TEXT', 'HTML' are available as parsers. HTML will be parsed as normal XML files if [http://vrici.lojban.org/~cowan/XML/tagsoup/ [Parsers#HTML_Parser|Tagsoup]] is not found in the classpath.
|}
|-
| '''Summary'''
|This option controls inlining of XQuery functions:* The XQuery compiler inlines functions to speed up query evaluation. * Inlining will only take place if a function body is not too large (i.e., if it does not contain too many expressions). * With this option, this maximum number of expressions can be specified.<br/>* Function inlining can be turned off by setting the value to {{Code|0}}. * The limit can be locally overridden overwritten via the <code>[[XQuery_3.0XQuery Extensions#Annotationsbasex:inline|%basex:inline]]</code> annotation(follow the link to get more information on function inlining).
|}
;Version 8.6
* Added: {{Option|FAIRLOCK}}, {{Option|PARSERESTXQ}}* Removed: {{Code|GLOBALLOCK}} (always exclusive use of database lock)
* Removed: {{Code|QUERYPATH}} (will now be internally assigned)
* Removed: {{Code|CACHERESTXQ}} (replaced with PARSERESTXQ)
;Version 8.5
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu