1176 lines
34 KiB
Go
1176 lines
34 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package match
|
|
|
|
import (
|
|
"time"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
"entgo.io/ent/dialect/sql/sqlgraph"
|
|
"git.harting.dev/csgowtf/csgowtfd/ent/predicate"
|
|
)
|
|
|
|
// ID filters vertices based on their ID field.
|
|
func ID(id uint64) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldID), id))
|
|
})
|
|
}
|
|
|
|
// IDEQ applies the EQ predicate on the ID field.
|
|
func IDEQ(id uint64) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldID), id))
|
|
})
|
|
}
|
|
|
|
// IDNEQ applies the NEQ predicate on the ID field.
|
|
func IDNEQ(id uint64) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldID), id))
|
|
})
|
|
}
|
|
|
|
// IDIn applies the In predicate on the ID field.
|
|
func IDIn(ids ...uint64) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
v := make([]any, len(ids))
|
|
for i := range v {
|
|
v[i] = ids[i]
|
|
}
|
|
s.Where(sql.In(s.C(FieldID), v...))
|
|
})
|
|
}
|
|
|
|
// IDNotIn applies the NotIn predicate on the ID field.
|
|
func IDNotIn(ids ...uint64) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
v := make([]any, len(ids))
|
|
for i := range v {
|
|
v[i] = ids[i]
|
|
}
|
|
s.Where(sql.NotIn(s.C(FieldID), v...))
|
|
})
|
|
}
|
|
|
|
// IDGT applies the GT predicate on the ID field.
|
|
func IDGT(id uint64) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldID), id))
|
|
})
|
|
}
|
|
|
|
// IDGTE applies the GTE predicate on the ID field.
|
|
func IDGTE(id uint64) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldID), id))
|
|
})
|
|
}
|
|
|
|
// IDLT applies the LT predicate on the ID field.
|
|
func IDLT(id uint64) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldID), id))
|
|
})
|
|
}
|
|
|
|
// IDLTE applies the LTE predicate on the ID field.
|
|
func IDLTE(id uint64) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldID), id))
|
|
})
|
|
}
|
|
|
|
// ShareCode applies equality check predicate on the "share_code" field. It's identical to ShareCodeEQ.
|
|
func ShareCode(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldShareCode), v))
|
|
})
|
|
}
|
|
|
|
// Map applies equality check predicate on the "map" field. It's identical to MapEQ.
|
|
func Map(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldMap), v))
|
|
})
|
|
}
|
|
|
|
// Date applies equality check predicate on the "date" field. It's identical to DateEQ.
|
|
func Date(v time.Time) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldDate), v))
|
|
})
|
|
}
|
|
|
|
// ScoreTeamA applies equality check predicate on the "score_team_a" field. It's identical to ScoreTeamAEQ.
|
|
func ScoreTeamA(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldScoreTeamA), v))
|
|
})
|
|
}
|
|
|
|
// ScoreTeamB applies equality check predicate on the "score_team_b" field. It's identical to ScoreTeamBEQ.
|
|
func ScoreTeamB(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldScoreTeamB), v))
|
|
})
|
|
}
|
|
|
|
// ReplayURL applies equality check predicate on the "replay_url" field. It's identical to ReplayURLEQ.
|
|
func ReplayURL(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldReplayURL), v))
|
|
})
|
|
}
|
|
|
|
// Duration applies equality check predicate on the "duration" field. It's identical to DurationEQ.
|
|
func Duration(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldDuration), v))
|
|
})
|
|
}
|
|
|
|
// MatchResult applies equality check predicate on the "match_result" field. It's identical to MatchResultEQ.
|
|
func MatchResult(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldMatchResult), v))
|
|
})
|
|
}
|
|
|
|
// MaxRounds applies equality check predicate on the "max_rounds" field. It's identical to MaxRoundsEQ.
|
|
func MaxRounds(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldMaxRounds), v))
|
|
})
|
|
}
|
|
|
|
// DemoParsed applies equality check predicate on the "demo_parsed" field. It's identical to DemoParsedEQ.
|
|
func DemoParsed(v bool) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldDemoParsed), v))
|
|
})
|
|
}
|
|
|
|
// VacPresent applies equality check predicate on the "vac_present" field. It's identical to VacPresentEQ.
|
|
func VacPresent(v bool) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldVacPresent), v))
|
|
})
|
|
}
|
|
|
|
// GamebanPresent applies equality check predicate on the "gameban_present" field. It's identical to GamebanPresentEQ.
|
|
func GamebanPresent(v bool) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldGamebanPresent), v))
|
|
})
|
|
}
|
|
|
|
// DecryptionKey applies equality check predicate on the "decryption_key" field. It's identical to DecryptionKeyEQ.
|
|
func DecryptionKey(v []byte) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldDecryptionKey), v))
|
|
})
|
|
}
|
|
|
|
// TickRate applies equality check predicate on the "tick_rate" field. It's identical to TickRateEQ.
|
|
func TickRate(v float64) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldTickRate), v))
|
|
})
|
|
}
|
|
|
|
// ShareCodeEQ applies the EQ predicate on the "share_code" field.
|
|
func ShareCodeEQ(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldShareCode), v))
|
|
})
|
|
}
|
|
|
|
// ShareCodeNEQ applies the NEQ predicate on the "share_code" field.
|
|
func ShareCodeNEQ(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldShareCode), v))
|
|
})
|
|
}
|
|
|
|
// ShareCodeIn applies the In predicate on the "share_code" field.
|
|
func ShareCodeIn(vs ...string) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.In(s.C(FieldShareCode), v...))
|
|
})
|
|
}
|
|
|
|
// ShareCodeNotIn applies the NotIn predicate on the "share_code" field.
|
|
func ShareCodeNotIn(vs ...string) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NotIn(s.C(FieldShareCode), v...))
|
|
})
|
|
}
|
|
|
|
// ShareCodeGT applies the GT predicate on the "share_code" field.
|
|
func ShareCodeGT(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldShareCode), v))
|
|
})
|
|
}
|
|
|
|
// ShareCodeGTE applies the GTE predicate on the "share_code" field.
|
|
func ShareCodeGTE(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldShareCode), v))
|
|
})
|
|
}
|
|
|
|
// ShareCodeLT applies the LT predicate on the "share_code" field.
|
|
func ShareCodeLT(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldShareCode), v))
|
|
})
|
|
}
|
|
|
|
// ShareCodeLTE applies the LTE predicate on the "share_code" field.
|
|
func ShareCodeLTE(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldShareCode), v))
|
|
})
|
|
}
|
|
|
|
// ShareCodeContains applies the Contains predicate on the "share_code" field.
|
|
func ShareCodeContains(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.Contains(s.C(FieldShareCode), v))
|
|
})
|
|
}
|
|
|
|
// ShareCodeHasPrefix applies the HasPrefix predicate on the "share_code" field.
|
|
func ShareCodeHasPrefix(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.HasPrefix(s.C(FieldShareCode), v))
|
|
})
|
|
}
|
|
|
|
// ShareCodeHasSuffix applies the HasSuffix predicate on the "share_code" field.
|
|
func ShareCodeHasSuffix(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.HasSuffix(s.C(FieldShareCode), v))
|
|
})
|
|
}
|
|
|
|
// ShareCodeEqualFold applies the EqualFold predicate on the "share_code" field.
|
|
func ShareCodeEqualFold(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EqualFold(s.C(FieldShareCode), v))
|
|
})
|
|
}
|
|
|
|
// ShareCodeContainsFold applies the ContainsFold predicate on the "share_code" field.
|
|
func ShareCodeContainsFold(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.ContainsFold(s.C(FieldShareCode), v))
|
|
})
|
|
}
|
|
|
|
// MapEQ applies the EQ predicate on the "map" field.
|
|
func MapEQ(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldMap), v))
|
|
})
|
|
}
|
|
|
|
// MapNEQ applies the NEQ predicate on the "map" field.
|
|
func MapNEQ(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldMap), v))
|
|
})
|
|
}
|
|
|
|
// MapIn applies the In predicate on the "map" field.
|
|
func MapIn(vs ...string) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.In(s.C(FieldMap), v...))
|
|
})
|
|
}
|
|
|
|
// MapNotIn applies the NotIn predicate on the "map" field.
|
|
func MapNotIn(vs ...string) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NotIn(s.C(FieldMap), v...))
|
|
})
|
|
}
|
|
|
|
// MapGT applies the GT predicate on the "map" field.
|
|
func MapGT(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldMap), v))
|
|
})
|
|
}
|
|
|
|
// MapGTE applies the GTE predicate on the "map" field.
|
|
func MapGTE(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldMap), v))
|
|
})
|
|
}
|
|
|
|
// MapLT applies the LT predicate on the "map" field.
|
|
func MapLT(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldMap), v))
|
|
})
|
|
}
|
|
|
|
// MapLTE applies the LTE predicate on the "map" field.
|
|
func MapLTE(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldMap), v))
|
|
})
|
|
}
|
|
|
|
// MapContains applies the Contains predicate on the "map" field.
|
|
func MapContains(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.Contains(s.C(FieldMap), v))
|
|
})
|
|
}
|
|
|
|
// MapHasPrefix applies the HasPrefix predicate on the "map" field.
|
|
func MapHasPrefix(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.HasPrefix(s.C(FieldMap), v))
|
|
})
|
|
}
|
|
|
|
// MapHasSuffix applies the HasSuffix predicate on the "map" field.
|
|
func MapHasSuffix(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.HasSuffix(s.C(FieldMap), v))
|
|
})
|
|
}
|
|
|
|
// MapIsNil applies the IsNil predicate on the "map" field.
|
|
func MapIsNil() predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.IsNull(s.C(FieldMap)))
|
|
})
|
|
}
|
|
|
|
// MapNotNil applies the NotNil predicate on the "map" field.
|
|
func MapNotNil() predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NotNull(s.C(FieldMap)))
|
|
})
|
|
}
|
|
|
|
// MapEqualFold applies the EqualFold predicate on the "map" field.
|
|
func MapEqualFold(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EqualFold(s.C(FieldMap), v))
|
|
})
|
|
}
|
|
|
|
// MapContainsFold applies the ContainsFold predicate on the "map" field.
|
|
func MapContainsFold(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.ContainsFold(s.C(FieldMap), v))
|
|
})
|
|
}
|
|
|
|
// DateEQ applies the EQ predicate on the "date" field.
|
|
func DateEQ(v time.Time) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldDate), v))
|
|
})
|
|
}
|
|
|
|
// DateNEQ applies the NEQ predicate on the "date" field.
|
|
func DateNEQ(v time.Time) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldDate), v))
|
|
})
|
|
}
|
|
|
|
// DateIn applies the In predicate on the "date" field.
|
|
func DateIn(vs ...time.Time) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.In(s.C(FieldDate), v...))
|
|
})
|
|
}
|
|
|
|
// DateNotIn applies the NotIn predicate on the "date" field.
|
|
func DateNotIn(vs ...time.Time) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NotIn(s.C(FieldDate), v...))
|
|
})
|
|
}
|
|
|
|
// DateGT applies the GT predicate on the "date" field.
|
|
func DateGT(v time.Time) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldDate), v))
|
|
})
|
|
}
|
|
|
|
// DateGTE applies the GTE predicate on the "date" field.
|
|
func DateGTE(v time.Time) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldDate), v))
|
|
})
|
|
}
|
|
|
|
// DateLT applies the LT predicate on the "date" field.
|
|
func DateLT(v time.Time) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldDate), v))
|
|
})
|
|
}
|
|
|
|
// DateLTE applies the LTE predicate on the "date" field.
|
|
func DateLTE(v time.Time) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldDate), v))
|
|
})
|
|
}
|
|
|
|
// ScoreTeamAEQ applies the EQ predicate on the "score_team_a" field.
|
|
func ScoreTeamAEQ(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldScoreTeamA), v))
|
|
})
|
|
}
|
|
|
|
// ScoreTeamANEQ applies the NEQ predicate on the "score_team_a" field.
|
|
func ScoreTeamANEQ(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldScoreTeamA), v))
|
|
})
|
|
}
|
|
|
|
// ScoreTeamAIn applies the In predicate on the "score_team_a" field.
|
|
func ScoreTeamAIn(vs ...int) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.In(s.C(FieldScoreTeamA), v...))
|
|
})
|
|
}
|
|
|
|
// ScoreTeamANotIn applies the NotIn predicate on the "score_team_a" field.
|
|
func ScoreTeamANotIn(vs ...int) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NotIn(s.C(FieldScoreTeamA), v...))
|
|
})
|
|
}
|
|
|
|
// ScoreTeamAGT applies the GT predicate on the "score_team_a" field.
|
|
func ScoreTeamAGT(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldScoreTeamA), v))
|
|
})
|
|
}
|
|
|
|
// ScoreTeamAGTE applies the GTE predicate on the "score_team_a" field.
|
|
func ScoreTeamAGTE(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldScoreTeamA), v))
|
|
})
|
|
}
|
|
|
|
// ScoreTeamALT applies the LT predicate on the "score_team_a" field.
|
|
func ScoreTeamALT(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldScoreTeamA), v))
|
|
})
|
|
}
|
|
|
|
// ScoreTeamALTE applies the LTE predicate on the "score_team_a" field.
|
|
func ScoreTeamALTE(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldScoreTeamA), v))
|
|
})
|
|
}
|
|
|
|
// ScoreTeamBEQ applies the EQ predicate on the "score_team_b" field.
|
|
func ScoreTeamBEQ(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldScoreTeamB), v))
|
|
})
|
|
}
|
|
|
|
// ScoreTeamBNEQ applies the NEQ predicate on the "score_team_b" field.
|
|
func ScoreTeamBNEQ(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldScoreTeamB), v))
|
|
})
|
|
}
|
|
|
|
// ScoreTeamBIn applies the In predicate on the "score_team_b" field.
|
|
func ScoreTeamBIn(vs ...int) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.In(s.C(FieldScoreTeamB), v...))
|
|
})
|
|
}
|
|
|
|
// ScoreTeamBNotIn applies the NotIn predicate on the "score_team_b" field.
|
|
func ScoreTeamBNotIn(vs ...int) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NotIn(s.C(FieldScoreTeamB), v...))
|
|
})
|
|
}
|
|
|
|
// ScoreTeamBGT applies the GT predicate on the "score_team_b" field.
|
|
func ScoreTeamBGT(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldScoreTeamB), v))
|
|
})
|
|
}
|
|
|
|
// ScoreTeamBGTE applies the GTE predicate on the "score_team_b" field.
|
|
func ScoreTeamBGTE(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldScoreTeamB), v))
|
|
})
|
|
}
|
|
|
|
// ScoreTeamBLT applies the LT predicate on the "score_team_b" field.
|
|
func ScoreTeamBLT(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldScoreTeamB), v))
|
|
})
|
|
}
|
|
|
|
// ScoreTeamBLTE applies the LTE predicate on the "score_team_b" field.
|
|
func ScoreTeamBLTE(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldScoreTeamB), v))
|
|
})
|
|
}
|
|
|
|
// ReplayURLEQ applies the EQ predicate on the "replay_url" field.
|
|
func ReplayURLEQ(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldReplayURL), v))
|
|
})
|
|
}
|
|
|
|
// ReplayURLNEQ applies the NEQ predicate on the "replay_url" field.
|
|
func ReplayURLNEQ(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldReplayURL), v))
|
|
})
|
|
}
|
|
|
|
// ReplayURLIn applies the In predicate on the "replay_url" field.
|
|
func ReplayURLIn(vs ...string) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.In(s.C(FieldReplayURL), v...))
|
|
})
|
|
}
|
|
|
|
// ReplayURLNotIn applies the NotIn predicate on the "replay_url" field.
|
|
func ReplayURLNotIn(vs ...string) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NotIn(s.C(FieldReplayURL), v...))
|
|
})
|
|
}
|
|
|
|
// ReplayURLGT applies the GT predicate on the "replay_url" field.
|
|
func ReplayURLGT(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldReplayURL), v))
|
|
})
|
|
}
|
|
|
|
// ReplayURLGTE applies the GTE predicate on the "replay_url" field.
|
|
func ReplayURLGTE(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldReplayURL), v))
|
|
})
|
|
}
|
|
|
|
// ReplayURLLT applies the LT predicate on the "replay_url" field.
|
|
func ReplayURLLT(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldReplayURL), v))
|
|
})
|
|
}
|
|
|
|
// ReplayURLLTE applies the LTE predicate on the "replay_url" field.
|
|
func ReplayURLLTE(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldReplayURL), v))
|
|
})
|
|
}
|
|
|
|
// ReplayURLContains applies the Contains predicate on the "replay_url" field.
|
|
func ReplayURLContains(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.Contains(s.C(FieldReplayURL), v))
|
|
})
|
|
}
|
|
|
|
// ReplayURLHasPrefix applies the HasPrefix predicate on the "replay_url" field.
|
|
func ReplayURLHasPrefix(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.HasPrefix(s.C(FieldReplayURL), v))
|
|
})
|
|
}
|
|
|
|
// ReplayURLHasSuffix applies the HasSuffix predicate on the "replay_url" field.
|
|
func ReplayURLHasSuffix(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.HasSuffix(s.C(FieldReplayURL), v))
|
|
})
|
|
}
|
|
|
|
// ReplayURLIsNil applies the IsNil predicate on the "replay_url" field.
|
|
func ReplayURLIsNil() predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.IsNull(s.C(FieldReplayURL)))
|
|
})
|
|
}
|
|
|
|
// ReplayURLNotNil applies the NotNil predicate on the "replay_url" field.
|
|
func ReplayURLNotNil() predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NotNull(s.C(FieldReplayURL)))
|
|
})
|
|
}
|
|
|
|
// ReplayURLEqualFold applies the EqualFold predicate on the "replay_url" field.
|
|
func ReplayURLEqualFold(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EqualFold(s.C(FieldReplayURL), v))
|
|
})
|
|
}
|
|
|
|
// ReplayURLContainsFold applies the ContainsFold predicate on the "replay_url" field.
|
|
func ReplayURLContainsFold(v string) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.ContainsFold(s.C(FieldReplayURL), v))
|
|
})
|
|
}
|
|
|
|
// DurationEQ applies the EQ predicate on the "duration" field.
|
|
func DurationEQ(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldDuration), v))
|
|
})
|
|
}
|
|
|
|
// DurationNEQ applies the NEQ predicate on the "duration" field.
|
|
func DurationNEQ(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldDuration), v))
|
|
})
|
|
}
|
|
|
|
// DurationIn applies the In predicate on the "duration" field.
|
|
func DurationIn(vs ...int) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.In(s.C(FieldDuration), v...))
|
|
})
|
|
}
|
|
|
|
// DurationNotIn applies the NotIn predicate on the "duration" field.
|
|
func DurationNotIn(vs ...int) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NotIn(s.C(FieldDuration), v...))
|
|
})
|
|
}
|
|
|
|
// DurationGT applies the GT predicate on the "duration" field.
|
|
func DurationGT(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldDuration), v))
|
|
})
|
|
}
|
|
|
|
// DurationGTE applies the GTE predicate on the "duration" field.
|
|
func DurationGTE(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldDuration), v))
|
|
})
|
|
}
|
|
|
|
// DurationLT applies the LT predicate on the "duration" field.
|
|
func DurationLT(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldDuration), v))
|
|
})
|
|
}
|
|
|
|
// DurationLTE applies the LTE predicate on the "duration" field.
|
|
func DurationLTE(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldDuration), v))
|
|
})
|
|
}
|
|
|
|
// MatchResultEQ applies the EQ predicate on the "match_result" field.
|
|
func MatchResultEQ(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldMatchResult), v))
|
|
})
|
|
}
|
|
|
|
// MatchResultNEQ applies the NEQ predicate on the "match_result" field.
|
|
func MatchResultNEQ(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldMatchResult), v))
|
|
})
|
|
}
|
|
|
|
// MatchResultIn applies the In predicate on the "match_result" field.
|
|
func MatchResultIn(vs ...int) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.In(s.C(FieldMatchResult), v...))
|
|
})
|
|
}
|
|
|
|
// MatchResultNotIn applies the NotIn predicate on the "match_result" field.
|
|
func MatchResultNotIn(vs ...int) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NotIn(s.C(FieldMatchResult), v...))
|
|
})
|
|
}
|
|
|
|
// MatchResultGT applies the GT predicate on the "match_result" field.
|
|
func MatchResultGT(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldMatchResult), v))
|
|
})
|
|
}
|
|
|
|
// MatchResultGTE applies the GTE predicate on the "match_result" field.
|
|
func MatchResultGTE(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldMatchResult), v))
|
|
})
|
|
}
|
|
|
|
// MatchResultLT applies the LT predicate on the "match_result" field.
|
|
func MatchResultLT(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldMatchResult), v))
|
|
})
|
|
}
|
|
|
|
// MatchResultLTE applies the LTE predicate on the "match_result" field.
|
|
func MatchResultLTE(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldMatchResult), v))
|
|
})
|
|
}
|
|
|
|
// MaxRoundsEQ applies the EQ predicate on the "max_rounds" field.
|
|
func MaxRoundsEQ(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldMaxRounds), v))
|
|
})
|
|
}
|
|
|
|
// MaxRoundsNEQ applies the NEQ predicate on the "max_rounds" field.
|
|
func MaxRoundsNEQ(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldMaxRounds), v))
|
|
})
|
|
}
|
|
|
|
// MaxRoundsIn applies the In predicate on the "max_rounds" field.
|
|
func MaxRoundsIn(vs ...int) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.In(s.C(FieldMaxRounds), v...))
|
|
})
|
|
}
|
|
|
|
// MaxRoundsNotIn applies the NotIn predicate on the "max_rounds" field.
|
|
func MaxRoundsNotIn(vs ...int) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NotIn(s.C(FieldMaxRounds), v...))
|
|
})
|
|
}
|
|
|
|
// MaxRoundsGT applies the GT predicate on the "max_rounds" field.
|
|
func MaxRoundsGT(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldMaxRounds), v))
|
|
})
|
|
}
|
|
|
|
// MaxRoundsGTE applies the GTE predicate on the "max_rounds" field.
|
|
func MaxRoundsGTE(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldMaxRounds), v))
|
|
})
|
|
}
|
|
|
|
// MaxRoundsLT applies the LT predicate on the "max_rounds" field.
|
|
func MaxRoundsLT(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldMaxRounds), v))
|
|
})
|
|
}
|
|
|
|
// MaxRoundsLTE applies the LTE predicate on the "max_rounds" field.
|
|
func MaxRoundsLTE(v int) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldMaxRounds), v))
|
|
})
|
|
}
|
|
|
|
// DemoParsedEQ applies the EQ predicate on the "demo_parsed" field.
|
|
func DemoParsedEQ(v bool) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldDemoParsed), v))
|
|
})
|
|
}
|
|
|
|
// DemoParsedNEQ applies the NEQ predicate on the "demo_parsed" field.
|
|
func DemoParsedNEQ(v bool) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldDemoParsed), v))
|
|
})
|
|
}
|
|
|
|
// VacPresentEQ applies the EQ predicate on the "vac_present" field.
|
|
func VacPresentEQ(v bool) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldVacPresent), v))
|
|
})
|
|
}
|
|
|
|
// VacPresentNEQ applies the NEQ predicate on the "vac_present" field.
|
|
func VacPresentNEQ(v bool) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldVacPresent), v))
|
|
})
|
|
}
|
|
|
|
// GamebanPresentEQ applies the EQ predicate on the "gameban_present" field.
|
|
func GamebanPresentEQ(v bool) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldGamebanPresent), v))
|
|
})
|
|
}
|
|
|
|
// GamebanPresentNEQ applies the NEQ predicate on the "gameban_present" field.
|
|
func GamebanPresentNEQ(v bool) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldGamebanPresent), v))
|
|
})
|
|
}
|
|
|
|
// DecryptionKeyEQ applies the EQ predicate on the "decryption_key" field.
|
|
func DecryptionKeyEQ(v []byte) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldDecryptionKey), v))
|
|
})
|
|
}
|
|
|
|
// DecryptionKeyNEQ applies the NEQ predicate on the "decryption_key" field.
|
|
func DecryptionKeyNEQ(v []byte) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldDecryptionKey), v))
|
|
})
|
|
}
|
|
|
|
// DecryptionKeyIn applies the In predicate on the "decryption_key" field.
|
|
func DecryptionKeyIn(vs ...[]byte) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.In(s.C(FieldDecryptionKey), v...))
|
|
})
|
|
}
|
|
|
|
// DecryptionKeyNotIn applies the NotIn predicate on the "decryption_key" field.
|
|
func DecryptionKeyNotIn(vs ...[]byte) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NotIn(s.C(FieldDecryptionKey), v...))
|
|
})
|
|
}
|
|
|
|
// DecryptionKeyGT applies the GT predicate on the "decryption_key" field.
|
|
func DecryptionKeyGT(v []byte) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldDecryptionKey), v))
|
|
})
|
|
}
|
|
|
|
// DecryptionKeyGTE applies the GTE predicate on the "decryption_key" field.
|
|
func DecryptionKeyGTE(v []byte) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldDecryptionKey), v))
|
|
})
|
|
}
|
|
|
|
// DecryptionKeyLT applies the LT predicate on the "decryption_key" field.
|
|
func DecryptionKeyLT(v []byte) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldDecryptionKey), v))
|
|
})
|
|
}
|
|
|
|
// DecryptionKeyLTE applies the LTE predicate on the "decryption_key" field.
|
|
func DecryptionKeyLTE(v []byte) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldDecryptionKey), v))
|
|
})
|
|
}
|
|
|
|
// DecryptionKeyIsNil applies the IsNil predicate on the "decryption_key" field.
|
|
func DecryptionKeyIsNil() predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.IsNull(s.C(FieldDecryptionKey)))
|
|
})
|
|
}
|
|
|
|
// DecryptionKeyNotNil applies the NotNil predicate on the "decryption_key" field.
|
|
func DecryptionKeyNotNil() predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NotNull(s.C(FieldDecryptionKey)))
|
|
})
|
|
}
|
|
|
|
// TickRateEQ applies the EQ predicate on the "tick_rate" field.
|
|
func TickRateEQ(v float64) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldTickRate), v))
|
|
})
|
|
}
|
|
|
|
// TickRateNEQ applies the NEQ predicate on the "tick_rate" field.
|
|
func TickRateNEQ(v float64) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldTickRate), v))
|
|
})
|
|
}
|
|
|
|
// TickRateIn applies the In predicate on the "tick_rate" field.
|
|
func TickRateIn(vs ...float64) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.In(s.C(FieldTickRate), v...))
|
|
})
|
|
}
|
|
|
|
// TickRateNotIn applies the NotIn predicate on the "tick_rate" field.
|
|
func TickRateNotIn(vs ...float64) predicate.Match {
|
|
v := make([]any, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NotIn(s.C(FieldTickRate), v...))
|
|
})
|
|
}
|
|
|
|
// TickRateGT applies the GT predicate on the "tick_rate" field.
|
|
func TickRateGT(v float64) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldTickRate), v))
|
|
})
|
|
}
|
|
|
|
// TickRateGTE applies the GTE predicate on the "tick_rate" field.
|
|
func TickRateGTE(v float64) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldTickRate), v))
|
|
})
|
|
}
|
|
|
|
// TickRateLT applies the LT predicate on the "tick_rate" field.
|
|
func TickRateLT(v float64) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldTickRate), v))
|
|
})
|
|
}
|
|
|
|
// TickRateLTE applies the LTE predicate on the "tick_rate" field.
|
|
func TickRateLTE(v float64) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldTickRate), v))
|
|
})
|
|
}
|
|
|
|
// TickRateIsNil applies the IsNil predicate on the "tick_rate" field.
|
|
func TickRateIsNil() predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.IsNull(s.C(FieldTickRate)))
|
|
})
|
|
}
|
|
|
|
// TickRateNotNil applies the NotNil predicate on the "tick_rate" field.
|
|
func TickRateNotNil() predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s.Where(sql.NotNull(s.C(FieldTickRate)))
|
|
})
|
|
}
|
|
|
|
// HasStats applies the HasEdge predicate on the "stats" edge.
|
|
func HasStats() predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.To(StatsTable, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, StatsTable, StatsColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasStatsWith applies the HasEdge predicate on the "stats" edge with a given conditions (other predicates).
|
|
func HasStatsWith(preds ...predicate.MatchPlayer) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.To(StatsInverseTable, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, StatsTable, StatsColumn),
|
|
)
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasPlayers applies the HasEdge predicate on the "players" edge.
|
|
func HasPlayers() predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.To(PlayersTable, FieldID),
|
|
sqlgraph.Edge(sqlgraph.M2M, true, PlayersTable, PlayersPrimaryKey...),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasPlayersWith applies the HasEdge predicate on the "players" edge with a given conditions (other predicates).
|
|
func HasPlayersWith(preds ...predicate.Player) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.To(PlayersInverseTable, FieldID),
|
|
sqlgraph.Edge(sqlgraph.M2M, true, PlayersTable, PlayersPrimaryKey...),
|
|
)
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// And groups predicates with the AND operator between them.
|
|
func And(predicates ...predicate.Match) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s1 := s.Clone().SetP(nil)
|
|
for _, p := range predicates {
|
|
p(s1)
|
|
}
|
|
s.Where(s1.P())
|
|
})
|
|
}
|
|
|
|
// Or groups predicates with the OR operator between them.
|
|
func Or(predicates ...predicate.Match) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
s1 := s.Clone().SetP(nil)
|
|
for i, p := range predicates {
|
|
if i > 0 {
|
|
s1.Or()
|
|
}
|
|
p(s1)
|
|
}
|
|
s.Where(s1.P())
|
|
})
|
|
}
|
|
|
|
// Not applies the not operator on the given predicate.
|
|
func Not(p predicate.Match) predicate.Match {
|
|
return predicate.Match(func(s *sql.Selector) {
|
|
p(s.Not())
|
|
})
|
|
}
|