aboutsummaryrefslogtreecommitdiff
path: root/odb/mssql/query.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-10-12 17:24:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-10-12 17:24:44 +0200
commita049724c258a42af57d1ff572c3d15a3678e3875 (patch)
tree17180c89cedc2e137824f5569e0bc2078eaf10b1 /odb/mssql/query.cxx
parentd3261c7ed4ac622c8807ba88b39bd41632577c4f (diff)
Completion of prepared query support
Diffstat (limited to 'odb/mssql/query.cxx')
-rw-r--r--odb/mssql/query.cxx19
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