Changes

Jump to navigation Jump to search
3,086 bytes added ,  15:17, 1 October 2019
</pre>
* In XQuery, local options can be set via option declarations and pragmas (see [[XQuery Extensions#Pragmas|pragmas]]).
If options are changed by operations in the [[GUI]], the underlying commands will be listed in the [[GUI#Visualizations|Info View]].<br/><br/>
|-
| '''Default'''
|<code>[[Configuration#Database Directory|{home}/BaseXData]]</code> or <code>[[Configuration#Database Directory|{home}/data]]</code>
|-
| '''Summary'''
|-
| '''Default'''
|<code>[[Configuration#Database Directory|{home}/BaseXReporepo]]</code>
|-
| '''Summary'''
===FAIRLOCK===
 
{{Mark|Introduced with Version 8.6:}}
{| width='100%'
| '''Summary'''
|Defines the locking strategy:
* By default, non-fair is used. 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 . 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.
|}
| '''Summary'''
|This is a list of hosts that should be directly accessed. If the value is an empty string, it will be ignored.
|}
 
===IGNOREHOSTNAME===
 
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|IGNOREHOSTNAME [boolean]}}
|-
| '''Default'''
|{{Code|false}}
|-
| '''Summary'''
|If this option is enabled, hostnames of certificates will not be verified. Use {{Option|IGNORECERT}} to completely disable certificate verification.
|}
|-
| '''Summary'''
|This option can be turned on to ignore untrusted certificates when connecting to servers. Please use this option carefullyUse {{Option|IGNOREHOSTNAME}} to suppress only the hostname verification.
|}
|-
| '''Summary'''
|Denotes the maximum allowed number of parallel [[Transaction Management|transactions]]:* If {{Option|FAIRLOCK}} is enabled, the number of parallel transactions will never exceed the specified value.<br/>Note * If the option is disabled (which is the default), the limit only applies to transactions that a access databases.* The main reason for allowing parallel operations is to prevent slow transactions from blocking all other operations. A higher number of parallel operations may increase disk activity and thus slow down queries. In some cases, a single transaction may even give you better results than any parallel activity. The main reason for allowing parallel operations is to prevent slow transactions from blocking all other operations.
|}
==HTTP Services==
If BaseX is run as web servlet, the Most HTTP options must be specified are defined in the {{Code|jetty.xml}} and {{Code|web.xml}} configuration files in the <code>[https://github.com/BaseXdb/basex/tree/master/basex-api/src/main/webapp/WEB-INF webapp/WEB-INF]</code> directory and . Some additional BaseX-specific options exist that will be set before the {{Code|jetty.xml}} and {{Code|web.xml}} configuration files.server is started:
===WEBPATH===
|-
| '''Default'''
|<code>[[Configuration#Database Directory|{home}/BaseXWeb]]</code> or <code>[[Configuration#Database Directory|{home}/webapp]]</code>
|-
| '''Summary'''
===PARSERESTXQ===
 
{{Mark|Introduced with Version 8.6}}: replacing {{Code|CACHERESTXQ}}.
{| width='100%'
See [[RESTXQ#Preliminaries|RESTXQ Preliminaries]] for more details.
|}
 
===RESTXQERRORS===
 
{{Mark|Introduced with Version 9.2.}}
 
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|RESTXQERRORS}}
|-
| '''Default'''
|{{Code|true}}
|-
| '''Summary'''
|Reports parsing errors in XQuery modules in the RESTXQ directory back to the client. By default, this option is enabled. On productive systems, it can be disabled in order to suppress errors that should not be seen by the client.
|}
|-
| '''Summary'''
|By default, if BaseX is run as [[Web Application]], a the database server instance will be started as soon as the first HTTP service is called. The server in addition, which can then be addressed by other BaseX clients in parallel to [[Clients]] via the HTTP servicesdatabase port (see {{Option|PORT}}).<br/>If the option is set to {{Code|falsetrue}}, the no database server will be disabledlaunched.
|}
|-
| '''Summary'''
|If this option is activatedenabled, and if new all resources are added to a database, all files that are not filtered out by the {{Option|CREATEFILTER}} option while being added to a database will be added stored as ''[[Binary Data|raw'' files ]] instead (i.e., in their binary representation).
|}
|-
| '''Summary'''
|Defines a [[Parsers|parser]] for importing new files to the database. Currently, 'Available parsers are {{Code|XML'}}, '{{Code|JSON'}}, '{{Code|CSV'}}, '{{Code|TEXT'}}, '{{Code|HTML' are available as parsers}}, and {{Code|RAW}}. HTML input will be parsed as normal XML files documents if [[Parsers#HTML_Parser|Tagsoup]] is not found in the classpath.
|}
|-
| '''Summary'''
|Specifies the way how HTML data will be parsed. Keys and values are delimited with <code>=</code>, and multiple options are delimited with <code>,</code>. The available options are described in the [[Parsers#Options|Parsers]] article.
|-
| '''Examples'''
|* <code>encoding=Shift-JIS,nons=true</code> parses the input as Sihft-JIS and suppresses namespaces.* <code>lexical=true</code> preserves comments.
|}
* The flag should be turned off if a document contains [[Full-Text#Mixed Content|mixed content]].
* The flag can also be turned off on [[Command-Line Options#BaseX Standalone|command line]] via <code>-w</code>.
* If the <code>xml:space="preserve"</code> attribute is attached to an element, chopping will be turned off for all descendant text nodes.  In the following example document, the whitespaces in the text nodes of the {{Code|text}} element will not be chopped:
<pre class="brush:xml">
<xml>
</xml>
</pre>
It is recommendable to additionally assign <code>indent=no</code> to the {{Option|SERIALIZER}} option; otherwise the serialized documents will automatically be indented.
|}
|-
| '''Summary'''
|Specifies a Semicolon-separated list of XML catalog file files to locally resolve DTDsURIs. See the entry on [[Catalog Resolver]]s for more details.
|}
| '''Summary'''
|This option affects the [[Indexes#Performance|construction]] of new value indexes. It controls the number of index build operations that are performed before writing partial index data to disk:
* By default, if the value is set to {{Code|0}}, some heuristics are applied, based on the current memory consumption. Usually, this works fine.
* If explicit garbage collection is disabled when running Java (e.g. via the JVM option {{Code|-XX:+DisableExplicitGC}}), you may need to choose a custom split size.
* You can e. g. start with {{Code|1000000}} (one million) index operations and adjust this value in the next steps.
* The larger the assigned value is, the less splits will take place, and the more main memory will be required.
* By default, if the value is set to {{Code|0}}, some heuristics are applied, based on the current memory consumption.
|}
| '''Summary'''
|Prints more information on internal query rewritings, optimizations, and performance. By default, this info is shown in the [[GUI#Visualizations|Info View]] in the GUI. It can also be activated on [[Command-Line Options#BaseX Standalone|command line]] via <code>-V</code>.
|}
 
===XQUERY3===
 
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|XQUERY3}}
|-
| '''Default'''
|{{Code|true}}
|-
| '''Summary'''
|Enables all [[XQuery 3.0]] features supported by BaseX. If this option is set to {{Code|false}}, the XQuery parser will only accept expressions of the XQuery 1.0 specification.
|}
|-
| '''Summary'''
|Allows queries to both contain updating and non-updating expressions. All updating constraints will be turned off, and nodes to be returned will be copied before they are modified by an updating expression. By default, in compliance with the XQuery Update Facility, this option is set to {{Code|false}}, because the XQuery Update Facility does not allow an updating query to . See [[XQuery Update#Returning Results|return resultsReturning Results]]for more details.
|}
* With this option, this maximum number of expressions can be specified.
* Function inlining can be turned off by setting the value to {{Code|0}}.
* The limit can be locally overwritten via the [[XQuery Extensions#basex:inlineFunction Inlining|%basex:inline]] annotation (follow the link to get more information on function inlining).
|}
| '''Summary'''
|Specifies how many stack frames of [http://en.wikipedia.org/wiki/Tail_call tail-calls] are allowed on the stack at any time. When this limit is reached, tail-call optimization takes place and some call frames are eliminated. The feature can be turned off by setting the value to {{Code|-1}}.
|}
 
===WITHDB===
 
{{Mark|Introduced with Version 9.3.}}
 
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|WITHDB}}
|-
| '''Default'''
|{{Code|true}}
|-
| '''Summary'''
|By default, URIs specified in the [[Databases#XML Documents|fn:doc]] and [[Databases#XML Documents|fn:collection]] functions will also be resolved against existing databases. If {{Function|Database|db:open}} is consistently used to access database documents, it is recommendable to disable this option:
* Access to local and external resources will be faster, as the database lookup will be skipped.
* No locks will be created by the two functions (see [[Transaction Management#Limitations|limitations of database locking]] for more details).
|}
| '''Summary'''
|Specifies how often a query will be evaluated. The result is serialized only once, and the measured times are averages of all runs. This option can also be changed on [[Command-Line Options#BaseX Standalone|command line]] via <code>-r</code>.
|}
 
===ENFORCEINDEX===
 
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|ENFORCEINDEX [boolean]}}
|-
| '''Default'''
|{{Code|false}}
|-
| '''Summary'''
|Enforces index rewritings in path expressions (see [[Indexes#Enforce Rewritings|Enforce Rewritings]] for details).
|}
 
===COPYNODE===
 
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|COPYNODE [boolean]}}
|-
| '''Default'''
|{{Code|true}}
|-
| '''Summary'''
|When creating new nodes in XQuery via [https://www.w3.org/TR/xquery-31/#id-constructors Node Constructors], all enclosed nodes will be copied, and all resulting nodes will get new node identities. This step can be very expensive, and it can be disabled with this option. The option should be used carefully, as it changes the standard behavior of XQuery. It should preferrably be used in [[XQuery Extensions#Database Pragmas|Pragmas]].
|}
| '''Examples'''
|
* <code>indent=no</code> : disables automatic indentation of XML nodes. This is usually a good choice when working with [[Full-Text#Mixed Content|Mixed-Content Data]].
* <code>encoding=US-ASCII,omit-xml-declaration=no</code> : sets the encoding to {{Code|US-ASCII}} and prints the XML declaration.
* <code>item-separator=,,</code> : separates serialized items by a single comma.
|-
| '''Summary'''
|Contains parameters for exporting all resources of a databaseand writing files after updates via the {{Option|WRITEBACK}} option. Keys and values are separated by equality signs, multiple parameters are delimited by commas. See [[Serialization]] for more details.|-| '''Examples'''|* <code>indent=no,omit-xml-declaration=no</code> : disables automatic indentation of XML nodes, outputs the XML declaration.
|}
|}
===DOTPLANFULLPLAN=== {| width='100%'|-| width='120' | '''Signature'''|{{Code|DOTPLAN [boolean]}}|-| '''Default'''|{{Code|false}}|-| '''Summary'''|Saves the query plan of an XQuery expression as {{Code|.dot}} file in the current working directory, using the [https://en.wikipedia.org/wiki/DOT_(graph_description_language) graph description language]. The output file can e.g. be visualized with [http://www.graphviz.org Graphviz].|}
===DOTCOMPACT==={{Mark|Introduced with Version 9.2:}}
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|DOTCOMPACT FULLPLAN [boolean]}}
|-
| '''Default'''
|-
| '''Summary'''
|Chooses a compact dot representationAttaches the file path, line and column of the expressions in the original query string to the query plan. Values (items and sequences) have no input information attached.
|}
|-
| '''Summary'''
|Propagates updates on main-memory instances of files that have been retrieved via [[Databases#XML Documents|fn:doc]] and [[Databases#XML Documents|fn:collection]] back to disk. :* This option can also be activated on [[Command-Line Options#BaseX Standalone|command line]] via <code>-u</code>. * Please note take in mind that, when turning this option on, no backup will be created from your original files will not .* The serialization options can be backed upcontrolled via the {{Option|EXPORTER}} option.
|}
=Changelog=
 
;Version 9.3
* Added: {{Option|WITHDB}}
 
;Version 9.2
* Added: {{Option|RESTXQERRORS}}, {{Option|FULLPLAN}}
* Removed: <code>DOTPLAN</code>, <code>DOTCOMPACT</code>
 
;Version 9.0
* Added: {{Option|ENFORCEINDEX}}, {{Option|COPYNODE}}, {{Option|IGNOREHOSTNAME}}
;Version 8.6
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu