updated deps; regen ent
This commit is contained in:
@@ -221,7 +221,7 @@ func (c *MatchClient) DeleteOne(m *Match) *MatchDeleteOne {
|
||||
return c.DeleteOneID(m.ID)
|
||||
}
|
||||
|
||||
// DeleteOne returns a builder for deleting the given entity by its id.
|
||||
// DeleteOneID returns a builder for deleting the given entity by its id.
|
||||
func (c *MatchClient) DeleteOneID(id uint64) *MatchDeleteOne {
|
||||
builder := c.Delete().Where(match.ID(id))
|
||||
builder.mutation.id = &id
|
||||
@@ -253,7 +253,7 @@ func (c *MatchClient) GetX(ctx context.Context, id uint64) *Match {
|
||||
// QueryStats queries the stats edge of a Match.
|
||||
func (c *MatchClient) QueryStats(m *Match) *MatchPlayerQuery {
|
||||
query := &MatchPlayerQuery{config: c.config}
|
||||
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
|
||||
query.path = func(context.Context) (fromV *sql.Selector, _ error) {
|
||||
id := m.ID
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(match.Table, match.FieldID, id),
|
||||
@@ -269,7 +269,7 @@ func (c *MatchClient) QueryStats(m *Match) *MatchPlayerQuery {
|
||||
// QueryPlayers queries the players edge of a Match.
|
||||
func (c *MatchClient) QueryPlayers(m *Match) *PlayerQuery {
|
||||
query := &PlayerQuery{config: c.config}
|
||||
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
|
||||
query.path = func(context.Context) (fromV *sql.Selector, _ error) {
|
||||
id := m.ID
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(match.Table, match.FieldID, id),
|
||||
@@ -343,7 +343,7 @@ func (c *MatchPlayerClient) DeleteOne(mp *MatchPlayer) *MatchPlayerDeleteOne {
|
||||
return c.DeleteOneID(mp.ID)
|
||||
}
|
||||
|
||||
// DeleteOne returns a builder for deleting the given entity by its id.
|
||||
// DeleteOneID returns a builder for deleting the given entity by its id.
|
||||
func (c *MatchPlayerClient) DeleteOneID(id int) *MatchPlayerDeleteOne {
|
||||
builder := c.Delete().Where(matchplayer.ID(id))
|
||||
builder.mutation.id = &id
|
||||
@@ -375,7 +375,7 @@ func (c *MatchPlayerClient) GetX(ctx context.Context, id int) *MatchPlayer {
|
||||
// QueryMatches queries the matches edge of a MatchPlayer.
|
||||
func (c *MatchPlayerClient) QueryMatches(mp *MatchPlayer) *MatchQuery {
|
||||
query := &MatchQuery{config: c.config}
|
||||
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
|
||||
query.path = func(context.Context) (fromV *sql.Selector, _ error) {
|
||||
id := mp.ID
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(matchplayer.Table, matchplayer.FieldID, id),
|
||||
@@ -391,7 +391,7 @@ func (c *MatchPlayerClient) QueryMatches(mp *MatchPlayer) *MatchQuery {
|
||||
// QueryPlayers queries the players edge of a MatchPlayer.
|
||||
func (c *MatchPlayerClient) QueryPlayers(mp *MatchPlayer) *PlayerQuery {
|
||||
query := &PlayerQuery{config: c.config}
|
||||
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
|
||||
query.path = func(context.Context) (fromV *sql.Selector, _ error) {
|
||||
id := mp.ID
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(matchplayer.Table, matchplayer.FieldID, id),
|
||||
@@ -407,7 +407,7 @@ func (c *MatchPlayerClient) QueryPlayers(mp *MatchPlayer) *PlayerQuery {
|
||||
// QueryWeaponStats queries the weapon_stats edge of a MatchPlayer.
|
||||
func (c *MatchPlayerClient) QueryWeaponStats(mp *MatchPlayer) *WeaponQuery {
|
||||
query := &WeaponQuery{config: c.config}
|
||||
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
|
||||
query.path = func(context.Context) (fromV *sql.Selector, _ error) {
|
||||
id := mp.ID
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(matchplayer.Table, matchplayer.FieldID, id),
|
||||
@@ -423,7 +423,7 @@ func (c *MatchPlayerClient) QueryWeaponStats(mp *MatchPlayer) *WeaponQuery {
|
||||
// QueryRoundStats queries the round_stats edge of a MatchPlayer.
|
||||
func (c *MatchPlayerClient) QueryRoundStats(mp *MatchPlayer) *RoundStatsQuery {
|
||||
query := &RoundStatsQuery{config: c.config}
|
||||
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
|
||||
query.path = func(context.Context) (fromV *sql.Selector, _ error) {
|
||||
id := mp.ID
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(matchplayer.Table, matchplayer.FieldID, id),
|
||||
@@ -439,7 +439,7 @@ func (c *MatchPlayerClient) QueryRoundStats(mp *MatchPlayer) *RoundStatsQuery {
|
||||
// QuerySpray queries the spray edge of a MatchPlayer.
|
||||
func (c *MatchPlayerClient) QuerySpray(mp *MatchPlayer) *SprayQuery {
|
||||
query := &SprayQuery{config: c.config}
|
||||
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
|
||||
query.path = func(context.Context) (fromV *sql.Selector, _ error) {
|
||||
id := mp.ID
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(matchplayer.Table, matchplayer.FieldID, id),
|
||||
@@ -455,7 +455,7 @@ func (c *MatchPlayerClient) QuerySpray(mp *MatchPlayer) *SprayQuery {
|
||||
// QueryMessages queries the messages edge of a MatchPlayer.
|
||||
func (c *MatchPlayerClient) QueryMessages(mp *MatchPlayer) *MessagesQuery {
|
||||
query := &MessagesQuery{config: c.config}
|
||||
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
|
||||
query.path = func(context.Context) (fromV *sql.Selector, _ error) {
|
||||
id := mp.ID
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(matchplayer.Table, matchplayer.FieldID, id),
|
||||
@@ -529,7 +529,7 @@ func (c *MessagesClient) DeleteOne(m *Messages) *MessagesDeleteOne {
|
||||
return c.DeleteOneID(m.ID)
|
||||
}
|
||||
|
||||
// DeleteOne returns a builder for deleting the given entity by its id.
|
||||
// DeleteOneID returns a builder for deleting the given entity by its id.
|
||||
func (c *MessagesClient) DeleteOneID(id int) *MessagesDeleteOne {
|
||||
builder := c.Delete().Where(messages.ID(id))
|
||||
builder.mutation.id = &id
|
||||
@@ -561,7 +561,7 @@ func (c *MessagesClient) GetX(ctx context.Context, id int) *Messages {
|
||||
// QueryMatchPlayer queries the match_player edge of a Messages.
|
||||
func (c *MessagesClient) QueryMatchPlayer(m *Messages) *MatchPlayerQuery {
|
||||
query := &MatchPlayerQuery{config: c.config}
|
||||
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
|
||||
query.path = func(context.Context) (fromV *sql.Selector, _ error) {
|
||||
id := m.ID
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(messages.Table, messages.FieldID, id),
|
||||
@@ -635,7 +635,7 @@ func (c *PlayerClient) DeleteOne(pl *Player) *PlayerDeleteOne {
|
||||
return c.DeleteOneID(pl.ID)
|
||||
}
|
||||
|
||||
// DeleteOne returns a builder for deleting the given entity by its id.
|
||||
// DeleteOneID returns a builder for deleting the given entity by its id.
|
||||
func (c *PlayerClient) DeleteOneID(id uint64) *PlayerDeleteOne {
|
||||
builder := c.Delete().Where(player.ID(id))
|
||||
builder.mutation.id = &id
|
||||
@@ -667,7 +667,7 @@ func (c *PlayerClient) GetX(ctx context.Context, id uint64) *Player {
|
||||
// QueryStats queries the stats edge of a Player.
|
||||
func (c *PlayerClient) QueryStats(pl *Player) *MatchPlayerQuery {
|
||||
query := &MatchPlayerQuery{config: c.config}
|
||||
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
|
||||
query.path = func(context.Context) (fromV *sql.Selector, _ error) {
|
||||
id := pl.ID
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(player.Table, player.FieldID, id),
|
||||
@@ -683,7 +683,7 @@ func (c *PlayerClient) QueryStats(pl *Player) *MatchPlayerQuery {
|
||||
// QueryMatches queries the matches edge of a Player.
|
||||
func (c *PlayerClient) QueryMatches(pl *Player) *MatchQuery {
|
||||
query := &MatchQuery{config: c.config}
|
||||
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
|
||||
query.path = func(context.Context) (fromV *sql.Selector, _ error) {
|
||||
id := pl.ID
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(player.Table, player.FieldID, id),
|
||||
@@ -757,7 +757,7 @@ func (c *RoundStatsClient) DeleteOne(rs *RoundStats) *RoundStatsDeleteOne {
|
||||
return c.DeleteOneID(rs.ID)
|
||||
}
|
||||
|
||||
// DeleteOne returns a builder for deleting the given entity by its id.
|
||||
// DeleteOneID returns a builder for deleting the given entity by its id.
|
||||
func (c *RoundStatsClient) DeleteOneID(id int) *RoundStatsDeleteOne {
|
||||
builder := c.Delete().Where(roundstats.ID(id))
|
||||
builder.mutation.id = &id
|
||||
@@ -789,7 +789,7 @@ func (c *RoundStatsClient) GetX(ctx context.Context, id int) *RoundStats {
|
||||
// QueryMatchPlayer queries the match_player edge of a RoundStats.
|
||||
func (c *RoundStatsClient) QueryMatchPlayer(rs *RoundStats) *MatchPlayerQuery {
|
||||
query := &MatchPlayerQuery{config: c.config}
|
||||
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
|
||||
query.path = func(context.Context) (fromV *sql.Selector, _ error) {
|
||||
id := rs.ID
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(roundstats.Table, roundstats.FieldID, id),
|
||||
@@ -863,7 +863,7 @@ func (c *SprayClient) DeleteOne(s *Spray) *SprayDeleteOne {
|
||||
return c.DeleteOneID(s.ID)
|
||||
}
|
||||
|
||||
// DeleteOne returns a builder for deleting the given entity by its id.
|
||||
// DeleteOneID returns a builder for deleting the given entity by its id.
|
||||
func (c *SprayClient) DeleteOneID(id int) *SprayDeleteOne {
|
||||
builder := c.Delete().Where(spray.ID(id))
|
||||
builder.mutation.id = &id
|
||||
@@ -895,7 +895,7 @@ func (c *SprayClient) GetX(ctx context.Context, id int) *Spray {
|
||||
// QueryMatchPlayers queries the match_players edge of a Spray.
|
||||
func (c *SprayClient) QueryMatchPlayers(s *Spray) *MatchPlayerQuery {
|
||||
query := &MatchPlayerQuery{config: c.config}
|
||||
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
|
||||
query.path = func(context.Context) (fromV *sql.Selector, _ error) {
|
||||
id := s.ID
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(spray.Table, spray.FieldID, id),
|
||||
@@ -969,7 +969,7 @@ func (c *WeaponClient) DeleteOne(w *Weapon) *WeaponDeleteOne {
|
||||
return c.DeleteOneID(w.ID)
|
||||
}
|
||||
|
||||
// DeleteOne returns a builder for deleting the given entity by its id.
|
||||
// DeleteOneID returns a builder for deleting the given entity by its id.
|
||||
func (c *WeaponClient) DeleteOneID(id int) *WeaponDeleteOne {
|
||||
builder := c.Delete().Where(weapon.ID(id))
|
||||
builder.mutation.id = &id
|
||||
@@ -1001,7 +1001,7 @@ func (c *WeaponClient) GetX(ctx context.Context, id int) *Weapon {
|
||||
// QueryStat queries the stat edge of a Weapon.
|
||||
func (c *WeaponClient) QueryStat(w *Weapon) *MatchPlayerQuery {
|
||||
query := &MatchPlayerQuery{config: c.config}
|
||||
query.path = func(ctx context.Context) (fromV *sql.Selector, _ error) {
|
||||
query.path = func(context.Context) (fromV *sql.Selector, _ error) {
|
||||
id := w.ID
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(weapon.Table, weapon.FieldID, id),
|
||||
|
@@ -17,7 +17,7 @@ type config struct {
|
||||
// debug enable a debug logging.
|
||||
debug bool
|
||||
// log used for logging on debug mode.
|
||||
log func(...interface{})
|
||||
log func(...any)
|
||||
// hooks to execute on mutations.
|
||||
hooks *hooks
|
||||
}
|
||||
@@ -51,7 +51,7 @@ func Debug() Option {
|
||||
}
|
||||
|
||||
// Log sets the logging function for debug mode.
|
||||
func Log(fn func(...interface{})) Option {
|
||||
func Log(fn func(...any)) Option {
|
||||
return func(c *config) {
|
||||
c.log = fn
|
||||
}
|
||||
|
@@ -275,11 +275,12 @@ func IsConstraintError(err error) bool {
|
||||
type selector struct {
|
||||
label string
|
||||
flds *[]string
|
||||
scan func(context.Context, interface{}) error
|
||||
fns []AggregateFunc
|
||||
scan func(context.Context, any) error
|
||||
}
|
||||
|
||||
// ScanX is like Scan, but panics if an error occurs.
|
||||
func (s *selector) ScanX(ctx context.Context, v interface{}) {
|
||||
func (s *selector) ScanX(ctx context.Context, v any) {
|
||||
if err := s.scan(ctx, v); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ type (
|
||||
// testing.T and testing.B and used by enttest.
|
||||
TestingT interface {
|
||||
FailNow()
|
||||
Error(...interface{})
|
||||
Error(...any)
|
||||
}
|
||||
|
||||
// Option configures client creation.
|
||||
|
@@ -79,8 +79,8 @@ func (e MatchEdges) PlayersOrErr() ([]*Player, error) {
|
||||
}
|
||||
|
||||
// scanValues returns the types for scanning values from sql.Rows.
|
||||
func (*Match) scanValues(columns []string) ([]interface{}, error) {
|
||||
values := make([]interface{}, len(columns))
|
||||
func (*Match) scanValues(columns []string) ([]any, error) {
|
||||
values := make([]any, len(columns))
|
||||
for i := range columns {
|
||||
switch columns[i] {
|
||||
case match.FieldDecryptionKey:
|
||||
@@ -104,7 +104,7 @@ func (*Match) scanValues(columns []string) ([]interface{}, error) {
|
||||
|
||||
// assignValues assigns the values that were returned from sql.Rows (after scanning)
|
||||
// to the Match fields.
|
||||
func (m *Match) assignValues(columns []string, values []interface{}) error {
|
||||
func (m *Match) assignValues(columns []string, values []any) error {
|
||||
if m, n := len(values), len(columns); m < n {
|
||||
return fmt.Errorf("mismatch number of scan values: %d != %d", m, n)
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@ func IDNEQ(id uint64) predicate.Match {
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...uint64) predicate.Match {
|
||||
return predicate.Match(func(s *sql.Selector) {
|
||||
v := make([]interface{}, len(ids))
|
||||
v := make([]any, len(ids))
|
||||
for i := range v {
|
||||
v[i] = ids[i]
|
||||
}
|
||||
@@ -45,7 +45,7 @@ func IDIn(ids ...uint64) predicate.Match {
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...uint64) predicate.Match {
|
||||
return predicate.Match(func(s *sql.Selector) {
|
||||
v := make([]interface{}, len(ids))
|
||||
v := make([]any, len(ids))
|
||||
for i := range v {
|
||||
v[i] = ids[i]
|
||||
}
|
||||
@@ -195,7 +195,7 @@ func ShareCodeNEQ(v string) predicate.Match {
|
||||
|
||||
// ShareCodeIn applies the In predicate on the "share_code" field.
|
||||
func ShareCodeIn(vs ...string) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -206,7 +206,7 @@ func ShareCodeIn(vs ...string) predicate.Match {
|
||||
|
||||
// ShareCodeNotIn applies the NotIn predicate on the "share_code" field.
|
||||
func ShareCodeNotIn(vs ...string) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -294,7 +294,7 @@ func MapNEQ(v string) predicate.Match {
|
||||
|
||||
// MapIn applies the In predicate on the "map" field.
|
||||
func MapIn(vs ...string) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -305,7 +305,7 @@ func MapIn(vs ...string) predicate.Match {
|
||||
|
||||
// MapNotIn applies the NotIn predicate on the "map" field.
|
||||
func MapNotIn(vs ...string) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -407,7 +407,7 @@ func DateNEQ(v time.Time) predicate.Match {
|
||||
|
||||
// DateIn applies the In predicate on the "date" field.
|
||||
func DateIn(vs ...time.Time) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -418,7 +418,7 @@ func DateIn(vs ...time.Time) predicate.Match {
|
||||
|
||||
// DateNotIn applies the NotIn predicate on the "date" field.
|
||||
func DateNotIn(vs ...time.Time) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -471,7 +471,7 @@ func ScoreTeamANEQ(v int) predicate.Match {
|
||||
|
||||
// ScoreTeamAIn applies the In predicate on the "score_team_a" field.
|
||||
func ScoreTeamAIn(vs ...int) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -482,7 +482,7 @@ func ScoreTeamAIn(vs ...int) predicate.Match {
|
||||
|
||||
// ScoreTeamANotIn applies the NotIn predicate on the "score_team_a" field.
|
||||
func ScoreTeamANotIn(vs ...int) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -535,7 +535,7 @@ func ScoreTeamBNEQ(v int) predicate.Match {
|
||||
|
||||
// ScoreTeamBIn applies the In predicate on the "score_team_b" field.
|
||||
func ScoreTeamBIn(vs ...int) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -546,7 +546,7 @@ func ScoreTeamBIn(vs ...int) predicate.Match {
|
||||
|
||||
// ScoreTeamBNotIn applies the NotIn predicate on the "score_team_b" field.
|
||||
func ScoreTeamBNotIn(vs ...int) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -599,7 +599,7 @@ func ReplayURLNEQ(v string) predicate.Match {
|
||||
|
||||
// ReplayURLIn applies the In predicate on the "replay_url" field.
|
||||
func ReplayURLIn(vs ...string) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -610,7 +610,7 @@ func ReplayURLIn(vs ...string) predicate.Match {
|
||||
|
||||
// ReplayURLNotIn applies the NotIn predicate on the "replay_url" field.
|
||||
func ReplayURLNotIn(vs ...string) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -712,7 +712,7 @@ func DurationNEQ(v int) predicate.Match {
|
||||
|
||||
// DurationIn applies the In predicate on the "duration" field.
|
||||
func DurationIn(vs ...int) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -723,7 +723,7 @@ func DurationIn(vs ...int) predicate.Match {
|
||||
|
||||
// DurationNotIn applies the NotIn predicate on the "duration" field.
|
||||
func DurationNotIn(vs ...int) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -776,7 +776,7 @@ func MatchResultNEQ(v int) predicate.Match {
|
||||
|
||||
// MatchResultIn applies the In predicate on the "match_result" field.
|
||||
func MatchResultIn(vs ...int) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -787,7 +787,7 @@ func MatchResultIn(vs ...int) predicate.Match {
|
||||
|
||||
// MatchResultNotIn applies the NotIn predicate on the "match_result" field.
|
||||
func MatchResultNotIn(vs ...int) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -840,7 +840,7 @@ func MaxRoundsNEQ(v int) predicate.Match {
|
||||
|
||||
// MaxRoundsIn applies the In predicate on the "max_rounds" field.
|
||||
func MaxRoundsIn(vs ...int) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -851,7 +851,7 @@ func MaxRoundsIn(vs ...int) predicate.Match {
|
||||
|
||||
// MaxRoundsNotIn applies the NotIn predicate on the "max_rounds" field.
|
||||
func MaxRoundsNotIn(vs ...int) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -946,7 +946,7 @@ func DecryptionKeyNEQ(v []byte) predicate.Match {
|
||||
|
||||
// DecryptionKeyIn applies the In predicate on the "decryption_key" field.
|
||||
func DecryptionKeyIn(vs ...[]byte) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -957,7 +957,7 @@ func DecryptionKeyIn(vs ...[]byte) predicate.Match {
|
||||
|
||||
// DecryptionKeyNotIn applies the NotIn predicate on the "decryption_key" field.
|
||||
func DecryptionKeyNotIn(vs ...[]byte) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1024,7 +1024,7 @@ func TickRateNEQ(v float64) predicate.Match {
|
||||
|
||||
// TickRateIn applies the In predicate on the "tick_rate" field.
|
||||
func TickRateIn(vs ...float64) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1035,7 +1035,7 @@ func TickRateIn(vs ...float64) predicate.Match {
|
||||
|
||||
// TickRateNotIn applies the NotIn predicate on the "tick_rate" field.
|
||||
func TickRateNotIn(vs ...float64) predicate.Match {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
@@ -347,115 +347,59 @@ func (mc *MatchCreate) createSpec() (*Match, *sqlgraph.CreateSpec) {
|
||||
_spec.ID.Value = id
|
||||
}
|
||||
if value, ok := mc.mutation.ShareCode(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: match.FieldShareCode,
|
||||
})
|
||||
_spec.SetField(match.FieldShareCode, field.TypeString, value)
|
||||
_node.ShareCode = value
|
||||
}
|
||||
if value, ok := mc.mutation.Map(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: match.FieldMap,
|
||||
})
|
||||
_spec.SetField(match.FieldMap, field.TypeString, value)
|
||||
_node.Map = value
|
||||
}
|
||||
if value, ok := mc.mutation.Date(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: match.FieldDate,
|
||||
})
|
||||
_spec.SetField(match.FieldDate, field.TypeTime, value)
|
||||
_node.Date = value
|
||||
}
|
||||
if value, ok := mc.mutation.ScoreTeamA(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldScoreTeamA,
|
||||
})
|
||||
_spec.SetField(match.FieldScoreTeamA, field.TypeInt, value)
|
||||
_node.ScoreTeamA = value
|
||||
}
|
||||
if value, ok := mc.mutation.ScoreTeamB(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldScoreTeamB,
|
||||
})
|
||||
_spec.SetField(match.FieldScoreTeamB, field.TypeInt, value)
|
||||
_node.ScoreTeamB = value
|
||||
}
|
||||
if value, ok := mc.mutation.ReplayURL(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: match.FieldReplayURL,
|
||||
})
|
||||
_spec.SetField(match.FieldReplayURL, field.TypeString, value)
|
||||
_node.ReplayURL = value
|
||||
}
|
||||
if value, ok := mc.mutation.Duration(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldDuration,
|
||||
})
|
||||
_spec.SetField(match.FieldDuration, field.TypeInt, value)
|
||||
_node.Duration = value
|
||||
}
|
||||
if value, ok := mc.mutation.MatchResult(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldMatchResult,
|
||||
})
|
||||
_spec.SetField(match.FieldMatchResult, field.TypeInt, value)
|
||||
_node.MatchResult = value
|
||||
}
|
||||
if value, ok := mc.mutation.MaxRounds(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldMaxRounds,
|
||||
})
|
||||
_spec.SetField(match.FieldMaxRounds, field.TypeInt, value)
|
||||
_node.MaxRounds = value
|
||||
}
|
||||
if value, ok := mc.mutation.DemoParsed(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeBool,
|
||||
Value: value,
|
||||
Column: match.FieldDemoParsed,
|
||||
})
|
||||
_spec.SetField(match.FieldDemoParsed, field.TypeBool, value)
|
||||
_node.DemoParsed = value
|
||||
}
|
||||
if value, ok := mc.mutation.VacPresent(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeBool,
|
||||
Value: value,
|
||||
Column: match.FieldVacPresent,
|
||||
})
|
||||
_spec.SetField(match.FieldVacPresent, field.TypeBool, value)
|
||||
_node.VacPresent = value
|
||||
}
|
||||
if value, ok := mc.mutation.GamebanPresent(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeBool,
|
||||
Value: value,
|
||||
Column: match.FieldGamebanPresent,
|
||||
})
|
||||
_spec.SetField(match.FieldGamebanPresent, field.TypeBool, value)
|
||||
_node.GamebanPresent = value
|
||||
}
|
||||
if value, ok := mc.mutation.DecryptionKey(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeBytes,
|
||||
Value: value,
|
||||
Column: match.FieldDecryptionKey,
|
||||
})
|
||||
_spec.SetField(match.FieldDecryptionKey, field.TypeBytes, value)
|
||||
_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,
|
||||
})
|
||||
_spec.SetField(match.FieldTickRate, field.TypeFloat64, value)
|
||||
_node.TickRate = value
|
||||
}
|
||||
if nodes := mc.mutation.StatsIDs(); len(nodes) > 0 {
|
||||
|
@@ -369,6 +369,11 @@ func (mq *MatchQuery) Select(fields ...string) *MatchSelect {
|
||||
return selbuild
|
||||
}
|
||||
|
||||
// Aggregate returns a MatchSelect configured with the given aggregations.
|
||||
func (mq *MatchQuery) Aggregate(fns ...AggregateFunc) *MatchSelect {
|
||||
return mq.Select().Aggregate(fns...)
|
||||
}
|
||||
|
||||
func (mq *MatchQuery) prepareQuery(ctx context.Context) error {
|
||||
for _, f := range mq.fields {
|
||||
if !match.ValidColumn(f) {
|
||||
@@ -394,10 +399,10 @@ func (mq *MatchQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Match,
|
||||
mq.withPlayers != nil,
|
||||
}
|
||||
)
|
||||
_spec.ScanValues = func(columns []string) ([]interface{}, error) {
|
||||
_spec.ScanValues = func(columns []string) ([]any, error) {
|
||||
return (*Match).scanValues(nil, columns)
|
||||
}
|
||||
_spec.Assign = func(columns []string, values []interface{}) error {
|
||||
_spec.Assign = func(columns []string, values []any) error {
|
||||
node := &Match{config: mq.config}
|
||||
nodes = append(nodes, node)
|
||||
node.Edges.loadedTypes = loadedTypes
|
||||
@@ -485,18 +490,18 @@ func (mq *MatchQuery) loadPlayers(ctx context.Context, query *PlayerQuery, nodes
|
||||
neighbors, err := query.sqlAll(ctx, func(_ context.Context, spec *sqlgraph.QuerySpec) {
|
||||
assign := spec.Assign
|
||||
values := spec.ScanValues
|
||||
spec.ScanValues = func(columns []string) ([]interface{}, error) {
|
||||
spec.ScanValues = func(columns []string) ([]any, error) {
|
||||
values, err := values(columns[1:])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return append([]interface{}{new(sql.NullInt64)}, values...), nil
|
||||
return append([]any{new(sql.NullInt64)}, values...), nil
|
||||
}
|
||||
spec.Assign = func(columns []string, values []interface{}) error {
|
||||
spec.Assign = func(columns []string, values []any) error {
|
||||
outValue := uint64(values[0].(*sql.NullInt64).Int64)
|
||||
inValue := uint64(values[1].(*sql.NullInt64).Int64)
|
||||
if nids[inValue] == nil {
|
||||
nids[inValue] = map[*Match]struct{}{byID[outValue]: struct{}{}}
|
||||
nids[inValue] = map[*Match]struct{}{byID[outValue]: {}}
|
||||
return assign(columns[1:], values[1:])
|
||||
}
|
||||
nids[inValue][byID[outValue]] = struct{}{}
|
||||
@@ -531,11 +536,14 @@ func (mq *MatchQuery) sqlCount(ctx context.Context) (int, error) {
|
||||
}
|
||||
|
||||
func (mq *MatchQuery) sqlExist(ctx context.Context) (bool, error) {
|
||||
n, err := mq.sqlCount(ctx)
|
||||
if err != nil {
|
||||
switch _, err := mq.FirstID(ctx); {
|
||||
case IsNotFound(err):
|
||||
return false, nil
|
||||
case err != nil:
|
||||
return false, fmt.Errorf("ent: check existence: %w", err)
|
||||
default:
|
||||
return true, nil
|
||||
}
|
||||
return n > 0, nil
|
||||
}
|
||||
|
||||
func (mq *MatchQuery) querySpec() *sqlgraph.QuerySpec {
|
||||
@@ -645,7 +653,7 @@ func (mgb *MatchGroupBy) Aggregate(fns ...AggregateFunc) *MatchGroupBy {
|
||||
}
|
||||
|
||||
// Scan applies the group-by query and scans the result into the given value.
|
||||
func (mgb *MatchGroupBy) Scan(ctx context.Context, v interface{}) error {
|
||||
func (mgb *MatchGroupBy) Scan(ctx context.Context, v any) error {
|
||||
query, err := mgb.path(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -654,7 +662,7 @@ func (mgb *MatchGroupBy) Scan(ctx context.Context, v interface{}) error {
|
||||
return mgb.sqlScan(ctx, v)
|
||||
}
|
||||
|
||||
func (mgb *MatchGroupBy) sqlScan(ctx context.Context, v interface{}) error {
|
||||
func (mgb *MatchGroupBy) sqlScan(ctx context.Context, v any) error {
|
||||
for _, f := range mgb.fields {
|
||||
if !match.ValidColumn(f) {
|
||||
return &ValidationError{Name: f, err: fmt.Errorf("invalid field %q for group-by", f)}
|
||||
@@ -679,8 +687,6 @@ func (mgb *MatchGroupBy) sqlQuery() *sql.Selector {
|
||||
for _, fn := range mgb.fns {
|
||||
aggregation = append(aggregation, fn(selector))
|
||||
}
|
||||
// If no columns were selected in a custom aggregation function, the default
|
||||
// selection is the fields used for "group-by", and the aggregation functions.
|
||||
if len(selector.SelectedColumns()) == 0 {
|
||||
columns := make([]string, 0, len(mgb.fields)+len(mgb.fns))
|
||||
for _, f := range mgb.fields {
|
||||
@@ -700,8 +706,14 @@ type MatchSelect struct {
|
||||
sql *sql.Selector
|
||||
}
|
||||
|
||||
// Aggregate adds the given aggregation functions to the selector query.
|
||||
func (ms *MatchSelect) Aggregate(fns ...AggregateFunc) *MatchSelect {
|
||||
ms.fns = append(ms.fns, fns...)
|
||||
return ms
|
||||
}
|
||||
|
||||
// Scan applies the selector query and scans the result into the given value.
|
||||
func (ms *MatchSelect) Scan(ctx context.Context, v interface{}) error {
|
||||
func (ms *MatchSelect) Scan(ctx context.Context, v any) error {
|
||||
if err := ms.prepareQuery(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -709,7 +721,17 @@ func (ms *MatchSelect) Scan(ctx context.Context, v interface{}) error {
|
||||
return ms.sqlScan(ctx, v)
|
||||
}
|
||||
|
||||
func (ms *MatchSelect) sqlScan(ctx context.Context, v interface{}) error {
|
||||
func (ms *MatchSelect) sqlScan(ctx context.Context, v any) error {
|
||||
aggregation := make([]string, 0, len(ms.fns))
|
||||
for _, fn := range ms.fns {
|
||||
aggregation = append(aggregation, fn(ms.sql))
|
||||
}
|
||||
switch n := len(*ms.selector.flds); {
|
||||
case n == 0 && len(aggregation) > 0:
|
||||
ms.sql.Select(aggregation...)
|
||||
case n != 0 && len(aggregation) > 0:
|
||||
ms.sql.AppendSelect(aggregation...)
|
||||
}
|
||||
rows := &sql.Rows{}
|
||||
query, args := ms.sql.Query()
|
||||
if err := ms.driver.Query(ctx, query, args, rows); err != nil {
|
||||
|
@@ -385,168 +385,76 @@ func (mu *MatchUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
}
|
||||
}
|
||||
if value, ok := mu.mutation.ShareCode(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: match.FieldShareCode,
|
||||
})
|
||||
_spec.SetField(match.FieldShareCode, field.TypeString, value)
|
||||
}
|
||||
if value, ok := mu.mutation.Map(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: match.FieldMap,
|
||||
})
|
||||
_spec.SetField(match.FieldMap, field.TypeString, value)
|
||||
}
|
||||
if mu.mutation.MapCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Column: match.FieldMap,
|
||||
})
|
||||
_spec.ClearField(match.FieldMap, field.TypeString)
|
||||
}
|
||||
if value, ok := mu.mutation.Date(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: match.FieldDate,
|
||||
})
|
||||
_spec.SetField(match.FieldDate, field.TypeTime, value)
|
||||
}
|
||||
if value, ok := mu.mutation.ScoreTeamA(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldScoreTeamA,
|
||||
})
|
||||
_spec.SetField(match.FieldScoreTeamA, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := mu.mutation.AddedScoreTeamA(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldScoreTeamA,
|
||||
})
|
||||
_spec.AddField(match.FieldScoreTeamA, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := mu.mutation.ScoreTeamB(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldScoreTeamB,
|
||||
})
|
||||
_spec.SetField(match.FieldScoreTeamB, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := mu.mutation.AddedScoreTeamB(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldScoreTeamB,
|
||||
})
|
||||
_spec.AddField(match.FieldScoreTeamB, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := mu.mutation.ReplayURL(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: match.FieldReplayURL,
|
||||
})
|
||||
_spec.SetField(match.FieldReplayURL, field.TypeString, value)
|
||||
}
|
||||
if mu.mutation.ReplayURLCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Column: match.FieldReplayURL,
|
||||
})
|
||||
_spec.ClearField(match.FieldReplayURL, field.TypeString)
|
||||
}
|
||||
if value, ok := mu.mutation.Duration(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldDuration,
|
||||
})
|
||||
_spec.SetField(match.FieldDuration, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := mu.mutation.AddedDuration(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldDuration,
|
||||
})
|
||||
_spec.AddField(match.FieldDuration, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := mu.mutation.MatchResult(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldMatchResult,
|
||||
})
|
||||
_spec.SetField(match.FieldMatchResult, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := mu.mutation.AddedMatchResult(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldMatchResult,
|
||||
})
|
||||
_spec.AddField(match.FieldMatchResult, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := mu.mutation.MaxRounds(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldMaxRounds,
|
||||
})
|
||||
_spec.SetField(match.FieldMaxRounds, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := mu.mutation.AddedMaxRounds(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldMaxRounds,
|
||||
})
|
||||
_spec.AddField(match.FieldMaxRounds, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := mu.mutation.DemoParsed(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeBool,
|
||||
Value: value,
|
||||
Column: match.FieldDemoParsed,
|
||||
})
|
||||
_spec.SetField(match.FieldDemoParsed, field.TypeBool, value)
|
||||
}
|
||||
if value, ok := mu.mutation.VacPresent(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeBool,
|
||||
Value: value,
|
||||
Column: match.FieldVacPresent,
|
||||
})
|
||||
_spec.SetField(match.FieldVacPresent, field.TypeBool, value)
|
||||
}
|
||||
if value, ok := mu.mutation.GamebanPresent(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeBool,
|
||||
Value: value,
|
||||
Column: match.FieldGamebanPresent,
|
||||
})
|
||||
_spec.SetField(match.FieldGamebanPresent, field.TypeBool, value)
|
||||
}
|
||||
if value, ok := mu.mutation.DecryptionKey(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeBytes,
|
||||
Value: value,
|
||||
Column: match.FieldDecryptionKey,
|
||||
})
|
||||
_spec.SetField(match.FieldDecryptionKey, field.TypeBytes, value)
|
||||
}
|
||||
if mu.mutation.DecryptionKeyCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeBytes,
|
||||
Column: match.FieldDecryptionKey,
|
||||
})
|
||||
_spec.ClearField(match.FieldDecryptionKey, field.TypeBytes)
|
||||
}
|
||||
if value, ok := mu.mutation.TickRate(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeFloat64,
|
||||
Value: value,
|
||||
Column: match.FieldTickRate,
|
||||
})
|
||||
_spec.SetField(match.FieldTickRate, field.TypeFloat64, value)
|
||||
}
|
||||
if value, ok := mu.mutation.AddedTickRate(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeFloat64,
|
||||
Value: value,
|
||||
Column: match.FieldTickRate,
|
||||
})
|
||||
_spec.AddField(match.FieldTickRate, field.TypeFloat64, value)
|
||||
}
|
||||
if mu.mutation.TickRateCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeFloat64,
|
||||
Column: match.FieldTickRate,
|
||||
})
|
||||
_spec.ClearField(match.FieldTickRate, field.TypeFloat64)
|
||||
}
|
||||
if mu.mutation.StatsCleared() {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
@@ -656,7 +564,7 @@ func (mu *MatchUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
}
|
||||
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
||||
}
|
||||
_spec.Modifiers = mu.modifiers
|
||||
_spec.AddModifiers(mu.modifiers...)
|
||||
if n, err = sqlgraph.UpdateNodes(ctx, mu.driver, _spec); err != nil {
|
||||
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
||||
err = &NotFoundError{match.Label}
|
||||
@@ -1061,168 +969,76 @@ func (muo *MatchUpdateOne) sqlSave(ctx context.Context) (_node *Match, err error
|
||||
}
|
||||
}
|
||||
if value, ok := muo.mutation.ShareCode(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: match.FieldShareCode,
|
||||
})
|
||||
_spec.SetField(match.FieldShareCode, field.TypeString, value)
|
||||
}
|
||||
if value, ok := muo.mutation.Map(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: match.FieldMap,
|
||||
})
|
||||
_spec.SetField(match.FieldMap, field.TypeString, value)
|
||||
}
|
||||
if muo.mutation.MapCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Column: match.FieldMap,
|
||||
})
|
||||
_spec.ClearField(match.FieldMap, field.TypeString)
|
||||
}
|
||||
if value, ok := muo.mutation.Date(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: match.FieldDate,
|
||||
})
|
||||
_spec.SetField(match.FieldDate, field.TypeTime, value)
|
||||
}
|
||||
if value, ok := muo.mutation.ScoreTeamA(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldScoreTeamA,
|
||||
})
|
||||
_spec.SetField(match.FieldScoreTeamA, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := muo.mutation.AddedScoreTeamA(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldScoreTeamA,
|
||||
})
|
||||
_spec.AddField(match.FieldScoreTeamA, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := muo.mutation.ScoreTeamB(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldScoreTeamB,
|
||||
})
|
||||
_spec.SetField(match.FieldScoreTeamB, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := muo.mutation.AddedScoreTeamB(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldScoreTeamB,
|
||||
})
|
||||
_spec.AddField(match.FieldScoreTeamB, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := muo.mutation.ReplayURL(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: match.FieldReplayURL,
|
||||
})
|
||||
_spec.SetField(match.FieldReplayURL, field.TypeString, value)
|
||||
}
|
||||
if muo.mutation.ReplayURLCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Column: match.FieldReplayURL,
|
||||
})
|
||||
_spec.ClearField(match.FieldReplayURL, field.TypeString)
|
||||
}
|
||||
if value, ok := muo.mutation.Duration(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldDuration,
|
||||
})
|
||||
_spec.SetField(match.FieldDuration, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := muo.mutation.AddedDuration(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldDuration,
|
||||
})
|
||||
_spec.AddField(match.FieldDuration, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := muo.mutation.MatchResult(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldMatchResult,
|
||||
})
|
||||
_spec.SetField(match.FieldMatchResult, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := muo.mutation.AddedMatchResult(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldMatchResult,
|
||||
})
|
||||
_spec.AddField(match.FieldMatchResult, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := muo.mutation.MaxRounds(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldMaxRounds,
|
||||
})
|
||||
_spec.SetField(match.FieldMaxRounds, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := muo.mutation.AddedMaxRounds(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: match.FieldMaxRounds,
|
||||
})
|
||||
_spec.AddField(match.FieldMaxRounds, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := muo.mutation.DemoParsed(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeBool,
|
||||
Value: value,
|
||||
Column: match.FieldDemoParsed,
|
||||
})
|
||||
_spec.SetField(match.FieldDemoParsed, field.TypeBool, value)
|
||||
}
|
||||
if value, ok := muo.mutation.VacPresent(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeBool,
|
||||
Value: value,
|
||||
Column: match.FieldVacPresent,
|
||||
})
|
||||
_spec.SetField(match.FieldVacPresent, field.TypeBool, value)
|
||||
}
|
||||
if value, ok := muo.mutation.GamebanPresent(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeBool,
|
||||
Value: value,
|
||||
Column: match.FieldGamebanPresent,
|
||||
})
|
||||
_spec.SetField(match.FieldGamebanPresent, field.TypeBool, value)
|
||||
}
|
||||
if value, ok := muo.mutation.DecryptionKey(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeBytes,
|
||||
Value: value,
|
||||
Column: match.FieldDecryptionKey,
|
||||
})
|
||||
_spec.SetField(match.FieldDecryptionKey, field.TypeBytes, value)
|
||||
}
|
||||
if muo.mutation.DecryptionKeyCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeBytes,
|
||||
Column: match.FieldDecryptionKey,
|
||||
})
|
||||
_spec.ClearField(match.FieldDecryptionKey, field.TypeBytes)
|
||||
}
|
||||
if value, ok := muo.mutation.TickRate(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeFloat64,
|
||||
Value: value,
|
||||
Column: match.FieldTickRate,
|
||||
})
|
||||
_spec.SetField(match.FieldTickRate, field.TypeFloat64, value)
|
||||
}
|
||||
if value, ok := muo.mutation.AddedTickRate(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeFloat64,
|
||||
Value: value,
|
||||
Column: match.FieldTickRate,
|
||||
})
|
||||
_spec.AddField(match.FieldTickRate, field.TypeFloat64, value)
|
||||
}
|
||||
if muo.mutation.TickRateCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeFloat64,
|
||||
Column: match.FieldTickRate,
|
||||
})
|
||||
_spec.ClearField(match.FieldTickRate, field.TypeFloat64)
|
||||
}
|
||||
if muo.mutation.StatsCleared() {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
@@ -1332,7 +1148,7 @@ func (muo *MatchUpdateOne) sqlSave(ctx context.Context) (_node *Match, err error
|
||||
}
|
||||
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
||||
}
|
||||
_spec.Modifiers = muo.modifiers
|
||||
_spec.AddModifiers(muo.modifiers...)
|
||||
_node = &Match{config: muo.config}
|
||||
_spec.Assign = _node.assignValues
|
||||
_spec.ScanValues = _node.scanValues
|
||||
|
@@ -168,8 +168,8 @@ func (e MatchPlayerEdges) MessagesOrErr() ([]*Messages, error) {
|
||||
}
|
||||
|
||||
// scanValues returns the types for scanning values from sql.Rows.
|
||||
func (*MatchPlayer) scanValues(columns []string) ([]interface{}, error) {
|
||||
values := make([]interface{}, len(columns))
|
||||
func (*MatchPlayer) scanValues(columns []string) ([]any, error) {
|
||||
values := make([]any, len(columns))
|
||||
for i := range columns {
|
||||
switch columns[i] {
|
||||
case matchplayer.FieldFlashDurationSelf, matchplayer.FieldFlashDurationTeam, matchplayer.FieldFlashDurationEnemy:
|
||||
@@ -187,7 +187,7 @@ func (*MatchPlayer) scanValues(columns []string) ([]interface{}, error) {
|
||||
|
||||
// assignValues assigns the values that were returned from sql.Rows (after scanning)
|
||||
// to the MatchPlayer fields.
|
||||
func (mp *MatchPlayer) assignValues(columns []string, values []interface{}) error {
|
||||
func (mp *MatchPlayer) assignValues(columns []string, values []any) error {
|
||||
if m, n := len(values), len(columns); m < n {
|
||||
return fmt.Errorf("mismatch number of scan values: %d != %d", m, n)
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ func IDNEQ(id int) predicate.MatchPlayer {
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.MatchPlayer {
|
||||
return predicate.MatchPlayer(func(s *sql.Selector) {
|
||||
v := make([]interface{}, len(ids))
|
||||
v := make([]any, len(ids))
|
||||
for i := range v {
|
||||
v[i] = ids[i]
|
||||
}
|
||||
@@ -43,7 +43,7 @@ func IDIn(ids ...int) predicate.MatchPlayer {
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.MatchPlayer {
|
||||
return predicate.MatchPlayer(func(s *sql.Selector) {
|
||||
v := make([]interface{}, len(ids))
|
||||
v := make([]any, len(ids))
|
||||
for i := range v {
|
||||
v[i] = ids[i]
|
||||
}
|
||||
@@ -312,7 +312,7 @@ func TeamIDNEQ(v int) predicate.MatchPlayer {
|
||||
|
||||
// TeamIDIn applies the In predicate on the "team_id" field.
|
||||
func TeamIDIn(vs ...int) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -323,7 +323,7 @@ func TeamIDIn(vs ...int) predicate.MatchPlayer {
|
||||
|
||||
// TeamIDNotIn applies the NotIn predicate on the "team_id" field.
|
||||
func TeamIDNotIn(vs ...int) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -376,7 +376,7 @@ func KillsNEQ(v int) predicate.MatchPlayer {
|
||||
|
||||
// KillsIn applies the In predicate on the "kills" field.
|
||||
func KillsIn(vs ...int) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -387,7 +387,7 @@ func KillsIn(vs ...int) predicate.MatchPlayer {
|
||||
|
||||
// KillsNotIn applies the NotIn predicate on the "kills" field.
|
||||
func KillsNotIn(vs ...int) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -440,7 +440,7 @@ func DeathsNEQ(v int) predicate.MatchPlayer {
|
||||
|
||||
// DeathsIn applies the In predicate on the "deaths" field.
|
||||
func DeathsIn(vs ...int) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -451,7 +451,7 @@ func DeathsIn(vs ...int) predicate.MatchPlayer {
|
||||
|
||||
// DeathsNotIn applies the NotIn predicate on the "deaths" field.
|
||||
func DeathsNotIn(vs ...int) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -504,7 +504,7 @@ func AssistsNEQ(v int) predicate.MatchPlayer {
|
||||
|
||||
// AssistsIn applies the In predicate on the "assists" field.
|
||||
func AssistsIn(vs ...int) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -515,7 +515,7 @@ func AssistsIn(vs ...int) predicate.MatchPlayer {
|
||||
|
||||
// AssistsNotIn applies the NotIn predicate on the "assists" field.
|
||||
func AssistsNotIn(vs ...int) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -568,7 +568,7 @@ func HeadshotNEQ(v int) predicate.MatchPlayer {
|
||||
|
||||
// HeadshotIn applies the In predicate on the "headshot" field.
|
||||
func HeadshotIn(vs ...int) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -579,7 +579,7 @@ func HeadshotIn(vs ...int) predicate.MatchPlayer {
|
||||
|
||||
// HeadshotNotIn applies the NotIn predicate on the "headshot" field.
|
||||
func HeadshotNotIn(vs ...int) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -632,7 +632,7 @@ func MvpNEQ(v uint) predicate.MatchPlayer {
|
||||
|
||||
// MvpIn applies the In predicate on the "mvp" field.
|
||||
func MvpIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -643,7 +643,7 @@ func MvpIn(vs ...uint) predicate.MatchPlayer {
|
||||
|
||||
// MvpNotIn applies the NotIn predicate on the "mvp" field.
|
||||
func MvpNotIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -696,7 +696,7 @@ func ScoreNEQ(v int) predicate.MatchPlayer {
|
||||
|
||||
// ScoreIn applies the In predicate on the "score" field.
|
||||
func ScoreIn(vs ...int) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -707,7 +707,7 @@ func ScoreIn(vs ...int) predicate.MatchPlayer {
|
||||
|
||||
// ScoreNotIn applies the NotIn predicate on the "score" field.
|
||||
func ScoreNotIn(vs ...int) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -760,7 +760,7 @@ func RankNewNEQ(v int) predicate.MatchPlayer {
|
||||
|
||||
// RankNewIn applies the In predicate on the "rank_new" field.
|
||||
func RankNewIn(vs ...int) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -771,7 +771,7 @@ func RankNewIn(vs ...int) predicate.MatchPlayer {
|
||||
|
||||
// RankNewNotIn applies the NotIn predicate on the "rank_new" field.
|
||||
func RankNewNotIn(vs ...int) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -838,7 +838,7 @@ func RankOldNEQ(v int) predicate.MatchPlayer {
|
||||
|
||||
// RankOldIn applies the In predicate on the "rank_old" field.
|
||||
func RankOldIn(vs ...int) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -849,7 +849,7 @@ func RankOldIn(vs ...int) predicate.MatchPlayer {
|
||||
|
||||
// RankOldNotIn applies the NotIn predicate on the "rank_old" field.
|
||||
func RankOldNotIn(vs ...int) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -916,7 +916,7 @@ func Mk2NEQ(v uint) predicate.MatchPlayer {
|
||||
|
||||
// Mk2In applies the In predicate on the "mk_2" field.
|
||||
func Mk2In(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -927,7 +927,7 @@ func Mk2In(vs ...uint) predicate.MatchPlayer {
|
||||
|
||||
// Mk2NotIn applies the NotIn predicate on the "mk_2" field.
|
||||
func Mk2NotIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -994,7 +994,7 @@ func Mk3NEQ(v uint) predicate.MatchPlayer {
|
||||
|
||||
// Mk3In applies the In predicate on the "mk_3" field.
|
||||
func Mk3In(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1005,7 +1005,7 @@ func Mk3In(vs ...uint) predicate.MatchPlayer {
|
||||
|
||||
// Mk3NotIn applies the NotIn predicate on the "mk_3" field.
|
||||
func Mk3NotIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1072,7 +1072,7 @@ func Mk4NEQ(v uint) predicate.MatchPlayer {
|
||||
|
||||
// Mk4In applies the In predicate on the "mk_4" field.
|
||||
func Mk4In(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1083,7 +1083,7 @@ func Mk4In(vs ...uint) predicate.MatchPlayer {
|
||||
|
||||
// Mk4NotIn applies the NotIn predicate on the "mk_4" field.
|
||||
func Mk4NotIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1150,7 +1150,7 @@ func Mk5NEQ(v uint) predicate.MatchPlayer {
|
||||
|
||||
// Mk5In applies the In predicate on the "mk_5" field.
|
||||
func Mk5In(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1161,7 +1161,7 @@ func Mk5In(vs ...uint) predicate.MatchPlayer {
|
||||
|
||||
// Mk5NotIn applies the NotIn predicate on the "mk_5" field.
|
||||
func Mk5NotIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1228,7 +1228,7 @@ func DmgEnemyNEQ(v uint) predicate.MatchPlayer {
|
||||
|
||||
// DmgEnemyIn applies the In predicate on the "dmg_enemy" field.
|
||||
func DmgEnemyIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1239,7 +1239,7 @@ func DmgEnemyIn(vs ...uint) predicate.MatchPlayer {
|
||||
|
||||
// DmgEnemyNotIn applies the NotIn predicate on the "dmg_enemy" field.
|
||||
func DmgEnemyNotIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1306,7 +1306,7 @@ func DmgTeamNEQ(v uint) predicate.MatchPlayer {
|
||||
|
||||
// DmgTeamIn applies the In predicate on the "dmg_team" field.
|
||||
func DmgTeamIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1317,7 +1317,7 @@ func DmgTeamIn(vs ...uint) predicate.MatchPlayer {
|
||||
|
||||
// DmgTeamNotIn applies the NotIn predicate on the "dmg_team" field.
|
||||
func DmgTeamNotIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1384,7 +1384,7 @@ func UdHeNEQ(v uint) predicate.MatchPlayer {
|
||||
|
||||
// UdHeIn applies the In predicate on the "ud_he" field.
|
||||
func UdHeIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1395,7 +1395,7 @@ func UdHeIn(vs ...uint) predicate.MatchPlayer {
|
||||
|
||||
// UdHeNotIn applies the NotIn predicate on the "ud_he" field.
|
||||
func UdHeNotIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1462,7 +1462,7 @@ func UdFlamesNEQ(v uint) predicate.MatchPlayer {
|
||||
|
||||
// UdFlamesIn applies the In predicate on the "ud_flames" field.
|
||||
func UdFlamesIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1473,7 +1473,7 @@ func UdFlamesIn(vs ...uint) predicate.MatchPlayer {
|
||||
|
||||
// UdFlamesNotIn applies the NotIn predicate on the "ud_flames" field.
|
||||
func UdFlamesNotIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1540,7 +1540,7 @@ func UdFlashNEQ(v uint) predicate.MatchPlayer {
|
||||
|
||||
// UdFlashIn applies the In predicate on the "ud_flash" field.
|
||||
func UdFlashIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1551,7 +1551,7 @@ func UdFlashIn(vs ...uint) predicate.MatchPlayer {
|
||||
|
||||
// UdFlashNotIn applies the NotIn predicate on the "ud_flash" field.
|
||||
func UdFlashNotIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1618,7 +1618,7 @@ func UdDecoyNEQ(v uint) predicate.MatchPlayer {
|
||||
|
||||
// UdDecoyIn applies the In predicate on the "ud_decoy" field.
|
||||
func UdDecoyIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1629,7 +1629,7 @@ func UdDecoyIn(vs ...uint) predicate.MatchPlayer {
|
||||
|
||||
// UdDecoyNotIn applies the NotIn predicate on the "ud_decoy" field.
|
||||
func UdDecoyNotIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1696,7 +1696,7 @@ func UdSmokeNEQ(v uint) predicate.MatchPlayer {
|
||||
|
||||
// UdSmokeIn applies the In predicate on the "ud_smoke" field.
|
||||
func UdSmokeIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1707,7 +1707,7 @@ func UdSmokeIn(vs ...uint) predicate.MatchPlayer {
|
||||
|
||||
// UdSmokeNotIn applies the NotIn predicate on the "ud_smoke" field.
|
||||
func UdSmokeNotIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1774,7 +1774,7 @@ func CrosshairNEQ(v string) predicate.MatchPlayer {
|
||||
|
||||
// CrosshairIn applies the In predicate on the "crosshair" field.
|
||||
func CrosshairIn(vs ...string) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1785,7 +1785,7 @@ func CrosshairIn(vs ...string) predicate.MatchPlayer {
|
||||
|
||||
// CrosshairNotIn applies the NotIn predicate on the "crosshair" field.
|
||||
func CrosshairNotIn(vs ...string) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1887,7 +1887,7 @@ func ColorNEQ(v Color) predicate.MatchPlayer {
|
||||
|
||||
// ColorIn applies the In predicate on the "color" field.
|
||||
func ColorIn(vs ...Color) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1898,7 +1898,7 @@ func ColorIn(vs ...Color) predicate.MatchPlayer {
|
||||
|
||||
// ColorNotIn applies the NotIn predicate on the "color" field.
|
||||
func ColorNotIn(vs ...Color) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1937,7 +1937,7 @@ func KastNEQ(v int) predicate.MatchPlayer {
|
||||
|
||||
// KastIn applies the In predicate on the "kast" field.
|
||||
func KastIn(vs ...int) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1948,7 +1948,7 @@ func KastIn(vs ...int) predicate.MatchPlayer {
|
||||
|
||||
// KastNotIn applies the NotIn predicate on the "kast" field.
|
||||
func KastNotIn(vs ...int) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -2015,7 +2015,7 @@ func FlashDurationSelfNEQ(v float32) predicate.MatchPlayer {
|
||||
|
||||
// FlashDurationSelfIn applies the In predicate on the "flash_duration_self" field.
|
||||
func FlashDurationSelfIn(vs ...float32) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -2026,7 +2026,7 @@ func FlashDurationSelfIn(vs ...float32) predicate.MatchPlayer {
|
||||
|
||||
// FlashDurationSelfNotIn applies the NotIn predicate on the "flash_duration_self" field.
|
||||
func FlashDurationSelfNotIn(vs ...float32) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -2093,7 +2093,7 @@ func FlashDurationTeamNEQ(v float32) predicate.MatchPlayer {
|
||||
|
||||
// FlashDurationTeamIn applies the In predicate on the "flash_duration_team" field.
|
||||
func FlashDurationTeamIn(vs ...float32) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -2104,7 +2104,7 @@ func FlashDurationTeamIn(vs ...float32) predicate.MatchPlayer {
|
||||
|
||||
// FlashDurationTeamNotIn applies the NotIn predicate on the "flash_duration_team" field.
|
||||
func FlashDurationTeamNotIn(vs ...float32) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -2171,7 +2171,7 @@ func FlashDurationEnemyNEQ(v float32) predicate.MatchPlayer {
|
||||
|
||||
// FlashDurationEnemyIn applies the In predicate on the "flash_duration_enemy" field.
|
||||
func FlashDurationEnemyIn(vs ...float32) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -2182,7 +2182,7 @@ func FlashDurationEnemyIn(vs ...float32) predicate.MatchPlayer {
|
||||
|
||||
// FlashDurationEnemyNotIn applies the NotIn predicate on the "flash_duration_enemy" field.
|
||||
func FlashDurationEnemyNotIn(vs ...float32) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -2249,7 +2249,7 @@ func FlashTotalSelfNEQ(v uint) predicate.MatchPlayer {
|
||||
|
||||
// FlashTotalSelfIn applies the In predicate on the "flash_total_self" field.
|
||||
func FlashTotalSelfIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -2260,7 +2260,7 @@ func FlashTotalSelfIn(vs ...uint) predicate.MatchPlayer {
|
||||
|
||||
// FlashTotalSelfNotIn applies the NotIn predicate on the "flash_total_self" field.
|
||||
func FlashTotalSelfNotIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -2327,7 +2327,7 @@ func FlashTotalTeamNEQ(v uint) predicate.MatchPlayer {
|
||||
|
||||
// FlashTotalTeamIn applies the In predicate on the "flash_total_team" field.
|
||||
func FlashTotalTeamIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -2338,7 +2338,7 @@ func FlashTotalTeamIn(vs ...uint) predicate.MatchPlayer {
|
||||
|
||||
// FlashTotalTeamNotIn applies the NotIn predicate on the "flash_total_team" field.
|
||||
func FlashTotalTeamNotIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -2405,7 +2405,7 @@ func FlashTotalEnemyNEQ(v uint) predicate.MatchPlayer {
|
||||
|
||||
// FlashTotalEnemyIn applies the In predicate on the "flash_total_enemy" field.
|
||||
func FlashTotalEnemyIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -2416,7 +2416,7 @@ func FlashTotalEnemyIn(vs ...uint) predicate.MatchPlayer {
|
||||
|
||||
// FlashTotalEnemyNotIn applies the NotIn predicate on the "flash_total_enemy" field.
|
||||
func FlashTotalEnemyNotIn(vs ...uint) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -2483,7 +2483,7 @@ func MatchStatsNEQ(v uint64) predicate.MatchPlayer {
|
||||
|
||||
// MatchStatsIn applies the In predicate on the "match_stats" field.
|
||||
func MatchStatsIn(vs ...uint64) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -2494,7 +2494,7 @@ func MatchStatsIn(vs ...uint64) predicate.MatchPlayer {
|
||||
|
||||
// MatchStatsNotIn applies the NotIn predicate on the "match_stats" field.
|
||||
func MatchStatsNotIn(vs ...uint64) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -2533,7 +2533,7 @@ func PlayerStatsNEQ(v uint64) predicate.MatchPlayer {
|
||||
|
||||
// PlayerStatsIn applies the In predicate on the "player_stats" field.
|
||||
func PlayerStatsIn(vs ...uint64) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -2544,7 +2544,7 @@ func PlayerStatsIn(vs ...uint64) predicate.MatchPlayer {
|
||||
|
||||
// PlayerStatsNotIn applies the NotIn predicate on the "player_stats" field.
|
||||
func PlayerStatsNotIn(vs ...uint64) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -2583,7 +2583,7 @@ func FlashAssistsNEQ(v int) predicate.MatchPlayer {
|
||||
|
||||
// FlashAssistsIn applies the In predicate on the "flash_assists" field.
|
||||
func FlashAssistsIn(vs ...int) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -2594,7 +2594,7 @@ func FlashAssistsIn(vs ...int) predicate.MatchPlayer {
|
||||
|
||||
// FlashAssistsNotIn applies the NotIn predicate on the "flash_assists" field.
|
||||
func FlashAssistsNotIn(vs ...int) predicate.MatchPlayer {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
@@ -645,243 +645,123 @@ func (mpc *MatchPlayerCreate) createSpec() (*MatchPlayer, *sqlgraph.CreateSpec)
|
||||
}
|
||||
)
|
||||
if value, ok := mpc.mutation.TeamID(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldTeamID,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldTeamID, field.TypeInt, value)
|
||||
_node.TeamID = value
|
||||
}
|
||||
if value, ok := mpc.mutation.Kills(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldKills,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldKills, field.TypeInt, value)
|
||||
_node.Kills = value
|
||||
}
|
||||
if value, ok := mpc.mutation.Deaths(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldDeaths,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldDeaths, field.TypeInt, value)
|
||||
_node.Deaths = value
|
||||
}
|
||||
if value, ok := mpc.mutation.Assists(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldAssists,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldAssists, field.TypeInt, value)
|
||||
_node.Assists = value
|
||||
}
|
||||
if value, ok := mpc.mutation.Headshot(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldHeadshot,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldHeadshot, field.TypeInt, value)
|
||||
_node.Headshot = value
|
||||
}
|
||||
if value, ok := mpc.mutation.Mvp(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldMvp,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldMvp, field.TypeUint, value)
|
||||
_node.Mvp = value
|
||||
}
|
||||
if value, ok := mpc.mutation.Score(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldScore,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldScore, field.TypeInt, value)
|
||||
_node.Score = value
|
||||
}
|
||||
if value, ok := mpc.mutation.RankNew(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldRankNew,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldRankNew, field.TypeInt, value)
|
||||
_node.RankNew = value
|
||||
}
|
||||
if value, ok := mpc.mutation.RankOld(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldRankOld,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldRankOld, field.TypeInt, value)
|
||||
_node.RankOld = value
|
||||
}
|
||||
if value, ok := mpc.mutation.Mk2(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldMk2,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldMk2, field.TypeUint, value)
|
||||
_node.Mk2 = value
|
||||
}
|
||||
if value, ok := mpc.mutation.Mk3(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldMk3,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldMk3, field.TypeUint, value)
|
||||
_node.Mk3 = value
|
||||
}
|
||||
if value, ok := mpc.mutation.Mk4(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldMk4,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldMk4, field.TypeUint, value)
|
||||
_node.Mk4 = value
|
||||
}
|
||||
if value, ok := mpc.mutation.Mk5(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldMk5,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldMk5, field.TypeUint, value)
|
||||
_node.Mk5 = value
|
||||
}
|
||||
if value, ok := mpc.mutation.DmgEnemy(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldDmgEnemy,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldDmgEnemy, field.TypeUint, value)
|
||||
_node.DmgEnemy = value
|
||||
}
|
||||
if value, ok := mpc.mutation.DmgTeam(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldDmgTeam,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldDmgTeam, field.TypeUint, value)
|
||||
_node.DmgTeam = value
|
||||
}
|
||||
if value, ok := mpc.mutation.UdHe(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldUdHe,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldUdHe, field.TypeUint, value)
|
||||
_node.UdHe = value
|
||||
}
|
||||
if value, ok := mpc.mutation.UdFlames(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldUdFlames,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldUdFlames, field.TypeUint, value)
|
||||
_node.UdFlames = value
|
||||
}
|
||||
if value, ok := mpc.mutation.UdFlash(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldUdFlash,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldUdFlash, field.TypeUint, value)
|
||||
_node.UdFlash = value
|
||||
}
|
||||
if value, ok := mpc.mutation.UdDecoy(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldUdDecoy,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldUdDecoy, field.TypeUint, value)
|
||||
_node.UdDecoy = value
|
||||
}
|
||||
if value, ok := mpc.mutation.UdSmoke(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldUdSmoke,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldUdSmoke, field.TypeUint, value)
|
||||
_node.UdSmoke = value
|
||||
}
|
||||
if value, ok := mpc.mutation.Crosshair(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldCrosshair,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldCrosshair, field.TypeString, value)
|
||||
_node.Crosshair = value
|
||||
}
|
||||
if value, ok := mpc.mutation.Color(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeEnum,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldColor,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldColor, field.TypeEnum, value)
|
||||
_node.Color = value
|
||||
}
|
||||
if value, ok := mpc.mutation.Kast(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldKast,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldKast, field.TypeInt, value)
|
||||
_node.Kast = value
|
||||
}
|
||||
if value, ok := mpc.mutation.FlashDurationSelf(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeFloat32,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldFlashDurationSelf,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldFlashDurationSelf, field.TypeFloat32, value)
|
||||
_node.FlashDurationSelf = value
|
||||
}
|
||||
if value, ok := mpc.mutation.FlashDurationTeam(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeFloat32,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldFlashDurationTeam,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldFlashDurationTeam, field.TypeFloat32, value)
|
||||
_node.FlashDurationTeam = value
|
||||
}
|
||||
if value, ok := mpc.mutation.FlashDurationEnemy(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeFloat32,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldFlashDurationEnemy,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldFlashDurationEnemy, field.TypeFloat32, value)
|
||||
_node.FlashDurationEnemy = value
|
||||
}
|
||||
if value, ok := mpc.mutation.FlashTotalSelf(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldFlashTotalSelf,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldFlashTotalSelf, field.TypeUint, value)
|
||||
_node.FlashTotalSelf = value
|
||||
}
|
||||
if value, ok := mpc.mutation.FlashTotalTeam(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldFlashTotalTeam,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldFlashTotalTeam, field.TypeUint, value)
|
||||
_node.FlashTotalTeam = value
|
||||
}
|
||||
if value, ok := mpc.mutation.FlashTotalEnemy(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldFlashTotalEnemy,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldFlashTotalEnemy, field.TypeUint, value)
|
||||
_node.FlashTotalEnemy = value
|
||||
}
|
||||
if value, ok := mpc.mutation.FlashAssists(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: matchplayer.FieldFlashAssists,
|
||||
})
|
||||
_spec.SetField(matchplayer.FieldFlashAssists, field.TypeInt, value)
|
||||
_node.FlashAssists = value
|
||||
}
|
||||
if nodes := mpc.mutation.MatchesIDs(); len(nodes) > 0 {
|
||||
|
@@ -513,6 +513,11 @@ func (mpq *MatchPlayerQuery) Select(fields ...string) *MatchPlayerSelect {
|
||||
return selbuild
|
||||
}
|
||||
|
||||
// Aggregate returns a MatchPlayerSelect configured with the given aggregations.
|
||||
func (mpq *MatchPlayerQuery) Aggregate(fns ...AggregateFunc) *MatchPlayerSelect {
|
||||
return mpq.Select().Aggregate(fns...)
|
||||
}
|
||||
|
||||
func (mpq *MatchPlayerQuery) prepareQuery(ctx context.Context) error {
|
||||
for _, f := range mpq.fields {
|
||||
if !matchplayer.ValidColumn(f) {
|
||||
@@ -542,10 +547,10 @@ func (mpq *MatchPlayerQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]
|
||||
mpq.withMessages != nil,
|
||||
}
|
||||
)
|
||||
_spec.ScanValues = func(columns []string) ([]interface{}, error) {
|
||||
_spec.ScanValues = func(columns []string) ([]any, error) {
|
||||
return (*MatchPlayer).scanValues(nil, columns)
|
||||
}
|
||||
_spec.Assign = func(columns []string, values []interface{}) error {
|
||||
_spec.Assign = func(columns []string, values []any) error {
|
||||
node := &MatchPlayer{config: mpq.config}
|
||||
nodes = append(nodes, node)
|
||||
node.Edges.loadedTypes = loadedTypes
|
||||
@@ -796,11 +801,14 @@ func (mpq *MatchPlayerQuery) sqlCount(ctx context.Context) (int, error) {
|
||||
}
|
||||
|
||||
func (mpq *MatchPlayerQuery) sqlExist(ctx context.Context) (bool, error) {
|
||||
n, err := mpq.sqlCount(ctx)
|
||||
if err != nil {
|
||||
switch _, err := mpq.FirstID(ctx); {
|
||||
case IsNotFound(err):
|
||||
return false, nil
|
||||
case err != nil:
|
||||
return false, fmt.Errorf("ent: check existence: %w", err)
|
||||
default:
|
||||
return true, nil
|
||||
}
|
||||
return n > 0, nil
|
||||
}
|
||||
|
||||
func (mpq *MatchPlayerQuery) querySpec() *sqlgraph.QuerySpec {
|
||||
@@ -910,7 +918,7 @@ func (mpgb *MatchPlayerGroupBy) Aggregate(fns ...AggregateFunc) *MatchPlayerGrou
|
||||
}
|
||||
|
||||
// Scan applies the group-by query and scans the result into the given value.
|
||||
func (mpgb *MatchPlayerGroupBy) Scan(ctx context.Context, v interface{}) error {
|
||||
func (mpgb *MatchPlayerGroupBy) Scan(ctx context.Context, v any) error {
|
||||
query, err := mpgb.path(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -919,7 +927,7 @@ func (mpgb *MatchPlayerGroupBy) Scan(ctx context.Context, v interface{}) error {
|
||||
return mpgb.sqlScan(ctx, v)
|
||||
}
|
||||
|
||||
func (mpgb *MatchPlayerGroupBy) sqlScan(ctx context.Context, v interface{}) error {
|
||||
func (mpgb *MatchPlayerGroupBy) sqlScan(ctx context.Context, v any) error {
|
||||
for _, f := range mpgb.fields {
|
||||
if !matchplayer.ValidColumn(f) {
|
||||
return &ValidationError{Name: f, err: fmt.Errorf("invalid field %q for group-by", f)}
|
||||
@@ -944,8 +952,6 @@ func (mpgb *MatchPlayerGroupBy) sqlQuery() *sql.Selector {
|
||||
for _, fn := range mpgb.fns {
|
||||
aggregation = append(aggregation, fn(selector))
|
||||
}
|
||||
// If no columns were selected in a custom aggregation function, the default
|
||||
// selection is the fields used for "group-by", and the aggregation functions.
|
||||
if len(selector.SelectedColumns()) == 0 {
|
||||
columns := make([]string, 0, len(mpgb.fields)+len(mpgb.fns))
|
||||
for _, f := range mpgb.fields {
|
||||
@@ -965,8 +971,14 @@ type MatchPlayerSelect struct {
|
||||
sql *sql.Selector
|
||||
}
|
||||
|
||||
// Aggregate adds the given aggregation functions to the selector query.
|
||||
func (mps *MatchPlayerSelect) Aggregate(fns ...AggregateFunc) *MatchPlayerSelect {
|
||||
mps.fns = append(mps.fns, fns...)
|
||||
return mps
|
||||
}
|
||||
|
||||
// Scan applies the selector query and scans the result into the given value.
|
||||
func (mps *MatchPlayerSelect) Scan(ctx context.Context, v interface{}) error {
|
||||
func (mps *MatchPlayerSelect) Scan(ctx context.Context, v any) error {
|
||||
if err := mps.prepareQuery(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -974,7 +986,17 @@ func (mps *MatchPlayerSelect) Scan(ctx context.Context, v interface{}) error {
|
||||
return mps.sqlScan(ctx, v)
|
||||
}
|
||||
|
||||
func (mps *MatchPlayerSelect) sqlScan(ctx context.Context, v interface{}) error {
|
||||
func (mps *MatchPlayerSelect) sqlScan(ctx context.Context, v any) error {
|
||||
aggregation := make([]string, 0, len(mps.fns))
|
||||
for _, fn := range mps.fns {
|
||||
aggregation = append(aggregation, fn(mps.sql))
|
||||
}
|
||||
switch n := len(*mps.selector.flds); {
|
||||
case n == 0 && len(aggregation) > 0:
|
||||
mps.sql.Select(aggregation...)
|
||||
case n != 0 && len(aggregation) > 0:
|
||||
mps.sql.AppendSelect(aggregation...)
|
||||
}
|
||||
rows := &sql.Rows{}
|
||||
query, args := mps.sql.Query()
|
||||
if err := mps.driver.Query(ctx, query, args, rows); err != nil {
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -51,8 +51,8 @@ func (e MessagesEdges) MatchPlayerOrErr() (*MatchPlayer, error) {
|
||||
}
|
||||
|
||||
// scanValues returns the types for scanning values from sql.Rows.
|
||||
func (*Messages) scanValues(columns []string) ([]interface{}, error) {
|
||||
values := make([]interface{}, len(columns))
|
||||
func (*Messages) scanValues(columns []string) ([]any, error) {
|
||||
values := make([]any, len(columns))
|
||||
for i := range columns {
|
||||
switch columns[i] {
|
||||
case messages.FieldAllChat:
|
||||
@@ -72,7 +72,7 @@ func (*Messages) scanValues(columns []string) ([]interface{}, error) {
|
||||
|
||||
// assignValues assigns the values that were returned from sql.Rows (after scanning)
|
||||
// to the Messages fields.
|
||||
func (m *Messages) assignValues(columns []string, values []interface{}) error {
|
||||
func (m *Messages) assignValues(columns []string, values []any) error {
|
||||
if m, n := len(values), len(columns); m < n {
|
||||
return fmt.Errorf("mismatch number of scan values: %d != %d", m, n)
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ func IDNEQ(id int) predicate.Messages {
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.Messages {
|
||||
return predicate.Messages(func(s *sql.Selector) {
|
||||
v := make([]interface{}, len(ids))
|
||||
v := make([]any, len(ids))
|
||||
for i := range v {
|
||||
v[i] = ids[i]
|
||||
}
|
||||
@@ -43,7 +43,7 @@ func IDIn(ids ...int) predicate.Messages {
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.Messages {
|
||||
return predicate.Messages(func(s *sql.Selector) {
|
||||
v := make([]interface{}, len(ids))
|
||||
v := make([]any, len(ids))
|
||||
for i := range v {
|
||||
v[i] = ids[i]
|
||||
}
|
||||
@@ -116,7 +116,7 @@ func MessageNEQ(v string) predicate.Messages {
|
||||
|
||||
// MessageIn applies the In predicate on the "message" field.
|
||||
func MessageIn(vs ...string) predicate.Messages {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -127,7 +127,7 @@ func MessageIn(vs ...string) predicate.Messages {
|
||||
|
||||
// MessageNotIn applies the NotIn predicate on the "message" field.
|
||||
func MessageNotIn(vs ...string) predicate.Messages {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -229,7 +229,7 @@ func TickNEQ(v int) predicate.Messages {
|
||||
|
||||
// TickIn applies the In predicate on the "tick" field.
|
||||
func TickIn(vs ...int) predicate.Messages {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -240,7 +240,7 @@ func TickIn(vs ...int) predicate.Messages {
|
||||
|
||||
// TickNotIn applies the NotIn predicate on the "tick" field.
|
||||
func TickNotIn(vs ...int) predicate.Messages {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
@@ -170,27 +170,15 @@ func (mc *MessagesCreate) createSpec() (*Messages, *sqlgraph.CreateSpec) {
|
||||
}
|
||||
)
|
||||
if value, ok := mc.mutation.Message(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: messages.FieldMessage,
|
||||
})
|
||||
_spec.SetField(messages.FieldMessage, field.TypeString, value)
|
||||
_node.Message = value
|
||||
}
|
||||
if value, ok := mc.mutation.AllChat(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeBool,
|
||||
Value: value,
|
||||
Column: messages.FieldAllChat,
|
||||
})
|
||||
_spec.SetField(messages.FieldAllChat, field.TypeBool, value)
|
||||
_node.AllChat = value
|
||||
}
|
||||
if value, ok := mc.mutation.Tick(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: messages.FieldTick,
|
||||
})
|
||||
_spec.SetField(messages.FieldTick, field.TypeInt, value)
|
||||
_node.Tick = value
|
||||
}
|
||||
if nodes := mc.mutation.MatchPlayerIDs(); len(nodes) > 0 {
|
||||
|
@@ -333,6 +333,11 @@ func (mq *MessagesQuery) Select(fields ...string) *MessagesSelect {
|
||||
return selbuild
|
||||
}
|
||||
|
||||
// Aggregate returns a MessagesSelect configured with the given aggregations.
|
||||
func (mq *MessagesQuery) Aggregate(fns ...AggregateFunc) *MessagesSelect {
|
||||
return mq.Select().Aggregate(fns...)
|
||||
}
|
||||
|
||||
func (mq *MessagesQuery) prepareQuery(ctx context.Context) error {
|
||||
for _, f := range mq.fields {
|
||||
if !messages.ValidColumn(f) {
|
||||
@@ -364,10 +369,10 @@ func (mq *MessagesQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Mes
|
||||
if withFKs {
|
||||
_spec.Node.Columns = append(_spec.Node.Columns, messages.ForeignKeys...)
|
||||
}
|
||||
_spec.ScanValues = func(columns []string) ([]interface{}, error) {
|
||||
_spec.ScanValues = func(columns []string) ([]any, error) {
|
||||
return (*Messages).scanValues(nil, columns)
|
||||
}
|
||||
_spec.Assign = func(columns []string, values []interface{}) error {
|
||||
_spec.Assign = func(columns []string, values []any) error {
|
||||
node := &Messages{config: mq.config}
|
||||
nodes = append(nodes, node)
|
||||
node.Edges.loadedTypes = loadedTypes
|
||||
@@ -437,11 +442,14 @@ func (mq *MessagesQuery) sqlCount(ctx context.Context) (int, error) {
|
||||
}
|
||||
|
||||
func (mq *MessagesQuery) sqlExist(ctx context.Context) (bool, error) {
|
||||
n, err := mq.sqlCount(ctx)
|
||||
if err != nil {
|
||||
switch _, err := mq.FirstID(ctx); {
|
||||
case IsNotFound(err):
|
||||
return false, nil
|
||||
case err != nil:
|
||||
return false, fmt.Errorf("ent: check existence: %w", err)
|
||||
default:
|
||||
return true, nil
|
||||
}
|
||||
return n > 0, nil
|
||||
}
|
||||
|
||||
func (mq *MessagesQuery) querySpec() *sqlgraph.QuerySpec {
|
||||
@@ -551,7 +559,7 @@ func (mgb *MessagesGroupBy) Aggregate(fns ...AggregateFunc) *MessagesGroupBy {
|
||||
}
|
||||
|
||||
// Scan applies the group-by query and scans the result into the given value.
|
||||
func (mgb *MessagesGroupBy) Scan(ctx context.Context, v interface{}) error {
|
||||
func (mgb *MessagesGroupBy) Scan(ctx context.Context, v any) error {
|
||||
query, err := mgb.path(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -560,7 +568,7 @@ func (mgb *MessagesGroupBy) Scan(ctx context.Context, v interface{}) error {
|
||||
return mgb.sqlScan(ctx, v)
|
||||
}
|
||||
|
||||
func (mgb *MessagesGroupBy) sqlScan(ctx context.Context, v interface{}) error {
|
||||
func (mgb *MessagesGroupBy) sqlScan(ctx context.Context, v any) error {
|
||||
for _, f := range mgb.fields {
|
||||
if !messages.ValidColumn(f) {
|
||||
return &ValidationError{Name: f, err: fmt.Errorf("invalid field %q for group-by", f)}
|
||||
@@ -585,8 +593,6 @@ func (mgb *MessagesGroupBy) sqlQuery() *sql.Selector {
|
||||
for _, fn := range mgb.fns {
|
||||
aggregation = append(aggregation, fn(selector))
|
||||
}
|
||||
// If no columns were selected in a custom aggregation function, the default
|
||||
// selection is the fields used for "group-by", and the aggregation functions.
|
||||
if len(selector.SelectedColumns()) == 0 {
|
||||
columns := make([]string, 0, len(mgb.fields)+len(mgb.fns))
|
||||
for _, f := range mgb.fields {
|
||||
@@ -606,8 +612,14 @@ type MessagesSelect struct {
|
||||
sql *sql.Selector
|
||||
}
|
||||
|
||||
// Aggregate adds the given aggregation functions to the selector query.
|
||||
func (ms *MessagesSelect) Aggregate(fns ...AggregateFunc) *MessagesSelect {
|
||||
ms.fns = append(ms.fns, fns...)
|
||||
return ms
|
||||
}
|
||||
|
||||
// Scan applies the selector query and scans the result into the given value.
|
||||
func (ms *MessagesSelect) Scan(ctx context.Context, v interface{}) error {
|
||||
func (ms *MessagesSelect) Scan(ctx context.Context, v any) error {
|
||||
if err := ms.prepareQuery(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -615,7 +627,17 @@ func (ms *MessagesSelect) Scan(ctx context.Context, v interface{}) error {
|
||||
return ms.sqlScan(ctx, v)
|
||||
}
|
||||
|
||||
func (ms *MessagesSelect) sqlScan(ctx context.Context, v interface{}) error {
|
||||
func (ms *MessagesSelect) sqlScan(ctx context.Context, v any) error {
|
||||
aggregation := make([]string, 0, len(ms.fns))
|
||||
for _, fn := range ms.fns {
|
||||
aggregation = append(aggregation, fn(ms.sql))
|
||||
}
|
||||
switch n := len(*ms.selector.flds); {
|
||||
case n == 0 && len(aggregation) > 0:
|
||||
ms.sql.Select(aggregation...)
|
||||
case n != 0 && len(aggregation) > 0:
|
||||
ms.sql.AppendSelect(aggregation...)
|
||||
}
|
||||
rows := &sql.Rows{}
|
||||
query, args := ms.sql.Query()
|
||||
if err := ms.driver.Query(ctx, query, args, rows); err != nil {
|
||||
|
@@ -163,32 +163,16 @@ func (mu *MessagesUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
}
|
||||
}
|
||||
if value, ok := mu.mutation.Message(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: messages.FieldMessage,
|
||||
})
|
||||
_spec.SetField(messages.FieldMessage, field.TypeString, value)
|
||||
}
|
||||
if value, ok := mu.mutation.AllChat(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeBool,
|
||||
Value: value,
|
||||
Column: messages.FieldAllChat,
|
||||
})
|
||||
_spec.SetField(messages.FieldAllChat, field.TypeBool, value)
|
||||
}
|
||||
if value, ok := mu.mutation.Tick(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: messages.FieldTick,
|
||||
})
|
||||
_spec.SetField(messages.FieldTick, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := mu.mutation.AddedTick(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: messages.FieldTick,
|
||||
})
|
||||
_spec.AddField(messages.FieldTick, field.TypeInt, value)
|
||||
}
|
||||
if mu.mutation.MatchPlayerCleared() {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
@@ -225,7 +209,7 @@ func (mu *MessagesUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
}
|
||||
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
||||
}
|
||||
_spec.Modifiers = mu.modifiers
|
||||
_spec.AddModifiers(mu.modifiers...)
|
||||
if n, err = sqlgraph.UpdateNodes(ctx, mu.driver, _spec); err != nil {
|
||||
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
||||
err = &NotFoundError{messages.Label}
|
||||
@@ -410,32 +394,16 @@ func (muo *MessagesUpdateOne) sqlSave(ctx context.Context) (_node *Messages, err
|
||||
}
|
||||
}
|
||||
if value, ok := muo.mutation.Message(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: messages.FieldMessage,
|
||||
})
|
||||
_spec.SetField(messages.FieldMessage, field.TypeString, value)
|
||||
}
|
||||
if value, ok := muo.mutation.AllChat(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeBool,
|
||||
Value: value,
|
||||
Column: messages.FieldAllChat,
|
||||
})
|
||||
_spec.SetField(messages.FieldAllChat, field.TypeBool, value)
|
||||
}
|
||||
if value, ok := muo.mutation.Tick(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: messages.FieldTick,
|
||||
})
|
||||
_spec.SetField(messages.FieldTick, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := muo.mutation.AddedTick(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: messages.FieldTick,
|
||||
})
|
||||
_spec.AddField(messages.FieldTick, field.TypeInt, value)
|
||||
}
|
||||
if muo.mutation.MatchPlayerCleared() {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
@@ -472,7 +440,7 @@ func (muo *MessagesUpdateOne) sqlSave(ctx context.Context) (_node *Messages, err
|
||||
}
|
||||
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
||||
}
|
||||
_spec.Modifiers = muo.modifiers
|
||||
_spec.AddModifiers(muo.modifiers...)
|
||||
_node = &Messages{config: muo.config}
|
||||
_spec.Assign = _node.assignValues
|
||||
_spec.ScanValues = _node.scanValues
|
||||
|
@@ -5862,8 +5862,6 @@ func (m *MessagesMutation) RemovedEdges() []string {
|
||||
// RemovedIDs returns all IDs (to other nodes) that were removed for the edge with
|
||||
// the given name in this mutation.
|
||||
func (m *MessagesMutation) RemovedIDs(name string) []ent.Value {
|
||||
switch name {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -8303,8 +8301,6 @@ func (m *RoundStatsMutation) RemovedEdges() []string {
|
||||
// RemovedIDs returns all IDs (to other nodes) that were removed for the edge with
|
||||
// the given name in this mutation.
|
||||
func (m *RoundStatsMutation) RemovedIDs(name string) []ent.Value {
|
||||
switch name {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -8773,8 +8769,6 @@ func (m *SprayMutation) RemovedEdges() []string {
|
||||
// RemovedIDs returns all IDs (to other nodes) that were removed for the edge with
|
||||
// the given name in this mutation.
|
||||
func (m *SprayMutation) RemovedIDs(name string) []ent.Value {
|
||||
switch name {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -9450,8 +9444,6 @@ func (m *WeaponMutation) RemovedEdges() []string {
|
||||
// RemovedIDs returns all IDs (to other nodes) that were removed for the edge with
|
||||
// the given name in this mutation.
|
||||
func (m *WeaponMutation) RemovedIDs(name string) []ent.Value {
|
||||
switch name {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@@ -83,8 +83,8 @@ func (e PlayerEdges) MatchesOrErr() ([]*Match, error) {
|
||||
}
|
||||
|
||||
// scanValues returns the types for scanning values from sql.Rows.
|
||||
func (*Player) scanValues(columns []string) ([]interface{}, error) {
|
||||
values := make([]interface{}, len(columns))
|
||||
func (*Player) scanValues(columns []string) ([]any, error) {
|
||||
values := make([]any, len(columns))
|
||||
for i := range columns {
|
||||
switch columns[i] {
|
||||
case player.FieldID, player.FieldVacCount, player.FieldGameBanCount, player.FieldWins, player.FieldLooses, player.FieldTies:
|
||||
@@ -102,7 +102,7 @@ func (*Player) scanValues(columns []string) ([]interface{}, error) {
|
||||
|
||||
// assignValues assigns the values that were returned from sql.Rows (after scanning)
|
||||
// to the Player fields.
|
||||
func (pl *Player) assignValues(columns []string, values []interface{}) error {
|
||||
func (pl *Player) assignValues(columns []string, values []any) error {
|
||||
if m, n := len(values), len(columns); m < n {
|
||||
return fmt.Errorf("mismatch number of scan values: %d != %d", m, n)
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@ func IDNEQ(id uint64) predicate.Player {
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...uint64) predicate.Player {
|
||||
return predicate.Player(func(s *sql.Selector) {
|
||||
v := make([]interface{}, len(ids))
|
||||
v := make([]any, len(ids))
|
||||
for i := range v {
|
||||
v[i] = ids[i]
|
||||
}
|
||||
@@ -45,7 +45,7 @@ func IDIn(ids ...uint64) predicate.Player {
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...uint64) predicate.Player {
|
||||
return predicate.Player(func(s *sql.Selector) {
|
||||
v := make([]interface{}, len(ids))
|
||||
v := make([]any, len(ids))
|
||||
for i := range v {
|
||||
v[i] = ids[i]
|
||||
}
|
||||
@@ -209,7 +209,7 @@ func NameNEQ(v string) predicate.Player {
|
||||
|
||||
// NameIn applies the In predicate on the "name" field.
|
||||
func NameIn(vs ...string) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -220,7 +220,7 @@ func NameIn(vs ...string) predicate.Player {
|
||||
|
||||
// NameNotIn applies the NotIn predicate on the "name" field.
|
||||
func NameNotIn(vs ...string) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -322,7 +322,7 @@ func AvatarNEQ(v string) predicate.Player {
|
||||
|
||||
// AvatarIn applies the In predicate on the "avatar" field.
|
||||
func AvatarIn(vs ...string) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -333,7 +333,7 @@ func AvatarIn(vs ...string) predicate.Player {
|
||||
|
||||
// AvatarNotIn applies the NotIn predicate on the "avatar" field.
|
||||
func AvatarNotIn(vs ...string) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -435,7 +435,7 @@ func VanityURLNEQ(v string) predicate.Player {
|
||||
|
||||
// VanityURLIn applies the In predicate on the "vanity_url" field.
|
||||
func VanityURLIn(vs ...string) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -446,7 +446,7 @@ func VanityURLIn(vs ...string) predicate.Player {
|
||||
|
||||
// VanityURLNotIn applies the NotIn predicate on the "vanity_url" field.
|
||||
func VanityURLNotIn(vs ...string) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -548,7 +548,7 @@ func VanityURLRealNEQ(v string) predicate.Player {
|
||||
|
||||
// VanityURLRealIn applies the In predicate on the "vanity_url_real" field.
|
||||
func VanityURLRealIn(vs ...string) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -559,7 +559,7 @@ func VanityURLRealIn(vs ...string) predicate.Player {
|
||||
|
||||
// VanityURLRealNotIn applies the NotIn predicate on the "vanity_url_real" field.
|
||||
func VanityURLRealNotIn(vs ...string) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -661,7 +661,7 @@ func VacDateNEQ(v time.Time) predicate.Player {
|
||||
|
||||
// VacDateIn applies the In predicate on the "vac_date" field.
|
||||
func VacDateIn(vs ...time.Time) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -672,7 +672,7 @@ func VacDateIn(vs ...time.Time) predicate.Player {
|
||||
|
||||
// VacDateNotIn applies the NotIn predicate on the "vac_date" field.
|
||||
func VacDateNotIn(vs ...time.Time) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -739,7 +739,7 @@ func VacCountNEQ(v int) predicate.Player {
|
||||
|
||||
// VacCountIn applies the In predicate on the "vac_count" field.
|
||||
func VacCountIn(vs ...int) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -750,7 +750,7 @@ func VacCountIn(vs ...int) predicate.Player {
|
||||
|
||||
// VacCountNotIn applies the NotIn predicate on the "vac_count" field.
|
||||
func VacCountNotIn(vs ...int) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -817,7 +817,7 @@ func GameBanDateNEQ(v time.Time) predicate.Player {
|
||||
|
||||
// GameBanDateIn applies the In predicate on the "game_ban_date" field.
|
||||
func GameBanDateIn(vs ...time.Time) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -828,7 +828,7 @@ func GameBanDateIn(vs ...time.Time) predicate.Player {
|
||||
|
||||
// GameBanDateNotIn applies the NotIn predicate on the "game_ban_date" field.
|
||||
func GameBanDateNotIn(vs ...time.Time) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -895,7 +895,7 @@ func GameBanCountNEQ(v int) predicate.Player {
|
||||
|
||||
// GameBanCountIn applies the In predicate on the "game_ban_count" field.
|
||||
func GameBanCountIn(vs ...int) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -906,7 +906,7 @@ func GameBanCountIn(vs ...int) predicate.Player {
|
||||
|
||||
// GameBanCountNotIn applies the NotIn predicate on the "game_ban_count" field.
|
||||
func GameBanCountNotIn(vs ...int) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -973,7 +973,7 @@ func SteamUpdatedNEQ(v time.Time) predicate.Player {
|
||||
|
||||
// SteamUpdatedIn applies the In predicate on the "steam_updated" field.
|
||||
func SteamUpdatedIn(vs ...time.Time) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -984,7 +984,7 @@ func SteamUpdatedIn(vs ...time.Time) predicate.Player {
|
||||
|
||||
// SteamUpdatedNotIn applies the NotIn predicate on the "steam_updated" field.
|
||||
func SteamUpdatedNotIn(vs ...time.Time) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1037,7 +1037,7 @@ func SharecodeUpdatedNEQ(v time.Time) predicate.Player {
|
||||
|
||||
// SharecodeUpdatedIn applies the In predicate on the "sharecode_updated" field.
|
||||
func SharecodeUpdatedIn(vs ...time.Time) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1048,7 +1048,7 @@ func SharecodeUpdatedIn(vs ...time.Time) predicate.Player {
|
||||
|
||||
// SharecodeUpdatedNotIn applies the NotIn predicate on the "sharecode_updated" field.
|
||||
func SharecodeUpdatedNotIn(vs ...time.Time) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1115,7 +1115,7 @@ func AuthCodeNEQ(v string) predicate.Player {
|
||||
|
||||
// AuthCodeIn applies the In predicate on the "auth_code" field.
|
||||
func AuthCodeIn(vs ...string) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1126,7 +1126,7 @@ func AuthCodeIn(vs ...string) predicate.Player {
|
||||
|
||||
// AuthCodeNotIn applies the NotIn predicate on the "auth_code" field.
|
||||
func AuthCodeNotIn(vs ...string) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1228,7 +1228,7 @@ func ProfileCreatedNEQ(v time.Time) predicate.Player {
|
||||
|
||||
// ProfileCreatedIn applies the In predicate on the "profile_created" field.
|
||||
func ProfileCreatedIn(vs ...time.Time) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1239,7 +1239,7 @@ func ProfileCreatedIn(vs ...time.Time) predicate.Player {
|
||||
|
||||
// ProfileCreatedNotIn applies the NotIn predicate on the "profile_created" field.
|
||||
func ProfileCreatedNotIn(vs ...time.Time) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1306,7 +1306,7 @@ func OldestSharecodeSeenNEQ(v string) predicate.Player {
|
||||
|
||||
// OldestSharecodeSeenIn applies the In predicate on the "oldest_sharecode_seen" field.
|
||||
func OldestSharecodeSeenIn(vs ...string) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1317,7 +1317,7 @@ func OldestSharecodeSeenIn(vs ...string) predicate.Player {
|
||||
|
||||
// OldestSharecodeSeenNotIn applies the NotIn predicate on the "oldest_sharecode_seen" field.
|
||||
func OldestSharecodeSeenNotIn(vs ...string) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1419,7 +1419,7 @@ func WinsNEQ(v int) predicate.Player {
|
||||
|
||||
// WinsIn applies the In predicate on the "wins" field.
|
||||
func WinsIn(vs ...int) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1430,7 +1430,7 @@ func WinsIn(vs ...int) predicate.Player {
|
||||
|
||||
// WinsNotIn applies the NotIn predicate on the "wins" field.
|
||||
func WinsNotIn(vs ...int) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1497,7 +1497,7 @@ func LoosesNEQ(v int) predicate.Player {
|
||||
|
||||
// LoosesIn applies the In predicate on the "looses" field.
|
||||
func LoosesIn(vs ...int) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1508,7 +1508,7 @@ func LoosesIn(vs ...int) predicate.Player {
|
||||
|
||||
// LoosesNotIn applies the NotIn predicate on the "looses" field.
|
||||
func LoosesNotIn(vs ...int) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1575,7 +1575,7 @@ func TiesNEQ(v int) predicate.Player {
|
||||
|
||||
// TiesIn applies the In predicate on the "ties" field.
|
||||
func TiesIn(vs ...int) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -1586,7 +1586,7 @@ func TiesIn(vs ...int) predicate.Player {
|
||||
|
||||
// TiesNotIn applies the NotIn predicate on the "ties" field.
|
||||
func TiesNotIn(vs ...int) predicate.Player {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
@@ -404,131 +404,67 @@ func (pc *PlayerCreate) createSpec() (*Player, *sqlgraph.CreateSpec) {
|
||||
_spec.ID.Value = id
|
||||
}
|
||||
if value, ok := pc.mutation.Name(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: player.FieldName,
|
||||
})
|
||||
_spec.SetField(player.FieldName, field.TypeString, value)
|
||||
_node.Name = value
|
||||
}
|
||||
if value, ok := pc.mutation.Avatar(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: player.FieldAvatar,
|
||||
})
|
||||
_spec.SetField(player.FieldAvatar, field.TypeString, value)
|
||||
_node.Avatar = value
|
||||
}
|
||||
if value, ok := pc.mutation.VanityURL(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: player.FieldVanityURL,
|
||||
})
|
||||
_spec.SetField(player.FieldVanityURL, field.TypeString, value)
|
||||
_node.VanityURL = value
|
||||
}
|
||||
if value, ok := pc.mutation.VanityURLReal(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: player.FieldVanityURLReal,
|
||||
})
|
||||
_spec.SetField(player.FieldVanityURLReal, field.TypeString, value)
|
||||
_node.VanityURLReal = value
|
||||
}
|
||||
if value, ok := pc.mutation.VacDate(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: player.FieldVacDate,
|
||||
})
|
||||
_spec.SetField(player.FieldVacDate, field.TypeTime, value)
|
||||
_node.VacDate = value
|
||||
}
|
||||
if value, ok := pc.mutation.VacCount(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldVacCount,
|
||||
})
|
||||
_spec.SetField(player.FieldVacCount, field.TypeInt, value)
|
||||
_node.VacCount = value
|
||||
}
|
||||
if value, ok := pc.mutation.GameBanDate(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: player.FieldGameBanDate,
|
||||
})
|
||||
_spec.SetField(player.FieldGameBanDate, field.TypeTime, value)
|
||||
_node.GameBanDate = value
|
||||
}
|
||||
if value, ok := pc.mutation.GameBanCount(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldGameBanCount,
|
||||
})
|
||||
_spec.SetField(player.FieldGameBanCount, field.TypeInt, value)
|
||||
_node.GameBanCount = value
|
||||
}
|
||||
if value, ok := pc.mutation.SteamUpdated(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: player.FieldSteamUpdated,
|
||||
})
|
||||
_spec.SetField(player.FieldSteamUpdated, field.TypeTime, value)
|
||||
_node.SteamUpdated = value
|
||||
}
|
||||
if value, ok := pc.mutation.SharecodeUpdated(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: player.FieldSharecodeUpdated,
|
||||
})
|
||||
_spec.SetField(player.FieldSharecodeUpdated, field.TypeTime, value)
|
||||
_node.SharecodeUpdated = value
|
||||
}
|
||||
if value, ok := pc.mutation.AuthCode(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: player.FieldAuthCode,
|
||||
})
|
||||
_spec.SetField(player.FieldAuthCode, field.TypeString, value)
|
||||
_node.AuthCode = value
|
||||
}
|
||||
if value, ok := pc.mutation.ProfileCreated(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: player.FieldProfileCreated,
|
||||
})
|
||||
_spec.SetField(player.FieldProfileCreated, field.TypeTime, value)
|
||||
_node.ProfileCreated = value
|
||||
}
|
||||
if value, ok := pc.mutation.OldestSharecodeSeen(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: player.FieldOldestSharecodeSeen,
|
||||
})
|
||||
_spec.SetField(player.FieldOldestSharecodeSeen, field.TypeString, value)
|
||||
_node.OldestSharecodeSeen = value
|
||||
}
|
||||
if value, ok := pc.mutation.Wins(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldWins,
|
||||
})
|
||||
_spec.SetField(player.FieldWins, field.TypeInt, value)
|
||||
_node.Wins = value
|
||||
}
|
||||
if value, ok := pc.mutation.Looses(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldLooses,
|
||||
})
|
||||
_spec.SetField(player.FieldLooses, field.TypeInt, value)
|
||||
_node.Looses = value
|
||||
}
|
||||
if value, ok := pc.mutation.Ties(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldTies,
|
||||
})
|
||||
_spec.SetField(player.FieldTies, field.TypeInt, value)
|
||||
_node.Ties = value
|
||||
}
|
||||
if nodes := pc.mutation.StatsIDs(); len(nodes) > 0 {
|
||||
|
@@ -369,6 +369,11 @@ func (pq *PlayerQuery) Select(fields ...string) *PlayerSelect {
|
||||
return selbuild
|
||||
}
|
||||
|
||||
// Aggregate returns a PlayerSelect configured with the given aggregations.
|
||||
func (pq *PlayerQuery) Aggregate(fns ...AggregateFunc) *PlayerSelect {
|
||||
return pq.Select().Aggregate(fns...)
|
||||
}
|
||||
|
||||
func (pq *PlayerQuery) prepareQuery(ctx context.Context) error {
|
||||
for _, f := range pq.fields {
|
||||
if !player.ValidColumn(f) {
|
||||
@@ -394,10 +399,10 @@ func (pq *PlayerQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Playe
|
||||
pq.withMatches != nil,
|
||||
}
|
||||
)
|
||||
_spec.ScanValues = func(columns []string) ([]interface{}, error) {
|
||||
_spec.ScanValues = func(columns []string) ([]any, error) {
|
||||
return (*Player).scanValues(nil, columns)
|
||||
}
|
||||
_spec.Assign = func(columns []string, values []interface{}) error {
|
||||
_spec.Assign = func(columns []string, values []any) error {
|
||||
node := &Player{config: pq.config}
|
||||
nodes = append(nodes, node)
|
||||
node.Edges.loadedTypes = loadedTypes
|
||||
@@ -485,18 +490,18 @@ func (pq *PlayerQuery) loadMatches(ctx context.Context, query *MatchQuery, nodes
|
||||
neighbors, err := query.sqlAll(ctx, func(_ context.Context, spec *sqlgraph.QuerySpec) {
|
||||
assign := spec.Assign
|
||||
values := spec.ScanValues
|
||||
spec.ScanValues = func(columns []string) ([]interface{}, error) {
|
||||
spec.ScanValues = func(columns []string) ([]any, error) {
|
||||
values, err := values(columns[1:])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return append([]interface{}{new(sql.NullInt64)}, values...), nil
|
||||
return append([]any{new(sql.NullInt64)}, values...), nil
|
||||
}
|
||||
spec.Assign = func(columns []string, values []interface{}) error {
|
||||
spec.Assign = func(columns []string, values []any) error {
|
||||
outValue := uint64(values[0].(*sql.NullInt64).Int64)
|
||||
inValue := uint64(values[1].(*sql.NullInt64).Int64)
|
||||
if nids[inValue] == nil {
|
||||
nids[inValue] = map[*Player]struct{}{byID[outValue]: struct{}{}}
|
||||
nids[inValue] = map[*Player]struct{}{byID[outValue]: {}}
|
||||
return assign(columns[1:], values[1:])
|
||||
}
|
||||
nids[inValue][byID[outValue]] = struct{}{}
|
||||
@@ -531,11 +536,14 @@ func (pq *PlayerQuery) sqlCount(ctx context.Context) (int, error) {
|
||||
}
|
||||
|
||||
func (pq *PlayerQuery) sqlExist(ctx context.Context) (bool, error) {
|
||||
n, err := pq.sqlCount(ctx)
|
||||
if err != nil {
|
||||
switch _, err := pq.FirstID(ctx); {
|
||||
case IsNotFound(err):
|
||||
return false, nil
|
||||
case err != nil:
|
||||
return false, fmt.Errorf("ent: check existence: %w", err)
|
||||
default:
|
||||
return true, nil
|
||||
}
|
||||
return n > 0, nil
|
||||
}
|
||||
|
||||
func (pq *PlayerQuery) querySpec() *sqlgraph.QuerySpec {
|
||||
@@ -645,7 +653,7 @@ func (pgb *PlayerGroupBy) Aggregate(fns ...AggregateFunc) *PlayerGroupBy {
|
||||
}
|
||||
|
||||
// Scan applies the group-by query and scans the result into the given value.
|
||||
func (pgb *PlayerGroupBy) Scan(ctx context.Context, v interface{}) error {
|
||||
func (pgb *PlayerGroupBy) Scan(ctx context.Context, v any) error {
|
||||
query, err := pgb.path(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -654,7 +662,7 @@ func (pgb *PlayerGroupBy) Scan(ctx context.Context, v interface{}) error {
|
||||
return pgb.sqlScan(ctx, v)
|
||||
}
|
||||
|
||||
func (pgb *PlayerGroupBy) sqlScan(ctx context.Context, v interface{}) error {
|
||||
func (pgb *PlayerGroupBy) sqlScan(ctx context.Context, v any) error {
|
||||
for _, f := range pgb.fields {
|
||||
if !player.ValidColumn(f) {
|
||||
return &ValidationError{Name: f, err: fmt.Errorf("invalid field %q for group-by", f)}
|
||||
@@ -679,8 +687,6 @@ func (pgb *PlayerGroupBy) sqlQuery() *sql.Selector {
|
||||
for _, fn := range pgb.fns {
|
||||
aggregation = append(aggregation, fn(selector))
|
||||
}
|
||||
// If no columns were selected in a custom aggregation function, the default
|
||||
// selection is the fields used for "group-by", and the aggregation functions.
|
||||
if len(selector.SelectedColumns()) == 0 {
|
||||
columns := make([]string, 0, len(pgb.fields)+len(pgb.fns))
|
||||
for _, f := range pgb.fields {
|
||||
@@ -700,8 +706,14 @@ type PlayerSelect struct {
|
||||
sql *sql.Selector
|
||||
}
|
||||
|
||||
// Aggregate adds the given aggregation functions to the selector query.
|
||||
func (ps *PlayerSelect) Aggregate(fns ...AggregateFunc) *PlayerSelect {
|
||||
ps.fns = append(ps.fns, fns...)
|
||||
return ps
|
||||
}
|
||||
|
||||
// Scan applies the selector query and scans the result into the given value.
|
||||
func (ps *PlayerSelect) Scan(ctx context.Context, v interface{}) error {
|
||||
func (ps *PlayerSelect) Scan(ctx context.Context, v any) error {
|
||||
if err := ps.prepareQuery(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -709,7 +721,17 @@ func (ps *PlayerSelect) Scan(ctx context.Context, v interface{}) error {
|
||||
return ps.sqlScan(ctx, v)
|
||||
}
|
||||
|
||||
func (ps *PlayerSelect) sqlScan(ctx context.Context, v interface{}) error {
|
||||
func (ps *PlayerSelect) sqlScan(ctx context.Context, v any) error {
|
||||
aggregation := make([]string, 0, len(ps.fns))
|
||||
for _, fn := range ps.fns {
|
||||
aggregation = append(aggregation, fn(ps.sql))
|
||||
}
|
||||
switch n := len(*ps.selector.flds); {
|
||||
case n == 0 && len(aggregation) > 0:
|
||||
ps.sql.Select(aggregation...)
|
||||
case n != 0 && len(aggregation) > 0:
|
||||
ps.sql.AppendSelect(aggregation...)
|
||||
}
|
||||
rows := &sql.Rows{}
|
||||
query, args := ps.sql.Query()
|
||||
if err := ps.driver.Query(ctx, query, args, rows); err != nil {
|
||||
|
@@ -536,241 +536,112 @@ func (pu *PlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
}
|
||||
}
|
||||
if value, ok := pu.mutation.Name(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: player.FieldName,
|
||||
})
|
||||
_spec.SetField(player.FieldName, field.TypeString, value)
|
||||
}
|
||||
if pu.mutation.NameCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Column: player.FieldName,
|
||||
})
|
||||
_spec.ClearField(player.FieldName, field.TypeString)
|
||||
}
|
||||
if value, ok := pu.mutation.Avatar(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: player.FieldAvatar,
|
||||
})
|
||||
_spec.SetField(player.FieldAvatar, field.TypeString, value)
|
||||
}
|
||||
if pu.mutation.AvatarCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Column: player.FieldAvatar,
|
||||
})
|
||||
_spec.ClearField(player.FieldAvatar, field.TypeString)
|
||||
}
|
||||
if value, ok := pu.mutation.VanityURL(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: player.FieldVanityURL,
|
||||
})
|
||||
_spec.SetField(player.FieldVanityURL, field.TypeString, value)
|
||||
}
|
||||
if pu.mutation.VanityURLCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Column: player.FieldVanityURL,
|
||||
})
|
||||
_spec.ClearField(player.FieldVanityURL, field.TypeString)
|
||||
}
|
||||
if value, ok := pu.mutation.VanityURLReal(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: player.FieldVanityURLReal,
|
||||
})
|
||||
_spec.SetField(player.FieldVanityURLReal, field.TypeString, value)
|
||||
}
|
||||
if pu.mutation.VanityURLRealCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Column: player.FieldVanityURLReal,
|
||||
})
|
||||
_spec.ClearField(player.FieldVanityURLReal, field.TypeString)
|
||||
}
|
||||
if value, ok := pu.mutation.VacDate(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: player.FieldVacDate,
|
||||
})
|
||||
_spec.SetField(player.FieldVacDate, field.TypeTime, value)
|
||||
}
|
||||
if pu.mutation.VacDateCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Column: player.FieldVacDate,
|
||||
})
|
||||
_spec.ClearField(player.FieldVacDate, field.TypeTime)
|
||||
}
|
||||
if value, ok := pu.mutation.VacCount(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldVacCount,
|
||||
})
|
||||
_spec.SetField(player.FieldVacCount, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := pu.mutation.AddedVacCount(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldVacCount,
|
||||
})
|
||||
_spec.AddField(player.FieldVacCount, field.TypeInt, value)
|
||||
}
|
||||
if pu.mutation.VacCountCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: player.FieldVacCount,
|
||||
})
|
||||
_spec.ClearField(player.FieldVacCount, field.TypeInt)
|
||||
}
|
||||
if value, ok := pu.mutation.GameBanDate(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: player.FieldGameBanDate,
|
||||
})
|
||||
_spec.SetField(player.FieldGameBanDate, field.TypeTime, value)
|
||||
}
|
||||
if pu.mutation.GameBanDateCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Column: player.FieldGameBanDate,
|
||||
})
|
||||
_spec.ClearField(player.FieldGameBanDate, field.TypeTime)
|
||||
}
|
||||
if value, ok := pu.mutation.GameBanCount(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldGameBanCount,
|
||||
})
|
||||
_spec.SetField(player.FieldGameBanCount, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := pu.mutation.AddedGameBanCount(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldGameBanCount,
|
||||
})
|
||||
_spec.AddField(player.FieldGameBanCount, field.TypeInt, value)
|
||||
}
|
||||
if pu.mutation.GameBanCountCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: player.FieldGameBanCount,
|
||||
})
|
||||
_spec.ClearField(player.FieldGameBanCount, field.TypeInt)
|
||||
}
|
||||
if value, ok := pu.mutation.SteamUpdated(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: player.FieldSteamUpdated,
|
||||
})
|
||||
_spec.SetField(player.FieldSteamUpdated, field.TypeTime, value)
|
||||
}
|
||||
if value, ok := pu.mutation.SharecodeUpdated(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: player.FieldSharecodeUpdated,
|
||||
})
|
||||
_spec.SetField(player.FieldSharecodeUpdated, field.TypeTime, value)
|
||||
}
|
||||
if pu.mutation.SharecodeUpdatedCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Column: player.FieldSharecodeUpdated,
|
||||
})
|
||||
_spec.ClearField(player.FieldSharecodeUpdated, field.TypeTime)
|
||||
}
|
||||
if value, ok := pu.mutation.AuthCode(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: player.FieldAuthCode,
|
||||
})
|
||||
_spec.SetField(player.FieldAuthCode, field.TypeString, value)
|
||||
}
|
||||
if pu.mutation.AuthCodeCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Column: player.FieldAuthCode,
|
||||
})
|
||||
_spec.ClearField(player.FieldAuthCode, field.TypeString)
|
||||
}
|
||||
if value, ok := pu.mutation.ProfileCreated(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: player.FieldProfileCreated,
|
||||
})
|
||||
_spec.SetField(player.FieldProfileCreated, field.TypeTime, value)
|
||||
}
|
||||
if pu.mutation.ProfileCreatedCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Column: player.FieldProfileCreated,
|
||||
})
|
||||
_spec.ClearField(player.FieldProfileCreated, field.TypeTime)
|
||||
}
|
||||
if value, ok := pu.mutation.OldestSharecodeSeen(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: player.FieldOldestSharecodeSeen,
|
||||
})
|
||||
_spec.SetField(player.FieldOldestSharecodeSeen, field.TypeString, value)
|
||||
}
|
||||
if pu.mutation.OldestSharecodeSeenCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Column: player.FieldOldestSharecodeSeen,
|
||||
})
|
||||
_spec.ClearField(player.FieldOldestSharecodeSeen, field.TypeString)
|
||||
}
|
||||
if value, ok := pu.mutation.Wins(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldWins,
|
||||
})
|
||||
_spec.SetField(player.FieldWins, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := pu.mutation.AddedWins(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldWins,
|
||||
})
|
||||
_spec.AddField(player.FieldWins, field.TypeInt, value)
|
||||
}
|
||||
if pu.mutation.WinsCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: player.FieldWins,
|
||||
})
|
||||
_spec.ClearField(player.FieldWins, field.TypeInt)
|
||||
}
|
||||
if value, ok := pu.mutation.Looses(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldLooses,
|
||||
})
|
||||
_spec.SetField(player.FieldLooses, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := pu.mutation.AddedLooses(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldLooses,
|
||||
})
|
||||
_spec.AddField(player.FieldLooses, field.TypeInt, value)
|
||||
}
|
||||
if pu.mutation.LoosesCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: player.FieldLooses,
|
||||
})
|
||||
_spec.ClearField(player.FieldLooses, field.TypeInt)
|
||||
}
|
||||
if value, ok := pu.mutation.Ties(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldTies,
|
||||
})
|
||||
_spec.SetField(player.FieldTies, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := pu.mutation.AddedTies(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldTies,
|
||||
})
|
||||
_spec.AddField(player.FieldTies, field.TypeInt, value)
|
||||
}
|
||||
if pu.mutation.TiesCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: player.FieldTies,
|
||||
})
|
||||
_spec.ClearField(player.FieldTies, field.TypeInt)
|
||||
}
|
||||
if pu.mutation.StatsCleared() {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
@@ -880,7 +751,7 @@ func (pu *PlayerUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
}
|
||||
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
||||
}
|
||||
_spec.Modifiers = pu.modifiers
|
||||
_spec.AddModifiers(pu.modifiers...)
|
||||
if n, err = sqlgraph.UpdateNodes(ctx, pu.driver, _spec); err != nil {
|
||||
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
||||
err = &NotFoundError{player.Label}
|
||||
@@ -1436,241 +1307,112 @@ func (puo *PlayerUpdateOne) sqlSave(ctx context.Context) (_node *Player, err err
|
||||
}
|
||||
}
|
||||
if value, ok := puo.mutation.Name(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: player.FieldName,
|
||||
})
|
||||
_spec.SetField(player.FieldName, field.TypeString, value)
|
||||
}
|
||||
if puo.mutation.NameCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Column: player.FieldName,
|
||||
})
|
||||
_spec.ClearField(player.FieldName, field.TypeString)
|
||||
}
|
||||
if value, ok := puo.mutation.Avatar(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: player.FieldAvatar,
|
||||
})
|
||||
_spec.SetField(player.FieldAvatar, field.TypeString, value)
|
||||
}
|
||||
if puo.mutation.AvatarCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Column: player.FieldAvatar,
|
||||
})
|
||||
_spec.ClearField(player.FieldAvatar, field.TypeString)
|
||||
}
|
||||
if value, ok := puo.mutation.VanityURL(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: player.FieldVanityURL,
|
||||
})
|
||||
_spec.SetField(player.FieldVanityURL, field.TypeString, value)
|
||||
}
|
||||
if puo.mutation.VanityURLCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Column: player.FieldVanityURL,
|
||||
})
|
||||
_spec.ClearField(player.FieldVanityURL, field.TypeString)
|
||||
}
|
||||
if value, ok := puo.mutation.VanityURLReal(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: player.FieldVanityURLReal,
|
||||
})
|
||||
_spec.SetField(player.FieldVanityURLReal, field.TypeString, value)
|
||||
}
|
||||
if puo.mutation.VanityURLRealCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Column: player.FieldVanityURLReal,
|
||||
})
|
||||
_spec.ClearField(player.FieldVanityURLReal, field.TypeString)
|
||||
}
|
||||
if value, ok := puo.mutation.VacDate(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: player.FieldVacDate,
|
||||
})
|
||||
_spec.SetField(player.FieldVacDate, field.TypeTime, value)
|
||||
}
|
||||
if puo.mutation.VacDateCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Column: player.FieldVacDate,
|
||||
})
|
||||
_spec.ClearField(player.FieldVacDate, field.TypeTime)
|
||||
}
|
||||
if value, ok := puo.mutation.VacCount(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldVacCount,
|
||||
})
|
||||
_spec.SetField(player.FieldVacCount, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := puo.mutation.AddedVacCount(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldVacCount,
|
||||
})
|
||||
_spec.AddField(player.FieldVacCount, field.TypeInt, value)
|
||||
}
|
||||
if puo.mutation.VacCountCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: player.FieldVacCount,
|
||||
})
|
||||
_spec.ClearField(player.FieldVacCount, field.TypeInt)
|
||||
}
|
||||
if value, ok := puo.mutation.GameBanDate(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: player.FieldGameBanDate,
|
||||
})
|
||||
_spec.SetField(player.FieldGameBanDate, field.TypeTime, value)
|
||||
}
|
||||
if puo.mutation.GameBanDateCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Column: player.FieldGameBanDate,
|
||||
})
|
||||
_spec.ClearField(player.FieldGameBanDate, field.TypeTime)
|
||||
}
|
||||
if value, ok := puo.mutation.GameBanCount(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldGameBanCount,
|
||||
})
|
||||
_spec.SetField(player.FieldGameBanCount, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := puo.mutation.AddedGameBanCount(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldGameBanCount,
|
||||
})
|
||||
_spec.AddField(player.FieldGameBanCount, field.TypeInt, value)
|
||||
}
|
||||
if puo.mutation.GameBanCountCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: player.FieldGameBanCount,
|
||||
})
|
||||
_spec.ClearField(player.FieldGameBanCount, field.TypeInt)
|
||||
}
|
||||
if value, ok := puo.mutation.SteamUpdated(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: player.FieldSteamUpdated,
|
||||
})
|
||||
_spec.SetField(player.FieldSteamUpdated, field.TypeTime, value)
|
||||
}
|
||||
if value, ok := puo.mutation.SharecodeUpdated(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: player.FieldSharecodeUpdated,
|
||||
})
|
||||
_spec.SetField(player.FieldSharecodeUpdated, field.TypeTime, value)
|
||||
}
|
||||
if puo.mutation.SharecodeUpdatedCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Column: player.FieldSharecodeUpdated,
|
||||
})
|
||||
_spec.ClearField(player.FieldSharecodeUpdated, field.TypeTime)
|
||||
}
|
||||
if value, ok := puo.mutation.AuthCode(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: player.FieldAuthCode,
|
||||
})
|
||||
_spec.SetField(player.FieldAuthCode, field.TypeString, value)
|
||||
}
|
||||
if puo.mutation.AuthCodeCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Column: player.FieldAuthCode,
|
||||
})
|
||||
_spec.ClearField(player.FieldAuthCode, field.TypeString)
|
||||
}
|
||||
if value, ok := puo.mutation.ProfileCreated(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: player.FieldProfileCreated,
|
||||
})
|
||||
_spec.SetField(player.FieldProfileCreated, field.TypeTime, value)
|
||||
}
|
||||
if puo.mutation.ProfileCreatedCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Column: player.FieldProfileCreated,
|
||||
})
|
||||
_spec.ClearField(player.FieldProfileCreated, field.TypeTime)
|
||||
}
|
||||
if value, ok := puo.mutation.OldestSharecodeSeen(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: player.FieldOldestSharecodeSeen,
|
||||
})
|
||||
_spec.SetField(player.FieldOldestSharecodeSeen, field.TypeString, value)
|
||||
}
|
||||
if puo.mutation.OldestSharecodeSeenCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Column: player.FieldOldestSharecodeSeen,
|
||||
})
|
||||
_spec.ClearField(player.FieldOldestSharecodeSeen, field.TypeString)
|
||||
}
|
||||
if value, ok := puo.mutation.Wins(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldWins,
|
||||
})
|
||||
_spec.SetField(player.FieldWins, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := puo.mutation.AddedWins(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldWins,
|
||||
})
|
||||
_spec.AddField(player.FieldWins, field.TypeInt, value)
|
||||
}
|
||||
if puo.mutation.WinsCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: player.FieldWins,
|
||||
})
|
||||
_spec.ClearField(player.FieldWins, field.TypeInt)
|
||||
}
|
||||
if value, ok := puo.mutation.Looses(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldLooses,
|
||||
})
|
||||
_spec.SetField(player.FieldLooses, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := puo.mutation.AddedLooses(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldLooses,
|
||||
})
|
||||
_spec.AddField(player.FieldLooses, field.TypeInt, value)
|
||||
}
|
||||
if puo.mutation.LoosesCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: player.FieldLooses,
|
||||
})
|
||||
_spec.ClearField(player.FieldLooses, field.TypeInt)
|
||||
}
|
||||
if value, ok := puo.mutation.Ties(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldTies,
|
||||
})
|
||||
_spec.SetField(player.FieldTies, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := puo.mutation.AddedTies(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: player.FieldTies,
|
||||
})
|
||||
_spec.AddField(player.FieldTies, field.TypeInt, value)
|
||||
}
|
||||
if puo.mutation.TiesCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: player.FieldTies,
|
||||
})
|
||||
_spec.ClearField(player.FieldTies, field.TypeInt)
|
||||
}
|
||||
if puo.mutation.StatsCleared() {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
@@ -1780,7 +1522,7 @@ func (puo *PlayerUpdateOne) sqlSave(ctx context.Context) (_node *Player, err err
|
||||
}
|
||||
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
||||
}
|
||||
_spec.Modifiers = puo.modifiers
|
||||
_spec.AddModifiers(puo.modifiers...)
|
||||
_node = &Player{config: puo.config}
|
||||
_spec.Assign = _node.assignValues
|
||||
_spec.ScanValues = _node.scanValues
|
||||
|
@@ -53,8 +53,8 @@ func (e RoundStatsEdges) MatchPlayerOrErr() (*MatchPlayer, error) {
|
||||
}
|
||||
|
||||
// scanValues returns the types for scanning values from sql.Rows.
|
||||
func (*RoundStats) scanValues(columns []string) ([]interface{}, error) {
|
||||
values := make([]interface{}, len(columns))
|
||||
func (*RoundStats) scanValues(columns []string) ([]any, error) {
|
||||
values := make([]any, len(columns))
|
||||
for i := range columns {
|
||||
switch columns[i] {
|
||||
case roundstats.FieldID, roundstats.FieldRound, roundstats.FieldBank, roundstats.FieldEquipment, roundstats.FieldSpent:
|
||||
@@ -70,7 +70,7 @@ func (*RoundStats) scanValues(columns []string) ([]interface{}, error) {
|
||||
|
||||
// assignValues assigns the values that were returned from sql.Rows (after scanning)
|
||||
// to the RoundStats fields.
|
||||
func (rs *RoundStats) assignValues(columns []string, values []interface{}) error {
|
||||
func (rs *RoundStats) assignValues(columns []string, values []any) error {
|
||||
if m, n := len(values), len(columns); m < n {
|
||||
return fmt.Errorf("mismatch number of scan values: %d != %d", m, n)
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ func IDNEQ(id int) predicate.RoundStats {
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
v := make([]interface{}, len(ids))
|
||||
v := make([]any, len(ids))
|
||||
for i := range v {
|
||||
v[i] = ids[i]
|
||||
}
|
||||
@@ -43,7 +43,7 @@ func IDIn(ids ...int) predicate.RoundStats {
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
v := make([]interface{}, len(ids))
|
||||
v := make([]any, len(ids))
|
||||
for i := range v {
|
||||
v[i] = ids[i]
|
||||
}
|
||||
@@ -123,7 +123,7 @@ func RoundNEQ(v uint) predicate.RoundStats {
|
||||
|
||||
// RoundIn applies the In predicate on the "round" field.
|
||||
func RoundIn(vs ...uint) predicate.RoundStats {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -134,7 +134,7 @@ func RoundIn(vs ...uint) predicate.RoundStats {
|
||||
|
||||
// RoundNotIn applies the NotIn predicate on the "round" field.
|
||||
func RoundNotIn(vs ...uint) predicate.RoundStats {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -187,7 +187,7 @@ func BankNEQ(v uint) predicate.RoundStats {
|
||||
|
||||
// BankIn applies the In predicate on the "bank" field.
|
||||
func BankIn(vs ...uint) predicate.RoundStats {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -198,7 +198,7 @@ func BankIn(vs ...uint) predicate.RoundStats {
|
||||
|
||||
// BankNotIn applies the NotIn predicate on the "bank" field.
|
||||
func BankNotIn(vs ...uint) predicate.RoundStats {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -251,7 +251,7 @@ func EquipmentNEQ(v uint) predicate.RoundStats {
|
||||
|
||||
// EquipmentIn applies the In predicate on the "equipment" field.
|
||||
func EquipmentIn(vs ...uint) predicate.RoundStats {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -262,7 +262,7 @@ func EquipmentIn(vs ...uint) predicate.RoundStats {
|
||||
|
||||
// EquipmentNotIn applies the NotIn predicate on the "equipment" field.
|
||||
func EquipmentNotIn(vs ...uint) predicate.RoundStats {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -315,7 +315,7 @@ func SpentNEQ(v uint) predicate.RoundStats {
|
||||
|
||||
// SpentIn applies the In predicate on the "spent" field.
|
||||
func SpentIn(vs ...uint) predicate.RoundStats {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -326,7 +326,7 @@ func SpentIn(vs ...uint) predicate.RoundStats {
|
||||
|
||||
// SpentNotIn applies the NotIn predicate on the "spent" field.
|
||||
func SpentNotIn(vs ...uint) predicate.RoundStats {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
@@ -179,35 +179,19 @@ func (rsc *RoundStatsCreate) createSpec() (*RoundStats, *sqlgraph.CreateSpec) {
|
||||
}
|
||||
)
|
||||
if value, ok := rsc.mutation.Round(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: roundstats.FieldRound,
|
||||
})
|
||||
_spec.SetField(roundstats.FieldRound, field.TypeUint, value)
|
||||
_node.Round = value
|
||||
}
|
||||
if value, ok := rsc.mutation.Bank(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: roundstats.FieldBank,
|
||||
})
|
||||
_spec.SetField(roundstats.FieldBank, field.TypeUint, value)
|
||||
_node.Bank = value
|
||||
}
|
||||
if value, ok := rsc.mutation.Equipment(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: roundstats.FieldEquipment,
|
||||
})
|
||||
_spec.SetField(roundstats.FieldEquipment, field.TypeUint, value)
|
||||
_node.Equipment = value
|
||||
}
|
||||
if value, ok := rsc.mutation.Spent(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: roundstats.FieldSpent,
|
||||
})
|
||||
_spec.SetField(roundstats.FieldSpent, field.TypeUint, value)
|
||||
_node.Spent = value
|
||||
}
|
||||
if nodes := rsc.mutation.MatchPlayerIDs(); len(nodes) > 0 {
|
||||
|
@@ -333,6 +333,11 @@ func (rsq *RoundStatsQuery) Select(fields ...string) *RoundStatsSelect {
|
||||
return selbuild
|
||||
}
|
||||
|
||||
// Aggregate returns a RoundStatsSelect configured with the given aggregations.
|
||||
func (rsq *RoundStatsQuery) Aggregate(fns ...AggregateFunc) *RoundStatsSelect {
|
||||
return rsq.Select().Aggregate(fns...)
|
||||
}
|
||||
|
||||
func (rsq *RoundStatsQuery) prepareQuery(ctx context.Context) error {
|
||||
for _, f := range rsq.fields {
|
||||
if !roundstats.ValidColumn(f) {
|
||||
@@ -364,10 +369,10 @@ func (rsq *RoundStatsQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*
|
||||
if withFKs {
|
||||
_spec.Node.Columns = append(_spec.Node.Columns, roundstats.ForeignKeys...)
|
||||
}
|
||||
_spec.ScanValues = func(columns []string) ([]interface{}, error) {
|
||||
_spec.ScanValues = func(columns []string) ([]any, error) {
|
||||
return (*RoundStats).scanValues(nil, columns)
|
||||
}
|
||||
_spec.Assign = func(columns []string, values []interface{}) error {
|
||||
_spec.Assign = func(columns []string, values []any) error {
|
||||
node := &RoundStats{config: rsq.config}
|
||||
nodes = append(nodes, node)
|
||||
node.Edges.loadedTypes = loadedTypes
|
||||
@@ -437,11 +442,14 @@ func (rsq *RoundStatsQuery) sqlCount(ctx context.Context) (int, error) {
|
||||
}
|
||||
|
||||
func (rsq *RoundStatsQuery) sqlExist(ctx context.Context) (bool, error) {
|
||||
n, err := rsq.sqlCount(ctx)
|
||||
if err != nil {
|
||||
switch _, err := rsq.FirstID(ctx); {
|
||||
case IsNotFound(err):
|
||||
return false, nil
|
||||
case err != nil:
|
||||
return false, fmt.Errorf("ent: check existence: %w", err)
|
||||
default:
|
||||
return true, nil
|
||||
}
|
||||
return n > 0, nil
|
||||
}
|
||||
|
||||
func (rsq *RoundStatsQuery) querySpec() *sqlgraph.QuerySpec {
|
||||
@@ -551,7 +559,7 @@ func (rsgb *RoundStatsGroupBy) Aggregate(fns ...AggregateFunc) *RoundStatsGroupB
|
||||
}
|
||||
|
||||
// Scan applies the group-by query and scans the result into the given value.
|
||||
func (rsgb *RoundStatsGroupBy) Scan(ctx context.Context, v interface{}) error {
|
||||
func (rsgb *RoundStatsGroupBy) Scan(ctx context.Context, v any) error {
|
||||
query, err := rsgb.path(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -560,7 +568,7 @@ func (rsgb *RoundStatsGroupBy) Scan(ctx context.Context, v interface{}) error {
|
||||
return rsgb.sqlScan(ctx, v)
|
||||
}
|
||||
|
||||
func (rsgb *RoundStatsGroupBy) sqlScan(ctx context.Context, v interface{}) error {
|
||||
func (rsgb *RoundStatsGroupBy) sqlScan(ctx context.Context, v any) error {
|
||||
for _, f := range rsgb.fields {
|
||||
if !roundstats.ValidColumn(f) {
|
||||
return &ValidationError{Name: f, err: fmt.Errorf("invalid field %q for group-by", f)}
|
||||
@@ -585,8 +593,6 @@ func (rsgb *RoundStatsGroupBy) sqlQuery() *sql.Selector {
|
||||
for _, fn := range rsgb.fns {
|
||||
aggregation = append(aggregation, fn(selector))
|
||||
}
|
||||
// If no columns were selected in a custom aggregation function, the default
|
||||
// selection is the fields used for "group-by", and the aggregation functions.
|
||||
if len(selector.SelectedColumns()) == 0 {
|
||||
columns := make([]string, 0, len(rsgb.fields)+len(rsgb.fns))
|
||||
for _, f := range rsgb.fields {
|
||||
@@ -606,8 +612,14 @@ type RoundStatsSelect struct {
|
||||
sql *sql.Selector
|
||||
}
|
||||
|
||||
// Aggregate adds the given aggregation functions to the selector query.
|
||||
func (rss *RoundStatsSelect) Aggregate(fns ...AggregateFunc) *RoundStatsSelect {
|
||||
rss.fns = append(rss.fns, fns...)
|
||||
return rss
|
||||
}
|
||||
|
||||
// Scan applies the selector query and scans the result into the given value.
|
||||
func (rss *RoundStatsSelect) Scan(ctx context.Context, v interface{}) error {
|
||||
func (rss *RoundStatsSelect) Scan(ctx context.Context, v any) error {
|
||||
if err := rss.prepareQuery(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -615,7 +627,17 @@ func (rss *RoundStatsSelect) Scan(ctx context.Context, v interface{}) error {
|
||||
return rss.sqlScan(ctx, v)
|
||||
}
|
||||
|
||||
func (rss *RoundStatsSelect) sqlScan(ctx context.Context, v interface{}) error {
|
||||
func (rss *RoundStatsSelect) sqlScan(ctx context.Context, v any) error {
|
||||
aggregation := make([]string, 0, len(rss.fns))
|
||||
for _, fn := range rss.fns {
|
||||
aggregation = append(aggregation, fn(rss.sql))
|
||||
}
|
||||
switch n := len(*rss.selector.flds); {
|
||||
case n == 0 && len(aggregation) > 0:
|
||||
rss.sql.Select(aggregation...)
|
||||
case n != 0 && len(aggregation) > 0:
|
||||
rss.sql.AppendSelect(aggregation...)
|
||||
}
|
||||
rows := &sql.Rows{}
|
||||
query, args := rss.sql.Query()
|
||||
if err := rss.driver.Query(ctx, query, args, rows); err != nil {
|
||||
|
@@ -190,60 +190,28 @@ func (rsu *RoundStatsUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
}
|
||||
}
|
||||
if value, ok := rsu.mutation.Round(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: roundstats.FieldRound,
|
||||
})
|
||||
_spec.SetField(roundstats.FieldRound, field.TypeUint, value)
|
||||
}
|
||||
if value, ok := rsu.mutation.AddedRound(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: roundstats.FieldRound,
|
||||
})
|
||||
_spec.AddField(roundstats.FieldRound, field.TypeUint, value)
|
||||
}
|
||||
if value, ok := rsu.mutation.Bank(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: roundstats.FieldBank,
|
||||
})
|
||||
_spec.SetField(roundstats.FieldBank, field.TypeUint, value)
|
||||
}
|
||||
if value, ok := rsu.mutation.AddedBank(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: roundstats.FieldBank,
|
||||
})
|
||||
_spec.AddField(roundstats.FieldBank, field.TypeUint, value)
|
||||
}
|
||||
if value, ok := rsu.mutation.Equipment(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: roundstats.FieldEquipment,
|
||||
})
|
||||
_spec.SetField(roundstats.FieldEquipment, field.TypeUint, value)
|
||||
}
|
||||
if value, ok := rsu.mutation.AddedEquipment(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: roundstats.FieldEquipment,
|
||||
})
|
||||
_spec.AddField(roundstats.FieldEquipment, field.TypeUint, value)
|
||||
}
|
||||
if value, ok := rsu.mutation.Spent(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: roundstats.FieldSpent,
|
||||
})
|
||||
_spec.SetField(roundstats.FieldSpent, field.TypeUint, value)
|
||||
}
|
||||
if value, ok := rsu.mutation.AddedSpent(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: roundstats.FieldSpent,
|
||||
})
|
||||
_spec.AddField(roundstats.FieldSpent, field.TypeUint, value)
|
||||
}
|
||||
if rsu.mutation.MatchPlayerCleared() {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
@@ -280,7 +248,7 @@ func (rsu *RoundStatsUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
}
|
||||
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
||||
}
|
||||
_spec.Modifiers = rsu.modifiers
|
||||
_spec.AddModifiers(rsu.modifiers...)
|
||||
if n, err = sqlgraph.UpdateNodes(ctx, rsu.driver, _spec); err != nil {
|
||||
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
||||
err = &NotFoundError{roundstats.Label}
|
||||
@@ -492,60 +460,28 @@ func (rsuo *RoundStatsUpdateOne) sqlSave(ctx context.Context) (_node *RoundStats
|
||||
}
|
||||
}
|
||||
if value, ok := rsuo.mutation.Round(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: roundstats.FieldRound,
|
||||
})
|
||||
_spec.SetField(roundstats.FieldRound, field.TypeUint, value)
|
||||
}
|
||||
if value, ok := rsuo.mutation.AddedRound(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: roundstats.FieldRound,
|
||||
})
|
||||
_spec.AddField(roundstats.FieldRound, field.TypeUint, value)
|
||||
}
|
||||
if value, ok := rsuo.mutation.Bank(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: roundstats.FieldBank,
|
||||
})
|
||||
_spec.SetField(roundstats.FieldBank, field.TypeUint, value)
|
||||
}
|
||||
if value, ok := rsuo.mutation.AddedBank(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: roundstats.FieldBank,
|
||||
})
|
||||
_spec.AddField(roundstats.FieldBank, field.TypeUint, value)
|
||||
}
|
||||
if value, ok := rsuo.mutation.Equipment(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: roundstats.FieldEquipment,
|
||||
})
|
||||
_spec.SetField(roundstats.FieldEquipment, field.TypeUint, value)
|
||||
}
|
||||
if value, ok := rsuo.mutation.AddedEquipment(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: roundstats.FieldEquipment,
|
||||
})
|
||||
_spec.AddField(roundstats.FieldEquipment, field.TypeUint, value)
|
||||
}
|
||||
if value, ok := rsuo.mutation.Spent(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: roundstats.FieldSpent,
|
||||
})
|
||||
_spec.SetField(roundstats.FieldSpent, field.TypeUint, value)
|
||||
}
|
||||
if value, ok := rsuo.mutation.AddedSpent(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: roundstats.FieldSpent,
|
||||
})
|
||||
_spec.AddField(roundstats.FieldSpent, field.TypeUint, value)
|
||||
}
|
||||
if rsuo.mutation.MatchPlayerCleared() {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
@@ -582,7 +518,7 @@ func (rsuo *RoundStatsUpdateOne) sqlSave(ctx context.Context) (_node *RoundStats
|
||||
}
|
||||
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
||||
}
|
||||
_spec.Modifiers = rsuo.modifiers
|
||||
_spec.AddModifiers(rsuo.modifiers...)
|
||||
_node = &RoundStats{config: rsuo.config}
|
||||
_spec.Assign = _node.assignValues
|
||||
_spec.ScanValues = _node.scanValues
|
||||
|
@@ -5,6 +5,6 @@ package runtime
|
||||
// The schema-stitching logic is generated in git.harting.dev/csgowtf/csgowtfd/ent/runtime.go
|
||||
|
||||
const (
|
||||
Version = "v0.11.2" // Version of ent codegen.
|
||||
Sum = "h1:UM2/BUhF2FfsxPHRxLjQbhqJNaDdVlOwNIAMLs2jyto=" // Sum of ent codegen.
|
||||
Version = "v0.11.4" // Version of ent codegen.
|
||||
Sum = "h1:grwVY0fp31BZ6oEo3YrXenAuv8VJmEw7F/Bi6WqeH3Q=" // Sum of ent codegen.
|
||||
)
|
||||
|
@@ -49,8 +49,8 @@ func (e SprayEdges) MatchPlayersOrErr() (*MatchPlayer, error) {
|
||||
}
|
||||
|
||||
// scanValues returns the types for scanning values from sql.Rows.
|
||||
func (*Spray) scanValues(columns []string) ([]interface{}, error) {
|
||||
values := make([]interface{}, len(columns))
|
||||
func (*Spray) scanValues(columns []string) ([]any, error) {
|
||||
values := make([]any, len(columns))
|
||||
for i := range columns {
|
||||
switch columns[i] {
|
||||
case spray.FieldSpray:
|
||||
@@ -68,7 +68,7 @@ func (*Spray) scanValues(columns []string) ([]interface{}, error) {
|
||||
|
||||
// assignValues assigns the values that were returned from sql.Rows (after scanning)
|
||||
// to the Spray fields.
|
||||
func (s *Spray) assignValues(columns []string, values []interface{}) error {
|
||||
func (s *Spray) assignValues(columns []string, values []any) error {
|
||||
if m, n := len(values), len(columns); m < n {
|
||||
return fmt.Errorf("mismatch number of scan values: %d != %d", m, n)
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ func IDNEQ(id int) predicate.Spray {
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.Spray {
|
||||
return predicate.Spray(func(s *sql.Selector) {
|
||||
v := make([]interface{}, len(ids))
|
||||
v := make([]any, len(ids))
|
||||
for i := range v {
|
||||
v[i] = ids[i]
|
||||
}
|
||||
@@ -43,7 +43,7 @@ func IDIn(ids ...int) predicate.Spray {
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.Spray {
|
||||
return predicate.Spray(func(s *sql.Selector) {
|
||||
v := make([]interface{}, len(ids))
|
||||
v := make([]any, len(ids))
|
||||
for i := range v {
|
||||
v[i] = ids[i]
|
||||
}
|
||||
@@ -109,7 +109,7 @@ func WeaponNEQ(v int) predicate.Spray {
|
||||
|
||||
// WeaponIn applies the In predicate on the "weapon" field.
|
||||
func WeaponIn(vs ...int) predicate.Spray {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -120,7 +120,7 @@ func WeaponIn(vs ...int) predicate.Spray {
|
||||
|
||||
// WeaponNotIn applies the NotIn predicate on the "weapon" field.
|
||||
func WeaponNotIn(vs ...int) predicate.Spray {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -173,7 +173,7 @@ func SprayNEQ(v []byte) predicate.Spray {
|
||||
|
||||
// SprayIn applies the In predicate on the "spray" field.
|
||||
func SprayIn(vs ...[]byte) predicate.Spray {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -184,7 +184,7 @@ func SprayIn(vs ...[]byte) predicate.Spray {
|
||||
|
||||
// SprayNotIn applies the NotIn predicate on the "spray" field.
|
||||
func SprayNotIn(vs ...[]byte) predicate.Spray {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
@@ -161,19 +161,11 @@ func (sc *SprayCreate) createSpec() (*Spray, *sqlgraph.CreateSpec) {
|
||||
}
|
||||
)
|
||||
if value, ok := sc.mutation.Weapon(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: spray.FieldWeapon,
|
||||
})
|
||||
_spec.SetField(spray.FieldWeapon, field.TypeInt, value)
|
||||
_node.Weapon = value
|
||||
}
|
||||
if value, ok := sc.mutation.Spray(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeBytes,
|
||||
Value: value,
|
||||
Column: spray.FieldSpray,
|
||||
})
|
||||
_spec.SetField(spray.FieldSpray, field.TypeBytes, value)
|
||||
_node.Spray = value
|
||||
}
|
||||
if nodes := sc.mutation.MatchPlayersIDs(); len(nodes) > 0 {
|
||||
|
@@ -333,6 +333,11 @@ func (sq *SprayQuery) Select(fields ...string) *SpraySelect {
|
||||
return selbuild
|
||||
}
|
||||
|
||||
// Aggregate returns a SpraySelect configured with the given aggregations.
|
||||
func (sq *SprayQuery) Aggregate(fns ...AggregateFunc) *SpraySelect {
|
||||
return sq.Select().Aggregate(fns...)
|
||||
}
|
||||
|
||||
func (sq *SprayQuery) prepareQuery(ctx context.Context) error {
|
||||
for _, f := range sq.fields {
|
||||
if !spray.ValidColumn(f) {
|
||||
@@ -364,10 +369,10 @@ func (sq *SprayQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Spray,
|
||||
if withFKs {
|
||||
_spec.Node.Columns = append(_spec.Node.Columns, spray.ForeignKeys...)
|
||||
}
|
||||
_spec.ScanValues = func(columns []string) ([]interface{}, error) {
|
||||
_spec.ScanValues = func(columns []string) ([]any, error) {
|
||||
return (*Spray).scanValues(nil, columns)
|
||||
}
|
||||
_spec.Assign = func(columns []string, values []interface{}) error {
|
||||
_spec.Assign = func(columns []string, values []any) error {
|
||||
node := &Spray{config: sq.config}
|
||||
nodes = append(nodes, node)
|
||||
node.Edges.loadedTypes = loadedTypes
|
||||
@@ -437,11 +442,14 @@ func (sq *SprayQuery) sqlCount(ctx context.Context) (int, error) {
|
||||
}
|
||||
|
||||
func (sq *SprayQuery) sqlExist(ctx context.Context) (bool, error) {
|
||||
n, err := sq.sqlCount(ctx)
|
||||
if err != nil {
|
||||
switch _, err := sq.FirstID(ctx); {
|
||||
case IsNotFound(err):
|
||||
return false, nil
|
||||
case err != nil:
|
||||
return false, fmt.Errorf("ent: check existence: %w", err)
|
||||
default:
|
||||
return true, nil
|
||||
}
|
||||
return n > 0, nil
|
||||
}
|
||||
|
||||
func (sq *SprayQuery) querySpec() *sqlgraph.QuerySpec {
|
||||
@@ -551,7 +559,7 @@ func (sgb *SprayGroupBy) Aggregate(fns ...AggregateFunc) *SprayGroupBy {
|
||||
}
|
||||
|
||||
// Scan applies the group-by query and scans the result into the given value.
|
||||
func (sgb *SprayGroupBy) Scan(ctx context.Context, v interface{}) error {
|
||||
func (sgb *SprayGroupBy) Scan(ctx context.Context, v any) error {
|
||||
query, err := sgb.path(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -560,7 +568,7 @@ func (sgb *SprayGroupBy) Scan(ctx context.Context, v interface{}) error {
|
||||
return sgb.sqlScan(ctx, v)
|
||||
}
|
||||
|
||||
func (sgb *SprayGroupBy) sqlScan(ctx context.Context, v interface{}) error {
|
||||
func (sgb *SprayGroupBy) sqlScan(ctx context.Context, v any) error {
|
||||
for _, f := range sgb.fields {
|
||||
if !spray.ValidColumn(f) {
|
||||
return &ValidationError{Name: f, err: fmt.Errorf("invalid field %q for group-by", f)}
|
||||
@@ -585,8 +593,6 @@ func (sgb *SprayGroupBy) sqlQuery() *sql.Selector {
|
||||
for _, fn := range sgb.fns {
|
||||
aggregation = append(aggregation, fn(selector))
|
||||
}
|
||||
// If no columns were selected in a custom aggregation function, the default
|
||||
// selection is the fields used for "group-by", and the aggregation functions.
|
||||
if len(selector.SelectedColumns()) == 0 {
|
||||
columns := make([]string, 0, len(sgb.fields)+len(sgb.fns))
|
||||
for _, f := range sgb.fields {
|
||||
@@ -606,8 +612,14 @@ type SpraySelect struct {
|
||||
sql *sql.Selector
|
||||
}
|
||||
|
||||
// Aggregate adds the given aggregation functions to the selector query.
|
||||
func (ss *SpraySelect) Aggregate(fns ...AggregateFunc) *SpraySelect {
|
||||
ss.fns = append(ss.fns, fns...)
|
||||
return ss
|
||||
}
|
||||
|
||||
// Scan applies the selector query and scans the result into the given value.
|
||||
func (ss *SpraySelect) Scan(ctx context.Context, v interface{}) error {
|
||||
func (ss *SpraySelect) Scan(ctx context.Context, v any) error {
|
||||
if err := ss.prepareQuery(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -615,7 +627,17 @@ func (ss *SpraySelect) Scan(ctx context.Context, v interface{}) error {
|
||||
return ss.sqlScan(ctx, v)
|
||||
}
|
||||
|
||||
func (ss *SpraySelect) sqlScan(ctx context.Context, v interface{}) error {
|
||||
func (ss *SpraySelect) sqlScan(ctx context.Context, v any) error {
|
||||
aggregation := make([]string, 0, len(ss.fns))
|
||||
for _, fn := range ss.fns {
|
||||
aggregation = append(aggregation, fn(ss.sql))
|
||||
}
|
||||
switch n := len(*ss.selector.flds); {
|
||||
case n == 0 && len(aggregation) > 0:
|
||||
ss.sql.Select(aggregation...)
|
||||
case n != 0 && len(aggregation) > 0:
|
||||
ss.sql.AppendSelect(aggregation...)
|
||||
}
|
||||
rows := &sql.Rows{}
|
||||
query, args := ss.sql.Query()
|
||||
if err := ss.driver.Query(ctx, query, args, rows); err != nil {
|
||||
|
@@ -157,25 +157,13 @@ func (su *SprayUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
}
|
||||
}
|
||||
if value, ok := su.mutation.Weapon(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: spray.FieldWeapon,
|
||||
})
|
||||
_spec.SetField(spray.FieldWeapon, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := su.mutation.AddedWeapon(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: spray.FieldWeapon,
|
||||
})
|
||||
_spec.AddField(spray.FieldWeapon, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := su.mutation.Spray(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeBytes,
|
||||
Value: value,
|
||||
Column: spray.FieldSpray,
|
||||
})
|
||||
_spec.SetField(spray.FieldSpray, field.TypeBytes, value)
|
||||
}
|
||||
if su.mutation.MatchPlayersCleared() {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
@@ -212,7 +200,7 @@ func (su *SprayUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
}
|
||||
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
||||
}
|
||||
_spec.Modifiers = su.modifiers
|
||||
_spec.AddModifiers(su.modifiers...)
|
||||
if n, err = sqlgraph.UpdateNodes(ctx, su.driver, _spec); err != nil {
|
||||
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
||||
err = &NotFoundError{spray.Label}
|
||||
@@ -391,25 +379,13 @@ func (suo *SprayUpdateOne) sqlSave(ctx context.Context) (_node *Spray, err error
|
||||
}
|
||||
}
|
||||
if value, ok := suo.mutation.Weapon(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: spray.FieldWeapon,
|
||||
})
|
||||
_spec.SetField(spray.FieldWeapon, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := suo.mutation.AddedWeapon(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: spray.FieldWeapon,
|
||||
})
|
||||
_spec.AddField(spray.FieldWeapon, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := suo.mutation.Spray(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeBytes,
|
||||
Value: value,
|
||||
Column: spray.FieldSpray,
|
||||
})
|
||||
_spec.SetField(spray.FieldSpray, field.TypeBytes, value)
|
||||
}
|
||||
if suo.mutation.MatchPlayersCleared() {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
@@ -446,7 +422,7 @@ func (suo *SprayUpdateOne) sqlSave(ctx context.Context) (_node *Spray, err error
|
||||
}
|
||||
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
||||
}
|
||||
_spec.Modifiers = suo.modifiers
|
||||
_spec.AddModifiers(suo.modifiers...)
|
||||
_node = &Spray{config: suo.config}
|
||||
_spec.Assign = _node.assignValues
|
||||
_spec.ScanValues = _node.scanValues
|
||||
|
40
ent/tx.go
40
ent/tx.go
@@ -30,12 +30,6 @@ type Tx struct {
|
||||
// lazily loaded.
|
||||
client *Client
|
||||
clientOnce sync.Once
|
||||
|
||||
// completion callbacks.
|
||||
mu sync.Mutex
|
||||
onCommit []CommitHook
|
||||
onRollback []RollbackHook
|
||||
|
||||
// ctx lives for the life of the transaction. It is
|
||||
// the same context used by the underlying connection.
|
||||
ctx context.Context
|
||||
@@ -80,9 +74,9 @@ func (tx *Tx) Commit() error {
|
||||
var fn Committer = CommitFunc(func(context.Context, *Tx) error {
|
||||
return txDriver.tx.Commit()
|
||||
})
|
||||
tx.mu.Lock()
|
||||
hooks := append([]CommitHook(nil), tx.onCommit...)
|
||||
tx.mu.Unlock()
|
||||
txDriver.mu.Lock()
|
||||
hooks := append([]CommitHook(nil), txDriver.onCommit...)
|
||||
txDriver.mu.Unlock()
|
||||
for i := len(hooks) - 1; i >= 0; i-- {
|
||||
fn = hooks[i](fn)
|
||||
}
|
||||
@@ -91,9 +85,10 @@ func (tx *Tx) Commit() error {
|
||||
|
||||
// OnCommit adds a hook to call on commit.
|
||||
func (tx *Tx) OnCommit(f CommitHook) {
|
||||
tx.mu.Lock()
|
||||
defer tx.mu.Unlock()
|
||||
tx.onCommit = append(tx.onCommit, f)
|
||||
txDriver := tx.config.driver.(*txDriver)
|
||||
txDriver.mu.Lock()
|
||||
txDriver.onCommit = append(txDriver.onCommit, f)
|
||||
txDriver.mu.Unlock()
|
||||
}
|
||||
|
||||
type (
|
||||
@@ -135,9 +130,9 @@ func (tx *Tx) Rollback() error {
|
||||
var fn Rollbacker = RollbackFunc(func(context.Context, *Tx) error {
|
||||
return txDriver.tx.Rollback()
|
||||
})
|
||||
tx.mu.Lock()
|
||||
hooks := append([]RollbackHook(nil), tx.onRollback...)
|
||||
tx.mu.Unlock()
|
||||
txDriver.mu.Lock()
|
||||
hooks := append([]RollbackHook(nil), txDriver.onRollback...)
|
||||
txDriver.mu.Unlock()
|
||||
for i := len(hooks) - 1; i >= 0; i-- {
|
||||
fn = hooks[i](fn)
|
||||
}
|
||||
@@ -146,9 +141,10 @@ func (tx *Tx) Rollback() error {
|
||||
|
||||
// OnRollback adds a hook to call on rollback.
|
||||
func (tx *Tx) OnRollback(f RollbackHook) {
|
||||
tx.mu.Lock()
|
||||
defer tx.mu.Unlock()
|
||||
tx.onRollback = append(tx.onRollback, f)
|
||||
txDriver := tx.config.driver.(*txDriver)
|
||||
txDriver.mu.Lock()
|
||||
txDriver.onRollback = append(txDriver.onRollback, f)
|
||||
txDriver.mu.Unlock()
|
||||
}
|
||||
|
||||
// Client returns a Client that binds to current transaction.
|
||||
@@ -186,6 +182,10 @@ type txDriver struct {
|
||||
drv dialect.Driver
|
||||
// tx is the underlying transaction.
|
||||
tx dialect.Tx
|
||||
// completion hooks.
|
||||
mu sync.Mutex
|
||||
onCommit []CommitHook
|
||||
onRollback []RollbackHook
|
||||
}
|
||||
|
||||
// newTx creates a new transactional driver.
|
||||
@@ -216,12 +216,12 @@ func (*txDriver) Commit() error { return nil }
|
||||
func (*txDriver) Rollback() error { return nil }
|
||||
|
||||
// Exec calls tx.Exec.
|
||||
func (tx *txDriver) Exec(ctx context.Context, query string, args, v interface{}) error {
|
||||
func (tx *txDriver) Exec(ctx context.Context, query string, args, v any) error {
|
||||
return tx.tx.Exec(ctx, query, args, v)
|
||||
}
|
||||
|
||||
// Query calls tx.Query.
|
||||
func (tx *txDriver) Query(ctx context.Context, query string, args, v interface{}) error {
|
||||
func (tx *txDriver) Query(ctx context.Context, query string, args, v any) error {
|
||||
return tx.tx.Query(ctx, query, args, v)
|
||||
}
|
||||
|
||||
|
@@ -53,8 +53,8 @@ func (e WeaponEdges) StatOrErr() (*MatchPlayer, error) {
|
||||
}
|
||||
|
||||
// scanValues returns the types for scanning values from sql.Rows.
|
||||
func (*Weapon) scanValues(columns []string) ([]interface{}, error) {
|
||||
values := make([]interface{}, len(columns))
|
||||
func (*Weapon) scanValues(columns []string) ([]any, error) {
|
||||
values := make([]any, len(columns))
|
||||
for i := range columns {
|
||||
switch columns[i] {
|
||||
case weapon.FieldID, weapon.FieldVictim, weapon.FieldDmg, weapon.FieldEqType, weapon.FieldHitGroup:
|
||||
@@ -70,7 +70,7 @@ func (*Weapon) scanValues(columns []string) ([]interface{}, error) {
|
||||
|
||||
// assignValues assigns the values that were returned from sql.Rows (after scanning)
|
||||
// to the Weapon fields.
|
||||
func (w *Weapon) assignValues(columns []string, values []interface{}) error {
|
||||
func (w *Weapon) assignValues(columns []string, values []any) error {
|
||||
if m, n := len(values), len(columns); m < n {
|
||||
return fmt.Errorf("mismatch number of scan values: %d != %d", m, n)
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ func IDNEQ(id int) predicate.Weapon {
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.Weapon {
|
||||
return predicate.Weapon(func(s *sql.Selector) {
|
||||
v := make([]interface{}, len(ids))
|
||||
v := make([]any, len(ids))
|
||||
for i := range v {
|
||||
v[i] = ids[i]
|
||||
}
|
||||
@@ -43,7 +43,7 @@ func IDIn(ids ...int) predicate.Weapon {
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.Weapon {
|
||||
return predicate.Weapon(func(s *sql.Selector) {
|
||||
v := make([]interface{}, len(ids))
|
||||
v := make([]any, len(ids))
|
||||
for i := range v {
|
||||
v[i] = ids[i]
|
||||
}
|
||||
@@ -123,7 +123,7 @@ func VictimNEQ(v uint64) predicate.Weapon {
|
||||
|
||||
// VictimIn applies the In predicate on the "victim" field.
|
||||
func VictimIn(vs ...uint64) predicate.Weapon {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -134,7 +134,7 @@ func VictimIn(vs ...uint64) predicate.Weapon {
|
||||
|
||||
// VictimNotIn applies the NotIn predicate on the "victim" field.
|
||||
func VictimNotIn(vs ...uint64) predicate.Weapon {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -187,7 +187,7 @@ func DmgNEQ(v uint) predicate.Weapon {
|
||||
|
||||
// DmgIn applies the In predicate on the "dmg" field.
|
||||
func DmgIn(vs ...uint) predicate.Weapon {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -198,7 +198,7 @@ func DmgIn(vs ...uint) predicate.Weapon {
|
||||
|
||||
// DmgNotIn applies the NotIn predicate on the "dmg" field.
|
||||
func DmgNotIn(vs ...uint) predicate.Weapon {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -251,7 +251,7 @@ func EqTypeNEQ(v int) predicate.Weapon {
|
||||
|
||||
// EqTypeIn applies the In predicate on the "eq_type" field.
|
||||
func EqTypeIn(vs ...int) predicate.Weapon {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -262,7 +262,7 @@ func EqTypeIn(vs ...int) predicate.Weapon {
|
||||
|
||||
// EqTypeNotIn applies the NotIn predicate on the "eq_type" field.
|
||||
func EqTypeNotIn(vs ...int) predicate.Weapon {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -315,7 +315,7 @@ func HitGroupNEQ(v int) predicate.Weapon {
|
||||
|
||||
// HitGroupIn applies the In predicate on the "hit_group" field.
|
||||
func HitGroupIn(vs ...int) predicate.Weapon {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
@@ -326,7 +326,7 @@ func HitGroupIn(vs ...int) predicate.Weapon {
|
||||
|
||||
// HitGroupNotIn applies the NotIn predicate on the "hit_group" field.
|
||||
func HitGroupNotIn(vs ...int) predicate.Weapon {
|
||||
v := make([]interface{}, len(vs))
|
||||
v := make([]any, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
|
@@ -179,35 +179,19 @@ func (wc *WeaponCreate) createSpec() (*Weapon, *sqlgraph.CreateSpec) {
|
||||
}
|
||||
)
|
||||
if value, ok := wc.mutation.Victim(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Value: value,
|
||||
Column: weapon.FieldVictim,
|
||||
})
|
||||
_spec.SetField(weapon.FieldVictim, field.TypeUint64, value)
|
||||
_node.Victim = value
|
||||
}
|
||||
if value, ok := wc.mutation.Dmg(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: weapon.FieldDmg,
|
||||
})
|
||||
_spec.SetField(weapon.FieldDmg, field.TypeUint, value)
|
||||
_node.Dmg = value
|
||||
}
|
||||
if value, ok := wc.mutation.EqType(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: weapon.FieldEqType,
|
||||
})
|
||||
_spec.SetField(weapon.FieldEqType, field.TypeInt, value)
|
||||
_node.EqType = value
|
||||
}
|
||||
if value, ok := wc.mutation.HitGroup(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: weapon.FieldHitGroup,
|
||||
})
|
||||
_spec.SetField(weapon.FieldHitGroup, field.TypeInt, value)
|
||||
_node.HitGroup = value
|
||||
}
|
||||
if nodes := wc.mutation.StatIDs(); len(nodes) > 0 {
|
||||
|
@@ -333,6 +333,11 @@ func (wq *WeaponQuery) Select(fields ...string) *WeaponSelect {
|
||||
return selbuild
|
||||
}
|
||||
|
||||
// Aggregate returns a WeaponSelect configured with the given aggregations.
|
||||
func (wq *WeaponQuery) Aggregate(fns ...AggregateFunc) *WeaponSelect {
|
||||
return wq.Select().Aggregate(fns...)
|
||||
}
|
||||
|
||||
func (wq *WeaponQuery) prepareQuery(ctx context.Context) error {
|
||||
for _, f := range wq.fields {
|
||||
if !weapon.ValidColumn(f) {
|
||||
@@ -364,10 +369,10 @@ func (wq *WeaponQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Weapo
|
||||
if withFKs {
|
||||
_spec.Node.Columns = append(_spec.Node.Columns, weapon.ForeignKeys...)
|
||||
}
|
||||
_spec.ScanValues = func(columns []string) ([]interface{}, error) {
|
||||
_spec.ScanValues = func(columns []string) ([]any, error) {
|
||||
return (*Weapon).scanValues(nil, columns)
|
||||
}
|
||||
_spec.Assign = func(columns []string, values []interface{}) error {
|
||||
_spec.Assign = func(columns []string, values []any) error {
|
||||
node := &Weapon{config: wq.config}
|
||||
nodes = append(nodes, node)
|
||||
node.Edges.loadedTypes = loadedTypes
|
||||
@@ -437,11 +442,14 @@ func (wq *WeaponQuery) sqlCount(ctx context.Context) (int, error) {
|
||||
}
|
||||
|
||||
func (wq *WeaponQuery) sqlExist(ctx context.Context) (bool, error) {
|
||||
n, err := wq.sqlCount(ctx)
|
||||
if err != nil {
|
||||
switch _, err := wq.FirstID(ctx); {
|
||||
case IsNotFound(err):
|
||||
return false, nil
|
||||
case err != nil:
|
||||
return false, fmt.Errorf("ent: check existence: %w", err)
|
||||
default:
|
||||
return true, nil
|
||||
}
|
||||
return n > 0, nil
|
||||
}
|
||||
|
||||
func (wq *WeaponQuery) querySpec() *sqlgraph.QuerySpec {
|
||||
@@ -551,7 +559,7 @@ func (wgb *WeaponGroupBy) Aggregate(fns ...AggregateFunc) *WeaponGroupBy {
|
||||
}
|
||||
|
||||
// Scan applies the group-by query and scans the result into the given value.
|
||||
func (wgb *WeaponGroupBy) Scan(ctx context.Context, v interface{}) error {
|
||||
func (wgb *WeaponGroupBy) Scan(ctx context.Context, v any) error {
|
||||
query, err := wgb.path(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -560,7 +568,7 @@ func (wgb *WeaponGroupBy) Scan(ctx context.Context, v interface{}) error {
|
||||
return wgb.sqlScan(ctx, v)
|
||||
}
|
||||
|
||||
func (wgb *WeaponGroupBy) sqlScan(ctx context.Context, v interface{}) error {
|
||||
func (wgb *WeaponGroupBy) sqlScan(ctx context.Context, v any) error {
|
||||
for _, f := range wgb.fields {
|
||||
if !weapon.ValidColumn(f) {
|
||||
return &ValidationError{Name: f, err: fmt.Errorf("invalid field %q for group-by", f)}
|
||||
@@ -585,8 +593,6 @@ func (wgb *WeaponGroupBy) sqlQuery() *sql.Selector {
|
||||
for _, fn := range wgb.fns {
|
||||
aggregation = append(aggregation, fn(selector))
|
||||
}
|
||||
// If no columns were selected in a custom aggregation function, the default
|
||||
// selection is the fields used for "group-by", and the aggregation functions.
|
||||
if len(selector.SelectedColumns()) == 0 {
|
||||
columns := make([]string, 0, len(wgb.fields)+len(wgb.fns))
|
||||
for _, f := range wgb.fields {
|
||||
@@ -606,8 +612,14 @@ type WeaponSelect struct {
|
||||
sql *sql.Selector
|
||||
}
|
||||
|
||||
// Aggregate adds the given aggregation functions to the selector query.
|
||||
func (ws *WeaponSelect) Aggregate(fns ...AggregateFunc) *WeaponSelect {
|
||||
ws.fns = append(ws.fns, fns...)
|
||||
return ws
|
||||
}
|
||||
|
||||
// Scan applies the selector query and scans the result into the given value.
|
||||
func (ws *WeaponSelect) Scan(ctx context.Context, v interface{}) error {
|
||||
func (ws *WeaponSelect) Scan(ctx context.Context, v any) error {
|
||||
if err := ws.prepareQuery(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -615,7 +627,17 @@ func (ws *WeaponSelect) Scan(ctx context.Context, v interface{}) error {
|
||||
return ws.sqlScan(ctx, v)
|
||||
}
|
||||
|
||||
func (ws *WeaponSelect) sqlScan(ctx context.Context, v interface{}) error {
|
||||
func (ws *WeaponSelect) sqlScan(ctx context.Context, v any) error {
|
||||
aggregation := make([]string, 0, len(ws.fns))
|
||||
for _, fn := range ws.fns {
|
||||
aggregation = append(aggregation, fn(ws.sql))
|
||||
}
|
||||
switch n := len(*ws.selector.flds); {
|
||||
case n == 0 && len(aggregation) > 0:
|
||||
ws.sql.Select(aggregation...)
|
||||
case n != 0 && len(aggregation) > 0:
|
||||
ws.sql.AppendSelect(aggregation...)
|
||||
}
|
||||
rows := &sql.Rows{}
|
||||
query, args := ws.sql.Query()
|
||||
if err := ws.driver.Query(ctx, query, args, rows); err != nil {
|
||||
|
@@ -190,60 +190,28 @@ func (wu *WeaponUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
}
|
||||
}
|
||||
if value, ok := wu.mutation.Victim(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Value: value,
|
||||
Column: weapon.FieldVictim,
|
||||
})
|
||||
_spec.SetField(weapon.FieldVictim, field.TypeUint64, value)
|
||||
}
|
||||
if value, ok := wu.mutation.AddedVictim(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Value: value,
|
||||
Column: weapon.FieldVictim,
|
||||
})
|
||||
_spec.AddField(weapon.FieldVictim, field.TypeUint64, value)
|
||||
}
|
||||
if value, ok := wu.mutation.Dmg(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: weapon.FieldDmg,
|
||||
})
|
||||
_spec.SetField(weapon.FieldDmg, field.TypeUint, value)
|
||||
}
|
||||
if value, ok := wu.mutation.AddedDmg(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: weapon.FieldDmg,
|
||||
})
|
||||
_spec.AddField(weapon.FieldDmg, field.TypeUint, value)
|
||||
}
|
||||
if value, ok := wu.mutation.EqType(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: weapon.FieldEqType,
|
||||
})
|
||||
_spec.SetField(weapon.FieldEqType, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := wu.mutation.AddedEqType(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: weapon.FieldEqType,
|
||||
})
|
||||
_spec.AddField(weapon.FieldEqType, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := wu.mutation.HitGroup(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: weapon.FieldHitGroup,
|
||||
})
|
||||
_spec.SetField(weapon.FieldHitGroup, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := wu.mutation.AddedHitGroup(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: weapon.FieldHitGroup,
|
||||
})
|
||||
_spec.AddField(weapon.FieldHitGroup, field.TypeInt, value)
|
||||
}
|
||||
if wu.mutation.StatCleared() {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
@@ -280,7 +248,7 @@ func (wu *WeaponUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
}
|
||||
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
||||
}
|
||||
_spec.Modifiers = wu.modifiers
|
||||
_spec.AddModifiers(wu.modifiers...)
|
||||
if n, err = sqlgraph.UpdateNodes(ctx, wu.driver, _spec); err != nil {
|
||||
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
||||
err = &NotFoundError{weapon.Label}
|
||||
@@ -492,60 +460,28 @@ func (wuo *WeaponUpdateOne) sqlSave(ctx context.Context) (_node *Weapon, err err
|
||||
}
|
||||
}
|
||||
if value, ok := wuo.mutation.Victim(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Value: value,
|
||||
Column: weapon.FieldVictim,
|
||||
})
|
||||
_spec.SetField(weapon.FieldVictim, field.TypeUint64, value)
|
||||
}
|
||||
if value, ok := wuo.mutation.AddedVictim(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint64,
|
||||
Value: value,
|
||||
Column: weapon.FieldVictim,
|
||||
})
|
||||
_spec.AddField(weapon.FieldVictim, field.TypeUint64, value)
|
||||
}
|
||||
if value, ok := wuo.mutation.Dmg(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: weapon.FieldDmg,
|
||||
})
|
||||
_spec.SetField(weapon.FieldDmg, field.TypeUint, value)
|
||||
}
|
||||
if value, ok := wuo.mutation.AddedDmg(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeUint,
|
||||
Value: value,
|
||||
Column: weapon.FieldDmg,
|
||||
})
|
||||
_spec.AddField(weapon.FieldDmg, field.TypeUint, value)
|
||||
}
|
||||
if value, ok := wuo.mutation.EqType(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: weapon.FieldEqType,
|
||||
})
|
||||
_spec.SetField(weapon.FieldEqType, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := wuo.mutation.AddedEqType(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: weapon.FieldEqType,
|
||||
})
|
||||
_spec.AddField(weapon.FieldEqType, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := wuo.mutation.HitGroup(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: weapon.FieldHitGroup,
|
||||
})
|
||||
_spec.SetField(weapon.FieldHitGroup, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := wuo.mutation.AddedHitGroup(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Value: value,
|
||||
Column: weapon.FieldHitGroup,
|
||||
})
|
||||
_spec.AddField(weapon.FieldHitGroup, field.TypeInt, value)
|
||||
}
|
||||
if wuo.mutation.StatCleared() {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
@@ -582,7 +518,7 @@ func (wuo *WeaponUpdateOne) sqlSave(ctx context.Context) (_node *Weapon, err err
|
||||
}
|
||||
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
||||
}
|
||||
_spec.Modifiers = wuo.modifiers
|
||||
_spec.AddModifiers(wuo.modifiers...)
|
||||
_node = &Weapon{config: wuo.config}
|
||||
_spec.Assign = _node.assignValues
|
||||
_spec.ScanValues = _node.scanValues
|
||||
|
36
go.mod
36
go.mod
@@ -3,7 +3,7 @@ module git.harting.dev/csgowtf/csgowtfd
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
entgo.io/ent v0.11.2
|
||||
entgo.io/ent v0.11.4
|
||||
github.com/an0nfunc/go-steam/v3 v3.0.6
|
||||
github.com/an0nfunc/go-steamapi v1.1.0
|
||||
github.com/gin-contrib/cors v1.4.0
|
||||
@@ -12,19 +12,19 @@ require (
|
||||
github.com/go-redis/redis/v8 v8.11.5
|
||||
github.com/golang/geo v0.0.0-20210211234256-740aa86cb551
|
||||
github.com/gorilla/mux v1.8.0
|
||||
github.com/jackc/pgx/v4 v4.17.0
|
||||
github.com/markus-wa/demoinfocs-golang/v3 v3.0.0
|
||||
github.com/jackc/pgx/v4 v4.17.2
|
||||
github.com/markus-wa/demoinfocs-golang/v3 v3.0.1
|
||||
github.com/sethvargo/go-retry v0.2.3
|
||||
github.com/sirupsen/logrus v1.9.0
|
||||
github.com/wercker/journalhook v0.0.0-20180428041537-5d0a5ae867b3
|
||||
golang.org/x/text v0.3.7
|
||||
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9
|
||||
golang.org/x/text v0.4.0
|
||||
golang.org/x/time v0.1.0
|
||||
google.golang.org/protobuf v1.28.1
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
)
|
||||
|
||||
require (
|
||||
ariga.io/atlas v0.6.3 // indirect
|
||||
ariga.io/atlas v0.8.1 // indirect
|
||||
github.com/agext/levenshtein v1.2.3 // indirect
|
||||
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
@@ -35,11 +35,11 @@ require (
|
||||
github.com/go-openapi/inflect v0.19.0 // indirect
|
||||
github.com/go-playground/locales v0.14.0 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.0 // indirect
|
||||
github.com/go-playground/validator/v10 v10.11.0 // indirect
|
||||
github.com/go-playground/validator/v10 v10.11.1 // indirect
|
||||
github.com/goccy/go-json v0.9.11 // indirect
|
||||
github.com/google/go-cmp v0.5.8 // indirect
|
||||
github.com/google/go-cmp v0.5.9 // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/hashicorp/hcl/v2 v2.13.0 // indirect
|
||||
github.com/hashicorp/hcl/v2 v2.14.1 // indirect
|
||||
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
|
||||
github.com/jackc/pgconn v1.13.0 // indirect
|
||||
github.com/jackc/pgio v1.0.0 // indirect
|
||||
@@ -48,7 +48,7 @@ require (
|
||||
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
|
||||
github.com/jackc/pgtype v1.12.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/klauspost/compress v1.15.9 // indirect
|
||||
github.com/klauspost/compress v1.15.12 // indirect
|
||||
github.com/leodido/go-urn v1.2.1 // indirect
|
||||
github.com/markus-wa/go-unassert v0.1.2 // indirect
|
||||
github.com/markus-wa/gobitread v0.2.3 // indirect
|
||||
@@ -59,18 +59,18 @@ require (
|
||||
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.3 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/ugorji/go/codec v1.2.7 // indirect
|
||||
github.com/vmihailenco/go-tinylfu v0.2.2 // indirect
|
||||
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
|
||||
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
|
||||
github.com/zclconf/go-cty v1.11.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20220824171710-5757bc0c5503 // indirect
|
||||
golang.org/x/exp v0.0.0-20220823124025-807a23277127 // indirect
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
|
||||
golang.org/x/net v0.0.0-20220822230855-b0a4917ee28c // indirect
|
||||
golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde // indirect
|
||||
golang.org/x/sys v0.0.0-20220823224334-20c2bfdbfe24 // indirect
|
||||
github.com/zclconf/go-cty v1.12.0 // indirect
|
||||
golang.org/x/crypto v0.1.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20221031165847-c99f073a8326 // indirect
|
||||
golang.org/x/mod v0.6.0 // indirect
|
||||
golang.org/x/net v0.1.0 // indirect
|
||||
golang.org/x/sync v0.1.0 // indirect
|
||||
golang.org/x/sys v0.1.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
)
|
||||
|
78
go.sum
78
go.sum
@@ -1,10 +1,10 @@
|
||||
ariga.io/atlas v0.6.3 h1:MtT4OxHqkW0XgYRjvqU4bmmv+42U1lvw9u8HzJ8yK9c=
|
||||
ariga.io/atlas v0.6.3/go.mod h1:ft47uSh5hWGDCmQC9DsztZg6Xk+KagM5Ts/mZYKb9JE=
|
||||
ariga.io/atlas v0.8.1 h1:eTZS+qyBpqMTkCbatFquYXIqGPAIEzjQzkVXlOwkcEY=
|
||||
ariga.io/atlas v0.8.1/go.mod h1:ft47uSh5hWGDCmQC9DsztZg6Xk+KagM5Ts/mZYKb9JE=
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
entgo.io/ent v0.11.2 h1:UM2/BUhF2FfsxPHRxLjQbhqJNaDdVlOwNIAMLs2jyto=
|
||||
entgo.io/ent v0.11.2/go.mod h1:YGHEQnmmIUgtD5b1ICD5vg74dS3npkNnmC5K+0J+IHU=
|
||||
entgo.io/ent v0.11.4 h1:grwVY0fp31BZ6oEo3YrXenAuv8VJmEw7F/Bi6WqeH3Q=
|
||||
entgo.io/ent v0.11.4/go.mod h1:fnQIXL36RYnCk/9nvG4aE7YHBFZhCycfh7wMjY5p7SE=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
|
||||
@@ -27,6 +27,7 @@ github.com/an0nfunc/go-steamapi v1.1.0 h1:sBOSAKO0zEmzKrkMX2bVhoFiErA+Gyx9hRl+7B
|
||||
github.com/an0nfunc/go-steamapi v1.1.0/go.mod h1:tInHdrGkh0gaXuPnvhMG4BoW9S5gVcWOY9gJ9gCBKOI=
|
||||
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
|
||||
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
|
||||
github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3 h1:ZSTrOEhiM5J5RFxEaFvMZVEAM1KvT1YzbEOwB2EAGjA=
|
||||
github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw=
|
||||
github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo=
|
||||
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
|
||||
@@ -108,8 +109,8 @@ github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa
|
||||
github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho=
|
||||
github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA=
|
||||
github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos=
|
||||
github.com/go-playground/validator/v10 v10.11.0 h1:0W+xRM511GY47Yy3bZUbJVitCNg2BOGlCyvTqsp/xIw=
|
||||
github.com/go-playground/validator/v10 v10.11.0/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU=
|
||||
github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ=
|
||||
github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU=
|
||||
github.com/go-redis/cache/v8 v8.4.3 h1:+RZ0pQM+zOd6h/oWCsOl3+nsCgii9rn26oCYmU87kN8=
|
||||
github.com/go-redis/cache/v8 v8.4.3/go.mod h1:5lQPQ63uyBt4aZuRmdvUJOJRRjPxfLtJtlcJ/z8o1jA=
|
||||
github.com/go-redis/redis/v8 v8.11.3/go.mod h1:xNJ9xDG09FsIPwh3bWdk+0oDWHbtF9rPN0F/oD9XeKc=
|
||||
@@ -155,8 +156,8 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
|
||||
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
@@ -188,8 +189,8 @@ github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09
|
||||
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/hcl/v2 v2.13.0 h1:0Apadu1w6M11dyGFxWnmhhcMjkbAiKCv7G1r/2QgCNc=
|
||||
github.com/hashicorp/hcl/v2 v2.13.0/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0=
|
||||
github.com/hashicorp/hcl/v2 v2.14.1 h1:x0BpjfZ+CYdbiz+8yZTQ+gdLO7IXvOut7Da+XJayx34=
|
||||
github.com/hashicorp/hcl/v2 v2.14.1/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0=
|
||||
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
|
||||
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
|
||||
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
|
||||
@@ -239,12 +240,12 @@ github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08
|
||||
github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=
|
||||
github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=
|
||||
github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs=
|
||||
github.com/jackc/pgx/v4 v4.17.0 h1:Hsx+baY8/zU2WtPLQyZi8WbecgcsWEeyoK1jvg/WgIo=
|
||||
github.com/jackc/pgx/v4 v4.17.0/go.mod h1:Gd6RmOhtFLTu8cp/Fhq4kP195KrshxYJH3oW8AWJ1pw=
|
||||
github.com/jackc/pgx/v4 v4.17.2 h1:0Ut0rpeKwvIVbMQ1KbMBU4h6wxehBI535LK6Flheh8E=
|
||||
github.com/jackc/pgx/v4 v4.17.2/go.mod h1:lcxIZN44yMIrWI78a5CpucdD14hX0SBDbNRvjDBItsw=
|
||||
github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||
github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||
github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||
github.com/jackc/puddle v1.2.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||
github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
@@ -257,8 +258,8 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V
|
||||
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
|
||||
github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY=
|
||||
github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
|
||||
github.com/klauspost/compress v1.15.12 h1:YClS/PImqYbn+UILDnqxQCZ3RehC9N318SU3kElDUEM=
|
||||
github.com/klauspost/compress v1.15.12/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
@@ -278,12 +279,12 @@ github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/lib/pq v1.10.5 h1:J+gdV2cUmX7ZqL2B0lFcW0m+egaHC2V3lpO8nWxyYiQ=
|
||||
github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw=
|
||||
github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
|
||||
github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
|
||||
github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
|
||||
github.com/markus-wa/demoinfocs-golang/v3 v3.0.0 h1:Rto2f1C4wON/wuDEUezglM7ED/8awzJO/Z30yLIML0c=
|
||||
github.com/markus-wa/demoinfocs-golang/v3 v3.0.0/go.mod h1:a7IY3cRyFmfoTnTz8S6W+BuvuF5OioCmHlvznz4MaKU=
|
||||
github.com/markus-wa/demoinfocs-golang/v3 v3.0.1 h1:K9bMTHL6upFQPBV8kE0Xi4kxqPo2aFZW+tuRziOx8pA=
|
||||
github.com/markus-wa/demoinfocs-golang/v3 v3.0.1/go.mod h1:E/AlcQnTVFRBty3sAMaxhaZLVVVNip8TjKfXaoj3uPA=
|
||||
github.com/markus-wa/go-unassert v0.1.2 h1:uXWlMDa8JVtc4RgNq4XJIjyRejv9MOVuy/E0VECPxxo=
|
||||
github.com/markus-wa/go-unassert v0.1.2/go.mod h1:XEvrxR+trvZeMDfXcZPvzqGo6eumEtdk5VjNRuvvzxQ=
|
||||
github.com/markus-wa/gobitread v0.2.3 h1:COx7dtYQ7Q+77hgUmD+O4MvOcqG7y17RP3Z7BbjRvPs=
|
||||
@@ -306,7 +307,7 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k
|
||||
github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
|
||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||
github.com/mattn/go-sqlite3 v1.14.13 h1:1tj15ngiFfcZzii7yd82foL+ks+ouQcj8j/TPq3fk1I=
|
||||
github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||
@@ -362,8 +363,8 @@ github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIw
|
||||
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
|
||||
github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo=
|
||||
github.com/pelletier/go-toml/v2 v2.0.3 h1:h9JoA60e1dVEOpp0PFwJSmt1Htu057NUq9/bUwaO61s=
|
||||
github.com/pelletier/go-toml/v2 v2.0.3/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas=
|
||||
github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg=
|
||||
github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas=
|
||||
github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac=
|
||||
github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
|
||||
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||
@@ -460,8 +461,8 @@ github.com/wercker/journalhook v0.0.0-20180428041537-5d0a5ae867b3 h1:shC1HB1Uogx
|
||||
github.com/wercker/journalhook v0.0.0-20180428041537-5d0a5ae867b3/go.mod h1:XCsSkdKK4gwBMNrOCZWww0pX6AOt+2gYc5Z6jBRrNVg=
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/zclconf/go-cty v1.11.0 h1:726SxLdi2SDnjY+BStqB9J1hNp4+2WlzyXLuimibIe0=
|
||||
github.com/zclconf/go-cty v1.11.0/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA=
|
||||
github.com/zclconf/go-cty v1.12.0 h1:F5E/vbilcrCtat9sYcEjlwwg1mDqbRTjyXR57nnx5sc=
|
||||
github.com/zclconf/go-cty v1.12.0/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA=
|
||||
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
|
||||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
|
||||
@@ -501,13 +502,13 @@ golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5y
|
||||
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220824171710-5757bc0c5503 h1:vJ2V3lFLg+bBhgroYuRfyN583UzVveQmIXjc8T/y3to=
|
||||
golang.org/x/crypto v0.0.0-20220824171710-5757bc0c5503/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU=
|
||||
golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4=
|
||||
golang.org/x/exp v0.0.0-20210916165020-5cb4fee858ee/go.mod h1:a3o/VtDNHN+dCVLEpzjjUHOzR+Ln3DHX056ZPzoZGGA=
|
||||
golang.org/x/exp v0.0.0-20220823124025-807a23277127 h1:S4NrSKDfihhl3+4jSTgwoIevKxX9p7Iv9x++OEIptDo=
|
||||
golang.org/x/exp v0.0.0-20220823124025-807a23277127/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
|
||||
golang.org/x/exp v0.0.0-20221031165847-c99f073a8326 h1:QfTh0HpN6hlw6D3vu8DAwC8pBIwikq0AI1evdm+FksE=
|
||||
golang.org/x/exp v0.0.0-20221031165847-c99f073a8326/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
@@ -523,8 +524,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB
|
||||
golang.org/x/mod v0.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.5.1-0.20210830214625-1b1db11ec8f4/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I=
|
||||
golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@@ -546,8 +547,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220822230855-b0a4917ee28c h1:JVAXQ10yGGVbSyoer5VILysz6YKjdNT2bsvlayjqhes=
|
||||
golang.org/x/net v0.0.0-20220822230855-b0a4917ee28c/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
|
||||
golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0=
|
||||
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@@ -558,8 +559,8 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde h1:ejfdSekXMDxDLbRrJMwUk6KnSLZ2McaUCVcIKM+N6jc=
|
||||
golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@@ -595,8 +596,8 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220823224334-20c2bfdbfe24 h1:TyKJRhyo17yWxOMCTHKWrc5rddHORMlnZ/j57umaUd8=
|
||||
golang.org/x/sys v0.0.0-20220823224334-20c2bfdbfe24/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
@@ -604,12 +605,13 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
|
||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 h1:ftMN5LMiBFjbzleLqtoBZk7KdJwhuybIU+FckUHgoyQ=
|
||||
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA=
|
||||
golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
|
Reference in New Issue
Block a user