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/spray"
@@ -24,6 +25,7 @@ type Spray struct {
// The values are being populated by the SprayQuery when eager-loading is set.
Edges SprayEdges `json:"edges"`
match_player_spray *int
selectValues sql.SelectValues
}
// SprayEdges holds the relations/edges for other nodes in the graph.
@@ -60,7 +62,7 @@ func (*Spray) scanValues(columns []string) ([]any, error) {
case spray.ForeignKeys[0]: // match_player_spray
values[i] = new(sql.NullInt64)
default:
return nil, fmt.Errorf("unexpected column %q for type Spray", columns[i])
values[i] = new(sql.UnknownType)
}
}
return values, nil
@@ -99,11 +101,19 @@ func (s *Spray) assignValues(columns []string, values []any) error {
s.match_player_spray = new(int)
*s.match_player_spray = int(value.Int64)
}
default:
s.selectValues.Set(columns[i], values[i])
}
}
return nil
}
// Value returns the ent.Value that was dynamically selected and assigned to the Spray.
// This includes values selected through modifiers, order, etc.
func (s *Spray) Value(name string) (ent.Value, error) {
return s.selectValues.Get(name)
}
// QueryMatchPlayers queries the "match_players" edge of the Spray entity.
func (s *Spray) QueryMatchPlayers() *MatchPlayerQuery {
return NewSprayClient(s.config).QueryMatchPlayers(s)