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/connection.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'odb/pgsql/connection.cxx') diff --git a/odb/pgsql/connection.cxx b/odb/pgsql/connection.cxx index 6f0feaf..b173136 100644 --- a/odb/pgsql/connection.cxx +++ b/odb/pgsql/connection.cxx @@ -86,6 +86,14 @@ namespace odb // string str (s, n); + { + odb::tracer* t; + if ((t = transaction_tracer ()) || + (t = tracer ()) || + (t = database ().tracer ())) + t->execute (*this, str.c_str ()); + } + auto_handle h (PQexec (handle_, str.c_str ())); unsigned long long count (0); -- cgit v1.1