File: classSizeThresholdInsertPolicy.html

package info (click to toggle)
mysql%2B%2B 3.1.0-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 11,640 kB
  • sloc: cpp: 35,569; sh: 3,113; makefile: 946; perl: 786
file content (111 lines) | stat: -rw-r--r-- 6,552 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
<!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 id="current"><a href="annotated.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul></div>
<h1>SizeThresholdInsertPolicy&lt; AccessController &gt; Class Template Reference</h1><!-- doxytag: class="SizeThresholdInsertPolicy" -->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="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="insertpolicy_8h-source.html">insertpolicy.h</a>&gt;</code>
<p>
<a href="classSizeThresholdInsertPolicy-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="33d4e8d394d426d4c0e76301965ac506"></a><!-- doxytag: member="SizeThresholdInsertPolicy::access_controller" ref="33d4e8d394d426d4c0e76301965ac506" args="" -->
typedef AccessController&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSizeThresholdInsertPolicy.html#33d4e8d394d426d4c0e76301965ac506">access_controller</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Alias for our access controller type. <br></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="906fb0ee7cd08e682d348b9d1fb083e6"></a><!-- doxytag: member="SizeThresholdInsertPolicy::SizeThresholdInsertPolicy" ref="906fb0ee7cd08e682d348b9d1fb083e6" args="(int size)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSizeThresholdInsertPolicy.html#906fb0ee7cd08e682d348b9d1fb083e6">SizeThresholdInsertPolicy</a> (int size)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d8258f038c4e5a03b5517558f00e0849"></a><!-- doxytag: member="SizeThresholdInsertPolicy::~SizeThresholdInsertPolicy" ref="d8258f038c4e5a03b5517558f00e0849" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSizeThresholdInsertPolicy.html#d8258f038c4e5a03b5517558f00e0849">~SizeThresholdInsertPolicy</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class RowT&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classSizeThresholdInsertPolicy.html#2a1e33e96b573ef9e0a58edd89da72a0">can_add</a> (int size, const RowT &amp;object) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Can we add another object to the query?  <a href="#2a1e33e96b573ef9e0a58edd89da72a0"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;class AccessController = Transaction&gt;<br>
 class SizeThresholdInsertPolicy&lt; AccessController &gt;</h3>

An insert policy object that triggers a new INSERT statement after a size threshold for the length of the INSERT statement is exceeded. 
<p>
Although this insert policy isn't completely deterministic, it avoids building the VALUES expression for the SSQLS object passed in. 
<p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="2a1e33e96b573ef9e0a58edd89da72a0"></a><!-- doxytag: member="SizeThresholdInsertPolicy::can_add" ref="2a1e33e96b573ef9e0a58edd89da72a0" args="(int size, const RowT &amp;object) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class AccessController = Transaction&gt; </div>
<div class="memtemplate">
template&lt;class RowT&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classSizeThresholdInsertPolicy.html">SizeThresholdInsertPolicy</a>&lt; AccessController &gt;::can_add           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const RowT &amp;&nbsp;</td>
          <td class="paramname"> <em>object</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Can we add another object to the query? 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>current length of the INSERT statement </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>object</em>&nbsp;</td><td>the SSQLS object to be added</td></tr>
  </table>
</dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>true</em>&nbsp;</td><td>if the object is allowed to be added to the INSERT statement </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="insertpolicy_8h-source.html">insertpolicy.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Thu Jun 3 11:59:12 2010 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>