updated deps & regen ent

This commit is contained in:
2023-05-16 18:09:10 +02:00
parent e9e3e02a39
commit 3fd0a4204b
53 changed files with 1062 additions and 593 deletions

View File

@@ -6,6 +6,7 @@ import (
"fmt"
"strings"
"entgo.io/ent"
"entgo.io/ent/dialect/sql"
"somegit.dev/csgowtf/csgowtfd/ent/matchplayer"
"somegit.dev/csgowtf/csgowtfd/ent/roundstats"
@@ -28,6 +29,7 @@ type RoundStats struct {
// The values are being populated by the RoundStatsQuery when eager-loading is set.
Edges RoundStatsEdges `json:"edges"`
match_player_round_stats *int
selectValues sql.SelectValues
}
// RoundStatsEdges holds the relations/edges for other nodes in the graph.
@@ -62,7 +64,7 @@ func (*RoundStats) scanValues(columns []string) ([]any, error) {
case roundstats.ForeignKeys[0]: // match_player_round_stats
values[i] = new(sql.NullInt64)
default:
return nil, fmt.Errorf("unexpected column %q for type RoundStats", columns[i])
values[i] = new(sql.UnknownType)
}
}
return values, nil
@@ -113,11 +115,19 @@ func (rs *RoundStats) assignValues(columns []string, values []any) error {
rs.match_player_round_stats = new(int)
*rs.match_player_round_stats = int(value.Int64)
}
default:
rs.selectValues.Set(columns[i], values[i])
}
}
return nil
}
// Value returns the ent.Value that was dynamically selected and assigned to the RoundStats.
// This includes values selected through modifiers, order, etc.
func (rs *RoundStats) Value(name string) (ent.Value, error) {
return rs.selectValues.Get(name)
}
// QueryMatchPlayer queries the "match_player" edge of the RoundStats entity.
func (rs *RoundStats) QueryMatchPlayer() *MatchPlayerQuery {
return NewRoundStatsClient(rs.config).QueryMatchPlayer(rs)