diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-08-21 16:27:34 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-08-21 16:27:34 +0200 |
commit | ee570de4bd013fd2a4351d33d11539621f00bf57 (patch) | |
tree | 48a7857b2e5fcf799ae4773cbd61252b76ec7512 /odb/pgsql/connection-factory.cxx | |
parent | 6e3ac760696d4ec43138b1aba82426582c767072 (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/pgsql/connection-factory.cxx')
-rw-r--r-- | odb/pgsql/connection-factory.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/odb/pgsql/connection-factory.cxx b/odb/pgsql/connection-factory.cxx index 45d86cd..c9e758d 100644 --- a/odb/pgsql/connection-factory.cxx +++ b/odb/pgsql/connection-factory.cxx @@ -29,10 +29,10 @@ namespace odb // new_connection_factory // - shared_ptr<connection> new_connection_factory:: + connection_ptr new_connection_factory:: connect () { - return shared_ptr<connection> (new (shared) connection (*db_)); + return connection_ptr (new (shared) connection (*db_)); } void new_connection_factory:: @@ -60,7 +60,7 @@ namespace odb } } - shared_ptr<connection> connection_pool_factory:: + connection_ptr connection_pool_factory:: connect () { lock l (mutex_); |