From 3b63c05dbbd64db3ebc793cf8eb9003dacfd4cba Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 25 Apr 2013 07:34:35 +0200 Subject: Add default constructor, finalized() accessor to transaction --- odb/transaction.hxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'odb/transaction.hxx') diff --git a/odb/transaction.hxx b/odb/transaction.hxx index e80b21d..7abb502 100644 --- a/odb/transaction.hxx +++ b/odb/transaction.hxx @@ -31,6 +31,11 @@ namespace odb explicit transaction (transaction_impl*, bool make_current = true); + // Create a finalized transaction instance which can later be initialized + // with reset(). + // + transaction (); + // Unless the transaction has already been finalized (explicitly // committed or rolled back), the destructor will roll it back. // @@ -60,6 +65,9 @@ namespace odb connection_type& connection (); + bool + finalized () const {return finalized_;} + public: // Return true if there is a transaction in effect. // -- cgit v1.1