From bcf5fce175953bec0fd2725968828850a74d8539 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 7 Nov 2011 15:00:06 +0200 Subject: Add support for SQL statement tracing --- odb/transaction.ixx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'odb/transaction.ixx') 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 + 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_; + } } -- cgit v1.1