Changes

Jump to navigation Jump to search
25 bytes removed ,  18:52, 18 November 2020
* {{Code|where}} clauses are rewritten to predicates.
* {{Code|if}} expressions in the return clause are rewritten to {{Code|where}} clauses.
 Since {{Version|9.4}}, the * The last {{Code|for}} clause is merged into the {{Code|return}} clause and rewritten to a [[XQuery_3.0|Simple_Map_Operator|simple map]] expression.
Various of these rewriting are demonstrated in the following example:
| Distributivity
|- valign="top"
| <code>$a and or not($a)</code>
| <code>true()</code>
| Tertium non datur
for $p in $auction/site/people/person
let $a :=
for $t in $auction/site/closedauctionsclosed_auctions/closedauctionclosed_auction
where $t/buyer/@person = $p/@id
return $t
</syntaxhighlight>
If the accessed database is not known at compile time, or if you want to give a predicate preference to another one, you can use [[Indexes#Enforce Rewritings|enforce index rewritings]].
=Evaluation-Time Optimizations=
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu