diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-12 17:24:44 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-12 17:24:44 +0200 |
commit | a049724c258a42af57d1ff572c3d15a3678e3875 (patch) | |
tree | 17180c89cedc2e137824f5569e0bc2078eaf10b1 /odb/mssql/query.cxx | |
parent | d3261c7ed4ac622c8807ba88b39bd41632577c4f (diff) |
Completion of prepared query support
Diffstat (limited to 'odb/mssql/query.cxx')
-rw-r--r-- | odb/mssql/query.cxx | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/odb/mssql/query.cxx b/odb/mssql/query.cxx index a0371c7..a40bb23 100644 --- a/odb/mssql/query.cxx +++ b/odb/mssql/query.cxx @@ -136,19 +136,12 @@ namespace odb p->bind (b); } - binding& query_base:: - parameters_binding () const + void query_base:: + init_parameters () const { - size_t n (parameters_.size ()); - binding& r (binding_); - - if (n == 0) - return r; - bool inc_ver (false); - bind* b (&bind_[0]); - for (size_t i (0); i < n; ++i) + for (size_t i (0); i < parameters_.size (); ++i) { query_param& p (*parameters_[i]); @@ -156,16 +149,14 @@ namespace odb { if (p.init ()) { - p.bind (b + i); + p.bind (&bind_[i]); inc_ver = true; } } } if (inc_ver) - r.version++; - - return r; + binding_.version++; } static bool |