From 5694c0a4529334756f2b914ad67408df199551dc Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 21 Aug 2011 16:27:34 +0200 Subject: Add odb::connection class This abstract class represents a connection to the database. One can use it to start a transaction or to execute a native statement out of a transaction. Before we had concrete connection classes in the database runtime libraries (e.g., odb::mysql::connection). Now these classes derive from odb::connection. --- odb/sqlite/connection-factory.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'odb/sqlite/connection-factory.cxx') diff --git a/odb/sqlite/connection-factory.cxx b/odb/sqlite/connection-factory.cxx index fc9fefc..71f8b3e 100644 --- a/odb/sqlite/connection-factory.cxx +++ b/odb/sqlite/connection-factory.cxx @@ -38,12 +38,12 @@ namespace odb lock l (mutex_); } - shared_ptr single_connection_factory:: + connection_ptr single_connection_factory:: connect () { mutex_.lock (); connection_->factory_ = this; - shared_ptr r (connection_); + connection_ptr r (connection_); connection_.reset (); return r; } @@ -90,10 +90,10 @@ namespace odb // new_connection_factory // - shared_ptr new_connection_factory:: + connection_ptr new_connection_factory:: connect () { - return shared_ptr ( + return connection_ptr ( new (shared) connection (*db_, extra_flags_)); } @@ -126,7 +126,7 @@ namespace odb } } - shared_ptr connection_pool_factory:: + connection_ptr connection_pool_factory:: connect () { lock l (mutex_); -- cgit v1.1