where.go•10.9 kB
// Code generated by ent, DO NOT EDIT.
package postread
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.PostRead {
return predicate.PostRead(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldLTE(FieldID, id))
}
// RootPostID applies equality check predicate on the "root_post_id" field. It's identical to RootPostIDEQ.
func RootPostID(v xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldEQ(FieldRootPostID, v))
}
// AccountID applies equality check predicate on the "account_id" field. It's identical to AccountIDEQ.
func AccountID(v xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldEQ(FieldAccountID, v))
}
// LastSeenAt applies equality check predicate on the "last_seen_at" field. It's identical to LastSeenAtEQ.
func LastSeenAt(v time.Time) predicate.PostRead {
return predicate.PostRead(sql.FieldEQ(FieldLastSeenAt, v))
}
// RootPostIDEQ applies the EQ predicate on the "root_post_id" field.
func RootPostIDEQ(v xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldEQ(FieldRootPostID, v))
}
// RootPostIDNEQ applies the NEQ predicate on the "root_post_id" field.
func RootPostIDNEQ(v xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldNEQ(FieldRootPostID, v))
}
// RootPostIDIn applies the In predicate on the "root_post_id" field.
func RootPostIDIn(vs ...xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldIn(FieldRootPostID, vs...))
}
// RootPostIDNotIn applies the NotIn predicate on the "root_post_id" field.
func RootPostIDNotIn(vs ...xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldNotIn(FieldRootPostID, vs...))
}
// RootPostIDGT applies the GT predicate on the "root_post_id" field.
func RootPostIDGT(v xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldGT(FieldRootPostID, v))
}
// RootPostIDGTE applies the GTE predicate on the "root_post_id" field.
func RootPostIDGTE(v xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldGTE(FieldRootPostID, v))
}
// RootPostIDLT applies the LT predicate on the "root_post_id" field.
func RootPostIDLT(v xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldLT(FieldRootPostID, v))
}
// RootPostIDLTE applies the LTE predicate on the "root_post_id" field.
func RootPostIDLTE(v xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldLTE(FieldRootPostID, v))
}
// RootPostIDContains applies the Contains predicate on the "root_post_id" field.
func RootPostIDContains(v xid.ID) predicate.PostRead {
vc := v.String()
return predicate.PostRead(sql.FieldContains(FieldRootPostID, vc))
}
// RootPostIDHasPrefix applies the HasPrefix predicate on the "root_post_id" field.
func RootPostIDHasPrefix(v xid.ID) predicate.PostRead {
vc := v.String()
return predicate.PostRead(sql.FieldHasPrefix(FieldRootPostID, vc))
}
// RootPostIDHasSuffix applies the HasSuffix predicate on the "root_post_id" field.
func RootPostIDHasSuffix(v xid.ID) predicate.PostRead {
vc := v.String()
return predicate.PostRead(sql.FieldHasSuffix(FieldRootPostID, vc))
}
// RootPostIDEqualFold applies the EqualFold predicate on the "root_post_id" field.
func RootPostIDEqualFold(v xid.ID) predicate.PostRead {
vc := v.String()
return predicate.PostRead(sql.FieldEqualFold(FieldRootPostID, vc))
}
// RootPostIDContainsFold applies the ContainsFold predicate on the "root_post_id" field.
func RootPostIDContainsFold(v xid.ID) predicate.PostRead {
vc := v.String()
return predicate.PostRead(sql.FieldContainsFold(FieldRootPostID, vc))
}
// AccountIDEQ applies the EQ predicate on the "account_id" field.
func AccountIDEQ(v xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldEQ(FieldAccountID, v))
}
// AccountIDNEQ applies the NEQ predicate on the "account_id" field.
func AccountIDNEQ(v xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldNEQ(FieldAccountID, v))
}
// AccountIDIn applies the In predicate on the "account_id" field.
func AccountIDIn(vs ...xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldIn(FieldAccountID, vs...))
}
// AccountIDNotIn applies the NotIn predicate on the "account_id" field.
func AccountIDNotIn(vs ...xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldNotIn(FieldAccountID, vs...))
}
// AccountIDGT applies the GT predicate on the "account_id" field.
func AccountIDGT(v xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldGT(FieldAccountID, v))
}
// AccountIDGTE applies the GTE predicate on the "account_id" field.
func AccountIDGTE(v xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldGTE(FieldAccountID, v))
}
// AccountIDLT applies the LT predicate on the "account_id" field.
func AccountIDLT(v xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldLT(FieldAccountID, v))
}
// AccountIDLTE applies the LTE predicate on the "account_id" field.
func AccountIDLTE(v xid.ID) predicate.PostRead {
return predicate.PostRead(sql.FieldLTE(FieldAccountID, v))
}
// AccountIDContains applies the Contains predicate on the "account_id" field.
func AccountIDContains(v xid.ID) predicate.PostRead {
vc := v.String()
return predicate.PostRead(sql.FieldContains(FieldAccountID, vc))
}
// AccountIDHasPrefix applies the HasPrefix predicate on the "account_id" field.
func AccountIDHasPrefix(v xid.ID) predicate.PostRead {
vc := v.String()
return predicate.PostRead(sql.FieldHasPrefix(FieldAccountID, vc))
}
// AccountIDHasSuffix applies the HasSuffix predicate on the "account_id" field.
func AccountIDHasSuffix(v xid.ID) predicate.PostRead {
vc := v.String()
return predicate.PostRead(sql.FieldHasSuffix(FieldAccountID, vc))
}
// AccountIDEqualFold applies the EqualFold predicate on the "account_id" field.
func AccountIDEqualFold(v xid.ID) predicate.PostRead {
vc := v.String()
return predicate.PostRead(sql.FieldEqualFold(FieldAccountID, vc))
}
// AccountIDContainsFold applies the ContainsFold predicate on the "account_id" field.
func AccountIDContainsFold(v xid.ID) predicate.PostRead {
vc := v.String()
return predicate.PostRead(sql.FieldContainsFold(FieldAccountID, vc))
}
// LastSeenAtEQ applies the EQ predicate on the "last_seen_at" field.
func LastSeenAtEQ(v time.Time) predicate.PostRead {
return predicate.PostRead(sql.FieldEQ(FieldLastSeenAt, v))
}
// LastSeenAtNEQ applies the NEQ predicate on the "last_seen_at" field.
func LastSeenAtNEQ(v time.Time) predicate.PostRead {
return predicate.PostRead(sql.FieldNEQ(FieldLastSeenAt, v))
}
// LastSeenAtIn applies the In predicate on the "last_seen_at" field.
func LastSeenAtIn(vs ...time.Time) predicate.PostRead {
return predicate.PostRead(sql.FieldIn(FieldLastSeenAt, vs...))
}
// LastSeenAtNotIn applies the NotIn predicate on the "last_seen_at" field.
func LastSeenAtNotIn(vs ...time.Time) predicate.PostRead {
return predicate.PostRead(sql.FieldNotIn(FieldLastSeenAt, vs...))
}
// LastSeenAtGT applies the GT predicate on the "last_seen_at" field.
func LastSeenAtGT(v time.Time) predicate.PostRead {
return predicate.PostRead(sql.FieldGT(FieldLastSeenAt, v))
}
// LastSeenAtGTE applies the GTE predicate on the "last_seen_at" field.
func LastSeenAtGTE(v time.Time) predicate.PostRead {
return predicate.PostRead(sql.FieldGTE(FieldLastSeenAt, v))
}
// LastSeenAtLT applies the LT predicate on the "last_seen_at" field.
func LastSeenAtLT(v time.Time) predicate.PostRead {
return predicate.PostRead(sql.FieldLT(FieldLastSeenAt, v))
}
// LastSeenAtLTE applies the LTE predicate on the "last_seen_at" field.
func LastSeenAtLTE(v time.Time) predicate.PostRead {
return predicate.PostRead(sql.FieldLTE(FieldLastSeenAt, v))
}
// HasRootPost applies the HasEdge predicate on the "root_post" edge.
func HasRootPost() predicate.PostRead {
return predicate.PostRead(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, RootPostTable, RootPostColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasRootPostWith applies the HasEdge predicate on the "root_post" edge with a given conditions (other predicates).
func HasRootPostWith(preds ...predicate.Post) predicate.PostRead {
return predicate.PostRead(func(s *sql.Selector) {
step := newRootPostStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasAccount applies the HasEdge predicate on the "account" edge.
func HasAccount() predicate.PostRead {
return predicate.PostRead(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.PostRead {
return predicate.PostRead(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.PostRead) predicate.PostRead {
return predicate.PostRead(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.PostRead) predicate.PostRead {
return predicate.PostRead(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.PostRead) predicate.PostRead {
return predicate.PostRead(sql.NotPredicates(p))
}