diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-11-07 15:00:06 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-11-07 15:00:06 +0200 |
commit | bcf5fce175953bec0fd2725968828850a74d8539 (patch) | |
tree | 74388e8f50f893d53cf748a34b601c96557d0228 /odb/database.ixx | |
parent | 02e8d8116c01594716323fc6e03ede7094699d5c (diff) |
Add support for SQL statement tracing
Diffstat (limited to 'odb/database.ixx')
-rw-r--r-- | odb/database.ixx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/odb/database.ixx b/odb/database.ixx index 11b59ca..7df0d79 100644 --- a/odb/database.ixx +++ b/odb/database.ixx @@ -9,6 +9,7 @@ namespace odb { inline database:: database () + : tracer_ (0) { } @@ -18,6 +19,24 @@ namespace odb return connection_ptr (connection_ ()); } + inline void database:: + tracer (tracer_type& t) + { + tracer_ = &t; + } + + inline void database:: + tracer (tracer_type* t) + { + tracer_ = t; + } + + inline database::tracer_type* database:: + tracer () const + { + return tracer_; + } + template <typename T> inline typename object_traits<T>::id_type database:: persist (T* p) |