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

Try DataDirect XQuery® Free!

Put the power, scalability, and performance of DataDirect XQuery® to work for you today! Our free trial lets you see for yourself how easy it is to build data integration applications that access relational, EDI, and other file formats as XML!

Download DataDirect XQuery® today!

Online Video Tutorials!

Our easy-to-follow online video tutorials are a great way to get acquainted with the many features of DataDirect XQuery®.

And if you like what you see, download a free copy today and try DataDirect XQuery® for yourself!