From bbb153b9e576cdfdb59711f68d7f26a427a55041 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 12 Jan 2012 09:28:06 +0200 Subject: Query support for SQL Server --- odb/mssql/statement.hxx | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'odb/mssql/statement.hxx') diff --git a/odb/mssql/statement.hxx b/odb/mssql/statement.hxx index 15e64a0..3bea55f 100644 --- a/odb/mssql/statement.hxx +++ b/odb/mssql/statement.hxx @@ -60,8 +60,18 @@ namespace odb SQLRETURN execute (); + // The old_base and new_base arguments can be used to "re-base" + // the long_callback struct pointer (stored in bind::buffer). + // 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 start, std::size_t count); + stream_result (bind*, + std::size_t start, + std::size_t count, + void* old_base = 0, + void* new_base = 0); protected: connection& conn_; @@ -113,10 +123,14 @@ namespace odb fetch (); void - stream_result () + stream_result (void* old_base = 0, void* new_base = 0) { if (first_long_ != result_.count) - statement::stream_result (result_.bind, first_long_, result_.count); + statement::stream_result (result_.bind, + first_long_, + result_.count, + old_base, + new_base); } void -- cgit v1.1