Changes

Jump to navigation Jump to search
6 bytes added ,  12:35, 2 July 2020
m
Text replacement - "[http://www.w3.org/TR/x" to "[https://www.w3.org/TR/x"
This article is part of the [[XQuery|XQuery Portal]]. It provides a summary of the most important features of the [httphttps://www.w3.org/TR/xquery-30/ XQuery 3.0] Recommendation.
=Enhanced FLWOR Expressions=
==group by==
FLWOR expressions have been extended to include the [httphttps://www.w3.org/TR/xquery-30/#id-group-by group by] clause, which is well-established in SQL. <code>group by</code> can be used to apply value-based partitioning to query results:
'''XQuery:'''
</syntaxhighlight>
More information on window clauses, and all other enhancements, can be found in the [httphttps://www.w3.org/TR/xquery-30/#id-windows specification].
=Function Items=
=Simple Map Operator=
The [httphttps://www.w3.org/TR/xquery-30/#id-map-operator simple map] operator {{Code|!}} provides a compact notation for applying the results of a first to a second expression: the resulting items of the first expression are bound to the context item one by one, and the second expression is evaluated for each item. The map operator may be used as replacement for FLWOR expressions:
'''Example:'''
=Try/Catch=
The [httphttps://www.w3.org/TR/xquery-30/#id-try-catch try/catch] construct can be used to handle errors at runtime:
'''Example:'''
=Switch=
The [httphttps://www.w3.org/TR/xquery-30/#id-switch switch] statement is available in many other programming languages. It chooses one of several expressions to evaluate based on its input value.
'''Example:'''
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu