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 | 1adbed32a10e327bc1ab108133fcd2961ea1e07e (patch) | |
tree | adf0cb24d93b39d16734685f9685987d95c786c9 /odb/pgsql/object-statements.hxx | |
parent | f3e83073310e5fbafb142bb8d3cd1b03ed6088e9 (diff) |
Rework statement interfaces wrt param/result passing
Diffstat (limited to 'odb/pgsql/object-statements.hxx')
-rw-r--r-- | odb/pgsql/object-statements.hxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/odb/pgsql/object-statements.hxx b/odb/pgsql/object-statements.hxx index 2a26cce..f80ab42 100644 --- a/odb/pgsql/object-statements.hxx +++ b/odb/pgsql/object-statements.hxx @@ -219,6 +219,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_;} @@ -304,8 +310,6 @@ namespace odb object_traits::update_statement, object_traits::update_statement_types, update_column_count + id_column_count, - id_image_binding_, - id_image_native_binding_, update_image_binding_, update_image_native_binding_)); } @@ -390,10 +394,13 @@ namespace odb int insert_image_lengths_[insert_column_count]; int insert_image_formats_[insert_column_count]; - // Update binding. The suffix of the bind array is object id. we - // do it this way for consistency with other databases. + // 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]; native_binding update_image_native_binding_; |