DataDirect XQuery uses intelligent function inlining so that user-declared functions can be executed in the database.
Example 15. Inlining User-declared Functions
XQuery
declare function local:popularShares($quantity) {
$quantity > 10000
};
collection('HOLDINGS')/HOLDINGS/SHARES[local:popularShares(.)]
SQL
SELECT ALL
nrm5."SHARES" AS RACOL1
FROM
"PEPPINO"."HOLDINGS" nrm5
WHERE
nrm5."SHARES" > 10000
| Previous XQuery Built-in Functions | Home | Next Calling Database Functions |