Zorba#include </home/jenkins/.jenkins/ubuntu-remote-queue/jenkins-BuildZorbaUbuntu-462/source/zorba/swig/Zorba.h> The Zorba class is the single point of access to the Zorba engine. There exists one instance of the Zorba class per process. It can be used to (1) create and compile queries, (2) create static contexts, (3) provides access to the XmlDataManager, (4) provides access to the ItemFactory, and (5) provides access to the PropertiesGlobal.Private Attributes
Private Functions
Public Functions
Public Static Functions
Private AttributestheZorbazorba::Zorba * theZorba
Private FunctionsZorba Zorba(zorba::Zorba *aZorba)
Public FunctionscompileQueryXQuery compileQuery(const std::string &aStr) compileQueryXQuery compileQuery(const std::string &aStr, StaticContext &aStaticContext) Creates and compiles an XQuery object using a StaticContext. This methods creates an XQuery object and compiles the query string passed to this method. Compilation is done using the information contained in the StaticContext that is passed as parameter. Parameters
compileQueryXQuery compileQuery(const std::string &aStr, DiagnosticHandler *aDiagnosticHandler) Creates and compiles an XQuery object. This methods creates an XQuery object and compiles the query string passed to this method.Optionally, this method takes an DiagnosticHandler as parameter. In the case an DiagnosticHandler is passed as parameter, each error that occurs during compiling or executing the query, is reported to the passed error handler. If not DiagnosticHandler is given, exceptions are thrown for each of these errors. Parameters
compileQueryXQuery compileQuery(const std::string &aStr, StaticContext &aStaticContext, DiagnosticHandler *aDiagnosticHandler) Creates and compiles an XQuery object using a StaticContext. This methods creates an XQuery object and compiles the query string passed to this method. Compilation is done using the information contained in the StaticContext that is passed as parameter.Optionally, this method takes an DiagnosticHandler as parameter. In the case an DiagnosticHandler is passed as parameter, each error that occurs during compiling or executing the query, is reported to the passed error handler. If not DiagnosticHandler is given, exceptions are thrown for each of these errors. Parameters
compileQueryXQuery compileQuery(const std::string &aStr, CompilerHints &aCompilerHints, DiagnosticHandler *aDiagnosticHandler) Creates and compiles an XQuery object using the given CompilerHints. This methods creates an XQuery object and compiles the query string passed to this method. Compilation and optimization is done with respect to the given CompilerHints.Optionally, this method takes an DiagnosticHandler as parameter. In the case an DiagnosticHandler is passed as parameter, each error that occurs during compiling or executing the query, is reported to the passed error handler. If not DiagnosticHandler is given, exceptions are thrown for each of these errors. Parameters
compileQueryXQuery compileQuery(ZorbaIOStream &stream) compileQueryXQuery compileQuery(ZorbaIOStream &stream, StaticContext &aStaticContext) Creates and compiles an XQuery object using a StaticContext. This methods creates an XQuery object and compiles the query string passed to this method. Compilation is done using the information contained in the StaticContext that is passed as parameter. Parameters
createQueryXQuery createQuery() createStaticContextStaticContext createStaticContext() Creates a new StaticContext. The method returns a StaticContext object that can be used for compiling a query. Instances of the StaticContext class are returned as a smart pointer. ReturnsStaticContext_t a new StaticContext object.getMajorVersionint getMajorVersion() Get information about the used version of Zorba.
ReturnsVersion information about the used Zorba version.getMinorVersionint getMinorVersion() Get information about the used version of Zorba.
ReturnsVersion information about the used Zorba version.getPatchVersionint getPatchVersion() Get information about the used version of Zorba.
ReturnsVersion information about the used Zorba version.getVersionstd::string getVersion() Get information about the used version of Zorba.
ReturnsVersion information about the used Zorba version.getXmlDataManagerXmlDataManager getXmlDataManager() isXQueryXSupportedbool isXQueryXSupported() Get a boolean value informing if XQueryX is supported.
ReturnsA boolean value informing if XQueryX is supported.shutdownvoid shutdown() Releases all resources aquired by the Zorba XQuery Engine. Also releases resources aquired by the libraries used (i.e. icu, libxml2, xerces, libcurl).Before calling shutdown, all xquery objects, items, contexts, ... have to be closed or gone out of scope; otherwise this call may fail.After shutdown has been called, any calls to zorba are invalid.getInstance may be used to reinitialize the engine. Zorba Zorba()
Zorba Zorba(const Zorba &aZorba)
Public Static FunctionsgetInstanceZorba getInstance(const Store &) Gets the singleton instance of the Zorba object. The Zorba object provides factory methods for creating and/or compiling XQuery objects, creating StaticContext objects, and accessing components as, for example, the ItemFactory or the XmlDataManager.The first time this function is called, the Zorba Engine is initialized. Thereby, it initializes all the libraries that are used in the system, i.e. ICU, libxml2, xerces, and libcurl. |