mirror of
https://github.com/rbock/sqlpp11.git
synced 2026-01-13 08:29:44 -06:00
Cleaning up static asserts for .where(true)
This commit is contained in:
@@ -84,17 +84,17 @@ namespace
|
||||
where_static_check<sqlpp::assert_where_static_count_args_t>();
|
||||
|
||||
// Try assignment as condition
|
||||
where_static_check<sqlpp::assert_where_expressions_t>(t.gamma = true);
|
||||
where_static_check<sqlpp::assert_where_boolean_expression_t>(t.gamma = true);
|
||||
|
||||
// Try non-boolean expression
|
||||
where_static_check<sqlpp::assert_where_boolean_t>(t.alpha);
|
||||
where_static_check<sqlpp::assert_where_boolean_expression_t>(t.alpha);
|
||||
|
||||
// Try some other types as expressions
|
||||
where_static_check<sqlpp::assert_where_expressions_t>("true");
|
||||
where_static_check<sqlpp::assert_where_expressions_t>(17);
|
||||
where_static_check<sqlpp::assert_where_expressions_t>('c');
|
||||
where_static_check<sqlpp::assert_where_expressions_t>(nullptr);
|
||||
where_static_check<sqlpp::assert_where_expressions_t>(t.alpha.as(t.beta));
|
||||
where_static_check<sqlpp::assert_where_boolean_expression_t>("true");
|
||||
where_static_check<sqlpp::assert_where_boolean_expression_t>(17);
|
||||
where_static_check<sqlpp::assert_where_boolean_expression_t>('c');
|
||||
where_static_check<sqlpp::assert_where_boolean_expression_t>(nullptr);
|
||||
where_static_check<sqlpp::assert_where_boolean_expression_t>(t.alpha.as(t.beta));
|
||||
|
||||
// Try using aggregate functions in where
|
||||
where_static_check<sqlpp::assert_where_no_aggregate_functions_t>(count(t.alpha) > 0);
|
||||
@@ -111,17 +111,17 @@ namespace
|
||||
where_dynamic_check<sqlpp::consistent_t>(t.gamma == true);
|
||||
|
||||
// Try assignment as condition
|
||||
where_dynamic_check<sqlpp::assert_where_expressions_t>(t.gamma = true);
|
||||
where_dynamic_check<sqlpp::assert_where_boolean_expression_t>(t.gamma = true);
|
||||
|
||||
// Try non-boolean expression
|
||||
where_dynamic_check<sqlpp::assert_where_boolean_t>(t.alpha);
|
||||
where_dynamic_check<sqlpp::assert_where_boolean_expression_t>(t.alpha);
|
||||
|
||||
// Try some other types as expressions
|
||||
where_dynamic_check<sqlpp::assert_where_expressions_t>("true");
|
||||
where_dynamic_check<sqlpp::assert_where_expressions_t>(17);
|
||||
where_dynamic_check<sqlpp::assert_where_expressions_t>('c');
|
||||
where_dynamic_check<sqlpp::assert_where_expressions_t>(nullptr);
|
||||
where_dynamic_check<sqlpp::assert_where_expressions_t>(t.alpha.as(t.beta));
|
||||
where_dynamic_check<sqlpp::assert_where_boolean_expression_t>("true");
|
||||
where_dynamic_check<sqlpp::assert_where_boolean_expression_t>(17);
|
||||
where_dynamic_check<sqlpp::assert_where_boolean_expression_t>('c');
|
||||
where_dynamic_check<sqlpp::assert_where_boolean_expression_t>(nullptr);
|
||||
where_dynamic_check<sqlpp::assert_where_boolean_expression_t>(t.alpha.as(t.beta));
|
||||
|
||||
// Try using aggregate functions in where
|
||||
where_dynamic_check<sqlpp::assert_where_no_aggregate_functions_t>(count(t.alpha) > 0);
|
||||
|
||||
Reference in New Issue
Block a user