diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-10-30 17:52:31 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-10-30 17:52:31 +0200 |
commit | 59cab2f5fd95ed8ae833397044f2b704c3e7a8c4 (patch) | |
tree | 18893d7e260b04775d296f483f42ec4f6be2a161 /odb/sqlite/statement.hxx | |
parent | 192af55136c79910046de751bd85bf6d1f426e9e (diff) |
Rework statement interfaces wrt param/result passing
Diffstat (limited to 'odb/sqlite/statement.hxx')
-rw-r--r-- | odb/sqlite/statement.hxx | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/odb/sqlite/statement.hxx b/odb/sqlite/statement.hxx index 69f5a95..2bf770c 100644 --- a/odb/sqlite/statement.hxx +++ b/odb/sqlite/statement.hxx @@ -80,7 +80,7 @@ namespace odb protected: void - bind_param (const bind*, std::size_t count, std::size_t start_param = 0); + bind_param (const bind*, std::size_t count); // Extract row columns into the bound buffers. If the truncated // argument is true, then only truncated columns are extracted. @@ -213,12 +213,12 @@ namespace odb public: select_statement (connection& conn, const std::string& statement, - binding& cond, - binding& data); + binding& param, + binding& result); select_statement (connection& conn, const std::string& statement, - binding& data); + binding& result); // Common select interface expected by the generated code. // @@ -277,8 +277,8 @@ namespace odb private: bool done_; - binding* cond_; - binding& data_; + binding* param_; + binding& result_; }; class LIBODB_SQLITE_EXPORT insert_statement: public statement @@ -286,7 +286,7 @@ namespace odb public: insert_statement (connection& conn, const std::string& statement, - binding& data); + binding& param); // Return true if successful and false if the row is a duplicate. // All other errors are reported by throwing exceptions. @@ -302,7 +302,7 @@ namespace odb insert_statement& operator= (const insert_statement&); private: - binding& data_; + binding& param_; }; class LIBODB_SQLITE_EXPORT update_statement: public statement @@ -310,8 +310,7 @@ namespace odb public: update_statement (connection& conn, const std::string& statement, - binding& cond, - binding& data); + binding& param); void execute (); @@ -320,8 +319,7 @@ namespace odb update_statement& operator= (const update_statement&); private: - binding& cond_; - binding& data_; + binding& param_; }; class LIBODB_SQLITE_EXPORT delete_statement: public statement @@ -329,7 +327,7 @@ namespace odb public: delete_statement (connection& conn, const std::string& statement, - binding& cond); + binding& param); unsigned long long execute (); @@ -339,7 +337,7 @@ namespace odb delete_statement& operator= (const delete_statement&); private: - binding& cond_; + binding& param_; }; } } |