466 lines
14 KiB
Go
466 lines
14 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package socialmedia
|
|
|
|
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.Socialmedia {
|
|
return predicate.Socialmedia(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.Socialmedia {
|
|
return predicate.Socialmedia(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.Socialmedia {
|
|
return predicate.Socialmedia(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.Socialmedia {
|
|
return predicate.Socialmedia(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.Socialmedia {
|
|
return predicate.Socialmedia(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.Socialmedia {
|
|
return predicate.Socialmedia(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.Socialmedia {
|
|
return predicate.Socialmedia(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.Socialmedia {
|
|
return predicate.Socialmedia(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.Socialmedia {
|
|
return predicate.Socialmedia(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.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldServerid), v))
|
|
})
|
|
}
|
|
|
|
// Type applies equality check predicate on the "type" field. It's identical to TypeEQ.
|
|
func Type(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// Identificator applies equality check predicate on the "identificator" field. It's identical to IdentificatorEQ.
|
|
func Identificator(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldIdentificator), v))
|
|
})
|
|
}
|
|
|
|
// ServeridEQ applies the EQ predicate on the "serverid" field.
|
|
func ServeridEQ(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(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.Socialmedia {
|
|
return predicate.Socialmedia(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.Socialmedia {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Socialmedia(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.Socialmedia {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Socialmedia(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.Socialmedia {
|
|
return predicate.Socialmedia(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.Socialmedia {
|
|
return predicate.Socialmedia(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.Socialmedia {
|
|
return predicate.Socialmedia(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.Socialmedia {
|
|
return predicate.Socialmedia(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.Socialmedia {
|
|
return predicate.Socialmedia(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.Socialmedia {
|
|
return predicate.Socialmedia(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.Socialmedia {
|
|
return predicate.Socialmedia(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.Socialmedia {
|
|
return predicate.Socialmedia(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.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.ContainsFold(s.C(FieldServerid), v))
|
|
})
|
|
}
|
|
|
|
// TypeEQ applies the EQ predicate on the "type" field.
|
|
func TypeEQ(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// TypeNEQ applies the NEQ predicate on the "type" field.
|
|
func TypeNEQ(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// TypeIn applies the In predicate on the "type" field.
|
|
func TypeIn(vs ...string) predicate.Socialmedia {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Socialmedia(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(FieldType), v...))
|
|
})
|
|
}
|
|
|
|
// TypeNotIn applies the NotIn predicate on the "type" field.
|
|
func TypeNotIn(vs ...string) predicate.Socialmedia {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Socialmedia(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(FieldType), v...))
|
|
})
|
|
}
|
|
|
|
// TypeGT applies the GT predicate on the "type" field.
|
|
func TypeGT(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// TypeGTE applies the GTE predicate on the "type" field.
|
|
func TypeGTE(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// TypeLT applies the LT predicate on the "type" field.
|
|
func TypeLT(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// TypeLTE applies the LTE predicate on the "type" field.
|
|
func TypeLTE(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// TypeContains applies the Contains predicate on the "type" field.
|
|
func TypeContains(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.Contains(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// TypeHasPrefix applies the HasPrefix predicate on the "type" field.
|
|
func TypeHasPrefix(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.HasPrefix(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// TypeHasSuffix applies the HasSuffix predicate on the "type" field.
|
|
func TypeHasSuffix(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.HasSuffix(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// TypeEqualFold applies the EqualFold predicate on the "type" field.
|
|
func TypeEqualFold(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.EqualFold(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// TypeContainsFold applies the ContainsFold predicate on the "type" field.
|
|
func TypeContainsFold(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.ContainsFold(s.C(FieldType), v))
|
|
})
|
|
}
|
|
|
|
// IdentificatorEQ applies the EQ predicate on the "identificator" field.
|
|
func IdentificatorEQ(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldIdentificator), v))
|
|
})
|
|
}
|
|
|
|
// IdentificatorNEQ applies the NEQ predicate on the "identificator" field.
|
|
func IdentificatorNEQ(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldIdentificator), v))
|
|
})
|
|
}
|
|
|
|
// IdentificatorIn applies the In predicate on the "identificator" field.
|
|
func IdentificatorIn(vs ...string) predicate.Socialmedia {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Socialmedia(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(FieldIdentificator), v...))
|
|
})
|
|
}
|
|
|
|
// IdentificatorNotIn applies the NotIn predicate on the "identificator" field.
|
|
func IdentificatorNotIn(vs ...string) predicate.Socialmedia {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Socialmedia(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(FieldIdentificator), v...))
|
|
})
|
|
}
|
|
|
|
// IdentificatorGT applies the GT predicate on the "identificator" field.
|
|
func IdentificatorGT(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldIdentificator), v))
|
|
})
|
|
}
|
|
|
|
// IdentificatorGTE applies the GTE predicate on the "identificator" field.
|
|
func IdentificatorGTE(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldIdentificator), v))
|
|
})
|
|
}
|
|
|
|
// IdentificatorLT applies the LT predicate on the "identificator" field.
|
|
func IdentificatorLT(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldIdentificator), v))
|
|
})
|
|
}
|
|
|
|
// IdentificatorLTE applies the LTE predicate on the "identificator" field.
|
|
func IdentificatorLTE(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldIdentificator), v))
|
|
})
|
|
}
|
|
|
|
// IdentificatorContains applies the Contains predicate on the "identificator" field.
|
|
func IdentificatorContains(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.Contains(s.C(FieldIdentificator), v))
|
|
})
|
|
}
|
|
|
|
// IdentificatorHasPrefix applies the HasPrefix predicate on the "identificator" field.
|
|
func IdentificatorHasPrefix(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.HasPrefix(s.C(FieldIdentificator), v))
|
|
})
|
|
}
|
|
|
|
// IdentificatorHasSuffix applies the HasSuffix predicate on the "identificator" field.
|
|
func IdentificatorHasSuffix(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.HasSuffix(s.C(FieldIdentificator), v))
|
|
})
|
|
}
|
|
|
|
// IdentificatorEqualFold applies the EqualFold predicate on the "identificator" field.
|
|
func IdentificatorEqualFold(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.EqualFold(s.C(FieldIdentificator), v))
|
|
})
|
|
}
|
|
|
|
// IdentificatorContainsFold applies the ContainsFold predicate on the "identificator" field.
|
|
func IdentificatorContainsFold(v string) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
s.Where(sql.ContainsFold(s.C(FieldIdentificator), v))
|
|
})
|
|
}
|
|
|
|
// And groups predicates with the AND operator between them.
|
|
func And(predicates ...predicate.Socialmedia) predicate.Socialmedia {
|
|
return predicate.Socialmedia(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.Socialmedia) predicate.Socialmedia {
|
|
return predicate.Socialmedia(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.Socialmedia) predicate.Socialmedia {
|
|
return predicate.Socialmedia(func(s *sql.Selector) {
|
|
p(s.Not())
|
|
})
|
|
}
|