aboutsummaryrefslogtreecommitdiff
path: root/odb/context.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-03-10 10:04:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-03-21 15:39:59 +0200
commit51419aca9c4bcc056ee87d5aa26fe3076f4593ef (patch)
tree43cb3532098c3573a6b1d88717f72257aa77c8d6 /odb/context.cxx
parentdcb7bcd541f77b280e5733da9ec1eb24574e0d9e (diff)
Move to new "virtual functions in context" model
Diffstat (limited to 'odb/context.cxx')
-rw-r--r--odb/context.cxx17
1 files changed, 10 insertions, 7 deletions
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<string> (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);