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 | 0a71eaad620be004e7e28e7d3265a373dcd92395 (patch) | |
tree | 66adb95b0a79c376a3380182cd28601901dd741f /odb/sqlite/connection.hxx | |
parent | 3c150763bc946bebe2eb5a2e487a28cf25f2e449 (diff) |
Add support for SQL statement tracing
Diffstat (limited to 'odb/sqlite/connection.hxx')
-rw-r--r-- | odb/sqlite/connection.hxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/odb/sqlite/connection.hxx b/odb/sqlite/connection.hxx index 4ad4f42..0986866 100644 --- a/odb/sqlite/connection.hxx +++ b/odb/sqlite/connection.hxx @@ -20,6 +20,7 @@ #include <odb/sqlite/version.hxx> #include <odb/sqlite/forward.hxx> +#include <odb/sqlite/tracer.hxx> #include <odb/sqlite/transaction-impl.hxx> #include <odb/sqlite/auto-handle.hxx> @@ -69,6 +70,25 @@ namespace odb virtual unsigned long long execute (const char* statement, std::size_t length); + // SQL statement tracing. + // + public: + typedef sqlite::tracer tracer_type; + + void + tracer (tracer_type& t) + { + odb::connection::tracer (t); + } + + void + tracer (tracer_type* t) + { + odb::connection::tracer (t); + } + + using odb::connection::tracer; + public: sqlite3* handle () |