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/transaction-impl.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'odb/sqlite/transaction-impl.cxx') 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; } } -- cgit v1.1