// Code generated by ent, DO NOT EDIT. package spray import ( "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 int) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { s.Where(sql.EQ(s.C(FieldID), id)) }) } // IDEQ applies the EQ predicate on the ID field. func IDEQ(id int) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { s.Where(sql.EQ(s.C(FieldID), id)) }) } // IDNEQ applies the NEQ predicate on the ID field. func IDNEQ(id int) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { s.Where(sql.NEQ(s.C(FieldID), id)) }) } // IDIn applies the In predicate on the ID field. func IDIn(ids ...int) predicate.Spray { return predicate.Spray(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 ...int) predicate.Spray { return predicate.Spray(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 int) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { s.Where(sql.GT(s.C(FieldID), id)) }) } // IDGTE applies the GTE predicate on the ID field. func IDGTE(id int) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { s.Where(sql.GTE(s.C(FieldID), id)) }) } // IDLT applies the LT predicate on the ID field. func IDLT(id int) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { s.Where(sql.LT(s.C(FieldID), id)) }) } // IDLTE applies the LTE predicate on the ID field. func IDLTE(id int) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { s.Where(sql.LTE(s.C(FieldID), id)) }) } // Weapon applies equality check predicate on the "weapon" field. It's identical to WeaponEQ. func Weapon(v int) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { s.Where(sql.EQ(s.C(FieldWeapon), v)) }) } // Spray applies equality check predicate on the "spray" field. It's identical to SprayEQ. func Spray(v []byte) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { s.Where(sql.EQ(s.C(FieldSpray), v)) }) } // WeaponEQ applies the EQ predicate on the "weapon" field. func WeaponEQ(v int) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { s.Where(sql.EQ(s.C(FieldWeapon), v)) }) } // WeaponNEQ applies the NEQ predicate on the "weapon" field. func WeaponNEQ(v int) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { s.Where(sql.NEQ(s.C(FieldWeapon), v)) }) } // WeaponIn applies the In predicate on the "weapon" field. func WeaponIn(vs ...int) predicate.Spray { v := make([]any, len(vs)) for i := range v { v[i] = vs[i] } return predicate.Spray(func(s *sql.Selector) { s.Where(sql.In(s.C(FieldWeapon), v...)) }) } // WeaponNotIn applies the NotIn predicate on the "weapon" field. func WeaponNotIn(vs ...int) predicate.Spray { v := make([]any, len(vs)) for i := range v { v[i] = vs[i] } return predicate.Spray(func(s *sql.Selector) { s.Where(sql.NotIn(s.C(FieldWeapon), v...)) }) } // WeaponGT applies the GT predicate on the "weapon" field. func WeaponGT(v int) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { s.Where(sql.GT(s.C(FieldWeapon), v)) }) } // WeaponGTE applies the GTE predicate on the "weapon" field. func WeaponGTE(v int) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { s.Where(sql.GTE(s.C(FieldWeapon), v)) }) } // WeaponLT applies the LT predicate on the "weapon" field. func WeaponLT(v int) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { s.Where(sql.LT(s.C(FieldWeapon), v)) }) } // WeaponLTE applies the LTE predicate on the "weapon" field. func WeaponLTE(v int) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { s.Where(sql.LTE(s.C(FieldWeapon), v)) }) } // SprayEQ applies the EQ predicate on the "spray" field. func SprayEQ(v []byte) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { s.Where(sql.EQ(s.C(FieldSpray), v)) }) } // SprayNEQ applies the NEQ predicate on the "spray" field. func SprayNEQ(v []byte) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { s.Where(sql.NEQ(s.C(FieldSpray), v)) }) } // SprayIn applies the In predicate on the "spray" field. func SprayIn(vs ...[]byte) predicate.Spray { v := make([]any, len(vs)) for i := range v { v[i] = vs[i] } return predicate.Spray(func(s *sql.Selector) { s.Where(sql.In(s.C(FieldSpray), v...)) }) } // SprayNotIn applies the NotIn predicate on the "spray" field. func SprayNotIn(vs ...[]byte) predicate.Spray { v := make([]any, len(vs)) for i := range v { v[i] = vs[i] } return predicate.Spray(func(s *sql.Selector) { s.Where(sql.NotIn(s.C(FieldSpray), v...)) }) } // SprayGT applies the GT predicate on the "spray" field. func SprayGT(v []byte) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { s.Where(sql.GT(s.C(FieldSpray), v)) }) } // SprayGTE applies the GTE predicate on the "spray" field. func SprayGTE(v []byte) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { s.Where(sql.GTE(s.C(FieldSpray), v)) }) } // SprayLT applies the LT predicate on the "spray" field. func SprayLT(v []byte) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { s.Where(sql.LT(s.C(FieldSpray), v)) }) } // SprayLTE applies the LTE predicate on the "spray" field. func SprayLTE(v []byte) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { s.Where(sql.LTE(s.C(FieldSpray), v)) }) } // HasMatchPlayers applies the HasEdge predicate on the "match_players" edge. func HasMatchPlayers() predicate.Spray { return predicate.Spray(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.To(MatchPlayersTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, MatchPlayersTable, MatchPlayersColumn), ) sqlgraph.HasNeighbors(s, step) }) } // HasMatchPlayersWith applies the HasEdge predicate on the "match_players" edge with a given conditions (other predicates). func HasMatchPlayersWith(preds ...predicate.MatchPlayer) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.To(MatchPlayersInverseTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, MatchPlayersTable, MatchPlayersColumn), ) 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.Spray) predicate.Spray { return predicate.Spray(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.Spray) predicate.Spray { return predicate.Spray(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.Spray) predicate.Spray { return predicate.Spray(func(s *sql.Selector) { p(s.Not()) }) }