tracking tickrate

This commit is contained in:
2022-02-03 16:27:29 +01:00
parent ff0ea43cea
commit 182c7d8fc1
12 changed files with 352 additions and 3 deletions

View File

@@ -140,6 +140,20 @@ func (mc *MatchCreate) SetDecryptionKey(b []byte) *MatchCreate {
return mc
}
// SetTickRate sets the "tick_rate" field.
func (mc *MatchCreate) SetTickRate(f float64) *MatchCreate {
mc.mutation.SetTickRate(f)
return mc
}
// SetNillableTickRate sets the "tick_rate" field if the given value is not nil.
func (mc *MatchCreate) SetNillableTickRate(f *float64) *MatchCreate {
if f != nil {
mc.SetTickRate(*f)
}
return mc
}
// SetID sets the "id" field.
func (mc *MatchCreate) SetID(u uint64) *MatchCreate {
mc.mutation.SetID(u)
@@ -430,6 +444,14 @@ func (mc *MatchCreate) createSpec() (*Match, *sqlgraph.CreateSpec) {
})
_node.DecryptionKey = value
}
if value, ok := mc.mutation.TickRate(); ok {
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
Type: field.TypeFloat64,
Value: value,
Column: match.FieldTickRate,
})
_node.TickRate = value
}
if nodes := mc.mutation.StatsIDs(); len(nodes) > 0 {
edge := &sqlgraph.EdgeSpec{
Rel: sqlgraph.O2M,