diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-10-30 17:52:31 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-10-30 17:52:31 +0200 |
commit | 59cab2f5fd95ed8ae833397044f2b704c3e7a8c4 (patch) | |
tree | 18893d7e260b04775d296f483f42ec4f6be2a161 /odb/sqlite/object-statements.hxx | |
parent | 192af55136c79910046de751bd85bf6d1f426e9e (diff) |
Rework statement interfaces wrt param/result passing
Diffstat (limited to 'odb/sqlite/object-statements.hxx')
-rw-r--r-- | odb/sqlite/object-statements.hxx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/odb/sqlite/object-statements.hxx b/odb/sqlite/object-statements.hxx index 15c848d..53445b8 100644 --- a/odb/sqlite/object-statements.hxx +++ b/odb/sqlite/object-statements.hxx @@ -220,6 +220,12 @@ namespace odb void update_image_version (std::size_t v) {update_image_version_ = v;} + std::size_t + update_id_image_version () const { return update_id_image_version_;} + + void + update_id_image_version (std::size_t v) {update_id_image_version_ = v;} + binding& update_image_binding () {return update_image_binding_;} @@ -297,7 +303,6 @@ namespace odb new (details::shared) update_statement_type ( conn_, object_traits::update_statement, - id_image_binding_, update_image_binding_)); update_->cached (true); @@ -377,10 +382,13 @@ namespace odb binding insert_image_binding_; bind insert_image_bind_[insert_column_count]; - // Update binding. The suffix of the bind array is object id. We - // do it this way for consistency with other database runtimes. + // Update binding. Note that the id suffix is bound to id_image_ + // below instead of image_ which makes this binding effectively + // bound to two images. As a result, we have to track versions + // for both of them. // std::size_t update_image_version_; + std::size_t update_id_image_version_; binding update_image_binding_; bind update_image_bind_[update_column_count + id_column_count]; |