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
@@ -18,8 +18,9 @@ import (
// RoundStatsUpdate is the builder for updating RoundStats entities.
type RoundStatsUpdate struct {
config
hooks []Hook
mutation *RoundStatsMutation
hooks []Hook
mutation *RoundStatsMutation
modifiers []func(*sql.UpdateBuilder)
}
// Where appends a list predicates to the RoundStatsUpdate builder.
@@ -164,6 +165,12 @@ func (rsu *RoundStatsUpdate) ExecX(ctx context.Context) {
}
}
// Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (rsu *RoundStatsUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RoundStatsUpdate {
rsu.modifiers = append(rsu.modifiers, modifiers...)
return rsu
}
func (rsu *RoundStatsUpdate) sqlSave(ctx context.Context) (n int, err error) {
_spec := &sqlgraph.UpdateSpec{
Node: &sqlgraph.NodeSpec{
@@ -273,11 +280,12 @@ func (rsu *RoundStatsUpdate) sqlSave(ctx context.Context) (n int, err error) {
}
_spec.Edges.Add = append(_spec.Edges.Add, edge)
}
_spec.Modifiers = rsu.modifiers
if n, err = sqlgraph.UpdateNodes(ctx, rsu.driver, _spec); err != nil {
if _, ok := err.(*sqlgraph.NotFoundError); ok {
err = &NotFoundError{roundstats.Label}
} else if sqlgraph.IsConstraintError(err) {
err = &ConstraintError{err.Error(), err}
err = &ConstraintError{msg: err.Error(), wrap: err}
}
return 0, err
}
@@ -287,9 +295,10 @@ func (rsu *RoundStatsUpdate) sqlSave(ctx context.Context) (n int, err error) {
// RoundStatsUpdateOne is the builder for updating a single RoundStats entity.
type RoundStatsUpdateOne struct {
config
fields []string
hooks []Hook
mutation *RoundStatsMutation
fields []string
hooks []Hook
mutation *RoundStatsMutation
modifiers []func(*sql.UpdateBuilder)
}
// SetRound sets the "round" field.
@@ -406,9 +415,15 @@ func (rsuo *RoundStatsUpdateOne) Save(ctx context.Context) (*RoundStats, error)
}
mut = rsuo.hooks[i](mut)
}
if _, err := mut.Mutate(ctx, rsuo.mutation); err != nil {
v, err := mut.Mutate(ctx, rsuo.mutation)
if err != nil {
return nil, err
}
nv, ok := v.(*RoundStats)
if !ok {
return nil, fmt.Errorf("unexpected node type %T returned from RoundStatsMutation", v)
}
node = nv
}
return node, err
}
@@ -435,6 +450,12 @@ func (rsuo *RoundStatsUpdateOne) ExecX(ctx context.Context) {
}
}
// Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (rsuo *RoundStatsUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RoundStatsUpdateOne {
rsuo.modifiers = append(rsuo.modifiers, modifiers...)
return rsuo
}
func (rsuo *RoundStatsUpdateOne) sqlSave(ctx context.Context) (_node *RoundStats, err error) {
_spec := &sqlgraph.UpdateSpec{
Node: &sqlgraph.NodeSpec{
@@ -561,6 +582,7 @@ func (rsuo *RoundStatsUpdateOne) sqlSave(ctx context.Context) (_node *RoundStats
}
_spec.Edges.Add = append(_spec.Edges.Add, edge)
}
_spec.Modifiers = rsuo.modifiers
_node = &RoundStats{config: rsuo.config}
_spec.Assign = _node.assignValues
_spec.ScanValues = _node.scanValues
@@ -568,7 +590,7 @@ func (rsuo *RoundStatsUpdateOne) sqlSave(ctx context.Context) (_node *RoundStats
if _, ok := err.(*sqlgraph.NotFoundError); ok {
err = &NotFoundError{roundstats.Label}
} else if sqlgraph.IsConstraintError(err) {
err = &ConstraintError{err.Error(), err}
err = &ConstraintError{msg: err.Error(), wrap: err}
}
return nil, err
}