XQuilla/docs/xqc-api/structXQC__Expression__s.html

177 lines
15 KiB
HTML
Raw Permalink Normal View History

2020-02-17 21:17:06 +00:00
<!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 XQC API Documentation</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<a style="float:right;" href="http://sourceforge.net/projects/xqilla"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=152021&amp;type=2" border="0" alt="SourceForge.net Logo" /></a>
2020-02-17 21:24:47 +00:00
<!-- Generated by Doxygen 1.8.5 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
2020-02-17 21:19:57 +00:00
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
2020-02-17 21:24:47 +00:00
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
2020-02-17 21:19:57 +00:00
</ul>
</div>
2020-02-17 21:24:47 +00:00
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structXQC__Expression__s-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">XQC_Expression_s Struct Reference</div> </div>
</div><!--header-->
2020-02-17 21:19:57 +00:00
<div class="contents">
2020-02-17 21:24:47 +00:00
2020-02-17 21:19:57 +00:00
<p>The <a class="el" href="xqc_8h.html#a707b112e9370ee771b38ea01574df8ff">XQC_Expression</a> struct represents a prepared query, and allows the user to execute that query any number of times.
2020-02-17 21:24:47 +00:00
<a href="structXQC__Expression__s.html#details">More...</a></p>
2020-02-17 21:17:06 +00:00
2020-02-17 21:19:57 +00:00
<p><code>#include &lt;<a class="el" href="xqc_8h_source.html">xqc.h</a>&gt;</code></p>
2020-02-17 21:24:47 +00:00
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a04be56651df9f3f47aecd99a0b0ad66e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="xqc_8h.html#aeb1ad206e9c38a7f84749cafe04d7a3f">XQC_Error</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structXQC__Expression__s.html#a04be56651df9f3f47aecd99a0b0ad66e">create_context</a> )(const <a class="el" href="xqc_8h.html#a707b112e9370ee771b38ea01574df8ff">XQC_Expression</a> *expression, <a class="el" href="xqc_8h.html#acf4c0769616363086377cb527484d33e">XQC_DynamicContext</a> **context)</td></tr>
<tr class="memdesc:a04be56651df9f3f47aecd99a0b0ad66e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a dynamic context suitable for use in the <a class="el" href="structXQC__Expression__s.html#a3181579fa2677d43c29efd31a649726c" title="Executes the query represented by the XQC_Expression object using the values in the XQC_DynamicContex...">execute()</a> function. <a href="#a04be56651df9f3f47aecd99a0b0ad66e">More...</a><br/></td></tr>
<tr class="separator:a04be56651df9f3f47aecd99a0b0ad66e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3181579fa2677d43c29efd31a649726c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="xqc_8h.html#aeb1ad206e9c38a7f84749cafe04d7a3f">XQC_Error</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structXQC__Expression__s.html#a3181579fa2677d43c29efd31a649726c">execute</a> )(const <a class="el" href="xqc_8h.html#a707b112e9370ee771b38ea01574df8ff">XQC_Expression</a> *expression, const <a class="el" href="xqc_8h.html#acf4c0769616363086377cb527484d33e">XQC_DynamicContext</a> *context, <a class="el" href="xqc_8h.html#a611c8970264183d7d0f42a8551239463">XQC_Sequence</a> **sequence)</td></tr>
<tr class="memdesc:a3181579fa2677d43c29efd31a649726c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes the query represented by the XQC_Expression object using the values in the <a class="el" href="xqc_8h.html#acf4c0769616363086377cb527484d33e">XQC_DynamicContext</a> if provided. <a href="#a3181579fa2677d43c29efd31a649726c">More...</a><br/></td></tr>
<tr class="separator:a3181579fa2677d43c29efd31a649726c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc0d2caee9f7a61e68c57d18c1d4bd66"><td class="memItemLeft" align="right" valign="top">void *(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structXQC__Expression__s.html#acc0d2caee9f7a61e68c57d18c1d4bd66">get_interface</a> )(const <a class="el" href="xqc_8h.html#a707b112e9370ee771b38ea01574df8ff">XQC_Expression</a> *expression, const char *name)</td></tr>
<tr class="memdesc:acc0d2caee9f7a61e68c57d18c1d4bd66"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called to retrieve an implementation specific interface. <a href="#acc0d2caee9f7a61e68c57d18c1d4bd66">More...</a><br/></td></tr>
<tr class="separator:acc0d2caee9f7a61e68c57d18c1d4bd66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6aa28a94f0ff6732c26f131bbe4d44a9"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structXQC__Expression__s.html#a6aa28a94f0ff6732c26f131bbe4d44a9">free</a> )(<a class="el" href="xqc_8h.html#a707b112e9370ee771b38ea01574df8ff">XQC_Expression</a> *expression)</td></tr>
<tr class="memdesc:a6aa28a94f0ff6732c26f131bbe4d44a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called to free the resources associated with the XQC_Expression. <a href="#a6aa28a94f0ff6732c26f131bbe4d44a9">More...</a><br/></td></tr>
<tr class="separator:a6aa28a94f0ff6732c26f131bbe4d44a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
2020-02-17 21:17:06 +00:00
</table>
2020-02-17 21:24:47 +00:00
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The <a class="el" href="xqc_8h.html#a707b112e9370ee771b38ea01574df8ff">XQC_Expression</a> struct represents a prepared query, and allows the user to execute that query any number of times. </p>
2020-02-17 21:19:57 +00:00
<p>An <a class="el" href="xqc_8h.html#a707b112e9370ee771b38ea01574df8ff">XQC_Expression</a> object is thread-safe and can be used by multiple threads of execution at the same time.</p>
2020-02-17 21:24:47 +00:00
<p><a class="el" href="xqc_8h.html#a707b112e9370ee771b38ea01574df8ff">XQC_Expression</a> objects are created by calling the <a class="el" href="structXQC__Implementation__s.html#a4f82aa0b0e5c675f95f6c78b3bf76216" title="Prepares a query from a UTF-8 string, returning an XQC_Expression object. ">XQC_Implementation::prepare()</a>, <a class="el" href="structXQC__Implementation__s.html#a1ad25fbbed1449a0923e3ea274c81336" title="Prepares a query from a FILE pointer, returning an XQC_Expression object. ">XQC_Implementation::prepare_file()</a> and <a class="el" href="structXQC__Implementation__s.html#a5f43c181bbab51770a3c1c8943060745" title="Prepares a query from an XQC_InputStream, returning an XQC_Expression object. ">XQC_Implementation::prepare_stream()</a> functions. Once created, the user is responsible for freeing the object by calling the <a class="el" href="structXQC__Expression__s.html#a6aa28a94f0ff6732c26f131bbe4d44a9" title="Called to free the resources associated with the XQC_Expression. ">free()</a> function. The <a class="el" href="xqc_8h.html#a707b112e9370ee771b38ea01574df8ff">XQC_Expression</a> object should be freed before the <a class="el" href="xqc_8h.html#a3d46d69abb6d7b408bb8cd8c02ce66fb">XQC_Implementation</a> object that created it.</p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="xqc-basic_8c-example.html#_a1">xqc-basic.c</a>, and <a class="el" href="xqc-context-item_8c-example.html#_a1">xqc-context-item.c</a>.</dd>
</dl></div><h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a04be56651df9f3f47aecd99a0b0ad66e"></a>
2020-02-17 21:19:57 +00:00
<div class="memitem">
<div class="memproto">
<table class="memname">
2020-02-17 21:17:06 +00:00
<tr>
2020-02-17 21:24:47 +00:00
<td class="memname"><a class="el" href="xqc_8h.html#aeb1ad206e9c38a7f84749cafe04d7a3f">XQC_Error</a>(* XQC_Expression_s::create_context)(const <a class="el" href="xqc_8h.html#a707b112e9370ee771b38ea01574df8ff">XQC_Expression</a> *expression, <a class="el" href="xqc_8h.html#acf4c0769616363086377cb527484d33e">XQC_DynamicContext</a> **context)</td>
2020-02-17 21:17:06 +00:00
</tr>
</table>
2020-02-17 21:24:47 +00:00
</div><div class="memdoc">
2020-02-17 21:17:06 +00:00
2020-02-17 21:24:47 +00:00
<p>Creates a dynamic context suitable for use in the <a class="el" href="structXQC__Expression__s.html#a3181579fa2677d43c29efd31a649726c" title="Executes the query represented by the XQC_Expression object using the values in the XQC_DynamicContex...">execute()</a> function. </p>
<p>The user is responsible for freeing the <a class="el" href="xqc_8h.html#acf4c0769616363086377cb527484d33e">XQC_DynamicContext</a> object returned by calling <a class="el" href="structXQC__DynamicContext__s.html#ad40117a7e2dd660ea7478c4cc5124eab" title="Called to free the resources associated with the XQC_DynamicContext. ">XQC_DynamicContext::free()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir"></td><td class="paramname">expression</td><td>The XQC_Expression that this function pointer is a member of. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">context</td><td>The newly created XQC_DynamicContext object.</td></tr>
2020-02-17 21:17:06 +00:00
</table>
2020-02-17 21:19:57 +00:00
</dd>
2020-02-17 21:17:06 +00:00
</dl>
2020-02-17 21:24:47 +00:00
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname"><a class="el" href="xqc_8h.html#aeb1ad206e9c38a7f84749cafe04d7a3fa975a11c6557d4d849e48f4034380a375" title="No error. ">XQC_NO_ERROR</a></td><td></td></tr>
<tr><td class="paramname"><a class="el" href="xqc_8h.html#aeb1ad206e9c38a7f84749cafe04d7a3fa01b5565965d03299df81f0916b8fa768" title="An implementation specific error has occurred. ">XQC_INTERNAL_ERROR</a></td><td></td></tr>
2020-02-17 21:17:06 +00:00
</table>
2020-02-17 21:19:57 +00:00
</dd>
2020-02-17 21:17:06 +00:00
</dl>
2020-02-17 21:19:57 +00:00
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="xqc-context-item_8c-example.html#a8">xqc-context-item.c</a>.</dd>
</dl>
</div>
</div>
2020-02-17 21:24:47 +00:00
<a class="anchor" id="a3181579fa2677d43c29efd31a649726c"></a>
2020-02-17 21:19:57 +00:00
<div class="memitem">
<div class="memproto">
<table class="memname">
2020-02-17 21:17:06 +00:00
<tr>
2020-02-17 21:24:47 +00:00
<td class="memname"><a class="el" href="xqc_8h.html#aeb1ad206e9c38a7f84749cafe04d7a3f">XQC_Error</a>(* XQC_Expression_s::execute)(const <a class="el" href="xqc_8h.html#a707b112e9370ee771b38ea01574df8ff">XQC_Expression</a> *expression, const <a class="el" href="xqc_8h.html#acf4c0769616363086377cb527484d33e">XQC_DynamicContext</a> *context, <a class="el" href="xqc_8h.html#a611c8970264183d7d0f42a8551239463">XQC_Sequence</a> **sequence)</td>
2020-02-17 21:17:06 +00:00
</tr>
</table>
2020-02-17 21:24:47 +00:00
</div><div class="memdoc">
2020-02-17 21:17:06 +00:00
2020-02-17 21:19:57 +00:00
<p>Executes the query represented by the XQC_Expression object using the values in the <a class="el" href="xqc_8h.html#acf4c0769616363086377cb527484d33e">XQC_DynamicContext</a> if provided. </p>
2020-02-17 21:24:47 +00:00
<p>An <a class="el" href="xqc_8h.html#a611c8970264183d7d0f42a8551239463">XQC_Sequence</a> object is returned which can be used to examine the results of the query execution. The user is responsible for freeing the <a class="el" href="xqc_8h.html#a611c8970264183d7d0f42a8551239463">XQC_Sequence</a> object returned by calling <a class="el" href="structXQC__Sequence__s.html#a13ab651edb4e0754cb8a032e2bce50b0" title="Called to free the resources associated with the XQC_Sequence. ">XQC_Sequence::free()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir"></td><td class="paramname">expression</td><td>The XQC_Expression that this function pointer is a member of. </td></tr>
<tr><td class="paramdir"></td><td class="paramname">context</td><td>The dynamic context information to use when executing the query, or 0 to use the implementation defined default dynamic context. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">sequence</td><td>The newly created XQC_Sequence object.</td></tr>
2020-02-17 21:17:06 +00:00
</table>
2020-02-17 21:19:57 +00:00
</dd>
2020-02-17 21:17:06 +00:00
</dl>
2020-02-17 21:24:47 +00:00
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname"><a class="el" href="xqc_8h.html#aeb1ad206e9c38a7f84749cafe04d7a3fa975a11c6557d4d849e48f4034380a375" title="No error. ">XQC_NO_ERROR</a></td><td></td></tr>
<tr><td class="paramname"><a class="el" href="xqc_8h.html#aeb1ad206e9c38a7f84749cafe04d7a3fa01b5565965d03299df81f0916b8fa768" title="An implementation specific error has occurred. ">XQC_INTERNAL_ERROR</a></td><td></td></tr>
<tr><td class="paramname"><a class="el" href="xqc_8h.html#aeb1ad206e9c38a7f84749cafe04d7a3faeb68302bd3ceab3cb9d9473afd06248a" title="A type error has occured while preparing or executing the query. ">XQC_TYPE_ERROR</a></td><td></td></tr>
<tr><td class="paramname"><a class="el" href="xqc_8h.html#aeb1ad206e9c38a7f84749cafe04d7a3fa1ece0ad69a59c3f0ce59b841ded10f9d" title="A dynamic error has occured while preparing or executing the query. ">XQC_DYNAMIC_ERROR</a></td><td></td></tr>
2020-02-17 21:17:06 +00:00
</table>
2020-02-17 21:19:57 +00:00
</dd>
2020-02-17 21:17:06 +00:00
</dl>
2020-02-17 21:19:57 +00:00
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="xqc-basic_8c-example.html#a6">xqc-basic.c</a>, and <a class="el" href="xqc-context-item_8c-example.html#a11">xqc-context-item.c</a>.</dd>
</dl>
</div>
</div>
2020-02-17 21:24:47 +00:00
<a class="anchor" id="a6aa28a94f0ff6732c26f131bbe4d44a9"></a>
2020-02-17 21:19:57 +00:00
<div class="memitem">
<div class="memproto">
<table class="memname">
2020-02-17 21:17:06 +00:00
<tr>
2020-02-17 21:24:47 +00:00
<td class="memname">void(* XQC_Expression_s::free)(<a class="el" href="xqc_8h.html#a707b112e9370ee771b38ea01574df8ff">XQC_Expression</a> *expression)</td>
2020-02-17 21:17:06 +00:00
</tr>
</table>
2020-02-17 21:24:47 +00:00
</div><div class="memdoc">
2020-02-17 21:17:06 +00:00
2020-02-17 21:19:57 +00:00
<p>Called to free the resources associated with the XQC_Expression. </p>
2020-02-17 21:24:47 +00:00
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">expression</td><td>The XQC_Expression that this function pointer is a member of </td></tr>
2020-02-17 21:17:06 +00:00
</table>
2020-02-17 21:19:57 +00:00
</dd>
2020-02-17 21:17:06 +00:00
</dl>
2020-02-17 21:19:57 +00:00
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="xqc-basic_8c-example.html#a12">xqc-basic.c</a>, and <a class="el" href="xqc-context-item_8c-example.html#a17">xqc-context-item.c</a>.</dd>
</dl>
</div>
</div>
2020-02-17 21:24:47 +00:00
<a class="anchor" id="acc0d2caee9f7a61e68c57d18c1d4bd66"></a>
2020-02-17 21:19:57 +00:00
<div class="memitem">
<div class="memproto">
<table class="memname">
2020-02-17 21:17:06 +00:00
<tr>
2020-02-17 21:24:47 +00:00
<td class="memname">void*(* XQC_Expression_s::get_interface)(const <a class="el" href="xqc_8h.html#a707b112e9370ee771b38ea01574df8ff">XQC_Expression</a> *expression, const char *name)</td>
2020-02-17 21:17:06 +00:00
</tr>
</table>
2020-02-17 21:24:47 +00:00
</div><div class="memdoc">
2020-02-17 21:17:06 +00:00
2020-02-17 21:19:57 +00:00
<p>Called to retrieve an implementation specific interface. </p>
2020-02-17 21:24:47 +00:00
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">expression</td><td>The XQC_Expression that this function pointer is a member of. </td></tr>
<tr><td class="paramname">name</td><td>The name that identifies the interface to return</td></tr>
2020-02-17 21:17:06 +00:00
</table>
2020-02-17 21:19:57 +00:00
</dd>
2020-02-17 21:17:06 +00:00
</dl>
2020-02-17 21:24:47 +00:00
<dl class="section return"><dt>Returns</dt><dd>A pointer to the interface, or 0 if the name is not recognized by this implementation of XQC. </dd></dl>
2020-02-17 21:19:57 +00:00
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="xqc_8h_source.html">xqc.h</a></li>
</ul>
2020-02-17 21:24:47 +00:00
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
2020-02-17 21:17:06 +00:00
</body>
</html>