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 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 List</span></a></li>
<li><a href="globals.html"><span>File 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 "<a class="el" href="common_8h-source.html">common.h</a>"</code><br>
<code>#include "<a class="el" href="myset_8h-source.html">myset.h</a>"</code><br>
<code>#include "<a class="el" href="stadapter_8h-source.html">stadapter.h</a>"</code><br>
<code>#include <iostream></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 </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 </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 </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 </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 </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 </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 </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 & </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemysqlpp.html#ca9b938dd5aaec8ba0f92ba2ca08d212">mysqlpp::operator<<</a> (escape_type2 p, SQLTypeAdapter &in)</td></tr>
<tr><td class="mdescLeft"> </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<<" ref="570ed1997f58aa381d5ee1d9e99fca88" args="(escape_type1 o, const SQLTypeAdapter &in)" -->
ostream & </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemysqlpp.html#570ed1997f58aa381d5ee1d9e99fca88">mysqlpp::operator<<</a> (escape_type1 o, const SQLTypeAdapter &in)</td></tr>
<tr><td class="mdescLeft"> </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<<</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
<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>
|