1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
|
<!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&type=2" border="0" alt="SourceForge.net Logo" /></a>
<!-- Generated by Doxygen 1.8.5 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<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>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-attribs">Public Attributes</a> |
<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-->
<div class="contents">
<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.
<a href="structXQC__Expression__s.html#details">More...</a></p>
<p><code>#include <<a class="el" href="xqc_8h_source.html">xqc.h</a>></code></p>
<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>(* </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"> </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"> </td></tr>
<tr class="memitem:a3181579fa2677d43c29efd31a649726c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="xqc_8h.html#aeb1ad206e9c38a7f84749cafe04d7a3f">XQC_Error</a>(* </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"> </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"> </td></tr>
<tr class="memitem:acc0d2caee9f7a61e68c57d18c1d4bd66"><td class="memItemLeft" align="right" valign="top">void *(* </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"> </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"> </td></tr>
<tr class="memitem:a6aa28a94f0ff6732c26f131bbe4d44a9"><td class="memItemLeft" align="right" valign="top">void(* </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"> </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"> </td></tr>
</table>
<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>
<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>
<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>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<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>
</tr>
</table>
</div><div class="memdoc">
<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>
</table>
</dd>
</dl>
<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>
</table>
</dd>
</dl>
<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>
<a class="anchor" id="a3181579fa2677d43c29efd31a649726c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<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>
</tr>
</table>
</div><div class="memdoc">
<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>
<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>
</table>
</dd>
</dl>
<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>
</table>
</dd>
</dl>
<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>
<a class="anchor" id="a6aa28a94f0ff6732c26f131bbe4d44a9"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void(* XQC_Expression_s::free)(<a class="el" href="xqc_8h.html#a707b112e9370ee771b38ea01574df8ff">XQC_Expression</a> *expression)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Called to free the resources associated with the XQC_Expression. </p>
<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>
</table>
</dd>
</dl>
<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>
<a class="anchor" id="acc0d2caee9f7a61e68c57d18c1d4bd66"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<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>
</tr>
</table>
</div><div class="memdoc">
<p>Called to retrieve an implementation specific interface. </p>
<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>
</table>
</dd>
</dl>
<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>
</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>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
|