273 lines
8.2 KiB
Go
273 lines
8.2 KiB
Go
|
// Code generated by ent, DO NOT EDIT.
|
||
|
|
||
|
package agekey
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
|
||
|
"entgo.io/ent/dialect/sql"
|
||
|
"entgo.io/ent/dialect/sql/sqlgraph"
|
||
|
"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.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldEQ(FieldID, id))
|
||
|
}
|
||
|
|
||
|
// IDEQ applies the EQ predicate on the ID field.
|
||
|
func IDEQ(id uuid.UUID) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldEQ(FieldID, id))
|
||
|
}
|
||
|
|
||
|
// IDNEQ applies the NEQ predicate on the ID field.
|
||
|
func IDNEQ(id uuid.UUID) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldNEQ(FieldID, id))
|
||
|
}
|
||
|
|
||
|
// IDIn applies the In predicate on the ID field.
|
||
|
func IDIn(ids ...uuid.UUID) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldIn(FieldID, ids...))
|
||
|
}
|
||
|
|
||
|
// IDNotIn applies the NotIn predicate on the ID field.
|
||
|
func IDNotIn(ids ...uuid.UUID) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldNotIn(FieldID, ids...))
|
||
|
}
|
||
|
|
||
|
// IDGT applies the GT predicate on the ID field.
|
||
|
func IDGT(id uuid.UUID) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldGT(FieldID, id))
|
||
|
}
|
||
|
|
||
|
// IDGTE applies the GTE predicate on the ID field.
|
||
|
func IDGTE(id uuid.UUID) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldGTE(FieldID, id))
|
||
|
}
|
||
|
|
||
|
// IDLT applies the LT predicate on the ID field.
|
||
|
func IDLT(id uuid.UUID) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldLT(FieldID, id))
|
||
|
}
|
||
|
|
||
|
// IDLTE applies the LTE predicate on the ID field.
|
||
|
func IDLTE(id uuid.UUID) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldLTE(FieldID, id))
|
||
|
}
|
||
|
|
||
|
// Key applies equality check predicate on the "key" field. It's identical to KeyEQ.
|
||
|
func Key(v []byte) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldEQ(FieldKey, v))
|
||
|
}
|
||
|
|
||
|
// Created applies equality check predicate on the "created" field. It's identical to CreatedEQ.
|
||
|
func Created(v time.Time) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldEQ(FieldCreated, v))
|
||
|
}
|
||
|
|
||
|
// Updated applies equality check predicate on the "updated" field. It's identical to UpdatedEQ.
|
||
|
func Updated(v time.Time) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldEQ(FieldUpdated, v))
|
||
|
}
|
||
|
|
||
|
// Owner applies equality check predicate on the "owner" field. It's identical to OwnerEQ.
|
||
|
func Owner(v uuid.UUID) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldEQ(FieldOwner, v))
|
||
|
}
|
||
|
|
||
|
// KeyEQ applies the EQ predicate on the "key" field.
|
||
|
func KeyEQ(v []byte) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldEQ(FieldKey, v))
|
||
|
}
|
||
|
|
||
|
// KeyNEQ applies the NEQ predicate on the "key" field.
|
||
|
func KeyNEQ(v []byte) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldNEQ(FieldKey, v))
|
||
|
}
|
||
|
|
||
|
// KeyIn applies the In predicate on the "key" field.
|
||
|
func KeyIn(vs ...[]byte) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldIn(FieldKey, vs...))
|
||
|
}
|
||
|
|
||
|
// KeyNotIn applies the NotIn predicate on the "key" field.
|
||
|
func KeyNotIn(vs ...[]byte) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldNotIn(FieldKey, vs...))
|
||
|
}
|
||
|
|
||
|
// KeyGT applies the GT predicate on the "key" field.
|
||
|
func KeyGT(v []byte) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldGT(FieldKey, v))
|
||
|
}
|
||
|
|
||
|
// KeyGTE applies the GTE predicate on the "key" field.
|
||
|
func KeyGTE(v []byte) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldGTE(FieldKey, v))
|
||
|
}
|
||
|
|
||
|
// KeyLT applies the LT predicate on the "key" field.
|
||
|
func KeyLT(v []byte) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldLT(FieldKey, v))
|
||
|
}
|
||
|
|
||
|
// KeyLTE applies the LTE predicate on the "key" field.
|
||
|
func KeyLTE(v []byte) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldLTE(FieldKey, v))
|
||
|
}
|
||
|
|
||
|
// CreatedEQ applies the EQ predicate on the "created" field.
|
||
|
func CreatedEQ(v time.Time) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldEQ(FieldCreated, v))
|
||
|
}
|
||
|
|
||
|
// CreatedNEQ applies the NEQ predicate on the "created" field.
|
||
|
func CreatedNEQ(v time.Time) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldNEQ(FieldCreated, v))
|
||
|
}
|
||
|
|
||
|
// CreatedIn applies the In predicate on the "created" field.
|
||
|
func CreatedIn(vs ...time.Time) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldIn(FieldCreated, vs...))
|
||
|
}
|
||
|
|
||
|
// CreatedNotIn applies the NotIn predicate on the "created" field.
|
||
|
func CreatedNotIn(vs ...time.Time) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldNotIn(FieldCreated, vs...))
|
||
|
}
|
||
|
|
||
|
// CreatedGT applies the GT predicate on the "created" field.
|
||
|
func CreatedGT(v time.Time) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldGT(FieldCreated, v))
|
||
|
}
|
||
|
|
||
|
// CreatedGTE applies the GTE predicate on the "created" field.
|
||
|
func CreatedGTE(v time.Time) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldGTE(FieldCreated, v))
|
||
|
}
|
||
|
|
||
|
// CreatedLT applies the LT predicate on the "created" field.
|
||
|
func CreatedLT(v time.Time) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldLT(FieldCreated, v))
|
||
|
}
|
||
|
|
||
|
// CreatedLTE applies the LTE predicate on the "created" field.
|
||
|
func CreatedLTE(v time.Time) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldLTE(FieldCreated, v))
|
||
|
}
|
||
|
|
||
|
// UpdatedEQ applies the EQ predicate on the "updated" field.
|
||
|
func UpdatedEQ(v time.Time) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldEQ(FieldUpdated, v))
|
||
|
}
|
||
|
|
||
|
// UpdatedNEQ applies the NEQ predicate on the "updated" field.
|
||
|
func UpdatedNEQ(v time.Time) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldNEQ(FieldUpdated, v))
|
||
|
}
|
||
|
|
||
|
// UpdatedIn applies the In predicate on the "updated" field.
|
||
|
func UpdatedIn(vs ...time.Time) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldIn(FieldUpdated, vs...))
|
||
|
}
|
||
|
|
||
|
// UpdatedNotIn applies the NotIn predicate on the "updated" field.
|
||
|
func UpdatedNotIn(vs ...time.Time) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldNotIn(FieldUpdated, vs...))
|
||
|
}
|
||
|
|
||
|
// UpdatedGT applies the GT predicate on the "updated" field.
|
||
|
func UpdatedGT(v time.Time) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldGT(FieldUpdated, v))
|
||
|
}
|
||
|
|
||
|
// UpdatedGTE applies the GTE predicate on the "updated" field.
|
||
|
func UpdatedGTE(v time.Time) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldGTE(FieldUpdated, v))
|
||
|
}
|
||
|
|
||
|
// UpdatedLT applies the LT predicate on the "updated" field.
|
||
|
func UpdatedLT(v time.Time) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldLT(FieldUpdated, v))
|
||
|
}
|
||
|
|
||
|
// UpdatedLTE applies the LTE predicate on the "updated" field.
|
||
|
func UpdatedLTE(v time.Time) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldLTE(FieldUpdated, v))
|
||
|
}
|
||
|
|
||
|
// OwnerEQ applies the EQ predicate on the "owner" field.
|
||
|
func OwnerEQ(v uuid.UUID) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldEQ(FieldOwner, v))
|
||
|
}
|
||
|
|
||
|
// OwnerNEQ applies the NEQ predicate on the "owner" field.
|
||
|
func OwnerNEQ(v uuid.UUID) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldNEQ(FieldOwner, v))
|
||
|
}
|
||
|
|
||
|
// OwnerIn applies the In predicate on the "owner" field.
|
||
|
func OwnerIn(vs ...uuid.UUID) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldIn(FieldOwner, vs...))
|
||
|
}
|
||
|
|
||
|
// OwnerNotIn applies the NotIn predicate on the "owner" field.
|
||
|
func OwnerNotIn(vs ...uuid.UUID) predicate.AgeKey {
|
||
|
return predicate.AgeKey(sql.FieldNotIn(FieldOwner, vs...))
|
||
|
}
|
||
|
|
||
|
// HasUser applies the HasEdge predicate on the "user" edge.
|
||
|
func HasUser() predicate.AgeKey {
|
||
|
return predicate.AgeKey(func(s *sql.Selector) {
|
||
|
step := sqlgraph.NewStep(
|
||
|
sqlgraph.From(Table, FieldID),
|
||
|
sqlgraph.Edge(sqlgraph.O2O, true, UserTable, UserColumn),
|
||
|
)
|
||
|
sqlgraph.HasNeighbors(s, step)
|
||
|
})
|
||
|
}
|
||
|
|
||
|
// HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
|
||
|
func HasUserWith(preds ...predicate.User) predicate.AgeKey {
|
||
|
return predicate.AgeKey(func(s *sql.Selector) {
|
||
|
step := newUserStep()
|
||
|
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.AgeKey) predicate.AgeKey {
|
||
|
return predicate.AgeKey(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.AgeKey) predicate.AgeKey {
|
||
|
return predicate.AgeKey(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.AgeKey) predicate.AgeKey {
|
||
|
return predicate.AgeKey(func(s *sql.Selector) {
|
||
|
p(s.Not())
|
||
|
})
|
||
|
}
|