File: classmysqlpp_1_1Transaction.html

package info (click to toggle)
mysql%2B%2B 3.2.5-2.1
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 18,360 kB
  • sloc: cpp: 35,788; sh: 3,693; perl: 789; makefile: 730
file content (348 lines) | stat: -rwxr-xr-x 22,380 bytes parent folder | download | duplicates (3)
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>MySQL++ Reference Manual</title>
  <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  <meta name="generator" content="Doxygen 1.8.15"/>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  <title>MySQL++: mysqlpp::Transaction Class Reference</title>
  <link href="tabs.css" rel="stylesheet" type="text/css"/>
  <link href="doxygen.css" rel="stylesheet" type="text/css">
  <script type="text/javascript" src="jquery.js"></script>
  <script type="text/javascript" src="dynsections.js"></script>
  <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
  <link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
  <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
    <div id="titlearea">
    <table cellspacing="0" cellpadding="0">
     <tbody>
     <tr style="height: 56px;">
      <td id="projectalign" style="padding-left: 0.5em;">
       <div id="projectname">MySQL++
       &#160;<span id="projectnumber">3.2.5</span>
       </div>
      </td>
     </tr>
     </tbody>
    </table>
    </div>
    <!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>mysqlpp</b></li><li class="navelem"><a class="el" href="classmysqlpp_1_1Transaction.html">Transaction</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classmysqlpp_1_1Transaction-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">mysqlpp::Transaction Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Helper object for creating exception-safe SQL transactions.  
 <a href="classmysqlpp_1_1Transaction.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="transaction_8h_source.html">transaction.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a91d16b4539a969fb632ee672999cdd1f"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Transaction.html#a91d16b4539a969fb632ee672999cdd1f">IsolationLevel</a> { <a class="el" href="classmysqlpp_1_1Transaction.html#a91d16b4539a969fb632ee672999cdd1fa3932f25965a310d79e396f8f749f3d17">read_uncommitted</a>, 
<a class="el" href="classmysqlpp_1_1Transaction.html#a91d16b4539a969fb632ee672999cdd1fa82065aaf4094dab18b48d8e973d4ef4f">read_committed</a>, 
<a class="el" href="classmysqlpp_1_1Transaction.html#a91d16b4539a969fb632ee672999cdd1fa6a5934315b282de9c0f4037297c6f93a">repeatable_read</a>, 
<a class="el" href="classmysqlpp_1_1Transaction.html#a91d16b4539a969fb632ee672999cdd1fa6479eabcb53fb2d5b2ade3b254f0fd61">serializable</a>
 }</td></tr>
<tr class="memdesc:a91d16b4539a969fb632ee672999cdd1f"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classmysqlpp_1_1Transaction.html" title="Helper object for creating exception-safe SQL transactions.">Transaction</a> isolation levels defined in SQL.  <a href="classmysqlpp_1_1Transaction.html#a91d16b4539a969fb632ee672999cdd1f">More...</a><br /></td></tr>
<tr class="separator:a91d16b4539a969fb632ee672999cdd1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a933f0528d41cea97732d9e70e232612c"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Transaction.html#a933f0528d41cea97732d9e70e232612c">IsolationScope</a> { <a class="el" href="classmysqlpp_1_1Transaction.html#a933f0528d41cea97732d9e70e232612caf73085a07470c23fcdf8c9792cf4839d">this_transaction</a>, 
<a class="el" href="classmysqlpp_1_1Transaction.html#a933f0528d41cea97732d9e70e232612caaa607cae58b78192121c1e1e96111298">session</a>, 
<a class="el" href="classmysqlpp_1_1Transaction.html#a933f0528d41cea97732d9e70e232612ca707b5ddb102ba887030eb7f15acfe80e">global</a>
 }</td></tr>
