25.12.2013 Views

Tamino XQuery User Guide - Software AG Documentation

Tamino XQuery User Guide - Software AG Documentation

Tamino XQuery User Guide - Software AG Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

FLWOR Expressions<br />

The order by and return Clauses<br />

The mandatory return clause determines the result of the whole FLWOR expression. It is invoked<br />

for every tuple that is retained after evaluating the where clause. In the expression contained in<br />

the where clause you can use any variable bindings of the current FLWOR expression. As you can<br />

see from the join example above, this is also the place to use element constructors for tailoring<br />

your result.<br />

If there is no order by clause, the order of the tuple stream is determined by the for and let<br />

clauses. Otherwise the tuples in the tuple stream are reordered in a new, value-based order. In<br />

either case, the resulting order determines the order in which the return clause is evaluated, once<br />

for each tuple, using the variable bindings in the respective tuples.<br />

If the values to be compared are strings, you can specify the collation to be used (if no collation is<br />

specified, the default collation is used.)<br />

36<br />

<strong>XQuery</strong> <strong>User</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!