aboutsummaryrefslogtreecommitdiff
path: root/odb/transaction.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-11-07 15:00:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-11-07 15:00:06 +0200
commitbcf5fce175953bec0fd2725968828850a74d8539 (patch)
tree74388e8f50f893d53cf748a34b601c96557d0228 /odb/transaction.ixx
parent02e8d8116c01594716323fc6e03ede7094699d5c (diff)
Add support for SQL statement tracing
Diffstat (limited to 'odb/transaction.ixx')
-rw-r--r--odb/transaction.ixx23
1 files changed, 23 insertions, 0 deletions
diff --git a/odb/transaction.ixx b/odb/transaction.ixx
index d838a9f..13bf141 100644
--- a/odb/transaction.ixx
+++ b/odb/transaction.ixx
@@ -3,6 +3,8 @@
// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
+#include <odb/connection.hxx>
+
namespace odb
{
inline transaction::database_type& transaction::
@@ -22,4 +24,25 @@ 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;
+ }
+
+ inline void transaction::
+ tracer (tracer_type* t)
+ {
+ impl_->connection ().transaction_tracer_ = t;
+ }
+
+ inline transaction::tracer_type* transaction::
+ tracer () const
+ {
+ return impl_->connection ().transaction_tracer_;
+ }
}