aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite/connection-factory.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-08-21 16:27:34 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-08-21 16:27:34 +0200
commit5694c0a4529334756f2b914ad67408df199551dc (patch)
tree38daa2e27d6049ca7a808af642eb82a29c9d2886 /odb/sqlite/connection-factory.cxx
parent1bf4678c29b6e51396c18582b270254d1bd2cddc (diff)
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.
Diffstat (limited to 'odb/sqlite/connection-factory.cxx')
-rw-r--r--odb/sqlite/connection-factory.cxx10
1 files changed, 5 insertions, 5 deletions
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<connection> single_connection_factory::
+ connection_ptr single_connection_factory::
connect ()
{
mutex_.lock ();
connection_->factory_ = this;
- shared_ptr<connection> r (connection_);
+ connection_ptr r (connection_);
connection_.reset ();
return r;
}
@@ -90,10 +90,10 @@ namespace odb
// new_connection_factory
//
- shared_ptr<connection> new_connection_factory::
+ connection_ptr new_connection_factory::
connect ()
{
- return shared_ptr<connection> (
+ return connection_ptr (
new (shared) connection (*db_, extra_flags_));
}
@@ -126,7 +126,7 @@ namespace odb
}
}
- shared_ptr<connection> connection_pool_factory::
+ connection_ptr connection_pool_factory::
connect ()
{
lock l (mutex_);