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
@@ -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}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user