improve code

This commit is contained in:
Lunny Xiao 2020-03-08 20:41:12 +08:00
parent a7b1c34dba
commit 61b9ad3e24
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 2 additions and 2 deletions

View File

@ -603,13 +603,13 @@ func (statement *Statement) tbNameNoSchema(table *schemas.Table) string {
// GroupBy generate "Group By keys" statement // GroupBy generate "Group By keys" statement
func (statement *Statement) GroupBy(keys string) *Statement { func (statement *Statement) GroupBy(keys string) *Statement {
statement.GroupByStr = keys statement.GroupByStr = statement.ReplaceQuote(keys)
return statement return statement
} }
// Having generate "Having conditions" statement // Having generate "Having conditions" statement
func (statement *Statement) Having(conditions string) *Statement { func (statement *Statement) Having(conditions string) *Statement {
statement.HavingStr = fmt.Sprintf("HAVING %v", conditions) statement.HavingStr = fmt.Sprintf("HAVING %v", statement.ReplaceQuote(conditions))
return statement return statement
} }