diff options
author | Constantin Michael <constantin@codesynthesis.com> | 2011-06-14 09:59:46 +0200 |
---|---|---|
committer | Constantin Michael <constantin@codesynthesis.com> | 2011-07-05 14:43:37 +0200 |
commit | b78b1510cdcd82b560cabda8c082aff8f0d3cc2d (patch) | |
tree | 468943b346ace8cabaa1bec1fc40ec7d3454cebc /odb/relational/schema.hxx | |
parent | 6bfcd9d669a7da94d7878b265945cd38b5f1d6bf (diff) |
Add type hook point to relational schema generation
Diffstat (limited to 'odb/relational/schema.hxx')
-rw-r--r-- | odb/relational/schema.hxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/odb/relational/schema.hxx b/odb/relational/schema.hxx index 9e04b77..9d0c0d1 100644 --- a/odb/relational/schema.hxx +++ b/odb/relational/schema.hxx @@ -185,8 +185,9 @@ namespace relational if (!first) os << "," << endl; - os << " " << quote_id (name) << " " << column_type (m, prefix_); + os << " " << quote_id (name); + type (m); constraints (m); if (semantics::class_* c = object_pointer (member_type (m, prefix_))) @@ -199,6 +200,12 @@ namespace relational } virtual void + type (semantics::data_member& m) + { + os << " " << column_type (m, prefix_); + } + + virtual void constraints (semantics::data_member& m) { if (m.count ("id")) |