Changes

Jump to navigation Jump to search
1,198 bytes added ,  12:35, 17 June 2022
|-
| '''Summary'''
|If BaseX is running as [[Web Application]], trace output (generated via {{Code|fn:trace}}, {{Function|Profiling|prof:dump}} and similar functions) if is written to the [[Logging|database logs]]. If this option is disabled, trace output will be redirected to standard error, as it is known from the standalone version of BaseX.
|}
* The option can also be enabled on [[Command-Line Options#HTTP Server|command line]] via <code>-g</code>.
* It cannot be assigned via the {{Code|web.xml}} file, as it will be evaluated before the configuration files are parsed.
* The In addition to the [https://github.com/eclipse/jetty.project/blob/7cc552013eb4d05cb603ba0bc85d176c97957cd4/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipHandler.java#L187-L211 same Jetty defaults] of the web server will be applied (support for GET requests, exclusion of binaries, MSIE 6.0, etc.), POST and PUT requests are supported.
|}
===RESTXQERRORS===
 
{{Mark|Updated with BaseX 9.5:}} Additionally suppress stack trace in HTTP response.
{| width='100%'
===INLINELIMIT===
 
{{Mark|Updated with Version 9.5:}} default reduced to 50.
{| width='100%'
* Function inlining can be turned off by setting the value to {{Code|0}}.
* The limit can be locally overwritten via the [[XQuery Extensions#Function Inlining|%basex:inline]] annotation (follow the link to get more information on function inlining).
|}
 
===UNROLLLIMIT===
 
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|UNROLLLIMIT}}
|-
| '''Default'''
|{{Code|5}}
|-
| '''Summary'''
|This option controls the unroll limit:
* Loops with few iterations are ''unrolled'' by the XQuery compiler to enable further optimizations.
* If the limit is increased, more optimizations will take place, but the memory consumption and compile time will increase.
* See [[XQuery Optimizations#Loop Unrolling|Loop Unrolling]] for more details.
|}
 
===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], copies of all enclosed nodes will be created, and the copied nodes get new node identities. As a result, the following query yields <code>false</code>:
<syntaxhighlight lang="xquery">
let $a := <a/>
let $b := <b>{ $a }</b>
return $b/a is $a
</syntaxhighlight>
This step can be very expensive and memory consuming. If the option is disabled, child nodes will only be linked to the new parent nodes, and the upper query returns <code>true</code>.<br>The option should be used carefully as it changes the semantics of XQuery. It should preferably be used in [[XQuery Extensions#Database Pragmas|Pragmas]].
|}
| '''Summary'''
|By default, characters from external sources that are invalid in XML will trigger an error. If the option is set to <code>false</code>, these characters will be replaced with the Unicode replacement character <code>FFFD</code> (&#xFFFD;). The option affects [[Java Bindings]] and string conversion and input functions such as [[Archive Module#archive:create|archive:create]], [[Archive Module#archive:extract-text|archive:extract-text]], [[Archive Module#archive:update|archive:update]], and [[ZIP Module#zip:text-entry|zip:text-entry]].
|}
 
===WRAPJAVA===
 
{| width='100%'
|-
| width='120' | '''Signature'''
|{{Code|WRAPJAVA [mode]}}
|-
| '''Default'''
|{{Code|some}}
|-
| '''Summary'''
|Defines the way how values that result from Java code invocation will be converted to XQuery items. Allowed values: {{Code|none}}, {{Code|all}}, {{Code|some}}, {{Code|instance}}, and {{Code|void}}. See [[Java_Bindings#Conversion to XQuery|Java Bindings]] for further 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]].
|}
=Changelog=
 
;Version 9.7
* Updated: {{Option|GZIP}}: Support for POST and PUT requests.
 
;Version 9.6
* Added: {{Option|UNROLLLIMIT}}, {{Option|WRAPJAVA}}
;Version 9.5
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu