From 0fb66e3e85ccb096cb625bf4664fdbbf3b8a29f9 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 10 Nov 2011 16:23:24 +0200 Subject: Add descriptor management flags for TIMESTAMP and INTERVAL image types For a query expression that has only by-value parameters, we guarantee that it can be used by multiple threads. However, the way we handle TIMESTAMP and INTERVAL types now requires the modification of the image during query execution. To resolve this, the datetime, interval_ym, and interval_ds image types now have flags that allow the query implementation to avoid the modification. --- odb/oracle/statement.hxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'odb/oracle/statement.hxx') diff --git a/odb/oracle/statement.hxx b/odb/oracle/statement.hxx index 8d97ab4..3687728 100644 --- a/odb/oracle/statement.hxx +++ b/odb/oracle/statement.hxx @@ -50,6 +50,12 @@ namespace odb init (const char* text, std::size_t text_size); protected: + struct unbind + { + oracle::bind* bind; // Corresponding bind entry. + void* value; // Actual value passed to OCIBindByPos. + }; + // Bind parameters for this statement. This function must only // be called once. Multiple calls to it will result in memory // leaks due to lost OCIBind resources. @@ -85,6 +91,9 @@ namespace odb protected: connection& conn_; auto_handle stmt_; + + unbind* udata_; + std::size_t usize_; }; class LIBODB_ORACLE_EXPORT generic_statement: public statement -- cgit v1.1