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

@@ -363,8 +363,8 @@ func (fq *FileQuery) GroupBy(field string, fields ...string) *FileGroupBy {
// Select(file.FieldName).
// Scan(ctx, &v)
//
func (fq *FileQuery) Select(field string, fields ...string) *FileSelect {
fq.fields = append([]string{field}, fields...)
func (fq *FileQuery) Select(fields ...string) *FileSelect {
fq.fields = append(fq.fields, fields...)
return &FileSelect{FileQuery: fq}
}