From ae4b24d8d83a46dce969fd049a480bcaaeb0ad83 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 24 Aug 2011 13:42:04 +0200 Subject: Add support for transaction multiplexing Also delay getting a connection until after we do all the sanity checks (e.g., that there is no active transaction). Otherwise we are running risk of getting blocked rather than throwing an exception. --- odb/pgsql/transaction-impl.hxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'odb/pgsql/transaction-impl.hxx') diff --git a/odb/pgsql/transaction-impl.hxx b/odb/pgsql/transaction-impl.hxx index d3a76ce..2551994 100644 --- a/odb/pgsql/transaction-impl.hxx +++ b/odb/pgsql/transaction-impl.hxx @@ -23,19 +23,20 @@ namespace odb { class LIBODB_PGSQL_EXPORT transaction_impl: public odb::transaction_impl { - protected: - friend class connection; - friend class transaction; - + public: typedef pgsql::database database_type; typedef pgsql::connection connection_type; + transaction_impl (database_type&); transaction_impl (connection_ptr); virtual ~transaction_impl (); virtual void + start (); + + virtual void commit (); virtual void -- cgit v1.1