mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: use empty slice instead of nil in sqlAll (#310)
This commit is contained in:
@@ -294,8 +294,8 @@ func (gq *GroupQuery) Select(field string, fields ...string) *GroupSelect {
|
||||
|
||||
func (gq *GroupQuery) sqlAll(ctx context.Context) ([]*Group, error) {
|
||||
var (
|
||||
nodes []*Group
|
||||
_spec = gq.querySpec()
|
||||
nodes []*Group = []*Group{}
|
||||
_spec = gq.querySpec()
|
||||
)
|
||||
_spec.ScanValues = func() []interface{} {
|
||||
node := &Group{config: gq.config}
|
||||
|
||||
@@ -294,8 +294,8 @@ func (uq *UserQuery) Select(field string, fields ...string) *UserSelect {
|
||||
|
||||
func (uq *UserQuery) sqlAll(ctx context.Context) ([]*User, error) {
|
||||
var (
|
||||
nodes []*User
|
||||
_spec = uq.querySpec()
|
||||
nodes []*User = []*User{}
|
||||
_spec = uq.querySpec()
|
||||
)
|
||||
_spec.ScanValues = func() []interface{} {
|
||||
node := &User{config: uq.config}
|
||||
|
||||
Reference in New Issue
Block a user