diff options
Diffstat (limited to 'odb/sqlite/database.ixx')
-rw-r--r-- | odb/sqlite/database.ixx | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/odb/sqlite/database.ixx b/odb/sqlite/database.ixx index 7e34e01..f78d659 100644 --- a/odb/sqlite/database.ixx +++ b/odb/sqlite/database.ixx @@ -7,10 +7,32 @@ namespace odb { namespace sqlite { - 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<sqlite::connection*> (connection_ ())); + } + + inline transaction_impl* database:: + begin () + { + return connection ()->begin (); + } + + inline transaction_impl* database:: + begin_immediate () + { + return connection ()->begin_immediate (); + } + + inline transaction_impl* database:: + begin_exclusive () + { + return connection ()->begin_exclusive (); } } } |