aboutsummaryrefslogtreecommitdiff
path: root/odb/connection.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/connection.ixx
parent02e8d8116c01594716323fc6e03ede7094699d5c (diff)
Add support for SQL statement tracing
Diffstat (limited to 'odb/connection.ixx')
-rw-r--r--odb/connection.ixx26
1 files changed, 25 insertions, 1 deletions
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_;
+ }
}