aboutsummaryrefslogtreecommitdiff
path: root/odb/pgsql/transaction-impl.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
commitee570de4bd013fd2a4351d33d11539621f00bf57 (patch)
tree48a7857b2e5fcf799ae4773cbd61252b76ec7512 /odb/pgsql/transaction-impl.cxx
parent6e3ac760696d4ec43138b1aba82426582c767072 (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/transaction-impl.cxx')
-rw-r--r--odb/pgsql/transaction-impl.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/odb/pgsql/transaction-impl.cxx b/odb/pgsql/transaction-impl.cxx
index eb93361..81aaf08 100644
--- a/odb/pgsql/transaction-impl.cxx
+++ b/odb/pgsql/transaction-impl.cxx
@@ -19,8 +19,8 @@ namespace odb
namespace pgsql
{
transaction_impl::
- transaction_impl (database_type& db)
- : odb::transaction_impl (db), connection_ (db.connection ())
+ transaction_impl (connection_ptr c)
+ : odb::transaction_impl (c->database (), *c), connection_ (c)
{
result_ptr r (PQexec (connection_->handle (), "begin"));
PGresult* h (r.get ());