aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-01-12 08:55:19 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-01-12 08:59:54 +0200
commit68a5c554923bcb1ac223908aefd0181870c6d47f (patch)
treececfe66641d3c8b7956a18cc900b8a07a41c3147
parent679d03b12e9f5d6932985d722dbe66dec75ca211 (diff)
Cosmetic changes
-rw-r--r--odb/oracle/object-result.txx8
-rw-r--r--odb/oracle/oracle-types.hxx7
-rw-r--r--odb/oracle/query.cxx2
-rw-r--r--odb/oracle/view-result.txx4
4 files changed, 18 insertions, 3 deletions
diff --git a/odb/oracle/object-result.txx b/odb/oracle/object-result.txx
index 1153534..6cd994b 100644
--- a/odb/oracle/object-result.txx
+++ b/odb/oracle/object-result.txx
@@ -152,6 +152,10 @@ namespace odb
else
*r->image_copy_ = im;
+ // Increment binding version since we may have "stolen" some
+ // descriptors (LOB, date-time) from the image. Re-bind will
+ // reallocate them and update the binding.
+ //
r->statements_.select_image_binding ().version++;
im.change_callback_.callback = 0;
@@ -270,6 +274,10 @@ namespace odb
else
*r->image_copy_ = im;
+ // Increment binding version since we may have "stolen" some
+ // descriptors (LOB, date-time) from the image. Re-bind will
+ // reallocate them and update the binding.
+ //
r->statements_.select_image_binding ().version++;
im.change_callback_.callback = 0;
diff --git a/odb/oracle/oracle-types.hxx b/odb/oracle/oracle-types.hxx
index 6e01bf7..f2e5792 100644
--- a/odb/oracle/oracle-types.hxx
+++ b/odb/oracle/oracle-types.hxx
@@ -122,8 +122,11 @@ namespace odb
};
// An instance of this structure specifies the function to invoke and
- // the context to pass just prior to the image associated with a query
- // being modified.
+ // the context to pass when the object/view image is about to be
+ // modified. This mechanism is used by the query machinery to save the
+ // image between result iteration and dereferencing if something gets
+ // executed between these two operations that would overwrite the
+ // image.
//
struct change_callback
{
diff --git a/odb/oracle/query.cxx b/odb/oracle/query.cxx
index 60c83d8..f561a63 100644
--- a/odb/oracle/query.cxx
+++ b/odb/oracle/query.cxx
@@ -203,7 +203,7 @@ namespace odb
optimize ()
{
// Remove a single TRUE literal or one that is followe by one of
- // the other clauses. This avoids usless WHERE clauses like
+ // the other clauses. This avoids useless WHERE clauses like
//
// WHERE TRUE GROUP BY foo
//
diff --git a/odb/oracle/view-result.txx b/odb/oracle/view-result.txx
index 1d34503..9b9b0c9 100644
--- a/odb/oracle/view-result.txx
+++ b/odb/oracle/view-result.txx
@@ -116,6 +116,10 @@ namespace odb
else
*r->image_copy_ = im;
+ // Increment binding version since we may have "stolen" some
+ // descriptors (LOB, date-time) from the image. Re-bind will
+ // reallocate them and update the binding.
+ //
r->statements_.image_binding ().version++;
im.change_callback_.callback = 0;