diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-04-26 15:54:19 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-04-26 15:54:19 +0200 |
commit | 84cb9f184bc24ef7151ab9931b46311b03219b14 (patch) | |
tree | db976c22d0dfacdf7ceae4e0d27f4f1615bf5cb0 /odb/relational/model.hxx | |
parent | 436031d026eb004865faaa21af5213a6f89a6a85 (diff) |
Add support for table options in changelog, use to handle MySQL engine
Diffstat (limited to 'odb/relational/model.hxx')
-rw-r--r-- | odb/relational/model.hxx | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/odb/relational/model.hxx b/odb/relational/model.hxx index 5936ed1..6552048 100644 --- a/odb/relational/model.hxx +++ b/odb/relational/model.hxx @@ -468,6 +468,12 @@ namespace relational id_prefix_ = t; } + virtual string + table_options (semantics::data_member&, semantics::type&) + { + return ""; + } + virtual void traverse_container (semantics::data_member& m, semantics::type& ct) { @@ -495,6 +501,8 @@ namespace relational t.set ("cxx-location", m.location ()); model_.new_edge<sema_rel::qnames> (model_, t, name); + t.options (table_options (m, ct)); + // object_id // { @@ -675,9 +683,12 @@ namespace relational { typedef class_ base; - class_ (sema_rel::model& model) - : model_ (model) + class_ (sema_rel::model& model): model_ (model) {} + + virtual string + table_options (type&) { + return ""; } virtual void @@ -702,10 +713,12 @@ namespace relational string id (class_fq_name (c), 2); // Remove leading '::'. - sema_rel::table& t(model_.new_node<sema_rel::table> (id)); + sema_rel::table& t (model_.new_node<sema_rel::table> (id)); t.set ("cxx-location", c.location ()); model_.new_edge<sema_rel::qnames> (model_, t, name); + t.options (table_options (c)); + // Add columns. // { |