diff options
Diffstat (limited to 'odb/pgsql/database.cxx')
-rw-r--r-- | odb/pgsql/database.cxx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/odb/pgsql/database.cxx b/odb/pgsql/database.cxx index 887061b..080b17f 100644 --- a/odb/pgsql/database.cxx +++ b/odb/pgsql/database.cxx @@ -8,6 +8,7 @@ #include <odb/pgsql/database.hxx> #include <odb/pgsql/exceptions.hxx> #include <odb/pgsql/connection-factory.hxx> +#include <odb/pgsql/transaction.hxx> #include <odb/pgsql/details/options.hxx> @@ -214,11 +215,13 @@ namespace odb // { // } - // @@ Implement on completion of supporting code. - // - // transaction_impl* database:: - // begin () - // { - // } + transaction_impl* database:: + begin () + { + if (transaction::has_current ()) + throw already_in_transaction (); + + return new transaction_impl (*this); + } } } |