File: qparms_8h-source.html

package info (click to toggle)
mysql%2B%2B 3.0.9-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 11,228 kB
  • ctags: 9,647
  • sloc: cpp: 33,154; sh: 3,098; perl: 778; makefile: 700
file content (221 lines) | stat: -rw-r--r-- 19,564 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
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<!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="annotated.html"><span>Classes</span></a></li>
    <li id="current"><a href="files.html"><span>Files</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
  </ul></div>
<h1>qparms.h</h1><a href="qparms_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00002"></a>00002 
<a name="l00003"></a>00003 
<a name="l00004"></a>00004 
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 
<a name="l00007"></a>00007 
<a name="l00008"></a>00008 <span class="comment">/***********************************************************************</span>
<a name="l00009"></a>00009 <span class="comment"> Copyright (c) 1998 by Kevin Atkinson, (c) 1999-2001 by MySQL AB, and</span>
<a name="l00010"></a>00010 <span class="comment"> (c) 2004-2007 by Educational Technology Resources, Inc.  Others may</span>
<a name="l00011"></a>00011 <span class="comment"> also hold copyrights on code in this file.  See the CREDITS.txt file</span>
<a name="l00012"></a>00012 <span class="comment"> in the top directory of the distribution for details.</span>
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment"> This file is part of MySQL++.</span>
<a name="l00015"></a>00015 <span class="comment"></span>
<a name="l00016"></a>00016 <span class="comment"> MySQL++ is free software; you can redistribute it and/or modify it</span>
<a name="l00017"></a>00017 <span class="comment"> under the terms of the GNU Lesser General Public License as published</span>
<a name="l00018"></a>00018 <span class="comment"> by the Free Software Foundation; either version 2.1 of the License, or</span>
<a name="l00019"></a>00019 <span class="comment"> (at your option) any later version.</span>
<a name="l00020"></a>00020 <span class="comment"></span>
<a name="l00021"></a>00021 <span class="comment"> MySQL++ is distributed in the hope that it will be useful, but WITHOUT</span>
<a name="l00022"></a>00022 <span class="comment"> ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or</span>
<a name="l00023"></a>00023 <span class="comment"> FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public</span>
<a name="l00024"></a>00024 <span class="comment"> License for more details.</span>
<a name="l00025"></a>00025 <span class="comment"></span>
<a name="l00026"></a>00026 <span class="comment"> You should have received a copy of the GNU Lesser General Public</span>
<a name="l00027"></a>00027 <span class="comment"> License along with MySQL++; if not, write to the Free Software</span>
<a name="l00028"></a>00028 <span class="comment"> Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301</span>
<a name="l00029"></a>00029 <span class="comment"> USA</span>
<a name="l00030"></a>00030 <span class="comment">***********************************************************************/</span>
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 <span class="preprocessor">#ifndef MYSQLPP_QPARMS_H</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define MYSQLPP_QPARMS_H</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span>
<a name="l00035"></a>00035 <span class="preprocessor">#include "<a class="code" href="stadapter_8h.html">stadapter.h</a>"</span>
<a name="l00036"></a>00036 
<a name="l00037"></a>00037 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00038"></a>00038 
<a name="l00039"></a>00039 <span class="keyword">namespace </span>mysqlpp {
<a name="l00040"></a>00040 
<a name="l00041"></a>00041 <span class="preprocessor">#if !defined(DOXYGEN_IGNORE)</span>
<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="comment">// Make Doxygen ignore this</span>
<a name="l00043"></a>00043 <span class="keyword">class </span>MYSQLPP_EXPORT Query;
<a name="l00044"></a>00044 <span class="preprocessor">#endif</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span>
<a name="l00048"></a><a class="code" href="classmysqlpp_1_1SQLQueryParms.html">00048</a> <span class="keyword">class </span>MYSQLPP_EXPORT SQLQueryParms : <span class="keyword">public</span> std::vector&lt;SQLTypeAdapter&gt;
<a name="l00049"></a>00049 {
<a name="l00050"></a>00050 <span class="keyword">public</span>:
<a name="l00053"></a><a class="code" href="classmysqlpp_1_1SQLQueryParms.html#c637090d1e8981437fcc3277a9983099">00053</a>         <span class="keyword">typedef</span> <span class="keyword">const</span> <a class="code" href="classmysqlpp_1_1SQLTypeAdapter.html">SQLTypeAdapter</a>&amp; <a class="code" href="classmysqlpp_1_1SQLTypeAdapter.html">sta</a>;
<a name="l00054"></a>00054 
<a name="l00056"></a><a class="code" href="classmysqlpp_1_1SQLQueryParms.html#ab7e6bc3ba59425a174c9d31ab6a3a99">00056</a>         SQLQueryParms() :
<a name="l00057"></a>00057         parent_(0),
<a name="l00058"></a>00058         processing_(false)
<a name="l00059"></a>00059         {
<a name="l00060"></a>00060         }
<a name="l00061"></a>00061         
<a name="l00066"></a><a class="code" href="classmysqlpp_1_1SQLQueryParms.html#0796bfe6a2982b8fce758b174e547f5f">00066</a>         SQLQueryParms(Query* p) :
<a name="l00067"></a>00067         parent_(p),
<a name="l00068"></a>00068         processing_(false)
<a name="l00069"></a>00069         {
<a name="l00070"></a>00070         }
<a name="l00071"></a>00071         
<a name="l00075"></a><a class="code" href="classmysqlpp_1_1SQLQueryParms.html#90660977a90ed50dd83a7ddc26f0f334">00075</a>         <span class="keywordtype">bool</span> bound() { <span class="keywordflow">return</span> parent_ != 0; }
<a name="l00076"></a>00076 
<a name="l00078"></a><a class="code" href="classmysqlpp_1_1SQLQueryParms.html#15b3fb93546e32b4cbd8015db34ec1e5">00078</a>         <span class="keywordtype">void</span> clear() { erase(begin(), end()); }
<a name="l00079"></a>00079 
<a name="l00088"></a>00088         size_t escape_string(std::string* ps, <span class="keyword">const</span> <span class="keywordtype">char</span>* original = 0,
<a name="l00089"></a>00089                         size_t length = 0) <span class="keyword">const</span>;
<a name="l00090"></a>00090 
<a name="l00095"></a>00095         size_t escape_string(<span class="keywordtype">char</span>* escaped, <span class="keyword">const</span> <span class="keywordtype">char</span>* original,
<a name="l00096"></a>00096                         size_t length) <span class="keyword">const</span>;
<a name="l00097"></a>00097 
<a name="l00099"></a><a class="code" href="classmysqlpp_1_1SQLQueryParms.html#e062e7125fd3af499cb6a50d9e9ed078">00099</a>         <a class="code" href="classmysqlpp_1_1SQLTypeAdapter.html">SQLTypeAdapter</a>&amp; operator [](size_type n)
<a name="l00100"></a>00100         {
<a name="l00101"></a>00101                 <span class="keywordflow">if</span> (n &gt;= size()) {
<a name="l00102"></a>00102                         insert(end(), (n + 1) - size(), <span class="stringliteral">""</span>);
<a name="l00103"></a>00103                 }
<a name="l00104"></a>00104                 <span class="keywordflow">return</span> std::vector&lt;SQLTypeAdapter&gt;::operator [](n);
<a name="l00105"></a>00105         }
<a name="l00106"></a>00106 
<a name="l00108"></a><a class="code" href="classmysqlpp_1_1SQLQueryParms.html#abeae948017429107afc1e20a5048dea">00108</a>         <span class="keyword">const</span> <a class="code" href="classmysqlpp_1_1SQLTypeAdapter.html">SQLTypeAdapter</a>&amp; operator [](size_type n)<span class="keyword"> const</span>
<a name="l00109"></a>00109 <span class="keyword">                        </span>{ <span class="keywordflow">return</span> std::vector&lt;SQLTypeAdapter&gt;::operator [](n); }
<a name="l00110"></a>00110         
<a name="l00112"></a>00112         <a class="code" href="classmysqlpp_1_1SQLTypeAdapter.html">SQLTypeAdapter</a>&amp; operator [](<span class="keyword">const</span> <span class="keywordtype">char</span> *str);
<a name="l00113"></a>00113 
<a name="l00115"></a>00115         <span class="keyword">const</span> <a class="code" href="classmysqlpp_1_1SQLTypeAdapter.html">SQLTypeAdapter</a>&amp; operator [](<span class="keyword">const</span> <span class="keywordtype">char</span> *str) <span class="keyword">const</span>;
<a name="l00116"></a>00116 
<a name="l00118"></a><a class="code" href="classmysqlpp_1_1SQLQueryParms.html#99cd26777450918add30f14c0224d4e8">00118</a>         SQLQueryParms&amp; operator &lt;&lt;(<span class="keyword">const</span> <a class="code" href="classmysqlpp_1_1SQLTypeAdapter.html">SQLTypeAdapter</a>&amp; str)
<a name="l00119"></a>00119         {
<a name="l00120"></a>00120                 push_back(str);
<a name="l00121"></a>00121                 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00122"></a>00122         }
<a name="l00123"></a>00123 
<a name="l00125"></a><a class="code" href="classmysqlpp_1_1SQLQueryParms.html#5ea5a8f1b1598a03c969e4bd42b70367">00125</a>         SQLQueryParms&amp; operator +=(<span class="keyword">const</span> <a class="code" href="classmysqlpp_1_1SQLTypeAdapter.html">SQLTypeAdapter</a>&amp; str)
<a name="l00126"></a>00126         {
<a name="l00127"></a>00127                 push_back(str);
<a name="l00128"></a>00128                 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00129"></a>00129         }
<a name="l00130"></a>00130 
<a name="l00140"></a>00140         SQLQueryParms operator +(
<a name="l00141"></a>00141                         <span class="keyword">const</span> SQLQueryParms&amp; other) <span class="keyword">const</span>;
<a name="l00142"></a>00142 
<a name="l00143"></a>00143 <span class="preprocessor">#if !defined(DOXYGEN_IGNORE)</span>
<a name="l00144"></a>00144 <span class="preprocessor"></span><span class="comment">// Doxygen will not generate documentation for this section.</span>
<a name="l00145"></a>00145         <span class="keywordtype">void</span> set(sta a)
<a name="l00146"></a>00146         {
<a name="l00147"></a>00147                 clear();
<a name="l00148"></a>00148                 *<span class="keyword">this</span> &lt;&lt; a;
<a name="l00149"></a>00149         }
<a name="l00150"></a>00150         <span class="keywordtype">void</span> set(sta a, sta b)
<a name="l00151"></a>00151         {
<a name="l00152"></a>00152                 clear();
<a name="l00153"></a>00153                 *<span class="keyword">this</span> &lt;&lt; a &lt;&lt; b;
<a name="l00154"></a>00154         }
<a name="l00155"></a>00155         <span class="keywordtype">void</span> set(sta a, sta b, sta c)
<a name="l00156"></a>00156         {
<a name="l00157"></a>00157                 clear();
<a name="l00158"></a>00158                 *<span class="keyword">this</span> &lt;&lt; a &lt;&lt; b &lt;&lt; c;
<a name="l00159"></a>00159         }
<a name="l00160"></a>00160         <span class="keywordtype">void</span> set(sta a, sta b, sta c, sta d)
<a name="l00161"></a>00161         {
<a name="l00162"></a>00162                 clear();
<a name="l00163"></a>00163                 *<span class="keyword">this</span> &lt;&lt; a &lt;&lt; b &lt;&lt; c &lt;&lt; d;
<a name="l00164"></a>00164         }
<a name="l00165"></a>00165         <span class="keywordtype">void</span> set(sta a, sta b, sta c, sta d, sta e)
<a name="l00166"></a>00166         {
<a name="l00167"></a>00167                 clear();
<a name="l00168"></a>00168                 *<span class="keyword">this</span> &lt;&lt; a &lt;&lt; b &lt;&lt; c &lt;&lt; d &lt;&lt; e;
<a name="l00169"></a>00169         }
<a name="l00170"></a>00170         <span class="keywordtype">void</span> set(sta a, sta b, sta c, sta d, sta e, sta f)
<a name="l00171"></a>00171         {
<a name="l00172"></a>00172                 clear();
<a name="l00173"></a>00173                 *<span class="keyword">this</span> &lt;&lt; a &lt;&lt; b &lt;&lt; c &lt;&lt; d &lt;&lt; e &lt;&lt; f;
<a name="l00174"></a>00174         }
<a name="l00175"></a>00175         <span class="keywordtype">void</span> set(sta a, sta b, sta c, sta d, sta e, sta f, sta g)
<a name="l00176"></a>00176         {
<a name="l00177"></a>00177                 clear();
<a name="l00178"></a>00178                 *<span class="keyword">this</span> &lt;&lt; a &lt;&lt; b &lt;&lt; c &lt;&lt; d &lt;&lt; e &lt;&lt; f &lt;&lt; g;
<a name="l00179"></a>00179         }
<a name="l00180"></a>00180         <span class="keywordtype">void</span> set(sta a, sta b, sta c, sta d, sta e, sta f, sta g, sta h)
<a name="l00181"></a>00181         {
<a name="l00182"></a>00182                 clear();
<a name="l00183"></a>00183                 *<span class="keyword">this</span> &lt;&lt; a &lt;&lt; b &lt;&lt; c &lt;&lt; d &lt;&lt; e &lt;&lt; f &lt;&lt; g &lt;&lt; h;
<a name="l00184"></a>00184         }
<a name="l00185"></a>00185         <span class="keywordtype">void</span> set(sta a, sta b, sta c, sta d, sta e, sta f, sta g, sta h, sta i)
<a name="l00186"></a>00186         {
<a name="l00187"></a>00187                 clear();
<a name="l00188"></a>00188                 *<span class="keyword">this</span> &lt;&lt; a &lt;&lt; b &lt;&lt; c &lt;&lt; d &lt;&lt; e &lt;&lt; f &lt;&lt; g &lt;&lt; h &lt;&lt; i;
<a name="l00189"></a>00189         }
<a name="l00190"></a>00190         <span class="keywordtype">void</span> set(sta a, sta b, sta c, sta d, sta e, sta f, sta g, sta h, sta i, sta j)
<a name="l00191"></a>00191         {
<a name="l00192"></a>00192                 clear();
<a name="l00193"></a>00193                 *<span class="keyword">this</span> &lt;&lt; a &lt;&lt; b &lt;&lt; c &lt;&lt; d &lt;&lt; e &lt;&lt; f &lt;&lt; g &lt;&lt; h &lt;&lt; i &lt;&lt; j;
<a name="l00194"></a>00194         }
<a name="l00195"></a>00195         <span class="keywordtype">void</span> set(sta a, sta b, sta c, sta d, sta e, sta f, sta g, sta h, sta i, sta j, sta k)
<a name="l00196"></a>00196         {
<a name="l00197"></a>00197                 clear();
<a name="l00198"></a>00198                 *<span class="keyword">this</span> &lt;&lt; a &lt;&lt; b &lt;&lt; c &lt;&lt; d &lt;&lt; e &lt;&lt; f &lt;&lt; g &lt;&lt; h &lt;&lt; i &lt;&lt; j &lt;&lt; k;
<a name="l00199"></a>00199         }
<a name="l00200"></a>00200 <span class="preprocessor">#endif // !defined(DOXYGEN_IGNORE)</span>
<a name="l00201"></a>00201 <span class="preprocessor"></span>
<a name="l00207"></a><a class="code" href="classmysqlpp_1_1SQLQueryParms.html#2938179f7995d7fb8dbc7afc31e83971">00207</a>         <span class="keywordtype">void</span> set(<a class="code" href="classmysqlpp_1_1SQLTypeAdapter.html">sta</a> a, <a class="code" href="classmysqlpp_1_1SQLTypeAdapter.html">sta</a> b, <a class="code" href="classmysqlpp_1_1SQLTypeAdapter.html">sta</a> c, <a class="code" href="classmysqlpp_1_1SQLTypeAdapter.html">sta</a> d, <a class="code" href="classmysqlpp_1_1SQLTypeAdapter.html">sta</a> e, <a class="code" href="classmysqlpp_1_1SQLTypeAdapter.html">sta</a> f, <a class="code" href="classmysqlpp_1_1SQLTypeAdapter.html">sta</a> g,
<a name="l00208"></a>00208                         <a class="code" href="classmysqlpp_1_1SQLTypeAdapter.html">sta</a> h, <a class="code" href="classmysqlpp_1_1SQLTypeAdapter.html">sta</a> i, <a class="code" href="classmysqlpp_1_1SQLTypeAdapter.html">sta</a> j, <a class="code" href="classmysqlpp_1_1SQLTypeAdapter.html">sta</a> k, <a class="code" href="classmysqlpp_1_1SQLTypeAdapter.html">sta</a> l)
<a name="l00209"></a>00209         {
<a name="l00210"></a>00210                 clear();
<a name="l00211"></a>00211                 *<span class="keyword">this</span> &lt;&lt; a &lt;&lt; b &lt;&lt; c &lt;&lt; d &lt;&lt; e &lt;&lt; f &lt;&lt; g &lt;&lt; h &lt;&lt; i &lt;&lt; j &lt;&lt; k &lt;&lt; l;
<a name="l00212"></a>00212         }
<a name="l00213"></a>00213 
<a name="l00214"></a>00214 <span class="keyword">private</span>:
<a name="l00215"></a>00215         <span class="keyword">friend</span> <span class="keyword">class </span>Query;
<a name="l00216"></a>00216 
<a name="l00217"></a>00217         Query* parent_;
<a name="l00218"></a>00218         <span class="keywordtype">bool</span> processing_;       
<a name="l00219"></a>00219 };
<a name="l00220"></a>00220 
<a name="l00221"></a>00221 
<a name="l00243"></a>00243 
<a name="l00244"></a><a class="code" href="structmysqlpp_1_1SQLParseElement.html">00244</a> <span class="keyword">struct </span><a class="code" href="structmysqlpp_1_1SQLParseElement.html">SQLParseElement</a>
<a name="l00245"></a>00245 {
<a name="l00251"></a><a class="code" href="structmysqlpp_1_1SQLParseElement.html#5095f861effa2f1695c3cc29f79f825e">00251</a>         <a class="code" href="structmysqlpp_1_1SQLParseElement.html#5095f861effa2f1695c3cc29f79f825e">SQLParseElement</a>(std::string b, <span class="keywordtype">char</span> o, <span class="keywordtype">signed</span> <span class="keywordtype">char</span> n) :
<a name="l00252"></a>00252         <a class="code" href="structmysqlpp_1_1SQLParseElement.html#8b0a5afd4a8b825d13579b1427e94331">before</a>(b),
<a name="l00253"></a>00253         <a class="code" href="structmysqlpp_1_1SQLParseElement.html#99ca4660111774c7bdfc5d0a142d9f00">option</a>(o),
<a name="l00254"></a>00254         <a class="code" href="structmysqlpp_1_1SQLParseElement.html#dad4d34b5d3435cf327382a0cc343323">num</a>(n)
<a name="l00255"></a>00255         {
<a name="l00256"></a>00256         }
<a name="l00257"></a>00257         
<a name="l00258"></a><a class="code" href="structmysqlpp_1_1SQLParseElement.html#8b0a5afd4a8b825d13579b1427e94331">00258</a>         std::string <a class="code" href="structmysqlpp_1_1SQLParseElement.html#8b0a5afd4a8b825d13579b1427e94331">before</a>;             
<a name="l00259"></a><a class="code" href="structmysqlpp_1_1SQLParseElement.html#99ca4660111774c7bdfc5d0a142d9f00">00259</a>         <span class="keywordtype">char</span> <a class="code" href="structmysqlpp_1_1SQLParseElement.html#99ca4660111774c7bdfc5d0a142d9f00">option</a>;                    
<a name="l00260"></a><a class="code" href="structmysqlpp_1_1SQLParseElement.html#dad4d34b5d3435cf327382a0cc343323">00260</a>         <span class="keywordtype">signed</span> <span class="keywordtype">char</span> <a class="code" href="structmysqlpp_1_1SQLParseElement.html#dad4d34b5d3435cf327382a0cc343323">num</a>;                
<a name="l00261"></a>00261 };
<a name="l00262"></a>00262 
<a name="l00263"></a>00263 } <span class="comment">// end namespace mysqlpp</span>
<a name="l00264"></a>00264 
<a name="l00265"></a>00265 <span class="preprocessor">#endif // !defined(MYSQLPP_QPARMS_H)</span>
<a name="l00266"></a>00266 <span class="preprocessor"></span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Wed Feb 4 14:42:56 2009 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>