File: classwx_s_q_lite3_statement_buffer.html

package info (click to toggle)
wxsqlite3 3.0.0.1~dfsg0-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 6,740 kB
  • sloc: cpp: 20,130; sh: 2,837; makefile: 302; ansic: 197; php: 9
file content (237 lines) | stat: -rwxr-xr-x 11,367 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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>wxSQLite3: wxSQLite3StatementBuffer Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">wxSQLite3&#160;<span id="projectnumber">3.0.0</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;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="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">wxSQLite3StatementBuffer Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="wxSQLite3StatementBuffer" -->
<p>SQL statment buffer for use with SQLite3's printf method.  
 <a href="classwx_s_q_lite3_statement_buffer.html#details">More...</a></p>

<p><code>#include &lt;wxsqlite3.h&gt;</code></p>

<p><a href="classwx_s_q_lite3_statement_buffer-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_s_q_lite3_statement_buffer.html#aeabac47cf1dda49ae421c6f540d31f7d">wxSQLite3StatementBuffer</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#aeabac47cf1dda49ae421c6f540d31f7d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_s_q_lite3_statement_buffer.html#ab6018ed9530de2fc43760bbef9c7a70a">~wxSQLite3StatementBuffer</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#ab6018ed9530de2fc43760bbef9c7a70a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_s_q_lite3_statement_buffer.html#ad7dadc7a9b874c33cfca7565271586e8">Format</a> (const char *format,...)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Format a SQL statement using SQLite3's printf method.  <a href="#ad7dadc7a9b874c33cfca7565271586e8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_s_q_lite3_statement_buffer.html#a626288d04e2231632e29963a46aa9d4c">FormatV</a> (const char *format, va_list va)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Format a SQL statement using SQLite3's printf method.  <a href="#a626288d04e2231632e29963a46aa9d4c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_s_q_lite3_statement_buffer.html#aef64da2f49ed9b482b4bc8c8448e8bfe">operator const char *</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Dereference the internal buffer.  <a href="#aef64da2f49ed9b482b4bc8c8448e8bfe"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_s_q_lite3_statement_buffer.html#af7fe04229365aab5eb89914da1cb03ff">Clear</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear the internal buffer.  <a href="#af7fe04229365aab5eb89914da1cb03ff"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>SQL statment buffer for use with SQLite3's printf method. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aeabac47cf1dda49ae421c6f540d31f7d"></a><!-- doxytag: member="wxSQLite3StatementBuffer::wxSQLite3StatementBuffer" ref="aeabac47cf1dda49ae421c6f540d31f7d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wxSQLite3StatementBuffer::wxSQLite3StatementBuffer </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructor. </p>

</div>
</div>
<a class="anchor" id="ab6018ed9530de2fc43760bbef9c7a70a"></a><!-- doxytag: member="wxSQLite3StatementBuffer::~wxSQLite3StatementBuffer" ref="ab6018ed9530de2fc43760bbef9c7a70a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wxSQLite3StatementBuffer::~wxSQLite3StatementBuffer </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destructor. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="af7fe04229365aab5eb89914da1cb03ff"></a><!-- doxytag: member="wxSQLite3StatementBuffer::Clear" ref="af7fe04229365aab5eb89914da1cb03ff" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wxSQLite3StatementBuffer::Clear </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Clear the internal buffer. </p>

</div>
</div>
<a class="anchor" id="ad7dadc7a9b874c33cfca7565271586e8"></a><!-- doxytag: member="wxSQLite3StatementBuffer::Format" ref="ad7dadc7a9b874c33cfca7565271586e8" args="(const char *format,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char * wxSQLite3StatementBuffer::Format </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Format a SQL statement using SQLite3's printf method. </p>
<p>This method is a variant of the "sprintf()" from the standard C library. All of the usual printf formatting options apply. In addition, there is a "%q" option. q works like s in that it substitutes a null-terminated string from the argument list. But q also doubles every '\'' character. q is designed for use inside a string literal. By doubling each '\'' character it escapes that character and allows it to be inserted into the string.</p>
<p>For example, so some string variable contains text as follows:</p>
<p>char *zText = "It's a happy day!";</p>
<p>One can use this text in an SQL statement as follows:</p>
<p><a class="el" href="classwx_s_q_lite3_statement_buffer.html" title="SQL statment buffer for use with SQLite3&#39;s printf method.">wxSQLite3StatementBuffer</a> stmtBuffer; stmtBuffer.Format("INSERT INTO table VALUES('%q')", zText);</p>
<p>Because the q format string is used, the '\'' character in zText is escaped and the SQL generated is as follows:</p>
<p>INSERT INTO table1 VALUES('It''s a happy day!')</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">format</td><td>SQL statement string with formatting options </td></tr>
    <tr><td class="paramname">...</td><td>list of statement parameters </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>const char pointer to the resulting statement buffer </dd></dl>

</div>
</div>
<a class="anchor" id="a626288d04e2231632e29963a46aa9d4c"></a><!-- doxytag: member="wxSQLite3StatementBuffer::FormatV" ref="a626288d04e2231632e29963a46aa9d4c" args="(const char *format, va_list va)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char * wxSQLite3StatementBuffer::FormatV </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">va_list&#160;</td>
          <td class="paramname"><em>va</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Format a SQL statement using SQLite3's printf method. </p>
<p>This method is like method Format but takes a va_list argument to pass the statement parameters.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">format</td><td>SQL statement string with formatting options </td></tr>
    <tr><td class="paramname">va</td><td>va_list of statement parameters </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>const char pointer to the resulting statement buffer </dd></dl>

</div>
</div>
<a class="anchor" id="aef64da2f49ed9b482b4bc8c8448e8bfe"></a><!-- doxytag: member="wxSQLite3StatementBuffer::operator const char *" ref="aef64da2f49ed9b482b4bc8c8448e8bfe" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wxSQLite3StatementBuffer::operator const char * </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Dereference the internal buffer. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>const char pointer to the resulting statement buffer </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="wxsqlite3_8h.html">wxsqlite3.h</a></li>
<li><a class="el" href="wxsqlite3_8cpp.html">wxsqlite3.cpp</a></li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Jan 19 2012 16:17:48 for wxSQLite3 by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>