mirror of
https://github.com/rbock/sqlpp11.git
synced 2026-01-07 05:30:44 -06:00
Transport can_be_null into subselect used as a result column
This commit is contained in:
@@ -54,7 +54,6 @@ namespace sqlpp
|
||||
template<typename Column>
|
||||
struct select_traits<Column>
|
||||
{
|
||||
#warning need to transport the "can be null information here"
|
||||
using _traits = make_traits<value_type_of<Column>, tag::select_column_list, tag::return_value, tag::expression, tag::named_expression>;
|
||||
using _name_t = typename Column::_name_t;
|
||||
};
|
||||
|
||||
@@ -112,7 +112,12 @@ namespace sqlpp
|
||||
using _provided_outer_tables = detail::type_set<>;
|
||||
using _extra_tables = detail::type_set<>;
|
||||
using _parameters = detail::make_parameter_tuple_t<parameters_of<Policies>...>;
|
||||
using _can_be_null = detail::any_t<can_be_null_t<_value_type>::value>;
|
||||
using _can_be_null = detail::any_t<
|
||||
can_be_null_t<_result_type_provider>::value,
|
||||
::sqlpp::detail::make_intersect_set_t<
|
||||
required_tables_of<_result_type_provider>,
|
||||
provided_outer_tables_of<statement_policies_t>
|
||||
>::size::value>;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -128,7 +133,10 @@ namespace sqlpp
|
||||
{
|
||||
using _policies_t = typename detail::statement_policies_t<Db, Policies...>;
|
||||
|
||||
using _traits = make_traits<value_type_of<_policies_t>, ::sqlpp::tag::select, tag::expression_if<typename _policies_t::_is_expression>, tag::named_expression_if<typename _policies_t::_is_expression>>;
|
||||
using _traits = make_traits<value_type_of<_policies_t>,
|
||||
::sqlpp::tag::select,
|
||||
tag::expression_if<typename _policies_t::_is_expression>,
|
||||
tag::named_expression_if<typename _policies_t::_is_expression>>;
|
||||
using _recursive_traits = typename _policies_t::_recursive_traits;
|
||||
using _used_outer_tables = typename _policies_t::_all_provided_outer_tables;
|
||||
|
||||
|
||||
@@ -46,9 +46,13 @@ namespace sqlpp
|
||||
};
|
||||
}
|
||||
|
||||
#warning a verbatim table is always an outer table
|
||||
struct verbatim_table_t: public sqlpp::table_t<verbatim_table_t, detail::unusable_pseudo_column_t>
|
||||
{
|
||||
struct _recursive_traits: public sqlpp::table_t<verbatim_table_t, detail::unusable_pseudo_column_t>::_recursive_traits
|
||||
{
|
||||
using _provided_outer_tables = detail::type_set<verbatim_table_t>;
|
||||
};
|
||||
|
||||
struct _name_t {};
|
||||
|
||||
verbatim_table_t(std::string representation):
|
||||
|
||||
Reference in New Issue
Block a user