manager/ent/mailbox/where.go

1417 lines
41 KiB
Go
Raw Normal View History

2022-04-08 21:26:25 +02:00
// Code generated by entc, DO NOT EDIT.
package mailbox
import (
"time"
"code.icod.de/postfix/manager/ent/predicate"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
)
// ID filters vertices based on their ID field.
func ID(id int64) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldID), id))
})
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int64) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldID), id))
})
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int64) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldID), id))
})
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int64) predicate.Mailbox {
return predicate.Mailbox(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(ids) == 0 {
s.Where(sql.False())
return
}
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 ...int64) predicate.Mailbox {
return predicate.Mailbox(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(ids) == 0 {
s.Where(sql.False())
return
}
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 int64) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldID), id))
})
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int64) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldID), id))
})
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int64) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldID), id))
})
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int64) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldID), id))
})
}
// Active applies equality check predicate on the "active" field. It's identical to ActiveEQ.
func Active(v bool) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldActive), v))
})
}
// Created applies equality check predicate on the "created" field. It's identical to CreatedEQ.
func Created(v time.Time) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldCreated), v))
})
}
// Modified applies equality check predicate on the "modified" field. It's identical to ModifiedEQ.
func Modified(v time.Time) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldModified), v))
})
}
// DomainID applies equality check predicate on the "domain_id" field. It's identical to DomainIDEQ.
func DomainID(v int64) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldDomainID), v))
})
}
// Username applies equality check predicate on the "username" field. It's identical to UsernameEQ.
func Username(v string) predicate.Mailbox {
return predicate.Mailbox(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 []byte) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldPassword), v))
})
}
// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
func Name(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldName), v))
})
}
// Quota applies equality check predicate on the "quota" field. It's identical to QuotaEQ.
func Quota(v int64) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldQuota), v))
})
}
// LocalPart applies equality check predicate on the "local_part" field. It's identical to LocalPartEQ.
func LocalPart(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldLocalPart), v))
})
}
// Homedir applies equality check predicate on the "homedir" field. It's identical to HomedirEQ.
func Homedir(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldHomedir), v))
})
}
// Maildir applies equality check predicate on the "maildir" field. It's identical to MaildirEQ.
func Maildir(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldMaildir), v))
})
}
// UID applies equality check predicate on the "uid" field. It's identical to UIDEQ.
func UID(v int32) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldUID), v))
})
}
// Gid applies equality check predicate on the "gid" field. It's identical to GidEQ.
func Gid(v int32) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldGid), v))
})
}
// ActiveEQ applies the EQ predicate on the "active" field.
func ActiveEQ(v bool) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldActive), v))
})
}
// ActiveNEQ applies the NEQ predicate on the "active" field.
func ActiveNEQ(v bool) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldActive), v))
})
}
// CreatedEQ applies the EQ predicate on the "created" field.
func CreatedEQ(v time.Time) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldCreated), v))
})
}
// CreatedNEQ applies the NEQ predicate on the "created" field.
func CreatedNEQ(v time.Time) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldCreated), v))
})
}
// CreatedIn applies the In predicate on the "created" field.
func CreatedIn(vs ...time.Time) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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(FieldCreated), v...))
})
}
// CreatedNotIn applies the NotIn predicate on the "created" field.
func CreatedNotIn(vs ...time.Time) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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(FieldCreated), v...))
})
}
// CreatedGT applies the GT predicate on the "created" field.
func CreatedGT(v time.Time) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldCreated), v))
})
}
// CreatedGTE applies the GTE predicate on the "created" field.
func CreatedGTE(v time.Time) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldCreated), v))
})
}
// CreatedLT applies the LT predicate on the "created" field.
func CreatedLT(v time.Time) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldCreated), v))
})
}
// CreatedLTE applies the LTE predicate on the "created" field.
func CreatedLTE(v time.Time) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldCreated), v))
})
}
// ModifiedEQ applies the EQ predicate on the "modified" field.
func ModifiedEQ(v time.Time) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldModified), v))
})
}
// ModifiedNEQ applies the NEQ predicate on the "modified" field.
func ModifiedNEQ(v time.Time) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldModified), v))
})
}
// ModifiedIn applies the In predicate on the "modified" field.
func ModifiedIn(vs ...time.Time) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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(FieldModified), v...))
})
}
// ModifiedNotIn applies the NotIn predicate on the "modified" field.
func ModifiedNotIn(vs ...time.Time) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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(FieldModified), v...))
})
}
// ModifiedGT applies the GT predicate on the "modified" field.
func ModifiedGT(v time.Time) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldModified), v))
})
}
// ModifiedGTE applies the GTE predicate on the "modified" field.
func ModifiedGTE(v time.Time) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldModified), v))
})
}
// ModifiedLT applies the LT predicate on the "modified" field.
func ModifiedLT(v time.Time) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldModified), v))
})
}
// ModifiedLTE applies the LTE predicate on the "modified" field.
func ModifiedLTE(v time.Time) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldModified), v))
})
}
// ModifiedIsNil applies the IsNil predicate on the "modified" field.
func ModifiedIsNil() predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.IsNull(s.C(FieldModified)))
})
}
// ModifiedNotNil applies the NotNil predicate on the "modified" field.
func ModifiedNotNil() predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.NotNull(s.C(FieldModified)))
})
}
// DomainIDEQ applies the EQ predicate on the "domain_id" field.
func DomainIDEQ(v int64) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldDomainID), v))
})
}
// DomainIDNEQ applies the NEQ predicate on the "domain_id" field.
func DomainIDNEQ(v int64) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldDomainID), v))
})
}
// DomainIDIn applies the In predicate on the "domain_id" field.
func DomainIDIn(vs ...int64) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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(FieldDomainID), v...))
})
}
// DomainIDNotIn applies the NotIn predicate on the "domain_id" field.
func DomainIDNotIn(vs ...int64) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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(FieldDomainID), v...))
})
}
// DomainIDIsNil applies the IsNil predicate on the "domain_id" field.
func DomainIDIsNil() predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.IsNull(s.C(FieldDomainID)))
})
}
// DomainIDNotNil applies the NotNil predicate on the "domain_id" field.
func DomainIDNotNil() predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.NotNull(s.C(FieldDomainID)))
})
}
// UsernameEQ applies the EQ predicate on the "username" field.
func UsernameEQ(v string) predicate.Mailbox {
return predicate.Mailbox(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.Mailbox {
return predicate.Mailbox(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.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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.Mailbox {
return predicate.Mailbox(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.Mailbox {
return predicate.Mailbox(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.Mailbox {
return predicate.Mailbox(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.Mailbox {
return predicate.Mailbox(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.Mailbox {
return predicate.Mailbox(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.Mailbox {
return predicate.Mailbox(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.Mailbox {
return predicate.Mailbox(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.Mailbox {
return predicate.Mailbox(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.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.ContainsFold(s.C(FieldUsername), v))
})
}
// PasswordEQ applies the EQ predicate on the "password" field.
func PasswordEQ(v []byte) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldPassword), v))
})
}
// PasswordNEQ applies the NEQ predicate on the "password" field.
func PasswordNEQ(v []byte) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldPassword), v))
})
}
// PasswordIn applies the In predicate on the "password" field.
func PasswordIn(vs ...[]byte) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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 ...[]byte) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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 []byte) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldPassword), v))
})
}
// PasswordGTE applies the GTE predicate on the "password" field.
func PasswordGTE(v []byte) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldPassword), v))
})
}
// PasswordLT applies the LT predicate on the "password" field.
func PasswordLT(v []byte) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldPassword), v))
})
}
// PasswordLTE applies the LTE predicate on the "password" field.
func PasswordLTE(v []byte) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldPassword), v))
})
}
// NameEQ applies the EQ predicate on the "name" field.
func NameEQ(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldName), v))
})
}
// NameNEQ applies the NEQ predicate on the "name" field.
func NameNEQ(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldName), v))
})
}
// NameIn applies the In predicate on the "name" field.
func NameIn(vs ...string) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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(FieldName), v...))
})
}
// NameNotIn applies the NotIn predicate on the "name" field.
func NameNotIn(vs ...string) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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(FieldName), v...))
})
}
// NameGT applies the GT predicate on the "name" field.
func NameGT(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldName), v))
})
}
// NameGTE applies the GTE predicate on the "name" field.
func NameGTE(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldName), v))
})
}
// NameLT applies the LT predicate on the "name" field.
func NameLT(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldName), v))
})
}
// NameLTE applies the LTE predicate on the "name" field.
func NameLTE(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldName), v))
})
}
// NameContains applies the Contains predicate on the "name" field.
func NameContains(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.Contains(s.C(FieldName), v))
})
}
// NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasPrefix(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.HasPrefix(s.C(FieldName), v))
})
}
// NameHasSuffix applies the HasSuffix predicate on the "name" field.
func NameHasSuffix(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.HasSuffix(s.C(FieldName), v))
})
}
// NameIsNil applies the IsNil predicate on the "name" field.
func NameIsNil() predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.IsNull(s.C(FieldName)))
})
}
// NameNotNil applies the NotNil predicate on the "name" field.
func NameNotNil() predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.NotNull(s.C(FieldName)))
})
}
// NameEqualFold applies the EqualFold predicate on the "name" field.
func NameEqualFold(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EqualFold(s.C(FieldName), v))
})
}
// NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameContainsFold(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.ContainsFold(s.C(FieldName), v))
})
}
// QuotaEQ applies the EQ predicate on the "quota" field.
func QuotaEQ(v int64) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldQuota), v))
})
}
// QuotaNEQ applies the NEQ predicate on the "quota" field.
func QuotaNEQ(v int64) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldQuota), v))
})
}
// QuotaIn applies the In predicate on the "quota" field.
func QuotaIn(vs ...int64) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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(FieldQuota), v...))
})
}
// QuotaNotIn applies the NotIn predicate on the "quota" field.
func QuotaNotIn(vs ...int64) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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(FieldQuota), v...))
})
}
// QuotaGT applies the GT predicate on the "quota" field.
func QuotaGT(v int64) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldQuota), v))
})
}
// QuotaGTE applies the GTE predicate on the "quota" field.
func QuotaGTE(v int64) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldQuota), v))
})
}
// QuotaLT applies the LT predicate on the "quota" field.
func QuotaLT(v int64) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldQuota), v))
})
}
// QuotaLTE applies the LTE predicate on the "quota" field.
func QuotaLTE(v int64) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldQuota), v))
})
}
// LocalPartEQ applies the EQ predicate on the "local_part" field.
func LocalPartEQ(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldLocalPart), v))
})
}
// LocalPartNEQ applies the NEQ predicate on the "local_part" field.
func LocalPartNEQ(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldLocalPart), v))
})
}
// LocalPartIn applies the In predicate on the "local_part" field.
func LocalPartIn(vs ...string) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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(FieldLocalPart), v...))
})
}
// LocalPartNotIn applies the NotIn predicate on the "local_part" field.
func LocalPartNotIn(vs ...string) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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(FieldLocalPart), v...))
})
}
// LocalPartGT applies the GT predicate on the "local_part" field.
func LocalPartGT(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldLocalPart), v))
})
}
// LocalPartGTE applies the GTE predicate on the "local_part" field.
func LocalPartGTE(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldLocalPart), v))
})
}
// LocalPartLT applies the LT predicate on the "local_part" field.
func LocalPartLT(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldLocalPart), v))
})
}
// LocalPartLTE applies the LTE predicate on the "local_part" field.
func LocalPartLTE(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldLocalPart), v))
})
}
// LocalPartContains applies the Contains predicate on the "local_part" field.
func LocalPartContains(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.Contains(s.C(FieldLocalPart), v))
})
}
// LocalPartHasPrefix applies the HasPrefix predicate on the "local_part" field.
func LocalPartHasPrefix(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.HasPrefix(s.C(FieldLocalPart), v))
})
}
// LocalPartHasSuffix applies the HasSuffix predicate on the "local_part" field.
func LocalPartHasSuffix(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.HasSuffix(s.C(FieldLocalPart), v))
})
}
// LocalPartEqualFold applies the EqualFold predicate on the "local_part" field.
func LocalPartEqualFold(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EqualFold(s.C(FieldLocalPart), v))
})
}
// LocalPartContainsFold applies the ContainsFold predicate on the "local_part" field.
func LocalPartContainsFold(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.ContainsFold(s.C(FieldLocalPart), v))
})
}
// HomedirEQ applies the EQ predicate on the "homedir" field.
func HomedirEQ(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldHomedir), v))
})
}
// HomedirNEQ applies the NEQ predicate on the "homedir" field.
func HomedirNEQ(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldHomedir), v))
})
}
// HomedirIn applies the In predicate on the "homedir" field.
func HomedirIn(vs ...string) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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(FieldHomedir), v...))
})
}
// HomedirNotIn applies the NotIn predicate on the "homedir" field.
func HomedirNotIn(vs ...string) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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(FieldHomedir), v...))
})
}
// HomedirGT applies the GT predicate on the "homedir" field.
func HomedirGT(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldHomedir), v))
})
}
// HomedirGTE applies the GTE predicate on the "homedir" field.
func HomedirGTE(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldHomedir), v))
})
}
// HomedirLT applies the LT predicate on the "homedir" field.
func HomedirLT(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldHomedir), v))
})
}
// HomedirLTE applies the LTE predicate on the "homedir" field.
func HomedirLTE(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldHomedir), v))
})
}
// HomedirContains applies the Contains predicate on the "homedir" field.
func HomedirContains(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.Contains(s.C(FieldHomedir), v))
})
}
// HomedirHasPrefix applies the HasPrefix predicate on the "homedir" field.
func HomedirHasPrefix(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.HasPrefix(s.C(FieldHomedir), v))
})
}
// HomedirHasSuffix applies the HasSuffix predicate on the "homedir" field.
func HomedirHasSuffix(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.HasSuffix(s.C(FieldHomedir), v))
})
}
// HomedirIsNil applies the IsNil predicate on the "homedir" field.
func HomedirIsNil() predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.IsNull(s.C(FieldHomedir)))
})
}
// HomedirNotNil applies the NotNil predicate on the "homedir" field.
func HomedirNotNil() predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.NotNull(s.C(FieldHomedir)))
})
}
// HomedirEqualFold applies the EqualFold predicate on the "homedir" field.
func HomedirEqualFold(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EqualFold(s.C(FieldHomedir), v))
})
}
// HomedirContainsFold applies the ContainsFold predicate on the "homedir" field.
func HomedirContainsFold(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.ContainsFold(s.C(FieldHomedir), v))
})
}
// MaildirEQ applies the EQ predicate on the "maildir" field.
func MaildirEQ(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldMaildir), v))
})
}
// MaildirNEQ applies the NEQ predicate on the "maildir" field.
func MaildirNEQ(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldMaildir), v))
})
}
// MaildirIn applies the In predicate on the "maildir" field.
func MaildirIn(vs ...string) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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(FieldMaildir), v...))
})
}
// MaildirNotIn applies the NotIn predicate on the "maildir" field.
func MaildirNotIn(vs ...string) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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(FieldMaildir), v...))
})
}
// MaildirGT applies the GT predicate on the "maildir" field.
func MaildirGT(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldMaildir), v))
})
}
// MaildirGTE applies the GTE predicate on the "maildir" field.
func MaildirGTE(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldMaildir), v))
})
}
// MaildirLT applies the LT predicate on the "maildir" field.
func MaildirLT(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldMaildir), v))
})
}
// MaildirLTE applies the LTE predicate on the "maildir" field.
func MaildirLTE(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldMaildir), v))
})
}
// MaildirContains applies the Contains predicate on the "maildir" field.
func MaildirContains(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.Contains(s.C(FieldMaildir), v))
})
}
// MaildirHasPrefix applies the HasPrefix predicate on the "maildir" field.
func MaildirHasPrefix(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.HasPrefix(s.C(FieldMaildir), v))
})
}
// MaildirHasSuffix applies the HasSuffix predicate on the "maildir" field.
func MaildirHasSuffix(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.HasSuffix(s.C(FieldMaildir), v))
})
}
// MaildirIsNil applies the IsNil predicate on the "maildir" field.
func MaildirIsNil() predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.IsNull(s.C(FieldMaildir)))
})
}
// MaildirNotNil applies the NotNil predicate on the "maildir" field.
func MaildirNotNil() predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.NotNull(s.C(FieldMaildir)))
})
}
// MaildirEqualFold applies the EqualFold predicate on the "maildir" field.
func MaildirEqualFold(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EqualFold(s.C(FieldMaildir), v))
})
}
// MaildirContainsFold applies the ContainsFold predicate on the "maildir" field.
func MaildirContainsFold(v string) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.ContainsFold(s.C(FieldMaildir), v))
})
}
// UIDEQ applies the EQ predicate on the "uid" field.
func UIDEQ(v int32) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldUID), v))
})
}
// UIDNEQ applies the NEQ predicate on the "uid" field.
func UIDNEQ(v int32) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldUID), v))
})
}
// UIDIn applies the In predicate on the "uid" field.
func UIDIn(vs ...int32) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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(FieldUID), v...))
})
}
// UIDNotIn applies the NotIn predicate on the "uid" field.
func UIDNotIn(vs ...int32) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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(FieldUID), v...))
})
}
// UIDGT applies the GT predicate on the "uid" field.
func UIDGT(v int32) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldUID), v))
})
}
// UIDGTE applies the GTE predicate on the "uid" field.
func UIDGTE(v int32) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldUID), v))
})
}
// UIDLT applies the LT predicate on the "uid" field.
func UIDLT(v int32) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldUID), v))
})
}
// UIDLTE applies the LTE predicate on the "uid" field.
func UIDLTE(v int32) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldUID), v))
})
}
// UIDIsNil applies the IsNil predicate on the "uid" field.
func UIDIsNil() predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.IsNull(s.C(FieldUID)))
})
}
// UIDNotNil applies the NotNil predicate on the "uid" field.
func UIDNotNil() predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.NotNull(s.C(FieldUID)))
})
}
// GidEQ applies the EQ predicate on the "gid" field.
func GidEQ(v int32) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldGid), v))
})
}
// GidNEQ applies the NEQ predicate on the "gid" field.
func GidNEQ(v int32) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldGid), v))
})
}
// GidIn applies the In predicate on the "gid" field.
func GidIn(vs ...int32) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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(FieldGid), v...))
})
}
// GidNotIn applies the NotIn predicate on the "gid" field.
func GidNotIn(vs ...int32) predicate.Mailbox {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Mailbox(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(FieldGid), v...))
})
}
// GidGT applies the GT predicate on the "gid" field.
func GidGT(v int32) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldGid), v))
})
}
// GidGTE applies the GTE predicate on the "gid" field.
func GidGTE(v int32) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldGid), v))
})
}
// GidLT applies the LT predicate on the "gid" field.
func GidLT(v int32) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldGid), v))
})
}
// GidLTE applies the LTE predicate on the "gid" field.
func GidLTE(v int32) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldGid), v))
})
}
// GidIsNil applies the IsNil predicate on the "gid" field.
func GidIsNil() predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.IsNull(s.C(FieldGid)))
})
}
// GidNotNil applies the NotNil predicate on the "gid" field.
func GidNotNil() predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
s.Where(sql.NotNull(s.C(FieldGid)))
})
}
// HasDomain applies the HasEdge predicate on the "domain" edge.
func HasDomain() predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(DomainTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, DomainTable, DomainColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasDomainWith applies the HasEdge predicate on the "domain" edge with a given conditions (other predicates).
func HasDomainWith(preds ...predicate.Domain) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(DomainInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, DomainTable, DomainColumn),
)
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.Mailbox) predicate.Mailbox {
return predicate.Mailbox(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.Mailbox) predicate.Mailbox {
return predicate.Mailbox(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.Mailbox) predicate.Mailbox {
return predicate.Mailbox(func(s *sql.Selector) {
p(s.Not())
})
}