Added check if all selected columns are aggregates if group_by is present

This commit is contained in:
rbock
2015-10-03 17:00:53 +02:00
parent 25ff700c01
commit bd385f7377
7 changed files with 108 additions and 2 deletions

View File

@@ -375,7 +375,7 @@ int SelectType(int, char**)
static_assert(sqlpp::is_boolean_t<decltype(select(r.a).from(r))>::value, "select(bool) has to be a bool");
auto s1 = sqlpp::select()
.flags(sqlpp::distinct, sqlpp::straight_join)
.columns(l.alpha, l.beta, select(r.a).from(r))
.columns(l.gamma, r.a)
.from(r, t, l)
.where(t.beta == "hello world" and select(t.gamma).from(t)) // .as(alias::right))
.group_by(l.gamma, r.a)