pcmt/ent/setup/where.go

134 lines
3.7 KiB
Go
Raw Normal View History

2023-05-05 22:52:59 +02:00
// Code generated by ent, DO NOT EDIT.
package setup
import (
"time"
"entgo.io/ent/dialect/sql"
"git.dotya.ml/mirre-mt/pcmt/ent/predicate"
"github.com/google/uuid"
)
// ID filters vertices based on their ID field.
func ID(id uuid.UUID) predicate.Setup {
return predicate.Setup(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id uuid.UUID) predicate.Setup {
return predicate.Setup(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id uuid.UUID) predicate.Setup {
return predicate.Setup(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...uuid.UUID) predicate.Setup {
return predicate.Setup(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...uuid.UUID) predicate.Setup {
return predicate.Setup(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id uuid.UUID) predicate.Setup {
return predicate.Setup(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id uuid.UUID) predicate.Setup {
return predicate.Setup(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id uuid.UUID) predicate.Setup {
return predicate.Setup(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id uuid.UUID) predicate.Setup {
return predicate.Setup(sql.FieldLTE(FieldID, id))
}
// SetUpAt applies equality check predicate on the "set_up_at" field. It's identical to SetUpAtEQ.
func SetUpAt(v time.Time) predicate.Setup {
return predicate.Setup(sql.FieldEQ(FieldSetUpAt, v))
}
// SetUpAtEQ applies the EQ predicate on the "set_up_at" field.
func SetUpAtEQ(v time.Time) predicate.Setup {
return predicate.Setup(sql.FieldEQ(FieldSetUpAt, v))
}
// SetUpAtNEQ applies the NEQ predicate on the "set_up_at" field.
func SetUpAtNEQ(v time.Time) predicate.Setup {
return predicate.Setup(sql.FieldNEQ(FieldSetUpAt, v))
}
// SetUpAtIn applies the In predicate on the "set_up_at" field.
func SetUpAtIn(vs ...time.Time) predicate.Setup {
return predicate.Setup(sql.FieldIn(FieldSetUpAt, vs...))
}
// SetUpAtNotIn applies the NotIn predicate on the "set_up_at" field.
func SetUpAtNotIn(vs ...time.Time) predicate.Setup {
return predicate.Setup(sql.FieldNotIn(FieldSetUpAt, vs...))
}
// SetUpAtGT applies the GT predicate on the "set_up_at" field.
func SetUpAtGT(v time.Time) predicate.Setup {
return predicate.Setup(sql.FieldGT(FieldSetUpAt, v))
}
// SetUpAtGTE applies the GTE predicate on the "set_up_at" field.
func SetUpAtGTE(v time.Time) predicate.Setup {
return predicate.Setup(sql.FieldGTE(FieldSetUpAt, v))
}
// SetUpAtLT applies the LT predicate on the "set_up_at" field.
func SetUpAtLT(v time.Time) predicate.Setup {
return predicate.Setup(sql.FieldLT(FieldSetUpAt, v))
}
// SetUpAtLTE applies the LTE predicate on the "set_up_at" field.
func SetUpAtLTE(v time.Time) predicate.Setup {
return predicate.Setup(sql.FieldLTE(FieldSetUpAt, v))
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.Setup) predicate.Setup {
return predicate.Setup(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.Setup) predicate.Setup {
return predicate.Setup(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.Setup) predicate.Setup {
return predicate.Setup(func(s *sql.Selector) {
p(s.Not())
})
}