From 0a71eaad620be004e7e28e7d3265a373dcd92395 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/sqlite/connection.hxx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'odb/sqlite/connection.hxx') 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 #include +#include #include #include @@ -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 () -- cgit v1.1