diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-01-24 15:10:22 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-01-24 15:10:22 +0200 |
commit | ce03afff5ef2e8da677def73079864c31c6618d8 (patch) | |
tree | f0dd5ace26fcfb5c16dee9930a70cf274a80cfc0 /odb/context.hxx | |
parent | 7c9d4543838490670b632c7049bea53d58d78487 (diff) |
Add support for mapping char[N] to CHAR/VARCHAR database types
Also improve query support for arrays (decaying).
Diffstat (limited to 'odb/context.hxx')
-rw-r--r-- | odb/context.hxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/odb/context.hxx b/odb/context.hxx index 83d0747..aa604e4 100644 --- a/odb/context.hxx +++ b/odb/context.hxx @@ -1088,19 +1088,23 @@ public: // protected: // Return empty string if there is no mapping. The type passed is - // already cvr-unqualified. + // already cvr-unqualified. The null out argument indicates whether + // the column should allow NULL values by default. // string - database_type (semantics::type& t, semantics::names* hint, bool id) + database_type (semantics::type& t, + semantics::names* hint, + bool id, + bool* null = 0) { - return current ().database_type_impl (t, hint, id); + return current ().database_type_impl (t, hint, id, null); } // The default implementation uses the type map (populated by the database- // specific context implementation) to come up with a mapping. // virtual string - database_type_impl (semantics::type&, semantics::names*, bool); + database_type_impl (semantics::type&, semantics::names*, bool, bool*); public: typedef context root_context; |