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/statement.hxx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'odb/pgsql/statement.hxx') diff --git a/odb/pgsql/statement.hxx b/odb/pgsql/statement.hxx index 8beb01f..3230bb2 100644 --- a/odb/pgsql/statement.hxx +++ b/odb/pgsql/statement.hxx @@ -11,7 +11,8 @@ #include #include // std::size_t -#include +#include +#include #include #include @@ -26,12 +27,21 @@ namespace odb { class connection; - class LIBODB_PGSQL_EXPORT statement: public details::shared_base + class LIBODB_PGSQL_EXPORT statement: public odb::statement { public: virtual ~statement () = 0; + const char* + name () const + { + return name_.c_str (); + } + + virtual const char* + text () const; + void deallocate (); @@ -55,13 +65,14 @@ namespace odb protected: statement (connection&, const std::string& name, - const std::string& stmt, + const std::string& text, const Oid* types, std::size_t types_count); protected: connection& conn_; std::string name_; + std::string text_; private: bool deallocated_; -- cgit v1.1