diff options
Diffstat (limited to 'odb/pgsql/database.ixx')
-rw-r--r-- | odb/pgsql/database.ixx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/odb/pgsql/database.ixx b/odb/pgsql/database.ixx index a4f5040..467f765 100644 --- a/odb/pgsql/database.ixx +++ b/odb/pgsql/database.ixx @@ -7,10 +7,20 @@ namespace odb { namespace pgsql { - inline details::shared_ptr<database::connection_type> database:: + inline connection_ptr database:: connection () { - return factory_->connect (); + // Go through the virtual connection_() function instead of + // directly to allow overriding. + // + return connection_ptr ( + static_cast<pgsql::connection*> (connection_ ())); + } + + inline transaction_impl* database:: + begin () + { + return connection ()->begin (); } } } |