Changes

Jump to navigation Jump to search
241 bytes added ,  16:41, 30 January 2019
no edit summary
==xquery:eval==
 
{{Mark|Updated with 9.2}}: First argument may be a URI (xquery:invoke was removed).
{| width='100%'
|-
| '''Summary'''
|Evaluates the supplied {{Code|$query}} and returns the resulting items.{{Version|9.2}}: If the query is of type {{Code|xs:anyURI}}, the module located at this URI will be retrieved (a relative URI will be resolved against the static base URI of the query). Otherwise, the input will be evaluated as query string.
Variables and context items can be declared via {{Code|$bindings}}. The specified keys must be QNames or strings:
* If a key is a QName, it will be directly adopted as variable name.
* {{Code|timeout}}: query execution will be interrupted after the specified number of seconds.
* {{Code|memory}}: query execution will be interrupted if the specified number of megabytes will be exceeded. This check works best if only one process is running at the same time. Moreover, please note that this option enforces garbage collection, so it will take some additional time, and it requires GC to be enabled in your JVM.
* {{Code|base-uri}}: set [https://www.w3.org/TR/xquery-31/#dt-static-base-uri base-uri property] for the query. This Overwrites the base URI of the query; will be used when resolving relative URIs by functions such as {{Code|fn:doc}}.
* {{Code|pass}}: passes on the original error info (line and column number, optional file uri). By default, this option is {{Code|false}}.
|-
==xquery:eval-update==
 
{{Mark|Updated with 9.2}}: First argument may be a URI (xquery:invoke-update was removed).
{| width='100%'
|-
| '''Summary'''
|Evaluates {{Code|$a query}} as updating XQuery expression at runtime.<br/>All updates will be added to the [[XQuery Update#Pending Update List|Pending Update List]] of the main query and performed after the evaluation of the main query.<br />The rules of the {{Code|$bindings}} and {{Code|$options}} parameters for all arguments are the same as for [[#xquery:eval|xquery:eval]].
|-
| '''Errors'''
=Changelog=
 
;Version 9.2
 
* Deleted: [[#xquery:invoke|xquery:invoke]], [[#xquery:invoke-update|xquery:invoke-update]] (merged with xquery:eval and xquery:eval-update)
;Version 9.0
* Updated: [[#xquery:eval|xquery:eval]]: {{Code|base-uri}} option added
* Updated: Relative URIs will always be resolved against the static base URI of the query
* Deleted: xquery:type (moved to [[Profiling Module]])
;Version 8.4
* Added: xquery:update, [[#xquery:parse|xquery:parse]]
* Deleted: [[#xquery:evaluate|xquery:evaluate]] (opened databases will now be closed by main query)
;Version 7.8.2
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu