updated deps & regen ent
This commit is contained in:
14
ent/match.go
14
ent/match.go
@@ -7,6 +7,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"somegit.dev/csgowtf/csgowtfd/ent/match"
|
||||
)
|
||||
@@ -46,7 +47,8 @@ type Match struct {
|
||||
TickRate float64 `json:"tick_rate,omitempty"`
|
||||
// Edges holds the relations/edges for other nodes in the graph.
|
||||
// The values are being populated by the MatchQuery when eager-loading is set.
|
||||
Edges MatchEdges `json:"edges"`
|
||||
Edges MatchEdges `json:"edges"`
|
||||
selectValues sql.SelectValues
|
||||
}
|
||||
|
||||
// MatchEdges holds the relations/edges for other nodes in the graph.
|
||||
@@ -96,7 +98,7 @@ func (*Match) scanValues(columns []string) ([]any, error) {
|
||||
case match.FieldDate:
|
||||
values[i] = new(sql.NullTime)
|
||||
default:
|
||||
return nil, fmt.Errorf("unexpected column %q for type Match", columns[i])
|
||||
values[i] = new(sql.UnknownType)
|
||||
}
|
||||
}
|
||||
return values, nil
|
||||
@@ -200,11 +202,19 @@ func (m *Match) assignValues(columns []string, values []any) error {
|
||||
} else if value.Valid {
|
||||
m.TickRate = value.Float64
|
||||
}
|
||||
default:
|
||||
m.selectValues.Set(columns[i], values[i])
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Value returns the ent.Value that was dynamically selected and assigned to the Match.
|
||||
// This includes values selected through modifiers, order, etc.
|
||||
func (m *Match) Value(name string) (ent.Value, error) {
|
||||
return m.selectValues.Get(name)
|
||||
}
|
||||
|
||||
// QueryStats queries the "stats" edge of the Match entity.
|
||||
func (m *Match) QueryStats() *MatchPlayerQuery {
|
||||
return NewMatchClient(m.config).QueryStats(m)
|
||||
|
Reference in New Issue
Block a user