diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-10-11 16:52:45 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-10-21 19:05:53 +0200 |
commit | 2c44802ec25744ba351536a41f3ffc28d56282be (patch) | |
tree | e83c351e089f7716fefaa8bdf2988538580961cf /odb/pgsql/object-result.txx | |
parent | 5637ac2d280529b53454ed80698963525cd36f19 (diff) |
Split 'in' binding into insert/update pair; rename 'out' to select
Also add the initial infrastructure for the readonly members support.
Right now the split insert/update bindings allows us to avoid sending
object id in UPDATE statements. It will also allows us to support
readonly members.
Diffstat (limited to 'odb/pgsql/object-result.txx')
-rw-r--r-- | odb/pgsql/object-result.txx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/odb/pgsql/object-result.txx b/odb/pgsql/object-result.txx index f4ee961..b10afe4 100644 --- a/odb/pgsql/object-result.txx +++ b/odb/pgsql/object-result.txx @@ -93,11 +93,11 @@ namespace odb // typename object_traits::image_type& im (statements_.image ()); - if (im.version != statements_.out_image_version ()) + if (im.version != statements_.select_image_version ()) { - binding& b (statements_.out_image_binding ()); - object_traits::bind (b.bind, im, true); - statements_.out_image_version (im.version); + binding& b (statements_.select_image_binding ()); + object_traits::bind (b.bind, im, statement_select); + statements_.select_image_version (im.version); b.version++; } @@ -105,14 +105,14 @@ namespace odb if (r == select_statement::truncated) { - if (object_traits::grow (im, statements_.out_image_truncated ())) + if (object_traits::grow (im, statements_.select_image_truncated ())) im.version++; - if (im.version != statements_.out_image_version ()) + if (im.version != statements_.select_image_version ()) { - binding& b (statements_.out_image_binding ()); - object_traits::bind (b.bind, im, true); - statements_.out_image_version (im.version); + binding& b (statements_.select_image_binding ()); + object_traits::bind (b.bind, im, statement_select); + statements_.select_image_version (im.version); b.version++; statement_->reload (); } |