added spray patterns

This commit is contained in:
2021-10-31 08:40:02 +01:00
parent 268793f0e5
commit 978232dd0a
66 changed files with 16805 additions and 11903 deletions

View File

@@ -37,6 +37,12 @@ const (
FieldProfileCreated = "profile_created"
// FieldOldestSharecodeSeen holds the string denoting the oldest_sharecode_seen field in the database.
FieldOldestSharecodeSeen = "oldest_sharecode_seen"
// FieldWins holds the string denoting the wins field in the database.
FieldWins = "wins"
// FieldLooses holds the string denoting the looses field in the database.
FieldLooses = "looses"
// FieldTies holds the string denoting the ties field in the database.
FieldTies = "ties"
// EdgeStats holds the string denoting the stats edge name in mutations.
EdgeStats = "stats"
// EdgeMatches holds the string denoting the matches edge name in mutations.
@@ -44,10 +50,10 @@ const (
// Table holds the table name of the player in the database.
Table = "players"
// StatsTable is the table that holds the stats relation/edge.
StatsTable = "stats"
// StatsInverseTable is the table name for the Stats entity.
// It exists in this package in order to avoid circular dependency with the "stats" package.
StatsInverseTable = "stats"
StatsTable = "match_players"
// StatsInverseTable is the table name for the MatchPlayer entity.
// It exists in this package in order to avoid circular dependency with the "matchplayer" package.
StatsInverseTable = "match_players"
// StatsColumn is the table column denoting the stats relation/edge.
StatsColumn = "player_stats"
// MatchesTable is the table that holds the matches relation/edge. The primary key declared below.
@@ -73,6 +79,9 @@ var Columns = []string{
FieldAuthCode,
FieldProfileCreated,
FieldOldestSharecodeSeen,
FieldWins,
FieldLooses,
FieldTies,
}
var (

View File

@@ -184,6 +184,27 @@ func OldestSharecodeSeen(v string) predicate.Player {
})
}
// Wins applies equality check predicate on the "wins" field. It's identical to WinsEQ.
func Wins(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldWins), v))
})
}
// Looses applies equality check predicate on the "looses" field. It's identical to LoosesEQ.
func Looses(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldLooses), v))
})
}
// Ties applies equality check predicate on the "ties" field. It's identical to TiesEQ.
func Ties(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldTies), v))
})
}
// NameEQ applies the EQ predicate on the "name" field.
func NameEQ(v string) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
@@ -1550,6 +1571,276 @@ func OldestSharecodeSeenContainsFold(v string) predicate.Player {
})
}
// WinsEQ applies the EQ predicate on the "wins" field.
func WinsEQ(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldWins), v))
})
}
// WinsNEQ applies the NEQ predicate on the "wins" field.
func WinsNEQ(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldWins), v))
})
}
// WinsIn applies the In predicate on the "wins" field.
func WinsIn(vs ...int) predicate.Player {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Player(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.In(s.C(FieldWins), v...))
})
}
// WinsNotIn applies the NotIn predicate on the "wins" field.
func WinsNotIn(vs ...int) predicate.Player {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Player(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.NotIn(s.C(FieldWins), v...))
})
}
// WinsGT applies the GT predicate on the "wins" field.
func WinsGT(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldWins), v))
})
}
// WinsGTE applies the GTE predicate on the "wins" field.
func WinsGTE(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldWins), v))
})
}
// WinsLT applies the LT predicate on the "wins" field.
func WinsLT(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldWins), v))
})
}
// WinsLTE applies the LTE predicate on the "wins" field.
func WinsLTE(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldWins), v))
})
}
// WinsIsNil applies the IsNil predicate on the "wins" field.
func WinsIsNil() predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.IsNull(s.C(FieldWins)))
})
}
// WinsNotNil applies the NotNil predicate on the "wins" field.
func WinsNotNil() predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.NotNull(s.C(FieldWins)))
})
}
// LoosesEQ applies the EQ predicate on the "looses" field.
func LoosesEQ(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldLooses), v))
})
}
// LoosesNEQ applies the NEQ predicate on the "looses" field.
func LoosesNEQ(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldLooses), v))
})
}
// LoosesIn applies the In predicate on the "looses" field.
func LoosesIn(vs ...int) predicate.Player {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Player(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.In(s.C(FieldLooses), v...))
})
}
// LoosesNotIn applies the NotIn predicate on the "looses" field.
func LoosesNotIn(vs ...int) predicate.Player {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Player(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.NotIn(s.C(FieldLooses), v...))
})
}
// LoosesGT applies the GT predicate on the "looses" field.
func LoosesGT(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldLooses), v))
})
}
// LoosesGTE applies the GTE predicate on the "looses" field.
func LoosesGTE(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldLooses), v))
})
}
// LoosesLT applies the LT predicate on the "looses" field.
func LoosesLT(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldLooses), v))
})
}
// LoosesLTE applies the LTE predicate on the "looses" field.
func LoosesLTE(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldLooses), v))
})
}
// LoosesIsNil applies the IsNil predicate on the "looses" field.
func LoosesIsNil() predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.IsNull(s.C(FieldLooses)))
})
}
// LoosesNotNil applies the NotNil predicate on the "looses" field.
func LoosesNotNil() predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.NotNull(s.C(FieldLooses)))
})
}
// TiesEQ applies the EQ predicate on the "ties" field.
func TiesEQ(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldTies), v))
})
}
// TiesNEQ applies the NEQ predicate on the "ties" field.
func TiesNEQ(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldTies), v))
})
}
// TiesIn applies the In predicate on the "ties" field.
func TiesIn(vs ...int) predicate.Player {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Player(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.In(s.C(FieldTies), v...))
})
}
// TiesNotIn applies the NotIn predicate on the "ties" field.
func TiesNotIn(vs ...int) predicate.Player {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Player(func(s *sql.Selector) {
// if not arguments were provided, append the FALSE constants,
// since we can't apply "IN ()". This will make this predicate falsy.
if len(v) == 0 {
s.Where(sql.False())
return
}
s.Where(sql.NotIn(s.C(FieldTies), v...))
})
}
// TiesGT applies the GT predicate on the "ties" field.
func TiesGT(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldTies), v))
})
}
// TiesGTE applies the GTE predicate on the "ties" field.
func TiesGTE(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldTies), v))
})
}
// TiesLT applies the LT predicate on the "ties" field.
func TiesLT(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldTies), v))
})
}
// TiesLTE applies the LTE predicate on the "ties" field.
func TiesLTE(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldTies), v))
})
}
// TiesIsNil applies the IsNil predicate on the "ties" field.
func TiesIsNil() predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.IsNull(s.C(FieldTies)))
})
}
// TiesNotNil applies the NotNil predicate on the "ties" field.
func TiesNotNil() predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.NotNull(s.C(FieldTies)))
})
}
// HasStats applies the HasEdge predicate on the "stats" edge.
func HasStats() predicate.Player {
return predicate.Player(func(s *sql.Selector) {
@@ -1563,7 +1854,7 @@ func HasStats() predicate.Player {
}
// HasStatsWith applies the HasEdge predicate on the "stats" edge with a given conditions (other predicates).
func HasStatsWith(preds ...predicate.Stats) predicate.Player {
func HasStatsWith(preds ...predicate.MatchPlayer) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),