#include <XQQuery.hpp>
Inheritance diagram for XQQuery:
Public Member Functions | |
~XQQuery () | |
Destructor. | |
Runtime Methods | |
DynamicContext * | createDynamicContext (xercesc::MemoryManager *memMgr=xercesc::XMLPlatformUtils::fgMemoryManager) const |
Creates a DynamicContext based on the static context used to parse this query. | |
Result | execute (DynamicContext *context) const |
Executes the query using the given DynamicContext. | |
void | staticResolution (StaticContext *context=0) |
Perform static resolution on the query. | |
void | staticTyping (StaticContext *context=0) |
Perform type calculation and related optimizations. | |
Query Information | |
const XMLCh * | getQueryText () const |
Returns the expression that was parsed to create this XQQuery object. | |
std::string | getQueryPlan () const |
Returns the query plan as XML. This is designed for debug and informative purposes only. | |
Getters and Setters | |
ASTNode * | getQueryBody () const |
Get the query body as an ASTNode. | |
void | setQueryBody (ASTNode *query) |
Set the query body to an ASTNode. | |
void | addFunction (XQUserFunction *fnDef) |
Adds an XQUserFunction to the query. | |
const UserFunctions & | getFunctions () const |
Returns a vector of all XQUserFunction objects from the query. | |
void | addVariable (XQGlobalVariable *varDef) |
Adds a XQGlobalVariable to the query. | |
const GlobalVariables & | getVariables () const |
Returns a vector of all XQGlobalVariable objects from the query. | |
const ImportedModules & | getImportedModules () const |
Returns a vector of all XQGlobalVariable objects from the query. | |
const XMLCh * | getFile () const |
Returns the name of the file that this query was parsed from. | |
void | setFile (const XMLCh *file) |
Sets the name of the file that this query was parsed from. | |
const DynamicContext * | getStaticContext () const |
Module Methods | |
void | setIsLibraryModule (bool bIsModule=true) |
Sets whether this query is a module or not. | |
bool | getIsLibraryModule () const |
Returns whether this query is a module or not. | |
void | setModuleTargetNamespace (const XMLCh *uri) |
Sets the module target namespace for this query. | |
const XMLCh * | getModuleTargetNamespace () const |
Gets the module taget namespace for this query. | |
void | importModule (XQilla::Language language, const XMLCh *szUri, VectorOfStrings *locations, StaticContext *context) |
Performs a module import from the given target namespace and locations. | |
Classes | |
class | DebugResult |
Top level debug lazy result iterator. | |
class | QueryResult |
Top level lazy result iterator. |
XQQuery objects are thread safe, and can be executed from multiple threads at the same time - provided a DynamicContext is used per thread.
Instances of this class can be created by using the parsing methods on the XQilla object.
This class is dependant on the DynamicContext that was used to create it. This context must not be deleted before the XQQuery object. Normally this is acheived by the XQQuery adopting the DynamicContext and deleting it when it is deleted. However, this behaviour can be disabled by using the XQilla::NO_ADOPT_CONTEXT flag when creating the XQQuery.
|
Destructor.
|
|
Adds an XQUserFunction to the query.
|
|
Adds a XQGlobalVariable to the query.
|
|
Creates a DynamicContext based on the static context used to parse this query. This DynamicContext will be suitable for using to call execute().
|
|
Executes the query using the given DynamicContext.
|
|
Returns the name of the file that this query was parsed from.
|
|
Returns a vector of all XQUserFunction objects from the query.
|
|
Returns a vector of all XQGlobalVariable objects from the query.
|
|
Returns whether this query is a module or not.
|
|
Gets the module taget namespace for this query.
|
|
Get the query body as an ASTNode.
|
|
Returns the query plan as XML. This is designed for debug and informative purposes only.
|
|
Returns the expression that was parsed to create this XQQuery object.
|
|
|
|
Returns a vector of all XQGlobalVariable objects from the query.
|
|
Performs a module import from the given target namespace and locations.
|
|
Sets the name of the file that this query was parsed from.
|
|
Sets whether this query is a module or not.
|
|
Sets the module target namespace for this query.
|
|
Set the query body to an ASTNode.
|
|
Perform static resolution on the query. This operation is not thread safe, and should only be performed once. Static reolution resolves prefixes to namespace URIs, variable names to variables, function names to functions, and performs some basic query optimisation. Normally this is done as part of parsing the query expression. However, if the XQilla::NO_STATIC_RESOLUTION flag was specified when the query was parsed, this method will have to be called to perform this step manually.
|
|
Perform type calculation and related optimizations. This operation is safe to call multiple times. Normally this step is done as part of static resolution.
|