where.go•11 kB
// Code generated by ent, DO NOT EDIT.
package session
import (
"time"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/Southclaws/storyden/internal/ent/predicate"
"github.com/rs/xid"
)
// ID filters vertices based on their ID field.
func ID(id xid.ID) predicate.Session {
return predicate.Session(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id xid.ID) predicate.Session {
return predicate.Session(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id xid.ID) predicate.Session {
return predicate.Session(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...xid.ID) predicate.Session {
return predicate.Session(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...xid.ID) predicate.Session {
return predicate.Session(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id xid.ID) predicate.Session {
return predicate.Session(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id xid.ID) predicate.Session {
return predicate.Session(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id xid.ID) predicate.Session {
return predicate.Session(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id xid.ID) predicate.Session {
return predicate.Session(sql.FieldLTE(FieldID, id))
}
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.Session {
return predicate.Session(sql.FieldEQ(FieldCreatedAt, v))
}
// AccountID applies equality check predicate on the "account_id" field. It's identical to AccountIDEQ.
func AccountID(v xid.ID) predicate.Session {
return predicate.Session(sql.FieldEQ(FieldAccountID, v))
}
// ExpiresAt applies equality check predicate on the "expires_at" field. It's identical to ExpiresAtEQ.
func ExpiresAt(v time.Time) predicate.Session {
return predicate.Session(sql.FieldEQ(FieldExpiresAt, v))
}
// RevokedAt applies equality check predicate on the "revoked_at" field. It's identical to RevokedAtEQ.
func RevokedAt(v time.Time) predicate.Session {
return predicate.Session(sql.FieldEQ(FieldRevokedAt, v))
}
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtEQ(v time.Time) predicate.Session {
return predicate.Session(sql.FieldEQ(FieldCreatedAt, v))
}
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNEQ(v time.Time) predicate.Session {
return predicate.Session(sql.FieldNEQ(FieldCreatedAt, v))
}
// CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtIn(vs ...time.Time) predicate.Session {
return predicate.Session(sql.FieldIn(FieldCreatedAt, vs...))
}
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedAtNotIn(vs ...time.Time) predicate.Session {
return predicate.Session(sql.FieldNotIn(FieldCreatedAt, vs...))
}
// CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGT(v time.Time) predicate.Session {
return predicate.Session(sql.FieldGT(FieldCreatedAt, v))
}
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtGTE(v time.Time) predicate.Session {
return predicate.Session(sql.FieldGTE(FieldCreatedAt, v))
}
// CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLT(v time.Time) predicate.Session {
return predicate.Session(sql.FieldLT(FieldCreatedAt, v))
}
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtLTE(v time.Time) predicate.Session {
return predicate.Session(sql.FieldLTE(FieldCreatedAt, v))
}
// AccountIDEQ applies the EQ predicate on the "account_id" field.
func AccountIDEQ(v xid.ID) predicate.Session {
return predicate.Session(sql.FieldEQ(FieldAccountID, v))
}
// AccountIDNEQ applies the NEQ predicate on the "account_id" field.
func AccountIDNEQ(v xid.ID) predicate.Session {
return predicate.Session(sql.FieldNEQ(FieldAccountID, v))
}
// AccountIDIn applies the In predicate on the "account_id" field.
func AccountIDIn(vs ...xid.ID) predicate.Session {
return predicate.Session(sql.FieldIn(FieldAccountID, vs...))
}
// AccountIDNotIn applies the NotIn predicate on the "account_id" field.
func AccountIDNotIn(vs ...xid.ID) predicate.Session {
return predicate.Session(sql.FieldNotIn(FieldAccountID, vs...))
}
// AccountIDGT applies the GT predicate on the "account_id" field.
func AccountIDGT(v xid.ID) predicate.Session {
return predicate.Session(sql.FieldGT(FieldAccountID, v))
}
// AccountIDGTE applies the GTE predicate on the "account_id" field.
func AccountIDGTE(v xid.ID) predicate.Session {
return predicate.Session(sql.FieldGTE(FieldAccountID, v))
}
// AccountIDLT applies the LT predicate on the "account_id" field.
func AccountIDLT(v xid.ID) predicate.Session {
return predicate.Session(sql.FieldLT(FieldAccountID, v))
}
// AccountIDLTE applies the LTE predicate on the "account_id" field.
func AccountIDLTE(v xid.ID) predicate.Session {
return predicate.Session(sql.FieldLTE(FieldAccountID, v))
}
// AccountIDContains applies the Contains predicate on the "account_id" field.
func AccountIDContains(v xid.ID) predicate.Session {
vc := v.String()
return predicate.Session(sql.FieldContains(FieldAccountID, vc))
}
// AccountIDHasPrefix applies the HasPrefix predicate on the "account_id" field.
func AccountIDHasPrefix(v xid.ID) predicate.Session {
vc := v.String()
return predicate.Session(sql.FieldHasPrefix(FieldAccountID, vc))
}
// AccountIDHasSuffix applies the HasSuffix predicate on the "account_id" field.
func AccountIDHasSuffix(v xid.ID) predicate.Session {
vc := v.String()
return predicate.Session(sql.FieldHasSuffix(FieldAccountID, vc))
}
// AccountIDEqualFold applies the EqualFold predicate on the "account_id" field.
func AccountIDEqualFold(v xid.ID) predicate.Session {
vc := v.String()
return predicate.Session(sql.FieldEqualFold(FieldAccountID, vc))
}
// AccountIDContainsFold applies the ContainsFold predicate on the "account_id" field.
func AccountIDContainsFold(v xid.ID) predicate.Session {
vc := v.String()
return predicate.Session(sql.FieldContainsFold(FieldAccountID, vc))
}
// ExpiresAtEQ applies the EQ predicate on the "expires_at" field.
func ExpiresAtEQ(v time.Time) predicate.Session {
return predicate.Session(sql.FieldEQ(FieldExpiresAt, v))
}
// ExpiresAtNEQ applies the NEQ predicate on the "expires_at" field.
func ExpiresAtNEQ(v time.Time) predicate.Session {
return predicate.Session(sql.FieldNEQ(FieldExpiresAt, v))
}
// ExpiresAtIn applies the In predicate on the "expires_at" field.
func ExpiresAtIn(vs ...time.Time) predicate.Session {
return predicate.Session(sql.FieldIn(FieldExpiresAt, vs...))
}
// ExpiresAtNotIn applies the NotIn predicate on the "expires_at" field.
func ExpiresAtNotIn(vs ...time.Time) predicate.Session {
return predicate.Session(sql.FieldNotIn(FieldExpiresAt, vs...))
}
// ExpiresAtGT applies the GT predicate on the "expires_at" field.
func ExpiresAtGT(v time.Time) predicate.Session {
return predicate.Session(sql.FieldGT(FieldExpiresAt, v))
}
// ExpiresAtGTE applies the GTE predicate on the "expires_at" field.
func ExpiresAtGTE(v time.Time) predicate.Session {
return predicate.Session(sql.FieldGTE(FieldExpiresAt, v))
}
// ExpiresAtLT applies the LT predicate on the "expires_at" field.
func ExpiresAtLT(v time.Time) predicate.Session {
return predicate.Session(sql.FieldLT(FieldExpiresAt, v))
}
// ExpiresAtLTE applies the LTE predicate on the "expires_at" field.
func ExpiresAtLTE(v time.Time) predicate.Session {
return predicate.Session(sql.FieldLTE(FieldExpiresAt, v))
}
// RevokedAtEQ applies the EQ predicate on the "revoked_at" field.
func RevokedAtEQ(v time.Time) predicate.Session {
return predicate.Session(sql.FieldEQ(FieldRevokedAt, v))
}
// RevokedAtNEQ applies the NEQ predicate on the "revoked_at" field.
func RevokedAtNEQ(v time.Time) predicate.Session {
return predicate.Session(sql.FieldNEQ(FieldRevokedAt, v))
}
// RevokedAtIn applies the In predicate on the "revoked_at" field.
func RevokedAtIn(vs ...time.Time) predicate.Session {
return predicate.Session(sql.FieldIn(FieldRevokedAt, vs...))
}
// RevokedAtNotIn applies the NotIn predicate on the "revoked_at" field.
func RevokedAtNotIn(vs ...time.Time) predicate.Session {
return predicate.Session(sql.FieldNotIn(FieldRevokedAt, vs...))
}
// RevokedAtGT applies the GT predicate on the "revoked_at" field.
func RevokedAtGT(v time.Time) predicate.Session {
return predicate.Session(sql.FieldGT(FieldRevokedAt, v))
}
// RevokedAtGTE applies the GTE predicate on the "revoked_at" field.
func RevokedAtGTE(v time.Time) predicate.Session {
return predicate.Session(sql.FieldGTE(FieldRevokedAt, v))
}
// RevokedAtLT applies the LT predicate on the "revoked_at" field.
func RevokedAtLT(v time.Time) predicate.Session {
return predicate.Session(sql.FieldLT(FieldRevokedAt, v))
}
// RevokedAtLTE applies the LTE predicate on the "revoked_at" field.
func RevokedAtLTE(v time.Time) predicate.Session {
return predicate.Session(sql.FieldLTE(FieldRevokedAt, v))
}
// RevokedAtIsNil applies the IsNil predicate on the "revoked_at" field.
func RevokedAtIsNil() predicate.Session {
return predicate.Session(sql.FieldIsNull(FieldRevokedAt))
}
// RevokedAtNotNil applies the NotNil predicate on the "revoked_at" field.
func RevokedAtNotNil() predicate.Session {
return predicate.Session(sql.FieldNotNull(FieldRevokedAt))
}
// HasAccount applies the HasEdge predicate on the "account" edge.
func HasAccount() predicate.Session {
return predicate.Session(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, AccountTable, AccountColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasAccountWith applies the HasEdge predicate on the "account" edge with a given conditions (other predicates).
func HasAccountWith(preds ...predicate.Account) predicate.Session {
return predicate.Session(func(s *sql.Selector) {
step := newAccountStep()
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.Session) predicate.Session {
return predicate.Session(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.Session) predicate.Session {
return predicate.Session(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.Session) predicate.Session {
return predicate.Session(sql.NotPredicates(p))
}