584 lines
18 KiB
Go
584 lines
18 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package authorizables
|
|
|
|
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.Authorizables {
|
|
return predicate.Authorizables(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.Authorizables {
|
|
return predicate.Authorizables(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.Authorizables {
|
|
return predicate.Authorizables(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.Authorizables {
|
|
return predicate.Authorizables(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.Authorizables {
|
|
return predicate.Authorizables(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.Authorizables {
|
|
return predicate.Authorizables(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.Authorizables {
|
|
return predicate.Authorizables(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.Authorizables {
|
|
return predicate.Authorizables(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.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldID), id))
|
|
})
|
|
}
|
|
|
|
// Username applies equality check predicate on the "username" field. It's identical to UsernameEQ.
|
|
func Username(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldUsername), v))
|
|
})
|
|
}
|
|
|
|
// Password applies equality check predicate on the "password" field. It's identical to PasswordEQ.
|
|
func Password(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldPassword), v))
|
|
})
|
|
}
|
|
|
|
// Serverid applies equality check predicate on the "serverid" field. It's identical to ServeridEQ.
|
|
func Serverid(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldServerid), v))
|
|
})
|
|
}
|
|
|
|
// Userid applies equality check predicate on the "userid" field. It's identical to UseridEQ.
|
|
func Userid(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldUserid), v))
|
|
})
|
|
}
|
|
|
|
// UsernameEQ applies the EQ predicate on the "username" field.
|
|
func UsernameEQ(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldUsername), v))
|
|
})
|
|
}
|
|
|
|
// UsernameNEQ applies the NEQ predicate on the "username" field.
|
|
func UsernameNEQ(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldUsername), v))
|
|
})
|
|
}
|
|
|
|
// UsernameIn applies the In predicate on the "username" field.
|
|
func UsernameIn(vs ...string) predicate.Authorizables {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Authorizables(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(FieldUsername), v...))
|
|
})
|
|
}
|
|
|
|
// UsernameNotIn applies the NotIn predicate on the "username" field.
|
|
func UsernameNotIn(vs ...string) predicate.Authorizables {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Authorizables(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(FieldUsername), v...))
|
|
})
|
|
}
|
|
|
|
// UsernameGT applies the GT predicate on the "username" field.
|
|
func UsernameGT(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldUsername), v))
|
|
})
|
|
}
|
|
|
|
// UsernameGTE applies the GTE predicate on the "username" field.
|
|
func UsernameGTE(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldUsername), v))
|
|
})
|
|
}
|
|
|
|
// UsernameLT applies the LT predicate on the "username" field.
|
|
func UsernameLT(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldUsername), v))
|
|
})
|
|
}
|
|
|
|
// UsernameLTE applies the LTE predicate on the "username" field.
|
|
func UsernameLTE(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldUsername), v))
|
|
})
|
|
}
|
|
|
|
// UsernameContains applies the Contains predicate on the "username" field.
|
|
func UsernameContains(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.Contains(s.C(FieldUsername), v))
|
|
})
|
|
}
|
|
|
|
// UsernameHasPrefix applies the HasPrefix predicate on the "username" field.
|
|
func UsernameHasPrefix(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.HasPrefix(s.C(FieldUsername), v))
|
|
})
|
|
}
|
|
|
|
// UsernameHasSuffix applies the HasSuffix predicate on the "username" field.
|
|
func UsernameHasSuffix(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.HasSuffix(s.C(FieldUsername), v))
|
|
})
|
|
}
|
|
|
|
// UsernameEqualFold applies the EqualFold predicate on the "username" field.
|
|
func UsernameEqualFold(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.EqualFold(s.C(FieldUsername), v))
|
|
})
|
|
}
|
|
|
|
// UsernameContainsFold applies the ContainsFold predicate on the "username" field.
|
|
func UsernameContainsFold(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.ContainsFold(s.C(FieldUsername), v))
|
|
})
|
|
}
|
|
|
|
// PasswordEQ applies the EQ predicate on the "password" field.
|
|
func PasswordEQ(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldPassword), v))
|
|
})
|
|
}
|
|
|
|
// PasswordNEQ applies the NEQ predicate on the "password" field.
|
|
func PasswordNEQ(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldPassword), v))
|
|
})
|
|
}
|
|
|
|
// PasswordIn applies the In predicate on the "password" field.
|
|
func PasswordIn(vs ...string) predicate.Authorizables {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Authorizables(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(FieldPassword), v...))
|
|
})
|
|
}
|
|
|
|
// PasswordNotIn applies the NotIn predicate on the "password" field.
|
|
func PasswordNotIn(vs ...string) predicate.Authorizables {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Authorizables(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(FieldPassword), v...))
|
|
})
|
|
}
|
|
|
|
// PasswordGT applies the GT predicate on the "password" field.
|
|
func PasswordGT(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldPassword), v))
|
|
})
|
|
}
|
|
|
|
// PasswordGTE applies the GTE predicate on the "password" field.
|
|
func PasswordGTE(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldPassword), v))
|
|
})
|
|
}
|
|
|
|
// PasswordLT applies the LT predicate on the "password" field.
|
|
func PasswordLT(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldPassword), v))
|
|
})
|
|
}
|
|
|
|
// PasswordLTE applies the LTE predicate on the "password" field.
|
|
func PasswordLTE(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldPassword), v))
|
|
})
|
|
}
|
|
|
|
// PasswordContains applies the Contains predicate on the "password" field.
|
|
func PasswordContains(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.Contains(s.C(FieldPassword), v))
|
|
})
|
|
}
|
|
|
|
// PasswordHasPrefix applies the HasPrefix predicate on the "password" field.
|
|
func PasswordHasPrefix(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.HasPrefix(s.C(FieldPassword), v))
|
|
})
|
|
}
|
|
|
|
// PasswordHasSuffix applies the HasSuffix predicate on the "password" field.
|
|
func PasswordHasSuffix(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.HasSuffix(s.C(FieldPassword), v))
|
|
})
|
|
}
|
|
|
|
// PasswordEqualFold applies the EqualFold predicate on the "password" field.
|
|
func PasswordEqualFold(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.EqualFold(s.C(FieldPassword), v))
|
|
})
|
|
}
|
|
|
|
// PasswordContainsFold applies the ContainsFold predicate on the "password" field.
|
|
func PasswordContainsFold(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.ContainsFold(s.C(FieldPassword), v))
|
|
})
|
|
}
|
|
|
|
// ServeridEQ applies the EQ predicate on the "serverid" field.
|
|
func ServeridEQ(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(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.Authorizables {
|
|
return predicate.Authorizables(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.Authorizables {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Authorizables(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.Authorizables {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Authorizables(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.Authorizables {
|
|
return predicate.Authorizables(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.Authorizables {
|
|
return predicate.Authorizables(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.Authorizables {
|
|
return predicate.Authorizables(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.Authorizables {
|
|
return predicate.Authorizables(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.Authorizables {
|
|
return predicate.Authorizables(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.Authorizables {
|
|
return predicate.Authorizables(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.Authorizables {
|
|
return predicate.Authorizables(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.Authorizables {
|
|
return predicate.Authorizables(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.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.ContainsFold(s.C(FieldServerid), v))
|
|
})
|
|
}
|
|
|
|
// UseridEQ applies the EQ predicate on the "userid" field.
|
|
func UseridEQ(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.EQ(s.C(FieldUserid), v))
|
|
})
|
|
}
|
|
|
|
// UseridNEQ applies the NEQ predicate on the "userid" field.
|
|
func UseridNEQ(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.NEQ(s.C(FieldUserid), v))
|
|
})
|
|
}
|
|
|
|
// UseridIn applies the In predicate on the "userid" field.
|
|
func UseridIn(vs ...string) predicate.Authorizables {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Authorizables(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(FieldUserid), v...))
|
|
})
|
|
}
|
|
|
|
// UseridNotIn applies the NotIn predicate on the "userid" field.
|
|
func UseridNotIn(vs ...string) predicate.Authorizables {
|
|
v := make([]interface{}, len(vs))
|
|
for i := range v {
|
|
v[i] = vs[i]
|
|
}
|
|
return predicate.Authorizables(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(FieldUserid), v...))
|
|
})
|
|
}
|
|
|
|
// UseridGT applies the GT predicate on the "userid" field.
|
|
func UseridGT(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.GT(s.C(FieldUserid), v))
|
|
})
|
|
}
|
|
|
|
// UseridGTE applies the GTE predicate on the "userid" field.
|
|
func UseridGTE(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.GTE(s.C(FieldUserid), v))
|
|
})
|
|
}
|
|
|
|
// UseridLT applies the LT predicate on the "userid" field.
|
|
func UseridLT(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.LT(s.C(FieldUserid), v))
|
|
})
|
|
}
|
|
|
|
// UseridLTE applies the LTE predicate on the "userid" field.
|
|
func UseridLTE(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.LTE(s.C(FieldUserid), v))
|
|
})
|
|
}
|
|
|
|
// UseridContains applies the Contains predicate on the "userid" field.
|
|
func UseridContains(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.Contains(s.C(FieldUserid), v))
|
|
})
|
|
}
|
|
|
|
// UseridHasPrefix applies the HasPrefix predicate on the "userid" field.
|
|
func UseridHasPrefix(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.HasPrefix(s.C(FieldUserid), v))
|
|
})
|
|
}
|
|
|
|
// UseridHasSuffix applies the HasSuffix predicate on the "userid" field.
|
|
func UseridHasSuffix(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.HasSuffix(s.C(FieldUserid), v))
|
|
})
|
|
}
|
|
|
|
// UseridEqualFold applies the EqualFold predicate on the "userid" field.
|
|
func UseridEqualFold(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.EqualFold(s.C(FieldUserid), v))
|
|
})
|
|
}
|
|
|
|
// UseridContainsFold applies the ContainsFold predicate on the "userid" field.
|
|
func UseridContainsFold(v string) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
s.Where(sql.ContainsFold(s.C(FieldUserid), v))
|
|
})
|
|
}
|
|
|
|
// And groups predicates with the AND operator between them.
|
|
func And(predicates ...predicate.Authorizables) predicate.Authorizables {
|
|
return predicate.Authorizables(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.Authorizables) predicate.Authorizables {
|
|
return predicate.Authorizables(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.Authorizables) predicate.Authorizables {
|
|
return predicate.Authorizables(func(s *sql.Selector) {
|
|
p(s.Not())
|
|
})
|
|
}
|