From 51419aca9c4bcc056ee87d5aa26fe3076f4593ef Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 10 Mar 2011 10:04:20 +0200 Subject: Move to new "virtual functions in context" model --- odb/context.cxx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'odb/context.cxx') diff --git a/odb/context.cxx b/odb/context.cxx index 944756a..b98a27d 100644 --- a/odb/context.cxx +++ b/odb/context.cxx @@ -269,12 +269,15 @@ column_type (semantics::data_member& m, string const& kp) : indirect_value (m, kp + "-column-type"); } -string context::data:: -column_type_impl (semantics::type& t, - string const& type, - semantics::context& ctx, - column_type_flags f) const +string context:: +database_type_impl (semantics::type& t, + string const& type, + semantics::context& ctx, + column_type_flags f) { + // @@ If I handle additional qualifiers (e.g., NOT NULL, AUTO_INCREMENT) + // separately, then I won't need to pass custom type anymore. + // if (!type.empty ()) return type; @@ -282,9 +285,9 @@ column_type_impl (semantics::type& t, // ::std::string) instead of a user typedef (e.g., my_string). // string const& name (t.fq_name ()); - type_map_type::const_iterator i (type_map_.find (name)); + type_map_type::const_iterator i (data_->type_map_.find (name)); - if (i != type_map_.end ()) + if (i != data_->type_map_.end ()) { string r (ctx.count ("id") ? i->second.id_type : i->second.type); -- cgit v1.1