updated deps; regen ent
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Code generated by entc, DO NOT EDIT.
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package ent
|
||||
|
||||
@@ -23,8 +23,9 @@ import (
|
||||
// MatchPlayerUpdate is the builder for updating MatchPlayer entities.
|
||||
type MatchPlayerUpdate struct {
|
||||
config
|
||||
hooks []Hook
|
||||
mutation *MatchPlayerMutation
|
||||
hooks []Hook
|
||||
mutation *MatchPlayerMutation
|
||||
modifiers []func(*sql.UpdateBuilder)
|
||||
}
|
||||
|
||||
// Where appends a list predicates to the MatchPlayerUpdate builder.
|
||||
@@ -1040,6 +1041,12 @@ func (mpu *MatchPlayerUpdate) check() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
|
||||
func (mpu *MatchPlayerUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MatchPlayerUpdate {
|
||||
mpu.modifiers = append(mpu.modifiers, modifiers...)
|
||||
return mpu
|
||||
}
|
||||
|
||||
func (mpu *MatchPlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
_spec := &sqlgraph.UpdateSpec{
|
||||
Node: &sqlgraph.NodeSpec{
|
||||
@@ -1888,11 +1895,12 @@ func (mpu *MatchPlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
}
|
||||
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
||||
}
|
||||
_spec.Modifiers = mpu.modifiers
|
||||
if n, err = sqlgraph.UpdateNodes(ctx, mpu.driver, _spec); err != nil {
|
||||
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
||||
err = &NotFoundError{matchplayer.Label}
|
||||
} else if sqlgraph.IsConstraintError(err) {
|
||||
err = &ConstraintError{err.Error(), err}
|
||||
err = &ConstraintError{msg: err.Error(), wrap: err}
|
||||
}
|
||||
return 0, err
|
||||
}
|
||||
@@ -1902,9 +1910,10 @@ func (mpu *MatchPlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
// MatchPlayerUpdateOne is the builder for updating a single MatchPlayer entity.
|
||||
type MatchPlayerUpdateOne struct {
|
||||
config
|
||||
fields []string
|
||||
hooks []Hook
|
||||
mutation *MatchPlayerMutation
|
||||
fields []string
|
||||
hooks []Hook
|
||||
mutation *MatchPlayerMutation
|
||||
modifiers []func(*sql.UpdateBuilder)
|
||||
}
|
||||
|
||||
// SetTeamID sets the "team_id" field.
|
||||
@@ -2882,9 +2891,15 @@ func (mpuo *MatchPlayerUpdateOne) Save(ctx context.Context) (*MatchPlayer, error
|
||||
}
|
||||
mut = mpuo.hooks[i](mut)
|
||||
}
|
||||
if _, err := mut.Mutate(ctx, mpuo.mutation); err != nil {
|
||||
v, err := mut.Mutate(ctx, mpuo.mutation)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
nv, ok := v.(*MatchPlayer)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("unexpected node type %T returned from MatchPlayerMutation", v)
|
||||
}
|
||||
node = nv
|
||||
}
|
||||
return node, err
|
||||
}
|
||||
@@ -2921,6 +2936,12 @@ func (mpuo *MatchPlayerUpdateOne) check() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
|
||||
func (mpuo *MatchPlayerUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MatchPlayerUpdateOne {
|
||||
mpuo.modifiers = append(mpuo.modifiers, modifiers...)
|
||||
return mpuo
|
||||
}
|
||||
|
||||
func (mpuo *MatchPlayerUpdateOne) sqlSave(ctx context.Context) (_node *MatchPlayer, err error) {
|
||||
_spec := &sqlgraph.UpdateSpec{
|
||||
Node: &sqlgraph.NodeSpec{
|
||||
@@ -3786,6 +3807,7 @@ func (mpuo *MatchPlayerUpdateOne) sqlSave(ctx context.Context) (_node *MatchPlay
|
||||
}
|
||||
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
||||
}
|
||||
_spec.Modifiers = mpuo.modifiers
|
||||
_node = &MatchPlayer{config: mpuo.config}
|
||||
_spec.Assign = _node.assignValues
|
||||
_spec.ScanValues = _node.scanValues
|
||||
@@ -3793,7 +3815,7 @@ func (mpuo *MatchPlayerUpdateOne) sqlSave(ctx context.Context) (_node *MatchPlay
|
||||
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
||||
err = &NotFoundError{matchplayer.Label}
|
||||
} else if sqlgraph.IsConstraintError(err) {
|
||||
err = &ConstraintError{err.Error(), err}
|
||||
err = &ConstraintError{msg: err.Error(), wrap: err}
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user