<tr class="memdesc:a933f0528d41cea97732d9e70e232612c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Isolation level scopes defined in SQL.  <a href="classmysqlpp_1_1Transaction.html#a933f0528d41cea97732d9e70e232612c">More...</a><br /></td></tr>
<tr class="separator:a933f0528d41cea97732d9e70e232612c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a5472100c371746d23311bbd74067c5dc"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Transaction.html#a5472100c371746d23311bbd74067c5dc">Transaction</a> (<a class="el" href="classmysqlpp_1_1Connection.html">Connection</a> &amp;conn, bool consistent=false)</td></tr>
<tr class="memdesc:a5472100c371746d23311bbd74067c5dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simple constructor.  <a href="#a5472100c371746d23311bbd74067c5dc">More...</a><br /></td></tr>
<tr class="separator:a5472100c371746d23311bbd74067c5dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa83ef7b66a4c62fbc012f7ce71e6b2a5"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Transaction.html#aa83ef7b66a4c62fbc012f7ce71e6b2a5">Transaction</a> (<a class="el" href="classmysqlpp_1_1Connection.html">Connection</a> &amp;conn, <a class="el" href="classmysqlpp_1_1Transaction.html#a91d16b4539a969fb632ee672999cdd1f">IsolationLevel</a> level, <a class="el" href="classmysqlpp_1_1Transaction.html#a933f0528d41cea97732d9e70e232612c">IsolationScope</a> scope=<a class="el" href="classmysqlpp_1_1Transaction.html#a933f0528d41cea97732d9e70e232612caf73085a07470c23fcdf8c9792cf4839d">this_transaction</a>, bool consistent=false)</td></tr>
<tr class="memdesc:aa83ef7b66a4c62fbc012f7ce71e6b2a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor allowing custom transaction isolation level and scope.  <a href="#aa83ef7b66a4c62fbc012f7ce71e6b2a5">More...</a><br /></td></tr>
<tr class="separator:aa83ef7b66a4c62fbc012f7ce71e6b2a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a362b0d2524d0c799165190517192dca9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Transaction.html#a362b0d2524d0c799165190517192dca9">~Transaction</a> ()</td></tr>
<tr class="memdesc:a362b0d2524d0c799165190517192dca9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#a362b0d2524d0c799165190517192dca9">More...</a><br /></td></tr>
<tr class="separator:a362b0d2524d0c799165190517192dca9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a109bd0f1d70b6ff69cf3abccf7eea8f8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Transaction.html#a109bd0f1d70b6ff69cf3abccf7eea8f8">commit</a> ()</td></tr>
<tr class="memdesc:a109bd0f1d70b6ff69cf3abccf7eea8f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Commits the transaction.  <a href="#a109bd0f1d70b6ff69cf3abccf7eea8f8">More...</a><br /></td></tr>
<tr class="separator:a109bd0f1d70b6ff69cf3abccf7eea8f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a000e4f0882139eb8470f7472ca14a24e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmysqlpp_1_1Transaction.html#a000e4f0882139eb8470f7472ca14a24e">rollback</a> ()</td></tr>
<tr class="memdesc:a000e4f0882139eb8470f7472ca14a24e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rolls back the transaction.  <a href="#a000e4f0882139eb8470f7472ca14a24e">More...</a><br /></td></tr>
<tr class="separator:a000e4f0882139eb8470f7472ca14a24e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Helper object for creating exception-safe SQL transactions. </p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="a91d16b4539a969fb632ee672999cdd1f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a91d16b4539a969fb632ee672999cdd1f">&#9670;&nbsp;</a></span>IsolationLevel</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classmysqlpp_1_1Transaction.html#a91d16b4539a969fb632ee672999cdd1f">mysqlpp::Transaction::IsolationLevel</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><a class="el" href="classmysqlpp_1_1Transaction.html" title="Helper object for creating exception-safe SQL transactions.">Transaction</a> isolation levels defined in SQL. </p>
<p>These values can be passed to one of the <a class="el" href="classmysqlpp_1_1Transaction.html" title="Helper object for creating exception-safe SQL transactions.">Transaction</a> constructors to change the way the database engine protects transactions from other DB updates. These values are in order of increasing isolation, but decreasing performance. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a91d16b4539a969fb632ee672999cdd1fa3932f25965a310d79e396f8f749f3d17"></a>read_uncommitted&#160;</td><td class="fielddoc"><p>allow "dirty reads" from other transactions </p>
</td></tr>
<tr><td class="fieldname"><a id="a91d16b4539a969fb632ee672999cdd1fa82065aaf4094dab18b48d8e973d4ef4f"></a>read_committed&#160;</td><td class="fielddoc"><p>only read rows committed by other transactions </p>
</td></tr>
<tr><td class="fieldname"><a id="a91d16b4539a969fb632ee672999cdd1fa6a5934315b282de9c0f4037297c6f93a"></a>repeatable_read&#160;</td><td class="fielddoc"><p>other transactions do not affect repeated reads in this transaction </p>
</td></tr>
<tr><td class="fieldname"><a id="a91d16b4539a969fb632ee672999cdd1fa6479eabcb53fb2d5b2ade3b254f0fd61"></a>serializable&#160;</td><td class="fielddoc"><p>this transaction prevents writes to any rows it accesses while it runs </p>
</td></tr>
</table>

