aboutsummaryrefslogtreecommitdiff
path: root/odb/oracle/statement.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-11-10 16:23:24 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-11-10 16:28:29 +0200
commit0fb66e3e85ccb096cb625bf4664fdbbf3b8a29f9 (patch)
tree6ee6a9fce07ecc686afefd7aa8f83b5e57fd2a30 /odb/oracle/statement.hxx
parentf5f1489bed3bddd424981bbe84898832fb0e7414 (diff)
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.
Diffstat (limited to 'odb/oracle/statement.hxx')
-rw-r--r--odb/oracle/statement.hxx9
1 files changed, 9 insertions, 0 deletions
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<OCIStmt> stmt_;
+
+ unbind* udata_;
+ std::size_t usize_;
};
class LIBODB_ORACLE_EXPORT generic_statement: public statement