aboutsummaryrefslogtreecommitdiff
path: root/odb/mysql/object-result.txx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-10-11 16:52:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-10-21 19:03:04 +0200
commit889e08e66a975d6deb6468f9ce608a7c3e263073 (patch)
treeca8f31f538fd2dd2383ec686e9c0c57d5c279a0c /odb/mysql/object-result.txx
parent0f878bebf2dcb0332614cd8acfe429152779c2c9 (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/mysql/object-result.txx')
-rw-r--r--odb/mysql/object-result.txx19
1 files changed, 10 insertions, 9 deletions
diff --git a/odb/mysql/object-result.txx b/odb/mysql/object-result.txx
index 3b0c0ca..d745537 100644
--- a/odb/mysql/object-result.txx
+++ b/odb/mysql/object-result.txx
@@ -109,11 +109,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++;
}
}
@@ -133,14 +133,15 @@ namespace odb
typename object_traits::image_type& im (statements_.image ());
- 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_->refetch ();
}