</div>
</div>
<a id="a933f0528d41cea97732d9e70e232612c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a933f0528d41cea97732d9e70e232612c">&#9670;&nbsp;</a></span>IsolationScope</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classmysqlpp_1_1Transaction.html#a933f0528d41cea97732d9e70e232612c">mysqlpp::Transaction::IsolationScope</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Isolation level scopes defined in SQL. </p>
<p>These values are only used with one of the <a class="el" href="classmysqlpp_1_1Transaction.html" title="Helper object for creating exception-safe SQL transactions.">Transaction</a> constructors, to select which transaction(s) our change to </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a933f0528d41cea97732d9e70e232612caf73085a07470c23fcdf8c9792cf4839d"></a>this_transaction&#160;</td><td class="fielddoc"><p>change level for this transaction only </p>
</td></tr>
<tr><td class="fieldname"><a id="a933f0528d41cea97732d9e70e232612caaa607cae58b78192121c1e1e96111298"></a>session&#160;</td><td class="fielddoc"><p>change level for all transactions in this session </p>
</td></tr>
<tr><td class="fieldname"><a id="a933f0528d41cea97732d9e70e232612ca707b5ddb102ba887030eb7f15acfe80e"></a>global&#160;</td><td class="fielddoc"><p>change level for all transactions on the DB server </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a5472100c371746d23311bbd74067c5dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5472100c371746d23311bbd74067c5dc">&#9670;&nbsp;</a></span>Transaction() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Transaction::Transaction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmysqlpp_1_1Connection.html">Connection</a> &amp;&#160;</td>
          <td class="paramname"><em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>consistent</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Simple constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>The connection we use to manage the transaction set </td></tr>
    <tr><td class="paramname">consistent</td><td>Whether to use "consistent snapshots" during the transaction. See the documentation for "START TRANSACTION" in the MySQL manual for more on this. </td></tr>
  </table>
  </dd>
</dl>

<p class="reference">References <a class="el" href="classmysqlpp_1_1Query.html#a03ee1b9e393d88de946f5be804ea88cf">mysqlpp::Query::execute()</a>, and <a class="el" href="classmysqlpp_1_1Connection.html#a6954d437d52004915fbc96a0be79ab37">mysqlpp::Connection::query()</a>.</p>

</div>
</div>
<a id="aa83ef7b66a4c62fbc012f7ce71e6b2a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa83ef7b66a4c62fbc012f7ce71e6b2a5">&#9670;&nbsp;</a></span>Transaction() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Transaction::Transaction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmysqlpp_1_1Connection.html">Connection</a> &amp;&#160;</td>
          <td class="paramname"><em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmysqlpp_1_1Transaction.html#a91d16b4539a969fb632ee672999cdd1f">IsolationLevel</a>&#160;</td>
          <td class="paramname"><em>level</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmysqlpp_1_1Transaction.html#a933f0528d41cea97732d9e70e232612c">IsolationScope</a>&#160;</td>
          <td class="paramname"><em>scope</em> = <code><a class="el" href="classmysqlpp_1_1Transaction.html#a933f0528d41cea97732d9e70e232612caf73085a07470c23fcdf8c9792cf4839d">this_transaction</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>consistent</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor allowing custom transaction isolation level and scope. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">conn</td><td>The connection we use to manage the transaction set </td></tr>
    <tr><td class="paramname">level</td><td>Isolation level to use for this transaction </td></tr>
    <tr><td class="paramname">scope</td><td>Selects the scope of the isolation level change </td></tr>
    <tr><td class="paramname">consistent</td><td>Whether to use "consistent snapshots" during the transaction. See the documentation for "START TRANSACTION" in the MySQL manual for more on this. </td></tr>
  </table>
  </dd>
