From 0e37272b9ab8f37ad2f3d37bf6a09c68e5117d02 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/pgsql/database.hxx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'odb/pgsql/database.hxx') diff --git a/odb/pgsql/database.hxx b/odb/pgsql/database.hxx index 1b688fc..52e48c3 100644 --- a/odb/pgsql/database.hxx +++ b/odb/pgsql/database.hxx @@ -18,6 +18,7 @@ #include #include +#include #include #include @@ -98,6 +99,25 @@ namespace odb virtual odb::connection* connection_ (); + // SQL statement tracing. + // + public: + typedef pgsql::tracer tracer_type; + + void + tracer (tracer_type& t) + { + odb::database::tracer (t); + } + + void + tracer (tracer_type* t) + { + odb::database::tracer (t); + } + + using odb::database::tracer; + public: const std::string& user () const -- cgit v1.1