diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2014-11-19 11:51:17 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2014-11-19 11:51:17 +0200 |
commit | 2ea4bcebf8efa0a2f77d65c82e2df4b4f04b1f76 (patch) | |
tree | 8d4003cd9c92f91bafe9a83f911a7557d27ad588 /odb/mssql/statement.hxx | |
parent | 887039bafb6843fa82b800b351c34a479f36b51a (diff) |
Implement bulk API code generation
Diffstat (limited to 'odb/mssql/statement.hxx')
-rw-r--r-- | odb/mssql/statement.hxx | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/odb/mssql/statement.hxx b/odb/mssql/statement.hxx index 4bce464..516baed 100644 --- a/odb/mssql/statement.hxx +++ b/odb/mssql/statement.hxx @@ -319,7 +319,10 @@ namespace odb // Return the number of parameter sets (out of n) that were attempted. // std::size_t - execute (std::size_t n, multiple_exceptions*); + execute (std::size_t n, multiple_exceptions& mex) + { + return execute (n, &mex); + } // Return true if successful and false if this row is a duplicate. // All other errors are reported by throwing exceptions. @@ -340,7 +343,10 @@ namespace odb private: void - init_result (binding&); + init_result (); + + std::size_t + execute (std::size_t, multiple_exceptions*); void fetch (SQLRETURN); @@ -348,6 +354,7 @@ namespace odb private: bool returning_id_; bool returning_version_; + binding* ret_; bool text_batch_; bool result_; @@ -407,7 +414,10 @@ namespace odb // Return the number of parameter sets (out of n) that were attempted. // std::size_t - execute (std::size_t n, multiple_exceptions*); + execute (std::size_t n, multiple_exceptions& mex) + { + return execute (n, &mex); + } // Return the number of rows affected (deleted) by the parameter // set. If this is a batch (n > 1 in execute() call above) and it @@ -435,6 +445,9 @@ namespace odb void init (binding& param, binding* ret); + std::size_t + execute (std::size_t, multiple_exceptions*); + private: bool unique_; bool returning_; @@ -488,7 +501,10 @@ namespace odb // Return the number of parameter sets (out of n) that were attempted. // std::size_t - execute (std::size_t n, multiple_exceptions*); + execute (std::size_t n, multiple_exceptions& mex) + { + return execute (n, &mex); + } // Return the number of rows affected (deleted) by the parameter // set. If this is a batch (n > 1 in execute() call above) and it @@ -513,6 +529,10 @@ namespace odb delete_statement& operator= (const delete_statement&); private: + std::size_t + execute (std::size_t, multiple_exceptions*); + + private: bool unique_; unsigned long long result_; }; |