mirror of
https://github.com/rbock/sqlpp11.git
synced 2026-01-02 03:00:38 -06:00
Fixed order_by type check
This commit is contained in:
@@ -192,7 +192,7 @@ namespace sqlpp
|
||||
-> _new_statement_t<_check<Expressions...>, group_by_t<void, Expressions...>>
|
||||
{
|
||||
static_assert(sizeof...(Expressions), "at least one expression (e.g. a column) required in group_by()");
|
||||
static_assert(detail::all_t<is_expression_t<Expressions>::value...>::value, "at least one argument is not an expression in group_by()");
|
||||
static_assert(_check<Expressions...>::value, "at least one argument is not an expression in group_by()");
|
||||
|
||||
return _group_by_impl<void>(_check<Expressions...>{}, expressions...);
|
||||
}
|
||||
@@ -202,7 +202,7 @@ namespace sqlpp
|
||||
-> _new_statement_t<_check<Expressions...>, group_by_t<_database_t, Expressions...>>
|
||||
{
|
||||
static_assert(not std::is_same<_database_t, void>::value, "dynamic_group_by must not be called in a static statement");
|
||||
static_assert(detail::all_t<is_expression_t<Expressions>::value...>::value, "at least one argument is not an expression in group_by()");
|
||||
static_assert(_check<Expressions...>::value, "at least one argument is not an expression in group_by()");
|
||||
|
||||
return _group_by_impl<_database_t>(_check<Expressions...>{}, expressions...);
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ namespace sqlpp
|
||||
using _database_t = typename Policies::_database_t;
|
||||
|
||||
template<typename... T>
|
||||
using _check = detail::all_t<is_expression_t<T>::value...>;
|
||||
using _check = detail::all_t<is_sort_order_t<T>::value...>;
|
||||
|
||||
template<typename Check, typename T>
|
||||
using _new_statement_t = new_statement_t<Check::value, Policies, no_order_by_t, T>;
|
||||
@@ -192,7 +192,7 @@ namespace sqlpp
|
||||
-> _new_statement_t<_check<Expressions...>, order_by_t<void, Expressions...>>
|
||||
{
|
||||
static_assert(sizeof...(Expressions), "at least one expression (e.g. a column) required in order_by()");
|
||||
static_assert(detail::all_t<is_expression_t<Expressions>::value...>::value, "at least one argument is not an expression in order_by()");
|
||||
static_assert(_check<Expressions...>::value, "at least one argument is not a sort order in order_by()");
|
||||
|
||||
return _order_by_impl<void>(_check<Expressions...>{}, expressions...);
|
||||
}
|
||||
@@ -202,7 +202,7 @@ namespace sqlpp
|
||||
-> _new_statement_t<_check<Expressions...>, order_by_t<_database_t, Expressions...>>
|
||||
{
|
||||
static_assert(not std::is_same<_database_t, void>::value, "dynamic_order_by must not be called in a static statement");
|
||||
static_assert(detail::all_t<is_expression_t<Expressions>::value...>::value, "at least one argument is not an expression in order_by()");
|
||||
static_assert(_check<Expressions...>::value, "at least one argument is not a sort order in order_by()");
|
||||
|
||||
return _order_by_impl<_database_t>(_check<Expressions...>{}, expressions...);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user