mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: minor codegen improvements
This commit is contained in:
committed by
Ariel Mashraki
parent
e915765f3b
commit
ab207c499a
@@ -41,8 +41,7 @@ var (
|
||||
|
||||
// Schema is the API for creating, migrating and dropping a schema.
|
||||
type Schema struct {
|
||||
drv dialect.Driver
|
||||
universalID bool
|
||||
drv dialect.Driver
|
||||
}
|
||||
|
||||
// NewSchema creates a new schema client.
|
||||
|
||||
@@ -696,9 +696,7 @@ func (ugb *UserGroupBy) sqlQuery() *sql.Selector {
|
||||
for _, f := range ugb.fields {
|
||||
columns = append(columns, selector.C(f))
|
||||
}
|
||||
for _, c := range aggregation {
|
||||
columns = append(columns, c)
|
||||
}
|
||||
columns = append(columns, aggregation...)
|
||||
selector.Select(columns...)
|
||||
}
|
||||
return selector.GroupBy(selector.Columns(ugb.fields...)...)
|
||||
|
||||
Reference in New Issue
Block a user