diff --git a/include/sqlpp11/select_column_list.h b/include/sqlpp11/select_column_list.h index b8d1b97e..ee0b3c24 100644 --- a/include/sqlpp11/select_column_list.h +++ b/include/sqlpp11/select_column_list.h @@ -54,7 +54,7 @@ namespace sqlpp template struct select_traits { - using _traits = make_traits>, + using _traits = make_traits, tag::is_select_column_list, tag::is_return_value, tag::is_expression, @@ -228,6 +228,9 @@ namespace sqlpp }; }; + template + struct value_type_of> : public value_type_of {}; + namespace detail { template diff --git a/include/sqlpp11/statement.h b/include/sqlpp11/statement.h index a0e27b59..62b8359c 100644 --- a/include/sqlpp11/statement.h +++ b/include/sqlpp11/statement.h @@ -264,6 +264,9 @@ namespace sqlpp } }; + template + struct value_type_of> : value_type_of> {}; + template Context& serialize(const statement_t& t, Context& context) { diff --git a/tests/core/types/in_expression.cpp b/tests/core/types/in_expression.cpp index 952ae062..7edf2877 100644 --- a/tests/core/types/in_expression.cpp +++ b/tests/core/types/in_expression.cpp @@ -46,24 +46,25 @@ void test_in_expression(Value v) auto v_not_null = sqlpp::value(v); auto v_maybe_null = sqlpp::value(sqlpp::compat::make_optional(v)); -#warning : Need to support in with select - // in(v_not_null, select(v_not_null.as(sqlpp::alias::a))); - // Compare non-nullable with non-nullable. static_assert(is_bool::value, ""); static_assert(is_bool{}))>::value, ""); + static_assert(is_bool::value, ""); // Compare non-nullable with nullable. static_assert(is_maybe_bool::value, ""); static_assert(is_maybe_bool{}))>::value, ""); + static_assert(is_maybe_bool::value, ""); // Compare nullable with non-nullable. static_assert(is_maybe_bool::value, ""); static_assert(is_maybe_bool{}))>::value, ""); + static_assert(is_maybe_bool::value, ""); // Compare nullable with nullable. static_assert(is_maybe_bool::value, ""); static_assert(is_maybe_bool{}))>::value, ""); + static_assert(is_maybe_bool::value, ""); } template