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
|
<!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">
</head>
<body>
<!-- Generated by Doxygen 1.8.5 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<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 class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>File Members</span></a></li>
</ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#define-members">Macros</a> </div>
<div class="headertitle">
<div class="title">insertpolicy.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>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></p>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Declares the InsertPolicy classes. </p>
<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>
<p>These templates use a class called the AccessController, which is a stand-in for the <a class="el" href="classmysqlpp_1_1Transaction.html" title="Helper object for creating exception-safe SQL transactions. ">mysqlpp::Transaction</a> class and defaults to the Transaction class. Since some of the InsertPolicy objects (SizeThresholdInsertPolicy and MaxPacketInsertPolicy) 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>
<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>
<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>
<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> </p>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Mar 18 2015 18:55:03 for MySQL++ by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
|