diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-03-25 13:02:43 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-03-25 13:02:43 +0200 |
commit | fb07a6d9d6ce01a76d5d43ae94adbcb6574cb351 (patch) | |
tree | 94be11c486ffdf2683238142e8541176faadc876 | |
parent | 8ab3b127535f736ac0e14abd2fba25e022b05979 (diff) |
Update interface to conform to what's expected by generated code
-rw-r--r-- | odb/mysql/query.cxx | 6 | ||||
-rw-r--r-- | odb/mysql/query.hxx | 6 | ||||
-rw-r--r-- | odb/mysql/result.hxx | 5 | ||||
-rw-r--r-- | odb/mysql/result.txx | 3 |
4 files changed, 12 insertions, 8 deletions
diff --git a/odb/mysql/query.cxx b/odb/mysql/query.cxx index b7479ce..5727e4e 100644 --- a/odb/mysql/query.cxx +++ b/odb/mysql/query.cxx @@ -82,7 +82,7 @@ namespace odb } binding& query:: - parameters () const + parameters_binding () const { size_t n (parameters_.size ()); binding& r (binding_); @@ -94,10 +94,10 @@ namespace odb bool inc_ver (false); - if (r.bind != b || r.count != bind_.size ()) + if (r.bind != b || r.count != n) { r.bind = b; - r.count = bind_.size (); + r.count = n; inc_ver = true; } diff --git a/odb/mysql/query.hxx b/odb/mysql/query.hxx index c7d83ff..d58fb30 100644 --- a/odb/mysql/query.hxx +++ b/odb/mysql/query.hxx @@ -120,12 +120,12 @@ namespace odb operator= (const query&); public: - binding& - parameters () const; - std::string clause () const; + binding& + parameters_binding () const; + public: template <typename T> static val_bind<T> diff --git a/odb/mysql/result.hxx b/odb/mysql/result.hxx index ee1174c..ebc3e02 100644 --- a/odb/mysql/result.hxx +++ b/odb/mysql/result.hxx @@ -22,6 +22,8 @@ namespace odb { namespace mysql { + class query; + template <typename T> class result_impl: public odb::result_impl<T> { @@ -37,7 +39,8 @@ namespace odb virtual ~result_impl (); - result_impl (details::shared_ptr<select_statement> statement, + result_impl (const query&, + details::shared_ptr<select_statement> statement, object_statements<object_type>& statements); virtual void diff --git a/odb/mysql/result.txx b/odb/mysql/result.txx index 8140240..e207f73 100644 --- a/odb/mysql/result.txx +++ b/odb/mysql/result.txx @@ -17,7 +17,8 @@ namespace odb template <typename T> result_impl<T>:: - result_impl (details::shared_ptr<select_statement> statement, + result_impl (const query&, + details::shared_ptr<select_statement> statement, object_statements<object_type>& statements) : odb::result_impl<T> (statements.connection ().database ()), statement_ (statement), |