diff --git a/include/sqlpp11/avg.h b/include/sqlpp11/avg.h index 2854a8d6..50ca491c 100644 --- a/include/sqlpp11/avg.h +++ b/include/sqlpp11/avg.h @@ -34,7 +34,8 @@ namespace sqlpp namespace vendor { template - struct avg_t: public floating_point::template expression_operators> + struct avg_t: public floating_point::template expression_operators>, + public alias_operators> { using _traits = make_traits; using _recursive_traits = make_recursive_traits; diff --git a/include/sqlpp11/basic_expression_operators.h b/include/sqlpp11/basic_expression_operators.h index e306542d..d1f06749 100644 --- a/include/sqlpp11/basic_expression_operators.h +++ b/include/sqlpp11/basic_expression_operators.h @@ -139,7 +139,11 @@ namespace sqlpp static_assert(detail::all_t<_is_valid_comparison_operand>::value...>::value, "at least one operand of in() is not valid"); return { *static_cast(this), vendor::wrap_operand_t{t}... }; } + }; + template + struct alias_operators + { template expression_alias_t as(const alias_provider&) { diff --git a/include/sqlpp11/count.h b/include/sqlpp11/count.h index eec747be..838189a6 100644 --- a/include/sqlpp11/count.h +++ b/include/sqlpp11/count.h @@ -35,7 +35,8 @@ namespace sqlpp namespace vendor { template - struct count_t: public sqlpp::detail::integral::template expression_operators> + struct count_t: public sqlpp::detail::integral::template expression_operators>, + public alias_operators> { using _traits = make_traits<::sqlpp::detail::integral, ::sqlpp::tag::expression, ::sqlpp::tag::named_expression>; using _recursive_traits = make_recursive_traits; diff --git a/include/sqlpp11/exists.h b/include/sqlpp11/exists.h index 7469af47..8d767754 100644 --- a/include/sqlpp11/exists.h +++ b/include/sqlpp11/exists.h @@ -34,7 +34,8 @@ namespace sqlpp namespace vendor { template - struct exists_t: public boolean::template expression_operators> + struct exists_t: public boolean::template expression_operators>, + public alias_operators> { using _traits = make_traits; using _recursive_traits = make_recursive_traits