updated deps; regen ent

This commit is contained in:
2022-11-03 02:19:19 +01:00
parent 4b256dd594
commit ff3bbe0037
44 changed files with 938 additions and 2309 deletions

View File

@@ -190,60 +190,28 @@ func (rsu *RoundStatsUpdate) sqlSave(ctx context.Context) (n int, err error) {
}
}
if value, ok := rsu.mutation.Round(); ok {
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
Type: field.TypeUint,
Value: value,
Column: roundstats.FieldRound,
})
_spec.SetField(roundstats.FieldRound, field.TypeUint, value)
}
if value, ok := rsu.mutation.AddedRound(); ok {
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
Type: field.TypeUint,
Value: value,
Column: roundstats.FieldRound,
})
_spec.AddField(roundstats.FieldRound, field.TypeUint, value)
}
if value, ok := rsu.mutation.Bank(); ok {
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
Type: field.TypeUint,
Value: value,
Column: roundstats.FieldBank,
})
_spec.SetField(roundstats.FieldBank, field.TypeUint, value)
}
if value, ok := rsu.mutation.AddedBank(); ok {
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
Type: field.TypeUint,
Value: value,
Column: roundstats.FieldBank,
})
_spec.AddField(roundstats.FieldBank, field.TypeUint, value)
}
if value, ok := rsu.mutation.Equipment(); ok {
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
Type: field.TypeUint,
Value: value,
Column: roundstats.FieldEquipment,
})
_spec.SetField(roundstats.FieldEquipment, field.TypeUint, value)
}
if value, ok := rsu.mutation.AddedEquipment(); ok {
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
Type: field.TypeUint,
Value: value,
Column: roundstats.FieldEquipment,
})
_spec.AddField(roundstats.FieldEquipment, field.TypeUint, value)
}
if value, ok := rsu.mutation.Spent(); ok {
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
Type: field.TypeUint,
Value: value,
Column: roundstats.FieldSpent,
})
_spec.SetField(roundstats.FieldSpent, field.TypeUint, value)
}
if value, ok := rsu.mutation.AddedSpent(); ok {
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
Type: field.TypeUint,
Value: value,
Column: roundstats.FieldSpent,
})
_spec.AddField(roundstats.FieldSpent, field.TypeUint, value)
}
if rsu.mutation.MatchPlayerCleared() {
edge := &sqlgraph.EdgeSpec{
@@ -280,7 +248,7 @@ func (rsu *RoundStatsUpdate) sqlSave(ctx context.Context) (n int, err error) {
}
_spec.Edges.Add = append(_spec.Edges.Add, edge)
}
_spec.Modifiers = rsu.modifiers
_spec.AddModifiers(rsu.modifiers...)
if n, err = sqlgraph.UpdateNodes(ctx, rsu.driver, _spec); err != nil {
if _, ok := err.(*sqlgraph.NotFoundError); ok {
err = &NotFoundError{roundstats.Label}
@@ -492,60 +460,28 @@ func (rsuo *RoundStatsUpdateOne) sqlSave(ctx context.Context) (_node *RoundStats
}
}
if value, ok := rsuo.mutation.Round(); ok {
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
Type: field.TypeUint,
Value: value,
Column: roundstats.FieldRound,
})
_spec.SetField(roundstats.FieldRound, field.TypeUint, value)
}
if value, ok := rsuo.mutation.AddedRound(); ok {
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
Type: field.TypeUint,
Value: value,
Column: roundstats.FieldRound,
})
_spec.AddField(roundstats.FieldRound, field.TypeUint, value)
}
if value, ok := rsuo.mutation.Bank(); ok {
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
Type: field.TypeUint,
Value: value,
Column: roundstats.FieldBank,
})
_spec.SetField(roundstats.FieldBank, field.TypeUint, value)
}
if value, ok := rsuo.mutation.AddedBank(); ok {
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
Type: field.TypeUint,
Value: value,
Column: roundstats.FieldBank,
})
_spec.AddField(roundstats.FieldBank, field.TypeUint, value)
}
if value, ok := rsuo.mutation.Equipment(); ok {
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
Type: field.TypeUint,
Value: value,
Column: roundstats.FieldEquipment,
})
_spec.SetField(roundstats.FieldEquipment, field.TypeUint, value)
}
if value, ok := rsuo.mutation.AddedEquipment(); ok {
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
Type: field.TypeUint,
Value: value,
Column: roundstats.FieldEquipment,
})
_spec.AddField(roundstats.FieldEquipment, field.TypeUint, value)
}
if value, ok := rsuo.mutation.Spent(); ok {
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
Type: field.TypeUint,
Value: value,
Column: roundstats.FieldSpent,
})
_spec.SetField(roundstats.FieldSpent, field.TypeUint, value)
}
if value, ok := rsuo.mutation.AddedSpent(); ok {
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
Type: field.TypeUint,
Value: value,
Column: roundstats.FieldSpent,
})
_spec.AddField(roundstats.FieldSpent, field.TypeUint, value)
}
if rsuo.mutation.MatchPlayerCleared() {
edge := &sqlgraph.EdgeSpec{
@@ -582,7 +518,7 @@ func (rsuo *RoundStatsUpdateOne) sqlSave(ctx context.Context) (_node *RoundStats
}
_spec.Edges.Add = append(_spec.Edges.Add, edge)
}
_spec.Modifiers = rsuo.modifiers
_spec.AddModifiers(rsuo.modifiers...)
_node = &RoundStats{config: rsuo.config}
_spec.Assign = _node.assignValues
_spec.ScanValues = _node.scanValues