Changes

Jump to navigation Jump to search
243 bytes added ,  04:37, 4 January 2016
The following implementation-defined annotations are available:
* {{Code|%basex:inline([limit])}} enforces the inlining of a function. Example:The inlining limit can be specified as argument. Inlining can be disabled by specifying {{Code|0}}.
'''Example:''' <pre class="brush:xquery">declare %basex:inline(0) function local:e() { error() };local:e()</pre> '''Result:''' <pre class="brush:xml">Stopped at query.xq, 1/53:[FOER0000] Halted on error(). Stack Trace:- query.xq, 2/9</pre> In the next example, function inlining was disabled globally by assigning {{Code|0}} to the [[Options#INLINELIMIT|INLINELIMIT]] option. However, annotation is enforced to a single function: '''Example:'''
<pre class="brush:xquery">
declare option db:inlinelimit '0';
</pre>
In this The query, function inlining has been deactivated by setting [[Options#INLINELIMIT|INLINELIMIT]] will be optimized to {{Code|0}}. The annotation enforces inlining for the given function, though, resulting in the optimized query expression {{Code|123}}. If an integer is specified as annotation argument, it will be interpreted a local inline limit.
* {{Code|%basex:lazy}} enforces the lazy evaluation of a global variable. Example:
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu