diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-11-30 08:57:37 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-11-30 08:57:37 +0200 |
commit | 3ed6a781cf4aad7986f805dc8a8e5c487d10a805 (patch) | |
tree | 1aa8eb896bcad843b3a3428059af200784f0f452 /odb/oracle/statement.cxx | |
parent | e7ff893718d5ba3759d1c10d8ba82b611ee78b11 (diff) |
Merge LOB callback function and context into struct
This allows us to have one less member in the bind struct.
Diffstat (limited to 'odb/oracle/statement.cxx')
-rw-r--r-- | odb/oracle/statement.cxx | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/odb/oracle/statement.cxx b/odb/oracle/statement.cxx index 0bc4014..921a826 100644 --- a/odb/oracle/statement.cxx +++ b/odb/oracle/statement.cxx @@ -89,13 +89,14 @@ namespace odb if (*b.indicator != -1) { chunk_position pos; - if (!(*b.callback->param) (b.context->param, - &l->position, - const_cast<const void**> (buffer), - size, - &pos, - l->buffer->data (), - l->buffer->capacity ())) + if (!(*b.callback->callback.param) ( + b.callback->context.param, + &l->position, + const_cast<const void**> (buffer), + size, + &pos, + l->buffer->data (), + l->buffer->capacity ())) return OCI_ERROR; switch (pos) @@ -982,7 +983,7 @@ namespace odb b->type == bind::clob || b->type == bind::nclob) && (b->indicator == 0 || *b->indicator != -1) && - b->callback->result != 0) + b->callback->callback.result != 0) { lob* l (static_cast<lob*> (b->buffer)); @@ -1038,11 +1039,12 @@ namespace odb // OCI generates and ORA-24343 error when an error code is // returned from a user callback. We simulate this. // - if (!(*b->callback->result) (b->context->result, - &position, - lob_buffer.data (), - static_cast<ub4> (read), - cp)) + if (!(*b->callback->callback.result) ( + b->callback->context.result, + &position, + lob_buffer.data (), + static_cast<ub4> (read), + cp)) throw database_exception (24343, "user defined callback error"); } while (r == OCI_NEED_DATA); |