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/connection.ixx | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'odb/connection.ixx') diff --git a/odb/connection.ixx b/odb/connection.ixx index 0e6d24c..8e9f26a 100644 --- a/odb/connection.ixx +++ b/odb/connection.ixx @@ -9,7 +9,7 @@ namespace odb { inline connection:: connection (database_type& database) - : database_ (database) + : database_ (database), tracer_ (0), transaction_tracer_ (0) { } @@ -30,4 +30,28 @@ namespace odb { return execute (st.c_str (), st.size ()); } + + inline void connection:: + tracer (tracer_type& t) + { + tracer_ = &t; + } + + inline void connection:: + tracer (tracer_type* t) + { + tracer_ = t; + } + + inline connection::tracer_type* connection:: + tracer () const + { + return tracer_; + } + + inline connection::tracer_type* connection:: + transaction_tracer () const + { + return transaction_tracer_; + } } -- cgit v1.1