aboutsummaryrefslogtreecommitdiff
path: root/odb/transaction.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/transaction.cxx')
-rw-r--r--odb/transaction.cxx26
1 files changed, 24 insertions, 2 deletions
diff --git a/odb/transaction.cxx b/odb/transaction.cxx
index 1dc68e5..f75cf32 100644
--- a/odb/transaction.cxx
+++ b/odb/transaction.cxx
@@ -94,7 +94,7 @@ namespace odb
finalized_ = true;
rollback_guard rg (*this);
- impl_->connection ().transaction_tracer_ = 0;
+ impl_->tracer (0);
if (tls_get (current_transaction) == this)
{
@@ -118,7 +118,7 @@ namespace odb
finalized_ = true;
rollback_guard rg (*this);
- impl_->connection ().transaction_tracer_ = 0;
+ impl_->tracer (0);
if (tls_get (current_transaction) == this)
{
@@ -331,4 +331,26 @@ namespace odb
~transaction_impl ()
{
}
+
+ connection& transaction_impl::
+ connection (database_type* db)
+ {
+ assert (db == 0 || db == &database_);
+ return *connection_;
+ }
+
+ // The transaction-specific tracer is stored in the connection. See the
+ // connection class for the reason.
+ //
+ void transaction_impl::
+ tracer (tracer_type* t)
+ {
+ connection_->transaction_tracer_ = t;
+ }
+
+ tracer* transaction_impl::
+ tracer () const
+ {
+ return connection_->transaction_tracer_;
+ }
}