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 | 5694c0a4529334756f2b914ad67408df199551dc (patch) | |
tree | 38daa2e27d6049ca7a808af642eb82a29c9d2886 /odb/sqlite/transaction-impl.cxx | |
parent | 1bf4678c29b6e51396c18582b270254d1bd2cddc (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/transaction-impl.cxx')
-rw-r--r-- | odb/sqlite/transaction-impl.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/odb/sqlite/transaction-impl.cxx b/odb/sqlite/transaction-impl.cxx index 609a9c5..772b274 100644 --- a/odb/sqlite/transaction-impl.cxx +++ b/odb/sqlite/transaction-impl.cxx @@ -14,26 +14,26 @@ namespace odb namespace sqlite { transaction_impl:: - transaction_impl (database_type& db, lock l) - : odb::transaction_impl (db), connection_ (db.connection ()) + transaction_impl (connection_ptr c, lock l) + : odb::transaction_impl (c->database (), *c), connection_ (c) { - statement_cache& c (connection_->statement_cache ()); + statement_cache& sc (connection_->statement_cache ()); switch (l) { case deferred: { - c.begin_statement ().execute (); + sc.begin_statement ().execute (); break; } case immediate: { - c.begin_immediate_statement ().execute (); + sc.begin_immediate_statement ().execute (); break; } case exclusive: { - c.begin_exclusive_statement ().execute (); + sc.begin_exclusive_statement ().execute (); break; } } |