Files
csgowtfd/ent/messages/where.go

339 lines
9.3 KiB
Go

// Code generated by ent, DO NOT EDIT.
package messages
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.Messages {
return predicate.Messages(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.Messages {
return predicate.Messages(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.Messages {
return predicate.Messages(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.Messages {
return predicate.Messages(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.Messages {
return predicate.Messages(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.Messages {
return predicate.Messages(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.Messages {
return predicate.Messages(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.Messages {
return predicate.Messages(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.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldID), id))
})
}
// Message applies equality check predicate on the "message" field. It's identical to MessageEQ.
func Message(v string) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldMessage), v))
})
}
// AllChat applies equality check predicate on the "all_chat" field. It's identical to AllChatEQ.
func AllChat(v bool) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldAllChat), v))
})
}
// Tick applies equality check predicate on the "tick" field. It's identical to TickEQ.
func Tick(v int) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldTick), v))
})
}
// MessageEQ applies the EQ predicate on the "message" field.
func MessageEQ(v string) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldMessage), v))
})
}
// MessageNEQ applies the NEQ predicate on the "message" field.
func MessageNEQ(v string) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldMessage), v))
})
}
// MessageIn applies the In predicate on the "message" field.
func MessageIn(vs ...string) predicate.Messages {
v := make([]any, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.In(s.C(FieldMessage), v...))
})
}
// MessageNotIn applies the NotIn predicate on the "message" field.
func MessageNotIn(vs ...string) predicate.Messages {
v := make([]any, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.NotIn(s.C(FieldMessage), v...))
})
}
// MessageGT applies the GT predicate on the "message" field.
func MessageGT(v string) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldMessage), v))
})
}
// MessageGTE applies the GTE predicate on the "message" field.
func MessageGTE(v string) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldMessage), v))
})
}
// MessageLT applies the LT predicate on the "message" field.
func MessageLT(v string) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldMessage), v))
})
}
// MessageLTE applies the LTE predicate on the "message" field.
func MessageLTE(v string) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldMessage), v))
})
}
// MessageContains applies the Contains predicate on the "message" field.
func MessageContains(v string) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.Contains(s.C(FieldMessage), v))
})
}
// MessageHasPrefix applies the HasPrefix predicate on the "message" field.
func MessageHasPrefix(v string) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.HasPrefix(s.C(FieldMessage), v))
})
}
// MessageHasSuffix applies the HasSuffix predicate on the "message" field.
func MessageHasSuffix(v string) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.HasSuffix(s.C(FieldMessage), v))
})
}
// MessageEqualFold applies the EqualFold predicate on the "message" field.
func MessageEqualFold(v string) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.EqualFold(s.C(FieldMessage), v))
})
}
// MessageContainsFold applies the ContainsFold predicate on the "message" field.
func MessageContainsFold(v string) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.ContainsFold(s.C(FieldMessage), v))
})
}
// AllChatEQ applies the EQ predicate on the "all_chat" field.
func AllChatEQ(v bool) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldAllChat), v))
})
}
// AllChatNEQ applies the NEQ predicate on the "all_chat" field.
func AllChatNEQ(v bool) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldAllChat), v))
})
}
// TickEQ applies the EQ predicate on the "tick" field.
func TickEQ(v int) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldTick), v))
})
}
// TickNEQ applies the NEQ predicate on the "tick" field.
func TickNEQ(v int) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldTick), v))
})
}
// TickIn applies the In predicate on the "tick" field.
func TickIn(vs ...int) predicate.Messages {
v := make([]any, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.In(s.C(FieldTick), v...))
})
}
// TickNotIn applies the NotIn predicate on the "tick" field.
func TickNotIn(vs ...int) predicate.Messages {
v := make([]any, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.NotIn(s.C(FieldTick), v...))
})
}
// TickGT applies the GT predicate on the "tick" field.
func TickGT(v int) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldTick), v))
})
}
// TickGTE applies the GTE predicate on the "tick" field.
func TickGTE(v int) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldTick), v))
})
}
// TickLT applies the LT predicate on the "tick" field.
func TickLT(v int) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldTick), v))
})
}
// TickLTE applies the LTE predicate on the "tick" field.
func TickLTE(v int) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldTick), v))
})
}
// HasMatchPlayer applies the HasEdge predicate on the "match_player" edge.
func HasMatchPlayer() predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(MatchPlayerTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, MatchPlayerTable, MatchPlayerColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasMatchPlayerWith applies the HasEdge predicate on the "match_player" edge with a given conditions (other predicates).
func HasMatchPlayerWith(preds ...predicate.MatchPlayer) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(MatchPlayerInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, MatchPlayerTable, MatchPlayerColumn),
)
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.Messages) predicate.Messages {
return predicate.Messages(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.Messages) predicate.Messages {
return predicate.Messages(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.Messages) predicate.Messages {
return predicate.Messages(func(s *sql.Selector) {
p(s.Not())
})
}