|
|
|
@ -28,6 +28,65 @@
|
|
|
|
|
|
|
|
|
|
SQLPP_ALIAS_PROVIDER(cheese);
|
|
|
|
|
|
|
|
|
|
void test_is_aggregate_function()
|
|
|
|
|
{
|
|
|
|
|
auto v = sqlpp::value(17);
|
|
|
|
|
auto t = sqlpp::value("");
|
|
|
|
|
auto col_int = test::TabFoo{}.id;
|
|
|
|
|
auto col_txt = test::TabFoo{}.textNnD;
|
|
|
|
|
|
|
|
|
|
// Constant values are neutral and therefore considered neither aggregate and non-aggregate.
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(v)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(v + v)>::value, "");
|
|
|
|
|
|
|
|
|
|
// Columns are not aggregate functions
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(col_int)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(col_int + v)>::value, "");
|
|
|
|
|
|
|
|
|
|
// Normal functions of values or non-aggregates do not contain aggregate functions.
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(trim(t))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(trim(col_txt))>::value, "");
|
|
|
|
|
|
|
|
|
|
// Aggregate functions of non-aggregates and values are aggregate functions :-)
|
|
|
|
|
static_assert(sqlpp::is_aggregate_function<decltype(avg(v))>::value, "");
|
|
|
|
|
static_assert(sqlpp::is_aggregate_function<decltype(count(v))>::value, "");
|
|
|
|
|
static_assert(sqlpp::is_aggregate_function<decltype(min(v))>::value, "");
|
|
|
|
|
static_assert(sqlpp::is_aggregate_function<decltype(max(v))>::value, "");
|
|
|
|
|
static_assert(sqlpp::is_aggregate_function<decltype(sum(v))>::value, "");
|
|
|
|
|
|
|
|
|
|
static_assert(sqlpp::is_aggregate_function<decltype(avg(col_int))>::value, "");
|
|
|
|
|
static_assert(sqlpp::is_aggregate_function<decltype(count(col_int))>::value, "");
|
|
|
|
|
static_assert(sqlpp::is_aggregate_function<decltype(min(col_int))>::value, "");
|
|
|
|
|
static_assert(sqlpp::is_aggregate_function<decltype(max(col_int))>::value, "");
|
|
|
|
|
static_assert(sqlpp::is_aggregate_function<decltype(sum(col_int))>::value, "");
|
|
|
|
|
|
|
|
|
|
static_assert(sqlpp::is_aggregate_function<decltype(max(trim(col_txt)))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(trim(upper(lower(max(col_txt)))) + trim(col_txt))>::value, "");
|
|
|
|
|
|
|
|
|
|
// Expressions containing aggregate functions are not aggregate functions.
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(avg(col_int) + v)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(count(col_int) + v)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(min(col_int) + v)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(max(col_int) + v)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(sum(col_int) + v)>::value, "");
|
|
|
|
|
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(trim(max(col_txt)))>::value, "");
|
|
|
|
|
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(avg(col_int) + col_int)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(count(col_int) + col_int)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(min(col_int) + col_int)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(max(col_int) + col_int)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(sum(col_int) + col_int)>::value, "");
|
|
|
|
|
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(max(trim(col_txt)) + trim(col_txt))>::value, "");
|
|
|
|
|
|
|
|
|
|
// Clauses do not expose aggregates functions.
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(where(col_int > v))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(select_columns(v.as(cheese), col_int))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(select_columns(max(col_int), v.as(cheese), col_int))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_function<decltype(select_columns(dynamic(true, max(col_int)), v.as(cheese), col_int))>::value, "");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void test_contains_aggregate_function()
|
|
|
|
|
{
|
|
|
|
|
auto v = sqlpp::value(17);
|
|
|
|
@ -35,7 +94,7 @@ void test_contains_aggregate_function()
|
|
|
|
|
auto col_int = test::TabFoo{}.id;
|
|
|
|
|
auto col_txt = test::TabFoo{}.textNnD;
|
|
|
|
|
|
|
|
|
|
// Values are aggregate neutral and therefore considered neither aggregate and non-aggregate context.
|
|
|
|
|
// Constant values are neutral and therefore considered neither aggregate and non-aggregate.
|
|
|
|
|
static_assert(not sqlpp::contains_aggregate_function<decltype(v)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_aggregate_function<decltype(v + v)>::value, "");
|
|
|
|
|
|
|
|
|
@ -48,11 +107,11 @@ void test_contains_aggregate_function()
|
|
|
|
|
static_assert(not sqlpp::contains_aggregate_function<decltype(trim(col_txt))>::value, "");
|
|
|
|
|
|
|
|
|
|
// Aggregate functions of non-aggregates and values contain aggregate functions.
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(avg(v))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(count(v))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(min(v))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(max(v))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(sum(v))>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_function<decltype(avg(v))>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_function<decltype(count(v))>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_function<decltype(min(v))>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_function<decltype(max(v))>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_function<decltype(sum(v))>::value, "");
|
|
|
|
|
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_function<decltype(avg(col_int))>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_function<decltype(count(col_int))>::value, "");
|
|
|
|
@ -79,140 +138,70 @@ void test_contains_aggregate_function()
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_function<decltype(trim(upper(lower(max(col_txt)))) + trim(col_txt))>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_function<decltype(max(trim(col_txt)) + trim(col_txt))>::value, "");
|
|
|
|
|
|
|
|
|
|
// Clauses expose non-aggregates (probably irrelevant)
|
|
|
|
|
// Clauses expose non-aggregates.
|
|
|
|
|
static_assert(not sqlpp::contains_aggregate_function<decltype(where(col_int > v))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_aggregate_function<decltype(select_columns(v.as(cheese), col_int))>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_function<decltype(select_columns(max(col_int), v.as(cheese), col_int))>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_function<decltype(select_columns(dynamic(true, max(col_int)), v.as(cheese), col_int))>::value, "");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void test_contains_aggregate_expression()
|
|
|
|
|
void test_is_aggregate_expression()
|
|
|
|
|
{
|
|
|
|
|
auto v_not_null = sqlpp::value(17);
|
|
|
|
|
|
|
|
|
|
auto v = sqlpp::value(17);
|
|
|
|
|
auto t = sqlpp::value("");
|
|
|
|
|
auto col_int = test::TabFoo{}.id;
|
|
|
|
|
auto col_txt = test::TabFoo{}.textNnD;
|
|
|
|
|
auto agg_int = test::TabFoo{}.id;
|
|
|
|
|
auto agg_txt = test::TabFoo{}.textNnD;
|
|
|
|
|
|
|
|
|
|
auto col_int = test::TabBar{}.id;
|
|
|
|
|
auto col_txt = test::TabBar{}.textN;
|
|
|
|
|
|
|
|
|
|
using known_aggregates = sqlpp::detail::type_vector<decltype(v), decltype(col_txt), decltype(col_int + v)>;
|
|
|
|
|
using unknown = sqlpp::detail::type_vector<>;
|
|
|
|
|
using known_aggregates = sqlpp::detail::type_vector<decltype(agg_txt), decltype(agg_int)>;
|
|
|
|
|
|
|
|
|
|
// ...
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<known_aggregates, decltype(v)>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<known_aggregates, decltype(v + v)>::value, "");
|
|
|
|
|
// If there are no known aggregate expressions, then only aggregate functions will be found.
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_expression<unknown, decltype(v)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_expression<unknown, decltype(v + v)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_expression<unknown, decltype(col_int)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_expression<unknown, decltype(col_txt)>::value, "");
|
|
|
|
|
static_assert(sqlpp::is_aggregate_expression<unknown, decltype(count(col_int))>::value, "");
|
|
|
|
|
static_assert(sqlpp::is_aggregate_expression<unknown, decltype(count(col_txt))>::value, "");
|
|
|
|
|
static_assert(sqlpp::is_aggregate_expression<unknown, decltype(max(v))>::value, "");
|
|
|
|
|
static_assert(sqlpp::is_aggregate_expression<unknown, decltype(max(col_int))>::value, "");
|
|
|
|
|
static_assert(sqlpp::is_aggregate_expression<unknown, decltype(max(col_txt))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_expression<unknown, decltype(dynamic(true, max(v)))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_expression<unknown, decltype(dynamic(true, max(col_int)))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_expression<unknown, decltype(dynamic(true, max(col_txt)))>::value, "");
|
|
|
|
|
|
|
|
|
|
// ...
|
|
|
|
|
static_assert(not sqlpp::contains_aggregate_expression<unknown, decltype(v)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_aggregate_expression<unknown, decltype(v + v)>::value, "");
|
|
|
|
|
// Known aggregate expressions are detected as such.
|
|
|
|
|
static_assert(sqlpp::is_aggregate_expression<known_aggregates, decltype(agg_int)>::value, "");
|
|
|
|
|
static_assert(sqlpp::is_aggregate_expression<known_aggregates, decltype(agg_txt)>::value, "");
|
|
|
|
|
|
|
|
|
|
#warning: activate
|
|
|
|
|
#if 0
|
|
|
|
|
// Columns are non-aggregates.
|
|
|
|
|
static_assert(not sqlpp::contains_aggregate_expression<decltype(col_int)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_aggregate_expression<decltype(col_int + v)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_expression<known_aggregates, decltype(dynamic(true, agg_int))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_expression<known_aggregates, decltype(dynamic(true, agg_txt))>::value, "");
|
|
|
|
|
|
|
|
|
|
// Normal expressions of values or non-aggregates do not contain aggregate functions.
|
|
|
|
|
static_assert(not sqlpp::contains_aggregate_expression<decltype(trim(t))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_aggregate_expression<decltype(trim(col_txt))>::value, "");
|
|
|
|
|
// Known aggregate expressions are not detected as such in expressions.
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_expression<known_aggregates, decltype(agg_int + 17)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_expression<known_aggregates, decltype(17 + agg_int)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_expression<known_aggregates, decltype(agg_txt.like("%"))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_expression<known_aggregates, decltype((agg_int + v).between(1, 10))>::value, "");
|
|
|
|
|
|
|
|
|
|
// Aggregate expressions of non-aggregates contain aggregate functions.
|
|
|
|
|
static_assert(not sqlpp::contains_aggregate_expressions<decltype(avg(v))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_aggregate_expressions<decltype(count(v))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_aggregate_expressions<decltype(min(v))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_aggregate_expressions<decltype(max(v))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_aggregate_expressions<decltype(sum(v))>::value, "");
|
|
|
|
|
// Known aggregate expressions are not detected as such in aggregate functions.
|
|
|
|
|
static_assert(sqlpp::is_aggregate_expression<known_aggregates, decltype(max(agg_int + 17))>::value, "");
|
|
|
|
|
static_assert(sqlpp::is_aggregate_expression<known_aggregates, decltype(max(17 + agg_int))>::value, "");
|
|
|
|
|
static_assert(sqlpp::is_aggregate_expression<known_aggregates, decltype(count(agg_txt.like("%")))>::value, "");
|
|
|
|
|
static_assert(sqlpp::is_aggregate_expression<known_aggregates, decltype(count((agg_int + v).between(1, 10)))>::value, "");
|
|
|
|
|
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<decltype(avg(col_int))>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<decltype(count(col_int))>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<decltype(min(col_int))>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<decltype(max(col_int))>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<decltype(sum(col_int))>::value, "");
|
|
|
|
|
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<decltype(avg(col_int) + v)>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<decltype(count(col_int) + v)>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<decltype(min(col_int) + v)>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<decltype(max(col_int) + v)>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<decltype(sum(col_int) + v)>::value, "");
|
|
|
|
|
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<decltype(trim(max(col_txt)))>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<decltype(max(trim(col_txt)))>::value, "");
|
|
|
|
|
|
|
|
|
|
// Expressions of aggregate expressions and non-aggregates contain aggregate functions.
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<decltype(avg(col_int) + col_int)>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<decltype(count(col_int) + col_int)>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<decltype(min(col_int) + col_int)>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<decltype(max(col_int) + col_int)>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<decltype(sum(col_int) + col_int)>::value, "");
|
|
|
|
|
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<decltype(trim(upper(lower(max(col_txt)))) + trim(col_txt))>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<decltype(max(trim(col_txt)) + trim(col_txt))>::value, "");
|
|
|
|
|
|
|
|
|
|
// Clauses expose non-aggregates (probably irrelevant)
|
|
|
|
|
static_assert(not sqlpp::contains_aggregate_expression<decltype(where(col_int > v))>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_aggregate_expression<decltype(select_columns(max(col_int), v.as(cheese), col_int))>::value, "");
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void test_contains_non_aggregate()
|
|
|
|
|
{
|
|
|
|
|
auto v = sqlpp::value(17);
|
|
|
|
|
auto t = sqlpp::value("");
|
|
|
|
|
auto col_int = test::TabFoo{}.id;
|
|
|
|
|
auto col_txt = test::TabFoo{}.textNnD;
|
|
|
|
|
|
|
|
|
|
// Values are aggregate neutral and therefore considered neither aggregate and non-aggregate context.
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(v)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(v + v)>::value, "");
|
|
|
|
|
|
|
|
|
|
// Columns are non-aggregates.
|
|
|
|
|
static_assert(sqlpp::contains_non_aggregate<decltype(col_int)>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_non_aggregate<decltype(col_int + v)>::value, "");
|
|
|
|
|
|
|
|
|
|
// Functions can contain non-aggregates.
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(trim(t))>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_non_aggregate<decltype(trim(col_txt))>::value, "");
|
|
|
|
|
|
|
|
|
|
// Aggregate functions of non-aggregates and values are aggregate functions.
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(avg(v))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(count(v))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(min(v))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(max(v))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(sum(v))>::value, "");
|
|
|
|
|
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(avg(col_int))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(count(col_int))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(min(col_int))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(max(col_int))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(sum(col_int))>::value, "");
|
|
|
|
|
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(avg(col_int) + v)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(count(col_int) + v)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(min(col_int) + v)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(max(col_int) + v)>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(sum(col_int) + v)>::value, "");
|
|
|
|
|
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(trim(max(col_txt)))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::contains_non_aggregate<decltype(max(trim(col_txt)))>::value, "");
|
|
|
|
|
|
|
|
|
|
// Expressions of aggregate functions and non-aggregates contain non-aggregates.
|
|
|
|
|
static_assert(sqlpp::contains_non_aggregate<decltype(avg(col_int) + col_int)>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_non_aggregate<decltype(count(col_int) + col_int)>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_non_aggregate<decltype(min(col_int) + col_int)>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_non_aggregate<decltype(max(col_int) + col_int)>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_non_aggregate<decltype(sum(col_int) + col_int)>::value, "");
|
|
|
|
|
|
|
|
|
|
static_assert(sqlpp::contains_non_aggregate<decltype(trim(max(col_txt)) + trim(col_txt))>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_non_aggregate<decltype(max(trim(col_txt)) + trim(col_txt))>::value, "");
|
|
|
|
|
|
|
|
|
|
// Clauses expose non-aggregates (probably irrelevant)
|
|
|
|
|
static_assert(sqlpp::contains_non_aggregate<decltype(where(col_int > v))>::value, "");
|
|
|
|
|
static_assert(sqlpp::contains_non_aggregate<decltype(select_columns(max(col_int), v.as(cheese), col_int))>::value, "");
|
|
|
|
|
// Known aggregate expressions are not exposed as such by clauses.
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_expression<known_aggregates, decltype(select(agg_txt))>::value, "");
|
|
|
|
|
static_assert(not sqlpp::is_aggregate_expression<known_aggregates, decltype(select(agg_int))>::value, "");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int main()
|
|
|
|
|
{
|
|
|
|
|
void test_is_aggregate_function();
|
|
|
|
|
void test_contains_aggregate_function();
|
|
|
|
|
void test_contains_aggregate_expression();
|
|
|
|
|
void test_contains_non_aggregate();
|
|
|
|
|
void test_is_aggregate_expression();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|