diff options
author | Constantin Michael <constantin@codesynthesis.com> | 2011-11-15 16:34:47 +0200 |
---|---|---|
committer | Constantin Michael <constantin@codesynthesis.com> | 2011-11-15 16:34:47 +0200 |
commit | c94ffe778485970621a709ccf1312568ddaf7943 (patch) | |
tree | 47368f17f6e227eaf894b0647152e6b4b5540d98 | |
parent | e00784c2cfb8fa8a33ff6e7812aeac2aff608daf (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.
-rw-r--r-- | odb/relational/oracle/header.cxx | 2 | ||||
-rw-r--r-- | odb/relational/oracle/source.cxx | 18 |
2 files changed, 4 insertions, 16 deletions
diff --git a/odb/relational/oracle/header.cxx b/odb/relational/oracle/header.cxx index 5d13d41..17c1103 100644 --- a/odb/relational/oracle/header.cxx +++ b/odb/relational/oracle/header.cxx @@ -214,7 +214,7 @@ namespace relational { os << "mutable " << image_type << " " << mi.var << "callback;" << "sb2 " << mi.var << "indicator;" - << "oracle::lob_auto_descriptor " << mi.var << "lob;" + << "oracle::lob " << mi.var << "lob;" << "mutable oracle::lob_context " << mi.var << "context;" << "ub4 " << mi.var << "position_context;" << endl; diff --git a/odb/relational/oracle/source.cxx b/odb/relational/oracle/source.cxx index 0d4fee0..5c66154 100644 --- a/odb/relational/oracle/source.cxx +++ b/odb/relational/oracle/source.cxx @@ -265,8 +265,6 @@ namespace relational { os << b << ".type = oracle::bind::timestamp;" << b << ".buffer = &" << arg << "." << mi.var << "value;" - << b << ".capacity = sizeof (OCIDateTime*);" - << b << ".size = 0;" << b << ".indicator = &" << arg << "." << mi.var << "indicator;"; } @@ -275,8 +273,6 @@ namespace relational { os << b << ".type = oracle::bind::interval_ym;" << b << ".buffer = &" << arg << "." << mi.var << "value;" - << b << ".capacity = sizeof (OCIInterval*);" - << b << ".size = 0;" << b << ".indicator = &" << arg << "." << mi.var << "indicator;"; } @@ -285,8 +281,6 @@ namespace relational { os << b << ".type = oracle::bind::interval_ds;" << b << ".buffer = &" << arg << "." << mi.var << "value;" - << b << ".capacity = sizeof (OCIInterval*);" - << b << ".size = 0;" << b << ".indicator = &" << arg << "." << mi.var << "indicator;"; } @@ -307,19 +301,13 @@ namespace relational { os << b << ".type = " << lob_buffer_types[mi.st->type - sql_type::BLOB] << ";" + << arg << "." << mi.var << "lob.position_context = &" << arg << + "." << mi.var << "position_context;" + << b << ".buffer = &" << arg << "." << mi.var << "lob;" << b << ".indicator = &" << arg << "." << mi.var << "indicator;" << b << ".callback = &" << arg << "." << mi.var << "callback;" << b << ".context = &" << arg << "." << mi.var << "context;" - << "if (sk == statement_select)" << endl - << "{" - << b << ".buffer = &" << arg << "." << mi.var << "lob;" - << b << ".capacity = sizeof (OCILobLocator*);" - << b << ".size = 0;" - << "}" - << "else" << endl - << b << ".size = reinterpret_cast<ub2*> (&" << arg << "." << - mi.var << "position_context);" << endl; } |