aboutsummaryrefslogtreecommitdiff
path: root/odb/oracle/statement.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-01-12 09:02:40 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-01-12 09:02:40 +0200
commitedb5c55e828ad333ce1059b60b6fe97eface5dc4 (patch)
treeadeaee9709478c0498d0cdd20511c095c95e070b /odb/oracle/statement.hxx
parent725d1a2f7952ea47ddaa8c9f056002879d470169 (diff)
Implement callback data re-basing support for LOB result streaming
This is used by the query machinery when a copy of the image has to be made. In this case stream_result() needs to use data from the copy of the image, and not from the image that was bound to the bind array.
Diffstat (limited to 'odb/oracle/statement.hxx')
-rw-r--r--odb/oracle/statement.hxx18
1 files changed, 15 insertions, 3 deletions
diff --git a/odb/oracle/statement.hxx b/odb/oracle/statement.hxx
index fa2e879..6aa16e9 100644
--- a/odb/oracle/statement.hxx
+++ b/odb/oracle/statement.hxx
@@ -84,9 +84,18 @@ namespace odb
std::size_t lob_prefetch_size = 0);
// Stream the result LOBs, calling user callbacks where necessary.
+ // The old_base and new_base arguments can be used to "re-base" the
+ // lob_callback struct pointer (stored in bind::callback), the lob
+ // struct pointer (stored in bind::buffer), and the indicator value
+ // pointer (stored in bind::indicator). This is used by the query
+ // machinery to cause stream_result() to use the callback information
+ // from a copy of the image instead of the bound image.
//
void
- stream_result (bind*, std::size_t count);
+ stream_result (bind*,
+ std::size_t count,
+ void* old_base = 0,
+ void* new_base = 0);
protected:
connection& conn_;
@@ -162,9 +171,12 @@ namespace odb
fetch ();
void
- stream_result ()
+ stream_result (void* old_base = 0, void* new_base = 0)
{
- statement::stream_result (result_.bind, result_.count);
+ statement::stream_result (result_.bind,
+ result_.count,
+ old_base,
+ new_base);
}
void