From 84d9c3f57c35cf9e99e89eeeb6cc4f1c52c3f5a2 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 25 Apr 2011 18:32:22 +0200 Subject: Add support for mapping to database types based on type aliases This allows us to, for example, always map size_t to 64-bit type. The current implementation does not work for containers. It is not clear whether it will be possible to make it work using the GCC AST. --- odb/context.hxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'odb/context.hxx') diff --git a/odb/context.hxx b/odb/context.hxx index 9878bcb..84e9f70 100644 --- a/odb/context.hxx +++ b/odb/context.hxx @@ -400,16 +400,15 @@ protected: // static column_type_flags const ctf_default_null = 0x01; - // Return empty string if there is no mapping. The second argument - // is the custom type or empty string if it is not specified. + // Return empty string if there is no mapping. // string database_type (semantics::type& t, - string const& type, + semantics::names* hint, semantics::context& c, column_type_flags f) { - return current ().database_type_impl (t, type, c, f); + return current ().database_type_impl (t, hint, c, f); } // The default implementation uses the type map (populated by the database- @@ -417,7 +416,7 @@ protected: // virtual string database_type_impl (semantics::type&, - string const& type, + semantics::names*, semantics::context&, column_type_flags); -- cgit v1.1