diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-11-07 15:00:07 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-11-08 16:03:17 +0200 |
commit | 1d664d31bdfc341ca642948efdf395e7922141f6 (patch) | |
tree | 73bb369f5072aee7daf621d0cc009731178bf581 /odb/oracle/statement.hxx | |
parent | 487bd012de7efc7237581b4a7aeac7fd817138fb (diff) |
Add support for SQL statement tracing
Diffstat (limited to 'odb/oracle/statement.hxx')
-rw-r--r-- | odb/oracle/statement.hxx | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/odb/oracle/statement.hxx b/odb/oracle/statement.hxx index e0d30d9..f3e86f0 100644 --- a/odb/oracle/statement.hxx +++ b/odb/oracle/statement.hxx @@ -12,8 +12,7 @@ #include <cstddef> // std::size_t #include <odb/forward.hxx> - -#include <odb/details/shared-ptr.hxx> +#include <odb/statement.hxx> #include <odb/oracle/version.hxx> #include <odb/oracle/binding.hxx> @@ -27,12 +26,21 @@ namespace odb { namespace oracle { - class LIBODB_ORACLE_EXPORT statement: public details::shared_base + class LIBODB_ORACLE_EXPORT statement: public odb::statement { public: virtual ~statement () = 0; + OCIStmt* + handle () const + { + return stmt_; + } + + virtual const char* + text () const; + protected: statement (connection&, const std::string& statement); @@ -73,6 +81,26 @@ namespace odb auto_handle<OCIStmt> stmt_; }; + class LIBODB_ORACLE_EXPORT generic_statement: public statement + { + public: + virtual + ~generic_statement (); + + generic_statement (connection&, const std::string& statement); + + unsigned long long + execute (); + + private: + generic_statement (const generic_statement&); + generic_statement& operator= (const generic_statement&); + + private: + ub2 stmt_type_; + bool bound_; + }; + class LIBODB_ORACLE_EXPORT select_statement: public statement { public: |