diff options
author | Constantin Michael <constantin@codesynthesis.com> | 2011-09-08 08:35:47 +0200 |
---|---|---|
committer | Constantin Michael <constantin@codesynthesis.com> | 2011-09-08 08:35:47 +0200 |
commit | a3eb3fedc5478b28a813b689daca88fc2ac6e50a (patch) | |
tree | e0c6c4632d3422ad41222f783074be044db24fab /odb/oracle/statement.cxx | |
parent | 7823ebdaa6cc9772d1410e6e398ba36501a55f62 (diff) |
Add bind array offset argument to statement::bind_param
This allows for specification of non-contiguous bind arrays
in multiple calls to bind_param for the same statement.
Diffstat (limited to 'odb/oracle/statement.cxx')
-rw-r--r-- | odb/oracle/statement.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/odb/oracle/statement.cxx b/odb/oracle/statement.cxx index a88aa06..ebdbced 100644 --- a/odb/oracle/statement.cxx +++ b/odb/oracle/statement.cxx @@ -48,7 +48,7 @@ namespace odb } void statement:: - bind_param (bind* b, size_t c) + bind_param (bind* b, size_t c, size_t o) { for (size_t i (0); i < c; ++i) { @@ -57,7 +57,7 @@ namespace odb sword r (OCIBindByPos (stmt_, &h, conn_.error_handle (), - i, + o + i, b[i].buffer, b[i].capacity, b[i].type, @@ -120,7 +120,7 @@ namespace odb end_ (false), rows_ (0) { - bind_param (cond.bind, cond.count); + bind_param (cond.bind, cond.count, 0); bind_result (data.bind, data.count); } @@ -263,7 +263,7 @@ namespace odb bool returning) : statement (conn, s) { - bind_param (data.bind, data.count); + bind_param (data.bind, data.count, 0); if (returning) { @@ -357,7 +357,8 @@ namespace odb binding& data) : statement (conn, s) { - bind_param (data.bind, cond.count + data.count); + bind_param (data.bind, data.count, 0); + bind_param (cond.bind, cond.count, data.count); } void update_statement:: @@ -409,7 +410,7 @@ namespace odb binding& cond) : statement (conn, s) { - bind_param (cond.bind, cond.count); + bind_param (cond.bind, cond.count, 0); } unsigned long long delete_statement:: |