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 | 0e37272b9ab8f37ad2f3d37bf6a09c68e5117d02 (patch) | |
tree | 823c0bc76f6c03e9ecedaaad6db719a7b0367299 /odb/pgsql/statement.hxx | |
parent | 26f53799c911e44da5d229e8f6bf2c40f79c31b1 (diff) |
Add support for SQL statement tracing
Diffstat (limited to 'odb/pgsql/statement.hxx')
-rw-r--r-- | odb/pgsql/statement.hxx | 17 |
1 files changed, 14 insertions, 3 deletions
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 <string> #include <cstddef> // std::size_t -#include <odb/details/shared-ptr.hxx> +#include <odb/forward.hxx> +#include <odb/statement.hxx> #include <odb/pgsql/version.hxx> #include <odb/pgsql/binding.hxx> @@ -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_; |