aboutsummaryrefslogtreecommitdiff
path: root/odb/statement.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/statement.hxx')
-rw-r--r--odb/statement.hxx33
1 files changed, 18 insertions, 15 deletions
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.
};
}