348 lines
9.8 KiB
Go
348 lines
9.8 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package blacklist
|
|
|
|
import (
|
|
"entgo.io/ent/dialect/sql"
|
|
"github.com/FrankenBotDev/FrankenAPI/ent/predicate"
|
|
)
|
|
|
|
// ID filters vertices based on their ID field.
|
|
func ID(id int) predicate.Blacklist {
|
|
return predicate.Blacklist(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.Blacklist {
|
|
return predicate.Blacklist(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.Blacklist {
|
|
return predicate.Blacklist(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.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
v := make([]interface{}, 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.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
v := make([]interface{}, 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.Blacklist {
|
|
return predicate.Blacklist(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.Blacklist {
|
|
return predicate.Blacklist(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.Blacklist {
|
|
return predicate.Blacklist(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.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldID), id))
|
|
})
|
|
}
|
|
|
|
// Serverid applies equality check predicate on the "serverid" field. It's identical to ServeridEQ.
|
|
func Serverid(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldServerid), v))
|
|
})
|
|
}
|
|
|
|
// Word applies equality check predicate on the "word" field. It's identical to WordEQ.
|
|
func Word(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldWord), v))
|
|
})
|
|
}
|
|
|
|
// ServeridEQ applies the EQ predicate on the "serverid" field.
|
|
func ServeridEQ(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldServerid), v))
|
|
})
|
|
}
|
|
|
|
// ServeridNEQ applies the NEQ predicate on the "serverid" field.
|
|
func ServeridNEQ(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldServerid), v))
|
|
})
|
|
}
|
|
|
|
// ServeridIn applies the In predicate on the "serverid" field.
|
|
func ServeridIn(vs ...string) predicate.Blacklist {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Blacklist(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(FieldServerid), v...))
|
|
})
|
|
}
|
|
|
|
// ServeridNotIn applies the NotIn predicate on the "serverid" field.
|
|
func ServeridNotIn(vs ...string) predicate.Blacklist {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Blacklist(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(FieldServerid), v...))
|
|
})
|
|
}
|
|
|
|
// ServeridGT applies the GT predicate on the "serverid" field.
|
|
func ServeridGT(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldServerid), v))
|
|
})
|
|
}
|
|
|
|
// ServeridGTE applies the GTE predicate on the "serverid" field.
|
|
func ServeridGTE(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldServerid), v))
|
|
})
|
|
}
|
|
|
|
// ServeridLT applies the LT predicate on the "serverid" field.
|
|
func ServeridLT(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldServerid), v))
|
|
})
|
|
}
|
|
|
|
// ServeridLTE applies the LTE predicate on the "serverid" field.
|
|
func ServeridLTE(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldServerid), v))
|
|
})
|
|
}
|
|
|
|
// ServeridContains applies the Contains predicate on the "serverid" field.
|
|
func ServeridContains(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.Contains(s.C(FieldServerid), v))
|
|
})
|
|
}
|
|
|
|
// ServeridHasPrefix applies the HasPrefix predicate on the "serverid" field.
|
|
func ServeridHasPrefix(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.HasPrefix(s.C(FieldServerid), v))
|
|
})
|
|
}
|
|
|
|
// ServeridHasSuffix applies the HasSuffix predicate on the "serverid" field.
|
|
func ServeridHasSuffix(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.HasSuffix(s.C(FieldServerid), v))
|
|
})
|
|
}
|
|
|
|
// ServeridEqualFold applies the EqualFold predicate on the "serverid" field.
|
|
func ServeridEqualFold(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.EqualFold(s.C(FieldServerid), v))
|
|
})
|
|
}
|
|
|
|
// ServeridContainsFold applies the ContainsFold predicate on the "serverid" field.
|
|
func ServeridContainsFold(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.ContainsFold(s.C(FieldServerid), v))
|
|
})
|
|
}
|
|
|
|
// WordEQ applies the EQ predicate on the "word" field.
|
|
func WordEQ(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldWord), v))
|
|
})
|
|
}
|
|
|
|
// WordNEQ applies the NEQ predicate on the "word" field.
|
|
func WordNEQ(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldWord), v))
|
|
})
|
|
}
|
|
|
|
// WordIn applies the In predicate on the "word" field.
|
|
func WordIn(vs ...string) predicate.Blacklist {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Blacklist(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(FieldWord), v...))
|
|
})
|
|
}
|
|
|
|
// WordNotIn applies the NotIn predicate on the "word" field.
|
|
func WordNotIn(vs ...string) predicate.Blacklist {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Blacklist(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(FieldWord), v...))
|
|
})
|
|
}
|
|
|
|
// WordGT applies the GT predicate on the "word" field.
|
|
func WordGT(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldWord), v))
|
|
})
|
|
}
|
|
|
|
// WordGTE applies the GTE predicate on the "word" field.
|
|
func WordGTE(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldWord), v))
|
|
})
|
|
}
|
|
|
|
// WordLT applies the LT predicate on the "word" field.
|
|
func WordLT(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldWord), v))
|
|
})
|
|
}
|
|
|
|
// WordLTE applies the LTE predicate on the "word" field.
|
|
func WordLTE(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldWord), v))
|
|
})
|
|
}
|
|
|
|
// WordContains applies the Contains predicate on the "word" field.
|
|
func WordContains(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.Contains(s.C(FieldWord), v))
|
|
})
|
|
}
|
|
|
|
// WordHasPrefix applies the HasPrefix predicate on the "word" field.
|
|
func WordHasPrefix(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.HasPrefix(s.C(FieldWord), v))
|
|
})
|
|
}
|
|
|
|
// WordHasSuffix applies the HasSuffix predicate on the "word" field.
|
|
func WordHasSuffix(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.HasSuffix(s.C(FieldWord), v))
|
|
})
|
|
}
|
|
|
|
// WordEqualFold applies the EqualFold predicate on the "word" field.
|
|
func WordEqualFold(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.EqualFold(s.C(FieldWord), v))
|
|
})
|
|
}
|
|
|
|
// WordContainsFold applies the ContainsFold predicate on the "word" field.
|
|
func WordContainsFold(v string) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
s.Where(sql.ContainsFold(s.C(FieldWord), v))
|
|
})
|
|
}
|
|
|
|
// And groups predicates with the AND operator between them.
|
|
func And(predicates ...predicate.Blacklist) predicate.Blacklist {
|
|
return predicate.Blacklist(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.Blacklist) predicate.Blacklist {
|
|
return predicate.Blacklist(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.Blacklist) predicate.Blacklist {
|
|
return predicate.Blacklist(func(s *sql.Selector) {
|
|
p(s.Not())
|
|
})
|
|
}
|