compileQuery: Compile an XQuery expression/script

Description Usage Arguments Value Author(s) References See Also Examples

Description

These functions compile an XQuery expression into an object that can be evaluated and results obtained. compileQueryCtx allows the caller to specify the static context for the query.

Neither of these is currently used in other functions in the package. We tend to use xquery directly rather than explicitly compiling the queries and then evaluating them and getting the results as separate actions.

printPlan returns a string containing the XML description of the evaluation plan for the query.

Usage

1
2
compileXQuery(query, ctxt, engine = zorba(), ..., obj = new("zorba::XQuery"))
printPlan(xquery, parse = TRUE)

Arguments

query

a string giving the XQuery script

engine

the Zorba engine in which the query is to be compiled

obj

the object that is to be returned, allowing the caller to specify the class. The function fills in the ref slot.

ctxt

a zorba::StaticContext for the XQuery to use

...

additional parameters for methods

xquery

the compiled query

parse

a logical value indicating whether to parse the resulting XML text from printPlan as an XML document

Value

The filled in obj, i.e. with the ref slot filled in. By default, this corresponds to a zorba::XQuery object.

Author(s)

Duncan Temple Lang.

References

XQuery http://www.w3.org/TR/xquery/

Zorba http://www.zorba-xquery.com/

See Also

xquery

Examples

1
2
3
4
5
zorba()
  xq = compileXQuery("1+2")
#  printPlan(xq)
  xq = compileXQuery("(1+2, 1-2)")
#  printPlan(xq)

omegahat/RXQuery documentation built on May 24, 2019, 1:55 p.m.