diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-04 11:33:49 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-19 11:40:30 +0200 |
commit | 74bb67e9825e06b68e2f5499b68da2323cb5bb34 (patch) | |
tree | 654acdea4be408d8b7affa2fe6bccde638d25776 /odb/sqlite/query.cxx | |
parent | 382035d872a2cbb22fc14d3c87db93b1f39b407b (diff) |
Initial support for prepared queries
Diffstat (limited to 'odb/sqlite/query.cxx')
-rw-r--r-- | odb/sqlite/query.cxx | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/odb/sqlite/query.cxx b/odb/sqlite/query.cxx index 15934fb..f6a4dc1 100644 --- a/odb/sqlite/query.cxx +++ b/odb/sqlite/query.cxx @@ -92,19 +92,13 @@ namespace odb p->bind (b); } - query_params::binding_type& query_params:: - binding () + void query_params:: + init () { - size_t n (params_.size ()); - binding_type& r (binding_); - - if (n == 0) - return r; - bool inc_ver (false); sqlite::bind* b (&bind_[0]); - for (size_t i (0); i < n; ++i) + for (size_t i (0); i < params_.size (); ++i) { query_param& p (*params_[i]); @@ -119,9 +113,7 @@ namespace odb } if (inc_ver) - r.version++; - - return r; + binding_.version++; } // query_base |