File: manip_8h.html

package info (click to toggle)
mysql%2B%2B 3.2.1%2Bpristine-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 13,624 kB
  • ctags: 11,252
  • sloc: cpp: 35,659; sh: 3,034; makefile: 951; perl: 786
file content (73 lines) | stat: -rw-r--r-- 5,646 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
<!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><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>manip.h File Reference</h1>Declares the Query stream manipulators and operators. <a href="#_details">More...</a>
<p>
<code>#include &quot;<a class="el" href="common_8h-source.html">common.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="myset_8h-source.html">myset.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="stadapter_8h-source.html">stadapter.h</a>&quot;</code><br>
<code>#include &lt;iostream&gt;</code><br>

<p>
<a href="manip_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Namespaces</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><b>mysqlpp</b></td></tr>

<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><b>quote_type0</b> { <a class="el" href="namespacemysqlpp.html#e9f9a1a0b5b6c666cc577ac4ea30f2f8bc8a579670da714d08fece6f43b11b53">mysqlpp::quote</a>
 }</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><b>quote_only_type0</b> { <a class="el" href="namespacemysqlpp.html#c6684f37ebc2f5dc4b526f1858938ae0f77dc617bf2f8715000fea02996eb703">mysqlpp::quote_only</a>
 }</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><b>quote_double_only_type0</b> { <a class="el" href="namespacemysqlpp.html#b7c0f5b960b8c68a5bb6615908f8fb4fde9ec989c0afd3cb18e23689f17f74ed">mysqlpp::quote_double_only</a>
 }</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><b>escape_type0</b> { <b>escape</b>
 }</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><b>do_nothing_type0</b> { <a class="el" href="namespacemysqlpp.html#cabd5572224baf2f7c26f89bc082673fe465f6c0ca597e0ab6332883b7b5f00d">mysqlpp::do_nothing</a>
 }</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><b>ignore_type0</b> { <a class="el" href="namespacemysqlpp.html#ecf53d5cc6a2962626f69dd69e45845f2a90c97a62d76da373d485b2abf3b02a">mysqlpp::ignore</a>
 }</td></tr>

<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">SQLQueryParms &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemysqlpp.html#ca9b938dd5aaec8ba0f92ba2ca08d212">mysqlpp::operator&lt;&lt;</a> (escape_type2 p, SQLTypeAdapter &amp;in)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Inserts a <a class="el" href="classmysqlpp_1_1SQLTypeAdapter.html">SQLTypeAdapter</a> into a stream, escaping special SQL characters.  <a href="#ca9b938dd5aaec8ba0f92ba2ca08d212"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="570ed1997f58aa381d5ee1d9e99fca88"></a><!-- doxytag: member="manip.h::operator&lt;&lt;" ref="570ed1997f58aa381d5ee1d9e99fca88" args="(escape_type1 o, const SQLTypeAdapter &amp;in)" -->
ostream &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemysqlpp.html#570ed1997f58aa381d5ee1d9e99fca88">mysqlpp::operator&lt;&lt;</a> (escape_type1 o, const SQLTypeAdapter &amp;in)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Inserts anything that can be converted to <a class="el" href="classmysqlpp_1_1SQLTypeAdapter.html">SQLTypeAdapter</a> into a stream, escaping special SQL characters as needed. <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Declares the Query stream manipulators and operators. 
<p>
These manipulators let you automatically quote elements or escape characters that are special in SQL when inserting them into a Query stream. They make it easier to build syntactically-correct SQL queries.<p>
This file also includes special <code>operator&lt;&lt;</code> definitions for a few key MySQL++ data types, since we know when to do automatic quoting and escaping for these types. This only works with Query streams, not regular std::ostreams, since we're only concerned with making correct SQL, not with presentation matters.<p>
test/test_manip.cpp exercises the mechanisms defined here. <hr size="1"><address style="align: right;"><small>Generated on 10 Dec 2013 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>