Support Having w/o Group

This commit is contained in:
Jinzhu
2021-03-30 18:28:09 +08:00
parent 73c6d3e64e
commit 33601dc72f
2 changed files with 16 additions and 0 deletions
+6
View File
@@ -39,4 +39,10 @@ func (groupBy GroupBy) MergeClause(clause *Clause) {
groupBy.Having = append(copiedHaving, groupBy.Having...)
}
clause.Expression = groupBy
if len(groupBy.Columns) == 0 {
clause.Name = ""
} else {
clause.Name = groupBy.Name()
}
}