summaryrefslogtreecommitdiff
path: root/odb/common.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-09-16 08:20:00 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-09-16 08:20:00 +0200
commitf6eda10b4014ea75af1be88ab3498618e390ea47 (patch)
tree5c91266323a1aeedeb7dc4ab1b0cf2c5c771e66c /odb/common.cxx
parent5a5bf7fc225ac225dbc03df55f6be7c56cb419aa (diff)
Diagnose (potentially) empty UPDATE statements with ROWVERSION
Diffstat (limited to 'odb/common.cxx')
-rw-r--r--odb/common.cxx26
1 files changed, 24 insertions, 2 deletions
diff --git a/odb/common.cxx b/odb/common.cxx
index 365fe19..f52cee6 100644
--- a/odb/common.cxx
+++ b/odb/common.cxx
@@ -270,12 +270,24 @@ traverse_view (semantics::class_& c)
}
void object_columns_base::
+traverse_pre (semantics::nameable&)
+{
+}
+
+void object_columns_base::
+traverse_post (semantics::nameable&)
+{
+}
+
+void object_columns_base::
traverse (semantics::data_member& m,
semantics::type& t,
std::string const& kp,
std::string const& dn,
semantics::class_* to)
{
+ traverse_pre (m);
+
semantics::class_* oto (context::top_object);
if (to != 0)
@@ -305,6 +317,8 @@ traverse (semantics::data_member& m,
root_ = 0;
context::top_object = oto;
+
+ traverse_post (m);
}
void object_columns_base::
@@ -320,7 +334,10 @@ traverse (semantics::class_& c)
bool f (top_level_);
if (top_level_)
+ {
+ traverse_pre (c);
top_level_ = false;
+ }
else
{
// Unless requested otherwise, don't go into bases if we are a derived
@@ -365,8 +382,13 @@ traverse (semantics::class_& c)
context::top_object = 0;
}
- if (f && !first_)
- flush ();
+ if (f)
+ {
+ if (!first_)
+ flush ();
+
+ traverse_post (c);
+ }
}
void object_columns_base::