diff options
author | Constantin Michael <constantin@codesynthesis.com> | 2011-11-15 16:23:39 +0200 |
---|---|---|
committer | Constantin Michael <constantin@codesynthesis.com> | 2011-11-16 12:48:18 +0200 |
commit | 65b89ab22d0d2fe3cff2f3c071b3628b786afeb5 (patch) | |
tree | 73266e783901646ec1bdc8e5fc68f4b48ebf293d /odb/oracle/oracle-types.cxx | |
parent | f8d8de4ef1ec010cb81c75b00d8229204e7b1788 (diff) |
Refactor LOB descriptor, callback context, and temporary buffer handling
Due to image sharing amongst container statements, LOB binding placeholders
cannot be shared between parameter and result versions of a bind.
Diffstat (limited to 'odb/oracle/oracle-types.cxx')
-rw-r--r-- | odb/oracle/oracle-types.cxx | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/odb/oracle/oracle-types.cxx b/odb/oracle/oracle-types.cxx index 9de57cd..9f2ca3e 100644 --- a/odb/oracle/oracle-types.cxx +++ b/odb/oracle/oracle-types.cxx @@ -15,6 +15,44 @@ namespace odb namespace oracle { // + // lob + // + + lob:: + ~lob () + { + if (locator != 0) + OCIDescriptorFree (locator, OCI_DTYPE_LOB); + } + + lob:: + lob (lob& x) + : locator (x.locator), + buffer (x.buffer), + position_context (x.position_context) + { + x.locator = 0; + } + + lob& lob:: + operator= (lob& x) + { + if (this != &x) + { + if (locator != 0) + OCIDescriptorFree (locator, OCI_DTYPE_LOB); + + locator = x.locator; + buffer = x.buffer; + position_context = x.position_context; + + x.locator = 0; + } + + return *this; + } + + // // datetime // |