tracking tickrate
This commit is contained in:
@@ -201,6 +201,33 @@ func (mu *MatchUpdate) ClearDecryptionKey() *MatchUpdate {
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetTickRate sets the "tick_rate" field.
|
||||
func (mu *MatchUpdate) SetTickRate(f float64) *MatchUpdate {
|
||||
mu.mutation.ResetTickRate()
|
||||
mu.mutation.SetTickRate(f)
|
||||
return mu
|
||||
}
|
||||
|
||||
// SetNillableTickRate sets the "tick_rate" field if the given value is not nil.
|
||||
func (mu *MatchUpdate) SetNillableTickRate(f *float64) *MatchUpdate {
|
||||
if f != nil {
|
||||
mu.SetTickRate(*f)
|
||||
}
|
||||
return mu
|
||||
}
|
||||
|
||||
// AddTickRate adds f to the "tick_rate" field.
|
||||
func (mu *MatchUpdate) AddTickRate(f float64) *MatchUpdate {
|
||||
mu.mutation.AddTickRate(f)
|
||||
return mu
|
||||
}
|
||||
|
||||
// ClearTickRate clears the value of the "tick_rate" field.
|
||||
func (mu *MatchUpdate) ClearTickRate() *MatchUpdate {
|
||||
mu.mutation.ClearTickRate()
|
||||
return mu
|
||||
}
|
||||
|
||||
// AddStatIDs adds the "stats" edge to the MatchPlayer entity by IDs.
|
||||
func (mu *MatchUpdate) AddStatIDs(ids ...int) *MatchUpdate {
|
||||
mu.mutation.AddStatIDs(ids...)
|
||||
@@ -494,6 +521,26 @@ func (mu *MatchUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
Column: match.FieldDecryptionKey,
|
||||
})
|
||||
}
|
||||
if value, ok := mu.mutation.TickRate(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeFloat64,
|
||||
Value: value,
|
||||
Column: match.FieldTickRate,
|
||||
})
|
||||
}
|
||||
if value, ok := mu.mutation.AddedTickRate(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeFloat64,
|
||||
Value: value,
|
||||
Column: match.FieldTickRate,
|
||||
})
|
||||
}
|
||||
if mu.mutation.TickRateCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeFloat64,
|
||||
Column: match.FieldTickRate,
|
||||
})
|
||||
}
|
||||
if mu.mutation.StatsCleared() {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
Rel: sqlgraph.O2M,
|
||||
@@ -792,6 +839,33 @@ func (muo *MatchUpdateOne) ClearDecryptionKey() *MatchUpdateOne {
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetTickRate sets the "tick_rate" field.
|
||||
func (muo *MatchUpdateOne) SetTickRate(f float64) *MatchUpdateOne {
|
||||
muo.mutation.ResetTickRate()
|
||||
muo.mutation.SetTickRate(f)
|
||||
return muo
|
||||
}
|
||||
|
||||
// SetNillableTickRate sets the "tick_rate" field if the given value is not nil.
|
||||
func (muo *MatchUpdateOne) SetNillableTickRate(f *float64) *MatchUpdateOne {
|
||||
if f != nil {
|
||||
muo.SetTickRate(*f)
|
||||
}
|
||||
return muo
|
||||
}
|
||||
|
||||
// AddTickRate adds f to the "tick_rate" field.
|
||||
func (muo *MatchUpdateOne) AddTickRate(f float64) *MatchUpdateOne {
|
||||
muo.mutation.AddTickRate(f)
|
||||
return muo
|
||||
}
|
||||
|
||||
// ClearTickRate clears the value of the "tick_rate" field.
|
||||
func (muo *MatchUpdateOne) ClearTickRate() *MatchUpdateOne {
|
||||
muo.mutation.ClearTickRate()
|
||||
return muo
|
||||
}
|
||||
|
||||
// AddStatIDs adds the "stats" edge to the MatchPlayer entity by IDs.
|
||||
func (muo *MatchUpdateOne) AddStatIDs(ids ...int) *MatchUpdateOne {
|
||||
muo.mutation.AddStatIDs(ids...)
|
||||
@@ -1109,6 +1183,26 @@ func (muo *MatchUpdateOne) sqlSave(ctx context.Context) (_node *Match, err error
|
||||
Column: match.FieldDecryptionKey,
|
||||
})
|
||||
}
|
||||
if value, ok := muo.mutation.TickRate(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeFloat64,
|
||||
Value: value,
|
||||
Column: match.FieldTickRate,
|
||||
})
|
||||
}
|
||||
if value, ok := muo.mutation.AddedTickRate(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeFloat64,
|
||||
Value: value,
|
||||
Column: match.FieldTickRate,
|
||||
})
|
||||
}
|
||||
if muo.mutation.TickRateCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeFloat64,
|
||||
Column: match.FieldTickRate,
|
||||
})
|
||||
}
|
||||
if muo.mutation.StatsCleared() {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
Rel: sqlgraph.O2M,
|
||||
|
Reference in New Issue
Block a user