From 84cb9f184bc24ef7151ab9931b46311b03219b14 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 26 Apr 2013 15:54:19 +0200 Subject: Add support for table options in changelog, use to handle MySQL engine --- odb/relational/model.hxx | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'odb/relational/model.hxx') 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 (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 (id)); + sema_rel::table& t (model_.new_node (id)); t.set ("cxx-location", c.location ()); model_.new_edge (model_, t, name); + t.options (table_options (c)); + // Add columns. // { -- cgit v1.1