diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-04-30 12:06:15 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-04-30 12:08:30 +0200 |
commit | c6019273a7564be9ed772d45aa95e09aaff37a23 (patch) | |
tree | 501c84ed459866611032a705052aa57045a67c5f /odb/pgsql/database.cxx | |
parent | 38e203158a865d08070a4a72dcc1fee2cdacb952 (diff) |
Add transaction::connection(database&) overload
Diffstat (limited to 'odb/pgsql/database.cxx')
-rw-r--r-- | odb/pgsql/database.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/odb/pgsql/database.cxx b/odb/pgsql/database.cxx index 51752d7..b4d3732 100644 --- a/odb/pgsql/database.cxx +++ b/odb/pgsql/database.cxx @@ -282,7 +282,9 @@ namespace odb cp = factory_->connect (); pgsql::connection& c ( - cp != 0 ? *cp : transaction::current ().connection ()); + cp != 0 + ? *cp + : transaction::current ().connection (const_cast<database&> (*this))); // If we are in the user's transaction then things are complicated. When // we try to execute SELECT on a non-existent table, PG "poisons" the |