aboutsummaryrefslogtreecommitdiff
path: root/odb/oracle/oracle-types.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-11-03 10:05:55 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-11-03 10:05:55 +0200
commit951f324ae01c4d8f9cbe1edb19b5f1c370f825a2 (patch)
tree7b305bd87aefbae495b668c68374d1976306aaf0 /odb/oracle/oracle-types.hxx
parentf2a1bfb98f447e6c922c12f4403a387243dd65c5 (diff)
Add position context to LOB result callback
It turns out position context can be useful in result handling as well.
Diffstat (limited to 'odb/oracle/oracle-types.hxx')
-rw-r--r--odb/oracle/oracle-types.hxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/odb/oracle/oracle-types.hxx b/odb/oracle/oracle-types.hxx
index 0687335..3327c57 100644
--- a/odb/oracle/oracle-types.hxx
+++ b/odb/oracle/oracle-types.hxx
@@ -48,10 +48,14 @@ namespace odb
// the database. If false is returned, database_exception is thrown.
//
typedef bool (*result_callback_type) (
- void* context, // [in] The user context.
- void* buffer, // [in] A buffer containing the result data.
- ub4 size, // [in] The result data size in bytes.
- chunk_position); // [in] The position of this chunk.
+ void* context, // [in] The user context.
+ ub4* position_context, // [in] A position context. A callback is free to
+ // use this to track position information. This is
+ // initialized to zero before the callback is
+ // invoked for the first time.
+ void* buffer, // [in] A buffer containing the result data.
+ ub4 size, // [in] The result data size in bytes.
+ chunk_position); // [in] The position of this chunk.
union lob_callback
{
@@ -98,7 +102,7 @@ namespace odb
buffer_type type; // The type stored by buffer.
void* buffer; // Data buffer pointer. When result callbacks are in
- // use, this is interpreted as an lob_auto_descriptor*.
+ // use, this is interpreted as a lob_auto_descriptor*.
ub2* size; // The number of bytes in buffer. When parameter
// callbacks are in use, this is interpreted as a ub4*
// indicating the current position. For LOB result