XQuilla/docs/simple-api/classXQQuery.html
2020-02-17 22:05:20 +01:00

831 lines
39 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>XQilla Simple API: XQQuery Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.6 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li id="current"><a href="classes.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul></div>
<div class="tabs">
<ul>
<li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul></div>
<h1>XQQuery Class Reference</h1><!-- doxytag: class="XQQuery" --><!-- doxytag: inherits="xercesc::XMemory" -->Encapsulates a query expression.
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="XQQuery_8hpp-source.html">XQQuery.hpp</a>&gt;</code>
<p>
Inheritance diagram for XQQuery:<p><center><img src="classXQQuery__inherit__graph.png" border="0" usemap="#XQQuery__inherit__map" alt="Inheritance graph"></center>
<map name="XQQuery__inherit__map">
<area href="classxercesc_1_1XMemory.html" shape="rect" coords="7,9,141,33" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classXQQuery-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#558d8ab3c8ef625b17229d72c1b80cd9">~XQQuery</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <a href="#558d8ab3c8ef625b17229d72c1b80cd9"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Runtime Methods</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classDynamicContext.html">DynamicContext</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#37dc848b7f57536fa700bd2be416b1f2">createDynamicContext</a> (<a class="el" href="classxercesc_1_1MemoryManager.html">xercesc::MemoryManager</a> *memMgr=<a class="el" href="classxercesc_1_1XMLPlatformUtils.html#2521473ea52894e9313573d330a264b4">xercesc::XMLPlatformUtils::fgMemoryManager</a>) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a <a class="el" href="classDynamicContext.html">DynamicContext</a> based on the static context used to parse this query. <a href="#37dc848b7f57536fa700bd2be416b1f2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classResult.html">Result</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#3a22ddfd9faa4d7fcdf14fd1a802b331">execute</a> (<a class="el" href="classDynamicContext.html">DynamicContext</a> *context) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Executes the query using the given <a class="el" href="classDynamicContext.html">DynamicContext</a>. <a href="#3a22ddfd9faa4d7fcdf14fd1a802b331"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#ebb1ab3434751cf96b4f10aabfd48bdd">staticResolution</a> (<a class="el" href="classStaticContext.html">StaticContext</a> *context=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Perform static resolution on the query. <a href="#ebb1ab3434751cf96b4f10aabfd48bdd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#be1fdd354e3dd08c3b79c5cea0146b29">staticTyping</a> (<a class="el" href="classStaticContext.html">StaticContext</a> *context=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Perform type calculation and related optimizations. <a href="#be1fdd354e3dd08c3b79c5cea0146b29"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Query Information</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const XMLCh *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#50438749bfdca396ff857de515585e23">getQueryText</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the expression that was parsed to create this <a class="el" href="classXQQuery.html">XQQuery</a> object. <a href="#50438749bfdca396ff857de515585e23"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#6d1666c9dd517b08026346d778d50b1e">getQueryPlan</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the query plan as XML. This is designed for debug and informative purposes only. <a href="#6d1666c9dd517b08026346d778d50b1e"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Getters and Setters</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ASTNode *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#9bdf9610f65813fdaf43c1e864deb038">getQueryBody</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the query body as an ASTNode. <a href="#9bdf9610f65813fdaf43c1e864deb038"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#23208ecb2a66ea1437e8185dc90fc45b">setQueryBody</a> (ASTNode *query)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the query body to an ASTNode. <a href="#23208ecb2a66ea1437e8185dc90fc45b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#b876c486d751acb92e6ee62d78c3175a">addFunction</a> (XQUserFunction *fnDef)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds an XQUserFunction to the query. <a href="#b876c486d751acb92e6ee62d78c3175a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="XQQuery_8hpp.html#120407438cc6ede3bc7b57aae806741c">UserFunctions</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#51732e054576e453c196b8bdad1582f5">getFunctions</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a vector of all XQUserFunction objects from the query. <a href="#51732e054576e453c196b8bdad1582f5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#b11bb071fc6a34cc41a09d7a8f7922bb">addVariable</a> (XQGlobalVariable *varDef)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds a XQGlobalVariable to the query. <a href="#b11bb071fc6a34cc41a09d7a8f7922bb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="XQQuery_8hpp.html#9d2d5aa88c009aeb4423578b5665857a">GlobalVariables</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#24b830095210a3c4846c82470942fd8a">getVariables</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a vector of all XQGlobalVariable objects from the query. <a href="#24b830095210a3c4846c82470942fd8a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="XQQuery_8hpp.html#6bfc1be626a21b5f066df297e669fe9f">ImportedModules</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#80b70ab66101dd2e938c942c466399a7">getImportedModules</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a vector of all XQGlobalVariable objects from the query. <a href="#80b70ab66101dd2e938c942c466399a7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const XMLCh *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#49033a2ed8c0cc7b95b59a0382171f32">getFile</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the name of the file that this query was parsed from. <a href="#49033a2ed8c0cc7b95b59a0382171f32"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#a4526a237851b8c144b06010486dc646">setFile</a> (const XMLCh *file)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the name of the file that this query was parsed from. <a href="#a4526a237851b8c144b06010486dc646"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classDynamicContext.html">DynamicContext</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#3a4c85183980a4802bb42fb20369774b">getStaticContext</a> () const </td></tr>
<tr><td colspan="2"><div class="groupHeader">Module Methods</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#be331cfc9433f276b52d9b76290eb456">setIsLibraryModule</a> (bool bIsModule=true)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets whether this query is a module or not. <a href="#be331cfc9433f276b52d9b76290eb456"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#6a2549e688060acc8509f86efa107b6f">getIsLibraryModule</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns whether this query is a module or not. <a href="#6a2549e688060acc8509f86efa107b6f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#9ac6a0983cc3f7352b9a1f0d87bfaf6d">setModuleTargetNamespace</a> (const XMLCh *uri)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the module target namespace for this query. <a href="#9ac6a0983cc3f7352b9a1f0d87bfaf6d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const XMLCh *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#236264220217a0ed71d687b63822c910">getModuleTargetNamespace</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the module taget namespace for this query. <a href="#236264220217a0ed71d687b63822c910"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#da8ceefc6bdd3382032d28e5b304a756">importModule</a> (const XMLCh *szUri, VectorOfStrings *locations, <a class="el" href="classStaticContext.html">StaticContext</a> *context)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Performs a module import from the given target namespace and locations. <a href="#da8ceefc6bdd3382032d28e5b304a756"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><b>DebugResult</b></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Top level debug lazy result iterator. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><b>QueryResult</b></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Top level lazy result iterator. <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Encapsulates a query expression.
<p>
<a class="el" href="classXQQuery.html">XQQuery</a> objects are thread safe, and can be executed from multiple threads at the same time - provided a <a class="el" href="classDynamicContext.html">DynamicContext</a> is used per thread.<p>
Instances of this class can be created by using the parsing methods on the <a class="el" href="classXQilla.html">XQilla</a> object.<p>
This class is dependant on the <a class="el" href="classDynamicContext.html">DynamicContext</a> that was used to create it. This context must not be deleted before the <a class="el" href="classXQQuery.html">XQQuery</a> object. Normally this is acheived by the <a class="el" href="classXQQuery.html">XQQuery</a> adopting the <a class="el" href="classDynamicContext.html">DynamicContext</a> and deleting it when it is deleted. However, this behaviour can be disabled by using the <a class="el" href="classXQilla.html#7fbc185e109c8ce3da425054685e8ba199bed3057d85109e34e9f536c30dc514">XQilla::NO_ADOPT_CONTEXT</a> flag when creating the <a class="el" href="classXQQuery.html">XQQuery</a>.
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="558d8ab3c8ef625b17229d72c1b80cd9"></a><!-- doxytag: member="XQQuery::~XQQuery" ref="558d8ab3c8ef625b17229d72c1b80cd9" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">XQQuery::~XQQuery </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Destructor.
<p>
</td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="b876c486d751acb92e6ee62d78c3175a"></a><!-- doxytag: member="XQQuery::addFunction" ref="b876c486d751acb92e6ee62d78c3175a" args="(XQUserFunction *fnDef)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void XQQuery::addFunction </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">XQUserFunction *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>fnDef</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Adds an XQUserFunction to the query.
<p>
</td>
</tr>
</table>
<a class="anchor" name="b11bb071fc6a34cc41a09d7a8f7922bb"></a><!-- doxytag: member="XQQuery::addVariable" ref="b11bb071fc6a34cc41a09d7a8f7922bb" args="(XQGlobalVariable *varDef)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void XQQuery::addVariable </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">XQGlobalVariable *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>varDef</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Adds a XQGlobalVariable to the query.
<p>
</td>
</tr>
</table>
<a class="anchor" name="37dc848b7f57536fa700bd2be416b1f2"></a><!-- doxytag: member="XQQuery::createDynamicContext" ref="37dc848b7f57536fa700bd2be416b1f2" args="(xercesc::MemoryManager *memMgr=xercesc::XMLPlatformUtils::fgMemoryManager) const " --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"><a class="el" href="classDynamicContext.html">DynamicContext</a>* XQQuery::createDynamicContext </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="classxercesc_1_1MemoryManager.html">xercesc::MemoryManager</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>memMgr</em> = <code><a class="el" href="classxercesc_1_1XMLPlatformUtils.html#2521473ea52894e9313573d330a264b4">xercesc::XMLPlatformUtils::fgMemoryManager</a></code> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Creates a <a class="el" href="classDynamicContext.html">DynamicContext</a> based on the static context used to parse this query.
<p>
This <a class="el" href="classDynamicContext.html">DynamicContext</a> will be suitable for using to call <a class="el" href="classXQQuery.html#3a22ddfd9faa4d7fcdf14fd1a802b331">execute()</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>memMgr</em>&nbsp;</td><td>The memory manager used to create the <a class="el" href="classDynamicContext.html">DynamicContext</a>.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>An implementation of <a class="el" href="classDynamicContext.html">DynamicContext</a> </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="3a22ddfd9faa4d7fcdf14fd1a802b331"></a><!-- doxytag: member="XQQuery::execute" ref="3a22ddfd9faa4d7fcdf14fd1a802b331" args="(DynamicContext *context) const " --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"><a class="el" href="classResult.html">Result</a> XQQuery::execute </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="classDynamicContext.html">DynamicContext</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>context</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Executes the query using the given <a class="el" href="classDynamicContext.html">DynamicContext</a>.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>The <a class="el" href="classDynamicContext.html">DynamicContext</a> to use to execute the query. This contains runtime values for variables, the value of the context item, and other relevent information.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The <a class="el" href="classResult.html">Result</a> object - a lazy iterator over the query results.</dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classXQException.html">XQException</a></em>&nbsp;</td><td>If a runtime error occurs </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="49033a2ed8c0cc7b95b59a0382171f32"></a><!-- doxytag: member="XQQuery::getFile" ref="49033a2ed8c0cc7b95b59a0382171f32" args="() const " --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">const XMLCh* XQQuery::getFile </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Returns the name of the file that this query was parsed from.
<p>
</td>
</tr>
</table>
<a class="anchor" name="51732e054576e453c196b8bdad1582f5"></a><!-- doxytag: member="XQQuery::getFunctions" ref="51732e054576e453c196b8bdad1582f5" args="() const " --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">const <a class="el" href="XQQuery_8hpp.html#120407438cc6ede3bc7b57aae806741c">UserFunctions</a>&amp; XQQuery::getFunctions </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const<code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Returns a vector of all XQUserFunction objects from the query.
<p>
</td>
</tr>
</table>
<a class="anchor" name="80b70ab66101dd2e938c942c466399a7"></a><!-- doxytag: member="XQQuery::getImportedModules" ref="80b70ab66101dd2e938c942c466399a7" args="() const " --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">const <a class="el" href="XQQuery_8hpp.html#6bfc1be626a21b5f066df297e669fe9f">ImportedModules</a>&amp; XQQuery::getImportedModules </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const<code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Returns a vector of all XQGlobalVariable objects from the query.
<p>
</td>
</tr>
</table>
<a class="anchor" name="6a2549e688060acc8509f86efa107b6f"></a><!-- doxytag: member="XQQuery::getIsLibraryModule" ref="6a2549e688060acc8509f86efa107b6f" args="() const " --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">bool XQQuery::getIsLibraryModule </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Returns whether this query is a module or not.
<p>
</td>
</tr>
</table>
<a class="anchor" name="236264220217a0ed71d687b63822c910"></a><!-- doxytag: member="XQQuery::getModuleTargetNamespace" ref="236264220217a0ed71d687b63822c910" args="() const " --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">const XMLCh* XQQuery::getModuleTargetNamespace </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Gets the module taget namespace for this query.
<p>
</td>
</tr>
</table>
<a class="anchor" name="9bdf9610f65813fdaf43c1e864deb038"></a><!-- doxytag: member="XQQuery::getQueryBody" ref="9bdf9610f65813fdaf43c1e864deb038" args="() const " --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">ASTNode* XQQuery::getQueryBody </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Get the query body as an ASTNode.
<p>
</td>
</tr>
</table>
<a class="anchor" name="6d1666c9dd517b08026346d778d50b1e"></a><!-- doxytag: member="XQQuery::getQueryPlan" ref="6d1666c9dd517b08026346d778d50b1e" args="() const " --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">std::string XQQuery::getQueryPlan </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Returns the query plan as XML. This is designed for debug and informative purposes only.
<p>
</td>
</tr>
</table>
<a class="anchor" name="50438749bfdca396ff857de515585e23"></a><!-- doxytag: member="XQQuery::getQueryText" ref="50438749bfdca396ff857de515585e23" args="() const " --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">const XMLCh* XQQuery::getQueryText </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Returns the expression that was parsed to create this <a class="el" href="classXQQuery.html">XQQuery</a> object.
<p>
</td>
</tr>
</table>
<a class="anchor" name="3a4c85183980a4802bb42fb20369774b"></a><!-- doxytag: member="XQQuery::getStaticContext" ref="3a4c85183980a4802bb42fb20369774b" args="() const " --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">const <a class="el" href="classDynamicContext.html">DynamicContext</a>* XQQuery::getStaticContext </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const<code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="24b830095210a3c4846c82470942fd8a"></a><!-- doxytag: member="XQQuery::getVariables" ref="24b830095210a3c4846c82470942fd8a" args="() const " --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">const <a class="el" href="XQQuery_8hpp.html#9d2d5aa88c009aeb4423578b5665857a">GlobalVariables</a>&amp; XQQuery::getVariables </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const<code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Returns a vector of all XQGlobalVariable objects from the query.
<p>
</td>
</tr>
</table>
<a class="anchor" name="da8ceefc6bdd3382032d28e5b304a756"></a><!-- doxytag: member="XQQuery::importModule" ref="da8ceefc6bdd3382032d28e5b304a756" args="(const XMLCh *szUri, VectorOfStrings *locations, StaticContext *context)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void XQQuery::importModule </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const XMLCh *&nbsp;</td>
<td class="mdname" nowrap> <em>szUri</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>VectorOfStrings *&nbsp;</td>
<td class="mdname" nowrap> <em>locations</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="classStaticContext.html">StaticContext</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>context</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Performs a module import from the given target namespace and locations.
<p>
</td>
</tr>
</table>
<a class="anchor" name="a4526a237851b8c144b06010486dc646"></a><!-- doxytag: member="XQQuery::setFile" ref="a4526a237851b8c144b06010486dc646" args="(const XMLCh *file)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void XQQuery::setFile </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const XMLCh *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>file</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Sets the name of the file that this query was parsed from.
<p>
</td>
</tr>
</table>
<a class="anchor" name="be331cfc9433f276b52d9b76290eb456"></a><!-- doxytag: member="XQQuery::setIsLibraryModule" ref="be331cfc9433f276b52d9b76290eb456" args="(bool bIsModule=true)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void XQQuery::setIsLibraryModule </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">bool&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>bIsModule</em> = <code>true</code> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Sets whether this query is a module or not.
<p>
</td>
</tr>
</table>
<a class="anchor" name="9ac6a0983cc3f7352b9a1f0d87bfaf6d"></a><!-- doxytag: member="XQQuery::setModuleTargetNamespace" ref="9ac6a0983cc3f7352b9a1f0d87bfaf6d" args="(const XMLCh *uri)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void XQQuery::setModuleTargetNamespace </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const XMLCh *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>uri</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Sets the module target namespace for this query.
<p>
</td>
</tr>
</table>
<a class="anchor" name="23208ecb2a66ea1437e8185dc90fc45b"></a><!-- doxytag: member="XQQuery::setQueryBody" ref="23208ecb2a66ea1437e8185dc90fc45b" args="(ASTNode *query)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void XQQuery::setQueryBody </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">ASTNode *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>query</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Set the query body to an ASTNode.
<p>
</td>
</tr>
</table>
<a class="anchor" name="ebb1ab3434751cf96b4f10aabfd48bdd"></a><!-- doxytag: member="XQQuery::staticResolution" ref="ebb1ab3434751cf96b4f10aabfd48bdd" args="(StaticContext *context=0)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void XQQuery::staticResolution </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="classStaticContext.html">StaticContext</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>context</em> = <code>0</code> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Perform static resolution on the query.
<p>
This operation is not thread safe, and should only be performed once.<p>
Static reolution resolves prefixes to namespace URIs, variable names to variables, function names to functions, and performs some basic query optimisation.<p>
Normally this is done as part of parsing the query expression. However, if the <a class="el" href="classXQilla.html#7fbc185e109c8ce3da425054685e8ba13629b3bfdf036418daad522664441e9d">XQilla::NO_STATIC_RESOLUTION</a> flag was specified when the query was parsed, this method will have to be called to perform this step manually.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>If specified, the <a class="el" href="classStaticContext.html">StaticContext</a> to use to statically resolve this object. By default, the context used to parse the query is used. This should not need to be changed under normal usage.</td></tr>
</table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classXQException.html">XQException</a></em>&nbsp;</td><td>If a static resolution time error occurs </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="be1fdd354e3dd08c3b79c5cea0146b29"></a><!-- doxytag: member="XQQuery::staticTyping" ref="be1fdd354e3dd08c3b79c5cea0146b29" args="(StaticContext *context=0)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void XQQuery::staticTyping </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="classStaticContext.html">StaticContext</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>context</em> = <code>0</code> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Perform type calculation and related optimizations.
<p>
This operation is safe to call multiple times.<p>
Normally this step is done as part of static resolution.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>If specified, the <a class="el" href="classStaticContext.html">StaticContext</a> to use to statically resolve this object. By default, the context used to parse the query is used. This should not need to be changed under normal usage.</td></tr>
</table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classXQException.html">XQException</a></em>&nbsp;</td><td>If a static resolution time error occurs </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="XQQuery_8hpp-source.html">XQQuery.hpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Dec 12 00:18:57 2006 for XQilla Simple API by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
</body>
</html>