summaryrefslogtreecommitdiff
path: root/odb/context.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-11-01 09:01:50 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-11-01 09:01:50 +0200
commit727a83dc82fa094aa91630d165d230a9a2dabe60 (patch)
treecf908eef97e4fd5518359bc90dc5839c829475ff /odb/context.cxx
parent56237544eeed76a55190b3fd7cc364d133d4513d (diff)
Factor assignment of database type to separate pass
Diffstat (limited to 'odb/context.cxx')
-rw-r--r--odb/context.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/odb/context.cxx b/odb/context.cxx
index c578cd9..1eb597f 100644
--- a/odb/context.cxx
+++ b/odb/context.cxx
@@ -159,6 +159,12 @@ column_name (semantics::data_member& m) const
string context::
column_type (semantics::data_member& m) const
{
+ return m.get<string> ("column-type");
+}
+
+string context::
+column_type_impl (semantics::data_member& m) const
+{
if (m.count ("type"))
return m.get<string> ("type");
@@ -176,15 +182,7 @@ column_type (semantics::data_member& m) const
if (i != data_->type_map_.end ())
return m.count ("id") ? i->second.id_type : i->second.type;
- cerr << m.file () << ":" << m.line () << ":" << m.column () << ":"
- << " error: unable to map C++ type '" << name << "' used in "
- << "data member '" << m.name () << "' to a database type" << endl;
-
- cerr << m.file () << ":" << m.line () << ":" << m.column () << ":"
- << " info: use '#pragma db type' to specify the database type"
- << endl;
-
- throw generation_failed ();
+ return string ();
}
string context::