Difference between revisions of "XQuery 3.0"

From BaseX Documentation
Jump to navigation Jump to search
Line 1: Line 1:
 
This article summarizes the most important features of the upcoming [http://www.w3.org/TR/xquery-30/ Version 3.0] of the XQuery language that have already been implemented in BaseX.
 
This article summarizes the most important features of the upcoming [http://www.w3.org/TR/xquery-30/ Version 3.0] of the XQuery language that have already been implemented in BaseX.
 +
 +
==Group By==
 +
 +
FLWOR expressions have been extended by the [http://www.w3.org/TR/xquery-30/#id-group-by group by] clause, which is well-established among relational database systems. Group by clauses can be used to group query results based on its values.
 +
 +
'''Example:'''
 +
 +
...michi?...
 +
  
 
==Try/Catch==
 
==Try/Catch==
  
The well-known [http://www.w3.org/TR/xquery-30/#id-try-catch try/catch] construct can be used to handle errors at runtime:
+
The [http://www.w3.org/TR/xquery-30/#id-try-catch try/catch] construct can be used to handle errors at runtime:
 
   
 
   
 
'''Example:'''  
 
'''Example:'''  

Revision as of 14:54, 12 January 2011

This article summarizes the most important features of the upcoming Version 3.0 of the XQuery language that have already been implemented in BaseX.

Group By

FLWOR expressions have been extended by the group by clause, which is well-established among relational database systems. Group by clauses can be used to group query results based on its values.

Example:

...michi?...


Try/Catch

The try/catch construct can be used to handle errors at runtime:

Example:

 try {
   1 + '2'
 } catch *($code, $desc) {
   concat('Error [', $code, ']: ', $desc)
 }

Result: Error [XPTY0004]: '+' operator: number expected, string found.