diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-04-25 07:34:36 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-04-25 07:34:36 +0200 |
commit | 5ced83875191cf9e0f395af79f45babd6fae3d29 (patch) | |
tree | 471026d76ed78ce5106bb4c9b0cc30e6551e1591 /doc/manual.xhtml | |
parent | b0e61f10f4cf1b90a4fa2252f111137ebbcd3e66 (diff) |
Add default constructor, finalized() accessor to transaction
Diffstat (limited to 'doc/manual.xhtml')
-rw-r--r-- | doc/manual.xhtml | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/doc/manual.xhtml b/doc/manual.xhtml index dfdca31..75f9102 100644 --- a/doc/manual.xhtml +++ b/doc/manual.xhtml @@ -2973,8 +2973,11 @@ namespace odb typedef odb::database database_type; typedef odb::connection connection_type; + explicit transaction (transaction_impl*, bool make_current = true); + transaction (); + void reset (transaction_impl*, bool make_current = true); @@ -2990,6 +2993,10 @@ namespace odb connection_type& connection (); + bool + finilized () const; + + public: static bool has_current (); @@ -3004,6 +3011,7 @@ namespace odb // Callback API. // + public: ... }; } @@ -3070,9 +3078,12 @@ t2.commit (); <code>transaction</code> instance to complete several database transactions. Similar to the destructor, <code>reset()</code> will roll the current transaction back if it hasn't been finalized. - Here is how we can use this function to commit the current transaction - and start a new one every time a certain number of database operations - has been performed:</p> + The default <code>transaction</code> constructor creates a finalized + transaction which can later be initialized using <code>reset()</code>. + The <code>finilized()</code> accessor can be used to check whether the + transaction has been finalized. Here is how we can use this functionality + to commit the current transaction and start a new one every time a + certain number of database operations has been performed:</p> <pre class="cxx"> transaction t (db.begin ()); |