mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: allow scanning zero or more fields on Select
This commit is contained in:
committed by
Ariel Mashraki
parent
e1e197483c
commit
0b10a44f71
@@ -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}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user