File: structmysqlpp_1_1SQLParseElement.html

package info (click to toggle)
mysql%2B%2B 3.1.0-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 11,640 kB
  • sloc: cpp: 35,569; sh: 3,113; makefile: 946; perl: 786
file content (111 lines) | stat: -rw-r--r-- 7,151 bytes parent folder | download
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<title>MySQL++ Reference Manual</title>
	<meta http-equiv="Content-type" content="text/html;charset=iso-8859-1">
	<link href="doxygen.css" rel="stylesheet" type="text/css">
	<link href="refman.css" rel="stylesheet" type="text/css">
</head>
<body>
<!-- Generated by Doxygen 1.4.7 -->
<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="annotated.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="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>
<div class="nav">
<b>mysqlpp</b>::<a class="el" href="structmysqlpp_1_1SQLParseElement.html">SQLParseElement</a></div>
<h1>mysqlpp::SQLParseElement Struct Reference</h1><!-- doxytag: class="mysqlpp::SQLParseElement" -->Used within <a class="el" href="classmysqlpp_1_1Query.html">Query</a> to hold elements for parameterized queries.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="qparms_8h-source.html">qparms.h</a>&gt;</code>
<p>
Collaboration diagram for mysqlpp::SQLParseElement:<p><center><img src="structmysqlpp_1_1SQLParseElement__coll__graph.png" border="0" usemap="#mysqlpp_1_1SQLParseElement__coll__map" alt="Collaboration graph"></center>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="structmysqlpp_1_1SQLParseElement-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="structmysqlpp_1_1SQLParseElement.html#5095f861effa2f1695c3cc29f79f825e">SQLParseElement</a> (std::string b, char o, signed char n)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create object.  <a href="#5095f861effa2f1695c3cc29f79f825e"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8b0a5afd4a8b825d13579b1427e94331"></a><!-- doxytag: member="mysqlpp::SQLParseElement::before" ref="8b0a5afd4a8b825d13579b1427e94331" args="" -->
std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmysqlpp_1_1SQLParseElement.html#8b0a5afd4a8b825d13579b1427e94331">before</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">string inserted before the parameter <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="99ca4660111774c7bdfc5d0a142d9f00"></a><!-- doxytag: member="mysqlpp::SQLParseElement::option" ref="99ca4660111774c7bdfc5d0a142d9f00" args="" -->
char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmysqlpp_1_1SQLParseElement.html#99ca4660111774c7bdfc5d0a142d9f00">option</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">the parameter option, or blank if none <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dad4d34b5d3435cf327382a0cc343323"></a><!-- doxytag: member="mysqlpp::SQLParseElement::num" ref="dad4d34b5d3435cf327382a0cc343323" args="" -->
signed char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmysqlpp_1_1SQLParseElement.html#dad4d34b5d3435cf327382a0cc343323">num</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">the parameter position to use <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Used within <a class="el" href="classmysqlpp_1_1Query.html">Query</a> to hold elements for parameterized queries. 
<p>
Each element has three parts:<p>
The concept behind the <code>before</code> variable needs a little explaining. When a template query is parsed, each parameter is parsed into one of these <a class="el" href="structmysqlpp_1_1SQLParseElement.html">SQLParseElement</a> objects, but the non-parameter parts of the template also have to be stored somewhere. MySQL++ chooses to attach the text leading up to a parameter to that parameter. So, the <code>before</code> string is simply the text copied literally into the finished query before we insert a value for the parameter.<p>
The <code>option</code> character is currently one of 'q', 'Q', 'r', 'R' or ' '. See the "Template Queries" chapter in the user manual for details.<p>
The position value (<code>num</code>) allows a template query to have its parameters in a different order than in the <a class="el" href="classmysqlpp_1_1Query.html">Query</a> method call. An example of how this can be helpful is in the "Template Queries" chapter of the user manual. 
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="5095f861effa2f1695c3cc29f79f825e"></a><!-- doxytag: member="mysqlpp::SQLParseElement::SQLParseElement" ref="5095f861effa2f1695c3cc29f79f825e" args="(std::string b, char o, signed char n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mysqlpp::SQLParseElement::SQLParseElement           </td>
          <td>(</td>
          <td class="paramtype">std::string&nbsp;</td>
          <td class="paramname"> <em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&nbsp;</td>
          <td class="paramname"> <em>o</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">signed char&nbsp;</td>
          <td class="paramname"> <em>n</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create object. 
<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>b</em>&nbsp;</td><td>the 'before' value </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>o</em>&nbsp;</td><td>the 'option' value </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>the 'num' value </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="qparms_8h-source.html">qparms.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Thu Jun 3 11:59:12 2010 for MySQL++ by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>