From 5ced83875191cf9e0f395af79f45babd6fae3d29 Mon Sep 17 00:00:00 2001
From: Boris Kolpackov transaction
instance to complete several database
transactions. Similar to the destructor, reset()
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:
transaction
constructor creates a finalized
+ transaction which can later be initialized using reset()
.
+ The finilized()
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:
transaction t (db.begin ()); -- cgit v1.1