2022-09-08 09:18:04 +02:00

808 lines
25 KiB
Go

// Code generated by ent, DO NOT EDIT.
package supportresponse
import (
"time"
"entgo.io/ent/dialect/sql"
"github.com/FrankenBotDev/FrankenAPI/ent/predicate"
)
// ID filters vertices based on their ID field.
func ID(id int) predicate.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldID), id))
})
}
// Refid applies equality check predicate on the "refid" field. It's identical to RefidEQ.
func Refid(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldRefid), v))
})
}
// Writer applies equality check predicate on the "writer" field. It's identical to WriterEQ.
func Writer(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldWriter), v))
})
}
// Message applies equality check predicate on the "message" field. It's identical to MessageEQ.
func Message(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldMessage), v))
})
}
// Type applies equality check predicate on the "type" field. It's identical to TypeEQ.
func Type(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldType), v))
})
}
// Rtcchannel applies equality check predicate on the "rtcchannel" field. It's identical to RtcchannelEQ.
func Rtcchannel(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldRtcchannel), v))
})
}
// Isread applies equality check predicate on the "isread" field. It's identical to IsreadEQ.
func Isread(v bool) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldIsread), v))
})
}
// Created applies equality check predicate on the "created" field. It's identical to CreatedEQ.
func Created(v time.Time) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldCreated), v))
})
}
// RefidEQ applies the EQ predicate on the "refid" field.
func RefidEQ(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldRefid), v))
})
}
// RefidNEQ applies the NEQ predicate on the "refid" field.
func RefidNEQ(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldRefid), v))
})
}
// RefidIn applies the In predicate on the "refid" field.
func RefidIn(vs ...string) predicate.SupportResponse {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.SupportResponse(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(FieldRefid), v...))
})
}
// RefidNotIn applies the NotIn predicate on the "refid" field.
func RefidNotIn(vs ...string) predicate.SupportResponse {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.SupportResponse(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(FieldRefid), v...))
})
}
// RefidGT applies the GT predicate on the "refid" field.
func RefidGT(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldRefid), v))
})
}
// RefidGTE applies the GTE predicate on the "refid" field.
func RefidGTE(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldRefid), v))
})
}
// RefidLT applies the LT predicate on the "refid" field.
func RefidLT(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldRefid), v))
})
}
// RefidLTE applies the LTE predicate on the "refid" field.
func RefidLTE(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldRefid), v))
})
}
// RefidContains applies the Contains predicate on the "refid" field.
func RefidContains(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.Contains(s.C(FieldRefid), v))
})
}
// RefidHasPrefix applies the HasPrefix predicate on the "refid" field.
func RefidHasPrefix(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.HasPrefix(s.C(FieldRefid), v))
})
}
// RefidHasSuffix applies the HasSuffix predicate on the "refid" field.
func RefidHasSuffix(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.HasSuffix(s.C(FieldRefid), v))
})
}
// RefidEqualFold applies the EqualFold predicate on the "refid" field.
func RefidEqualFold(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.EqualFold(s.C(FieldRefid), v))
})
}
// RefidContainsFold applies the ContainsFold predicate on the "refid" field.
func RefidContainsFold(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.ContainsFold(s.C(FieldRefid), v))
})
}
// WriterEQ applies the EQ predicate on the "writer" field.
func WriterEQ(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldWriter), v))
})
}
// WriterNEQ applies the NEQ predicate on the "writer" field.
func WriterNEQ(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldWriter), v))
})
}
// WriterIn applies the In predicate on the "writer" field.
func WriterIn(vs ...string) predicate.SupportResponse {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.SupportResponse(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(FieldWriter), v...))
})
}
// WriterNotIn applies the NotIn predicate on the "writer" field.
func WriterNotIn(vs ...string) predicate.SupportResponse {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.SupportResponse(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(FieldWriter), v...))
})
}
// WriterGT applies the GT predicate on the "writer" field.
func WriterGT(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldWriter), v))
})
}
// WriterGTE applies the GTE predicate on the "writer" field.
func WriterGTE(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldWriter), v))
})
}
// WriterLT applies the LT predicate on the "writer" field.
func WriterLT(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldWriter), v))
})
}
// WriterLTE applies the LTE predicate on the "writer" field.
func WriterLTE(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldWriter), v))
})
}
// WriterContains applies the Contains predicate on the "writer" field.
func WriterContains(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.Contains(s.C(FieldWriter), v))
})
}
// WriterHasPrefix applies the HasPrefix predicate on the "writer" field.
func WriterHasPrefix(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.HasPrefix(s.C(FieldWriter), v))
})
}
// WriterHasSuffix applies the HasSuffix predicate on the "writer" field.
func WriterHasSuffix(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.HasSuffix(s.C(FieldWriter), v))
})
}
// WriterEqualFold applies the EqualFold predicate on the "writer" field.
func WriterEqualFold(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.EqualFold(s.C(FieldWriter), v))
})
}
// WriterContainsFold applies the ContainsFold predicate on the "writer" field.
func WriterContainsFold(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.ContainsFold(s.C(FieldWriter), v))
})
}
// MessageEQ applies the EQ predicate on the "message" field.
func MessageEQ(v string) predicate.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.SupportResponse(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(FieldMessage), v...))
})
}
// MessageNotIn applies the NotIn predicate on the "message" field.
func MessageNotIn(vs ...string) predicate.SupportResponse {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.SupportResponse(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(FieldMessage), v...))
})
}
// MessageGT applies the GT predicate on the "message" field.
func MessageGT(v string) predicate.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.ContainsFold(s.C(FieldMessage), v))
})
}
// TypeEQ applies the EQ predicate on the "type" field.
func TypeEQ(v string) predicate.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.SupportResponse(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.SupportResponse {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.ContainsFold(s.C(FieldType), v))
})
}
// RtcchannelEQ applies the EQ predicate on the "rtcchannel" field.
func RtcchannelEQ(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldRtcchannel), v))
})
}
// RtcchannelNEQ applies the NEQ predicate on the "rtcchannel" field.
func RtcchannelNEQ(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldRtcchannel), v))
})
}
// RtcchannelIn applies the In predicate on the "rtcchannel" field.
func RtcchannelIn(vs ...string) predicate.SupportResponse {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.SupportResponse(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(FieldRtcchannel), v...))
})
}
// RtcchannelNotIn applies the NotIn predicate on the "rtcchannel" field.
func RtcchannelNotIn(vs ...string) predicate.SupportResponse {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.SupportResponse(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(FieldRtcchannel), v...))
})
}
// RtcchannelGT applies the GT predicate on the "rtcchannel" field.
func RtcchannelGT(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldRtcchannel), v))
})
}
// RtcchannelGTE applies the GTE predicate on the "rtcchannel" field.
func RtcchannelGTE(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldRtcchannel), v))
})
}
// RtcchannelLT applies the LT predicate on the "rtcchannel" field.
func RtcchannelLT(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldRtcchannel), v))
})
}
// RtcchannelLTE applies the LTE predicate on the "rtcchannel" field.
func RtcchannelLTE(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldRtcchannel), v))
})
}
// RtcchannelContains applies the Contains predicate on the "rtcchannel" field.
func RtcchannelContains(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.Contains(s.C(FieldRtcchannel), v))
})
}
// RtcchannelHasPrefix applies the HasPrefix predicate on the "rtcchannel" field.
func RtcchannelHasPrefix(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.HasPrefix(s.C(FieldRtcchannel), v))
})
}
// RtcchannelHasSuffix applies the HasSuffix predicate on the "rtcchannel" field.
func RtcchannelHasSuffix(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.HasSuffix(s.C(FieldRtcchannel), v))
})
}
// RtcchannelEqualFold applies the EqualFold predicate on the "rtcchannel" field.
func RtcchannelEqualFold(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.EqualFold(s.C(FieldRtcchannel), v))
})
}
// RtcchannelContainsFold applies the ContainsFold predicate on the "rtcchannel" field.
func RtcchannelContainsFold(v string) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.ContainsFold(s.C(FieldRtcchannel), v))
})
}
// IsreadEQ applies the EQ predicate on the "isread" field.
func IsreadEQ(v bool) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldIsread), v))
})
}
// IsreadNEQ applies the NEQ predicate on the "isread" field.
func IsreadNEQ(v bool) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldIsread), v))
})
}
// CreatedEQ applies the EQ predicate on the "created" field.
func CreatedEQ(v time.Time) predicate.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.SupportResponse(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.SupportResponse {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(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.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldCreated), v))
})
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.SupportResponse) predicate.SupportResponse {
return predicate.SupportResponse(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.SupportResponse) predicate.SupportResponse {
return predicate.SupportResponse(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.SupportResponse) predicate.SupportResponse {
return predicate.SupportResponse(func(s *sql.Selector) {
p(s.Not())
})
}