updated deps; regen ent

This commit is contained in:
2022-08-15 12:10:15 +02:00
parent b8b9f82067
commit 657ca32bb3
66 changed files with 1578 additions and 4744 deletions

View File

@@ -1,4 +1,4 @@
// Code generated by entc, DO NOT EDIT.
// Code generated by ent, DO NOT EDIT.
package ent
@@ -20,8 +20,9 @@ import (
// MatchUpdate is the builder for updating Match entities.
type MatchUpdate struct {
config
hooks []Hook
mutation *MatchMutation
hooks []Hook
mutation *MatchMutation
modifiers []func(*sql.UpdateBuilder)
}
// Where appends a list predicates to the MatchUpdate builder.
@@ -359,6 +360,12 @@ func (mu *MatchUpdate) ExecX(ctx context.Context) {
}
}
// Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (mu *MatchUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MatchUpdate {
mu.modifiers = append(mu.modifiers, modifiers...)
return mu
}
func (mu *MatchUpdate) sqlSave(ctx context.Context) (n int, err error) {
_spec := &sqlgraph.UpdateSpec{
Node: &sqlgraph.NodeSpec{
@@ -649,11 +656,12 @@ func (mu *MatchUpdate) sqlSave(ctx context.Context) (n int, err error) {
}
_spec.Edges.Add = append(_spec.Edges.Add, edge)
}
_spec.Modifiers = mu.modifiers
if n, err = sqlgraph.UpdateNodes(ctx, mu.driver, _spec); err != nil {
if _, ok := err.(*sqlgraph.NotFoundError); ok {
err = &NotFoundError{match.Label}
} else if sqlgraph.IsConstraintError(err) {
err = &ConstraintError{err.Error(), err}
err = &ConstraintError{msg: err.Error(), wrap: err}
}
return 0, err
}
@@ -663,9 +671,10 @@ func (mu *MatchUpdate) sqlSave(ctx context.Context) (n int, err error) {
// MatchUpdateOne is the builder for updating a single Match entity.
type MatchUpdateOne struct {
config
fields []string
hooks []Hook
mutation *MatchMutation
fields []string
hooks []Hook
mutation *MatchMutation
modifiers []func(*sql.UpdateBuilder)
}
// SetShareCode sets the "share_code" field.
@@ -975,9 +984,15 @@ func (muo *MatchUpdateOne) Save(ctx context.Context) (*Match, error) {
}
mut = muo.hooks[i](mut)
}
if _, err := mut.Mutate(ctx, muo.mutation); err != nil {
v, err := mut.Mutate(ctx, muo.mutation)
if err != nil {
return nil, err
}
nv, ok := v.(*Match)
if !ok {
return nil, fmt.Errorf("unexpected node type %T returned from MatchMutation", v)
}
node = nv
}
return node, err
}
@@ -1004,6 +1019,12 @@ func (muo *MatchUpdateOne) ExecX(ctx context.Context) {
}
}
// Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (muo *MatchUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MatchUpdateOne {
muo.modifiers = append(muo.modifiers, modifiers...)
return muo
}
func (muo *MatchUpdateOne) sqlSave(ctx context.Context) (_node *Match, err error) {
_spec := &sqlgraph.UpdateSpec{
Node: &sqlgraph.NodeSpec{
@@ -1311,6 +1332,7 @@ func (muo *MatchUpdateOne) sqlSave(ctx context.Context) (_node *Match, err error
}
_spec.Edges.Add = append(_spec.Edges.Add, edge)
}
_spec.Modifiers = muo.modifiers
_node = &Match{config: muo.config}
_spec.Assign = _node.assignValues
_spec.ScanValues = _node.scanValues
@@ -1318,7 +1340,7 @@ func (muo *MatchUpdateOne) sqlSave(ctx context.Context) (_node *Match, err error
if _, ok := err.(*sqlgraph.NotFoundError); ok {
err = &NotFoundError{match.Label}
} else if sqlgraph.IsConstraintError(err) {
err = &ConstraintError{err.Error(), err}
err = &ConstraintError{msg: err.Error(), wrap: err}
}
return nil, err
}