XQuery#include </home/jenkins/.jenkins/ubuntu-remote-queue/jenkins-BuildZorbaUbuntu-462/source/zorba/swig/XQuery.h> This class is the representation of an XQuery in the Zorba engine. To compile and execute an XQuery, an instance of this class must be created. This is done by using either the createQuery or compileQuery methods of the Zorba class.Public Functions
Private Attributesclosedbool closed
theQueryzorba::XQuery_t theQuery
Public Functionscompilevoid compile(const std::string &aQuery) Compile a query given as a String.
Parameters
Parameters
compilevoid compile(const std::string &aQuery, StaticContext &aStaticContext) Compile a query given as a String, using a given static context and compiler hints.
Parameters
Parameters
destroyvoid destroy() /brief deletes this object from memory
executestd::string execute() Execute the query. The query can be executed with this function. The query only has a result if it's a non-updating query. Parameters
executevoid execute(ZorbaIOStream &stream) Execute the query and write the result to the given output stream. The query only has a result if it's a non-updating query. Parameters
executevoid execute(ZorbaIOStream &stream, SerializationOptions &serOptions) Execute the query and write the result to the given output stream. The query only has a result if it's a non-updating query. Parameters
executestd::string execute(SerializationOptions &serOptions) Execute the query. The query can be executed with this function. The query only has a result if it's a non-updating query. Parameters
Parameters
getDynamicContextDynamicContext getDynamicContext() Get the dynamic context of this query. This function returns the dynamic context that belongs to this query and is used during query execution. The context can be used, for example, to set values of external variables, the default collation, or the current datetime. It is only available if the query has been compiled, otherwise an error is reported. Moreover, the context must not be modified during the execution of a query (i.e. if a Iterator is opened). The lifetime of the context returned by this function is restricted by the lifetime of the according query object. Parameters
ReturnsDynamicContext of this query.getExternalVariablesvoid getExternalVariables(Iterator &vars) const Returns the QName of all external variables.
Parameters
Parameters
getStaticCollectionManagerStaticCollectionManager getStaticCollectionManager() Returns a CollectionManager responsible for all collections which are statically declared in the static context of this query (main module) or any transitively imported library module. The collection manager provides a set of functions for managing collections and their contents. ReturnsThe collection manager responsible for managing collections of this query.getStaticContextStaticContext getStaticContext() Get the static context of this query. This function returns the static context that belongs to this query. The static context is only available if the query has been compiled, otherwise an error is reported. The context has all the components and values that were set in the static context that was passed when creating the query and those that were set in the prolog of the query. Note that after compilation of the query the static context is a read only structure. Moreover, the lifetime of the context returned by this function is restricted by the lifetime of the corresponding query object. Parameters
ReturnsStaticContext of this query.iteratorIterator iterator() Get an iterator for the result of the query. Allows an application to lazily execute the query, retrieving the result one item at a time. ReturnsIterator iterator over the result sequence.Parameters
printPlanAsDOTstd::string printPlanAsDOT() Print the execution plan of this query to a given string.
ReturnsA String with the output.Parameters
printPlanAsXMLstd::string printPlanAsXML() Print the execution plan of this query to a given string.
ReturnsA String with the output.Parameters
XQuery XQuery()
XQuery XQuery(const XQuery &aXQuery)
XQuery XQuery(zorba::XQuery_t aQuery)
|