</dl>

<p class="reference">References <a class="el" href="classmysqlpp_1_1Transaction.html#a933f0528d41cea97732d9e70e232612ca707b5ddb102ba887030eb7f15acfe80e">global</a>, <a class="el" href="classmysqlpp_1_1Connection.html#a6954d437d52004915fbc96a0be79ab37">mysqlpp::Connection::query()</a>, <a class="el" href="classmysqlpp_1_1Transaction.html#a91d16b4539a969fb632ee672999cdd1fa82065aaf4094dab18b48d8e973d4ef4f">read_committed</a>, <a class="el" href="classmysqlpp_1_1Transaction.html#a91d16b4539a969fb632ee672999cdd1fa3932f25965a310d79e396f8f749f3d17">read_uncommitted</a>, <a class="el" href="classmysqlpp_1_1Transaction.html#a91d16b4539a969fb632ee672999cdd1fa6a5934315b282de9c0f4037297c6f93a">repeatable_read</a>, <a class="el" href="classmysqlpp_1_1Transaction.html#a91d16b4539a969fb632ee672999cdd1fa6479eabcb53fb2d5b2ade3b254f0fd61">serializable</a>, and <a class="el" href="classmysqlpp_1_1Transaction.html#a933f0528d41cea97732d9e70e232612caaa607cae58b78192121c1e1e96111298">session</a>.</p>

</div>
</div>
<a id="a362b0d2524d0c799165190517192dca9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a362b0d2524d0c799165190517192dca9">&#9670;&nbsp;</a></span>~Transaction()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Transaction::~Transaction </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Destructor. </p>
<p>If the transaction has not been committed or rolled back by the time the destructor is called, it is rolled back. This is the right thing because one way this can happen is if the object is being destroyed as the stack is unwound to handle an exception. In that instance, you certainly want to roll back the transaction. </p>

<p class="reference">References <a class="el" href="classmysqlpp_1_1Transaction.html#a000e4f0882139eb8470f7472ca14a24e">rollback()</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a109bd0f1d70b6ff69cf3abccf7eea8f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a109bd0f1d70b6ff69cf3abccf7eea8f8">&#9670;&nbsp;</a></span>commit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Transaction::commit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Commits the transaction. </p>
<p>This commits all updates to the database using the connection we were created with since this object was created. This is a no-op if the table isn't stored using a transaction-aware storage engine. See CREATE TABLE in the MySQL manual for details. </p>

<p class="reference">References <a class="el" href="classmysqlpp_1_1Query.html#a03ee1b9e393d88de946f5be804ea88cf">mysqlpp::Query::execute()</a>, and <a class="el" href="classmysqlpp_1_1Connection.html#a6954d437d52004915fbc96a0be79ab37">mysqlpp::Connection::query()</a>.</p>

</div>
</div>
<a id="a000e4f0882139eb8470f7472ca14a24e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a000e4f0882139eb8470f7472ca14a24e">&#9670;&nbsp;</a></span>rollback()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Transaction::rollback </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Rolls back the transaction. </p>
<p>This abandons all SQL statements made on the connection since this object was created. This only works on tables stored using a transaction-aware storage engine. See CREATE TABLE in the MySQL manual for details. </p>

<p class="reference">References <a class="el" href="classmysqlpp_1_1Query.html#a03ee1b9e393d88de946f5be804ea88cf">mysqlpp::Query::execute()</a>, and <a class="el" href="classmysqlpp_1_1Connection.html#a6954d437d52004915fbc96a0be79ab37">mysqlpp::Connection::query()</a>.</p>

<p class="reference">Referenced by <a class="el" href="classmysqlpp_1_1Transaction.html#a362b0d2524d0c799165190517192dca9">~Transaction()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="transaction_8h_source.html">transaction.h</a></li>
<li>transaction.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Jul 21 2019 05:32:21 for MySQL++ by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>