From 73c98a67ef4ed605cf69e0d212934c4dc1f3eb8e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 19 Jul 2011 13:42:18 +0200 Subject: New design for NULL semantics Now, instead of being specified as part of the SQL type with the type pragma, there are separate null and not_null pragmas. The not_null pragma was used to control NULL-ness of object pointers. Now the two pragmas are used consistently for object pointers and simple values (and in the future will work for composite values and containers). --- odb/relational/sqlite/context.cxx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'odb/relational/sqlite/context.cxx') diff --git a/odb/relational/sqlite/context.cxx b/odb/relational/sqlite/context.cxx index b026822..4d00621 100644 --- a/odb/relational/sqlite/context.cxx +++ b/odb/relational/sqlite/context.cxx @@ -197,12 +197,9 @@ namespace relational } string context:: - database_type_impl (semantics::type& t, - semantics::names* hint, - semantics::context& ctx, - column_type_flags f) + database_type_impl (semantics::type& t, semantics::names* hint, bool id) { - string r (base_context::database_type_impl (t, hint, ctx, f)); + string r (base_context::database_type_impl (t, hint, id)); if (!r.empty ()) return r; @@ -210,13 +207,8 @@ namespace relational using semantics::enum_; if (t.is_a ()) - { r = "INTEGER"; - if ((f & ctf_default_null) == 0) - r += " NOT NULL"; - } - return r; } -- cgit v1.1