summaryrefslogtreecommitdiff
path: root/odb/relational/changelog.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-04-26 17:18:12 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-04-26 17:18:12 +0200
commit6692558ba588c76f5e61eb7ed9a1040d36cb9ed7 (patch)
tree6f7a29e911713829583bc573e938591383f8486c /odb/relational/changelog.cxx
parent84cb9f184bc24ef7151ab9931b46311b03219b14 (diff)
Add support for extra database info in primary key
Use that to handle Oracle sequence name and SQLite lax auto ids.
Diffstat (limited to 'odb/relational/changelog.cxx')
-rw-r--r--odb/relational/changelog.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/odb/relational/changelog.cxx b/odb/relational/changelog.cxx
index 6fc85b7..63ea44f 100644
--- a/odb/relational/changelog.cxx
+++ b/odb/relational/changelog.cxx
@@ -97,6 +97,24 @@ namespace relational
if (pk.auto_ () != opk->auto_ ())
diagnose_primary_key (pk, "auto kind");
+ // Database-specific information.
+ //
+ for (primary_key::extra_map::const_iterator i (
+ pk.extra ().begin ()); i != pk.extra ().end (); ++i)
+ {
+ if (opk->extra ().count (i->first) == 0 ||
+ opk->extra ()[i->first] != i->second)
+ diagnose_primary_key (pk, i->first.c_str ());
+ }
+
+ for (primary_key::extra_map::const_iterator i (
+ opk->extra ().begin ()); i != opk->extra ().end (); ++i)
+ {
+ if (pk.extra ().count (i->first) == 0 ||
+ pk.extra ()[i->first] != i->second)
+ diagnose_primary_key (pk, i->first.c_str ());
+ }
+
if (pk.contains_size () != opk->contains_size ())
diagnose_primary_key (pk, "member set");