entc/gen: allow scanning zero or more fields on Select

This commit is contained in:
Ariel Mashraki
2021-07-12 22:36:24 +03:00
committed by Ariel Mashraki
parent e1e197483c
commit 0b10a44f71
101 changed files with 215 additions and 199 deletions

View File

@@ -291,8 +291,8 @@ func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy {
// Select(user.FieldName).
// Scan(ctx, &v)
//
func (uq *UserQuery) Select(field string, fields ...string) *UserSelect {
uq.fields = append([]string{field}, fields...)
func (uq *UserQuery) Select(fields ...string) *UserSelect {
uq.fields = append(uq.fields, fields...)
return &UserSelect{UserQuery: uq}
}