diff options
Diffstat (limited to 'odb/transaction.ixx')
-rw-r--r-- | odb/transaction.ixx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/odb/transaction.ixx b/odb/transaction.ixx index 50734a3..cc1ce5e 100644 --- a/odb/transaction.ixx +++ b/odb/transaction.ixx @@ -1,5 +1,4 @@ // file : odb/transaction.ixx -// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file #include <odb/connection.hxx> @@ -34,7 +33,13 @@ namespace odb inline transaction::connection_type& transaction:: connection () { - return impl_->connection (); + return impl_->connection (0); + } + + inline transaction::connection_type& transaction:: + connection (database_type& db) + { + return impl_->connection (&db); } inline transaction_impl& transaction:: @@ -43,24 +48,21 @@ namespace odb return *impl_; } - // The transaction-specific tracer is stored in the connection. See - // the connection class for the reason. - // inline void transaction:: tracer (tracer_type& t) { - impl_->connection ().transaction_tracer_ = &t; + impl_->tracer (&t); } inline void transaction:: tracer (tracer_type* t) { - impl_->connection ().transaction_tracer_ = t; + impl_->tracer (t); } inline transaction::tracer_type* transaction:: tracer () const { - return impl_->connection ().transaction_tracer_; + return impl_->tracer (); } } |