User-declared Functions

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
HomeNext

Calling Database Functions

Copyright © 1993 - 2008. Progress Software Corporation. All rights reserved. | N. America: 800 876 3101 | World: +44 (0) 1753 218 930