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
|
<!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>insertpolicy.h File Reference</h1>Declares the InsertPolicy classes. <a href="#_details">More...</a>
<p>
<p>
<a href="insertpolicy_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>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classRowCountInsertPolicy.html">RowCountInsertPolicy< AccessController ></a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">An insert policy object that triggers a new INSERT statement after a given number of rows have been inserted. <a href="classRowCountInsertPolicy.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classSizeThresholdInsertPolicy.html">SizeThresholdInsertPolicy< AccessController ></a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">An insert policy object that triggers a new INSERT statement after a size threshold for the length of the INSERT statement is exceeded. <a href="classSizeThresholdInsertPolicy.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classMaxPacketInsertPolicy.html">MaxPacketInsertPolicy< AccessController ></a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">An insert policy object that triggers a new INSERT statement if the object to be added would cause the statement to exceed a maximum size. <a href="classMaxPacketInsertPolicy.html#_details">More...</a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Declares the InsertPolicy classes.
<p>
One creates an insert policy object to control how Query::insertfrom() builds queries from collections of SSQLS objects. Policy objects are what cause Query::insertfrom() to have different insertion behavior than Query::insert(iter, iter)<p>
These templates use a class called the AccessController, which is a stand-in for the <a class="el" href="classmysqlpp_1_1Transaction.html">mysqlpp::Transaction</a> class and defaults to the Transaction class. Since some of the InsertPolicy objects (<a class="el" href="classSizeThresholdInsertPolicy.html">SizeThresholdInsertPolicy</a> and <a class="el" href="classMaxPacketInsertPolicy.html">MaxPacketInsertPolicy</a>) may cause Query::insertfrom() to issue multiple SQL statements to perform the insertion of all the objects in the container, and a failure in one of these statements would leave the table in an indeterminate state, the whole operation is wrapped in a transaction.<p>
However, a transaction may not be desired if the calling code is managing transactions, or transactions are not being used for some other reason. In this case, the template can be instantiated with the NoTransaction class. It provides the complete Transaction class interface, while doing nothing.<p>
Where possible, you should use one of the provided insert policy classes, but you can define your own if you need a behavior that the provided set doesn't include.<p>
This file is not meant to be included in end-user code. It's included in Query's public interface, since it is only used with Query::insertfrom(). You access it as Query::InsertPolicy<T> <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>
|