From 2ed52d1bc30a08ef791e2677fe559b4bdd249a68 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 15 Jul 2015 18:43:03 +0200 Subject: Implement SQLite incremental BLOB/TEXT I/O --- odb/statement.hxx | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'odb/statement.hxx') diff --git a/odb/statement.hxx b/odb/statement.hxx index 6ad458c..31f9cc9 100644 --- a/odb/statement.hxx +++ b/odb/statement.hxx @@ -55,12 +55,13 @@ namespace odb // [; SELECT ...] // static void - process_insert (const char* statement, - const void* const* bind, // Array of bind buffer pointers. - std::size_t bind_size, // Number of bind elements. - std::size_t bind_skip, // Offset to the next bind. - char param_symbol, // $, ?, :, etc. - std::string& result); + process_insert (std::string& result, + const char* statement, + const void* const* bind, // Array of bind buffer pointers. + std::size_t bind_size, // Number of bind elements. + std::size_t bind_skip, // Offset to the next bind. + char param_symbol, // $, ?, :, etc. + char param_symbol2 = '\0'); // Expected statement structure: // @@ -72,31 +73,33 @@ namespace odb // [WHERE ...] // static void - process_update (const char* statement, - const void* const* bind, // Array of bind buffer pointers. - std::size_t bind_size, // Number of bind elements. - std::size_t bind_skip, // Offset to the next bind. - char param_symbol, // $, ?, :, etc. - std::string& result); + process_update (std::string& result, + const char* statement, + const void* const* bind, // Array of bind buffer pointers. + std::size_t bind_size, // Number of bind elements. + std::size_t bind_skip, // Offset to the next bind. + char param_symbol, // $, ?, :, etc. + char param_symbol2 = '\0'); + // Expected statement structure: // // SELECT\n - // [schema.]table.a,\n + // [schema.]table.a [AS b],\n // alias.b\n // FROM [schema.]table[\n] // [{A-Z }* JOIN [schema.]table [AS alias][ ON ...][\n]]* // [WHERE ...] // static void - process_select (const char* statement, + process_select (std::string& result, + const char* statement, const void* const* bind, // Array of bind buffer pointers. std::size_t bind_size, // Number of bind elements. std::size_t bind_skip, // Offset to the next bind. char quote_open, // Identifier opening quote. char quote_close, // Identifier closing quote. bool optimize, // Remove unused JOINs. - std::string& result, bool as = true); // JOINs use AS keyword. }; } -- cgit v1.1