aboutsummaryrefslogtreecommitdiff
path: root/odb/oracle/oracle-types.cxx
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-11-15 16:23:39 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-11-16 12:48:18 +0200
commit65b89ab22d0d2fe3cff2f3c071b3628b786afeb5 (patch)
tree73266e783901646ec1bdc8e5fc68f4b48ebf293d /odb/oracle/oracle-types.cxx
parentf8d8de4ef1ec010cb81c75b00d8229204e7b1788 (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.cxx38
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
//