diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-04-25 18:32:22 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-04-25 19:27:36 +0200 |
commit | 84d9c3f57c35cf9e99e89eeeb6cc4f1c52c3f5a2 (patch) | |
tree | 6467dcafcb98ada1695f27af90ba10966f2dcafb /odb/context.hxx | |
parent | 2f1d254fb49e8cc8bd9ea2137758614e5825eaed (diff) |
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.
Diffstat (limited to 'odb/context.hxx')
-rw-r--r-- | odb/context.hxx | 9 |
1 files changed, 4 insertions, 5 deletions
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); |