diff options
Diffstat (limited to 'odb/mysql/database.ixx')
-rw-r--r-- | odb/mysql/database.ixx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/odb/mysql/database.ixx b/odb/mysql/database.ixx index 5791222..399fbdc 100644 --- a/odb/mysql/database.ixx +++ b/odb/mysql/database.ixx @@ -7,10 +7,20 @@ namespace odb { namespace mysql { - 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<mysql::connection*> (connection_ ())); + } + + inline transaction_impl* database:: + begin () + { + return connection ()->begin (); } } } |