Changes

Jump to navigation Jump to search
4 bytes removed ,  19:47, 18 July 2022
m
Text replacement - "\[\[#(job:[^|]+)\|(job:[^|]+)\]\]" to "{{Function||$1}}"
|Schedules the evaluation of the supplied {{Code|$query}} ({{Code|xs:string}}, or of type {{Code|xs:anyURI}}, pointing to a resource), and returns a query id. The query will be queued, and the result will optionally be cached. Queries can be updating. Variables and the context value can be declared via {{Code|$bindings}} (see [[XQuery Module#xquery:eval|xquery:eval]] for more details). The following {{Code|$options}} can be supplied:
* {{Code|cache}}: indicates if the query result will be cached or ignored (default: <code>false</code>):
** The result will be cached in main-memory until it is fetched via [[#job:result{{Function||job:result]]}}, or until {{Option|CACHETIMEOUT}} is exceeded.
** If the query raises an error, it will be cached and returned instead.
* {{Code|start}}: a dayTimeDuration, time, dateTime or integer can be specified to delay the execution of the query:
| '''Examples'''
|
* Cache query result. The returned id can be used to pick up the result with [[#job:result{{Function||job:result]]}}:
<syntaxhighlight lang="xquery">
job:eval("1+3", (), map { 'cache': true() })
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu