where.go•13.2 kB
// Code generated by ent, DO NOT EDIT.
package collectionpost
import (
"time"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/Southclaws/storyden/internal/ent/predicate"
"github.com/rs/xid"
)
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldEQ(FieldCreatedAt, v))
}
// CollectionID applies equality check predicate on the "collection_id" field. It's identical to CollectionIDEQ.
func CollectionID(v xid.ID) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldEQ(FieldCollectionID, v))
}
// PostID applies equality check predicate on the "post_id" field. It's identical to PostIDEQ.
func PostID(v xid.ID) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldEQ(FieldPostID, v))
}
// MembershipType applies equality check predicate on the "membership_type" field. It's identical to MembershipTypeEQ.
func MembershipType(v string) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldEQ(FieldMembershipType, v))
}
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtEQ(v time.Time) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldEQ(FieldCreatedAt, v))
}
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNEQ(v time.Time) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldNEQ(FieldCreatedAt, v))
}
// CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtIn(vs ...time.Time) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldIn(FieldCreatedAt, vs...))
}
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedAtNotIn(vs ...time.Time) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldNotIn(FieldCreatedAt, vs...))
}
// CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGT(v time.Time) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldGT(FieldCreatedAt, v))
}
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtGTE(v time.Time) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldGTE(FieldCreatedAt, v))
}
// CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLT(v time.Time) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldLT(FieldCreatedAt, v))
}
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtLTE(v time.Time) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldLTE(FieldCreatedAt, v))
}
// CollectionIDEQ applies the EQ predicate on the "collection_id" field.
func CollectionIDEQ(v xid.ID) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldEQ(FieldCollectionID, v))
}
// CollectionIDNEQ applies the NEQ predicate on the "collection_id" field.
func CollectionIDNEQ(v xid.ID) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldNEQ(FieldCollectionID, v))
}
// CollectionIDIn applies the In predicate on the "collection_id" field.
func CollectionIDIn(vs ...xid.ID) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldIn(FieldCollectionID, vs...))
}
// CollectionIDNotIn applies the NotIn predicate on the "collection_id" field.
func CollectionIDNotIn(vs ...xid.ID) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldNotIn(FieldCollectionID, vs...))
}
// CollectionIDGT applies the GT predicate on the "collection_id" field.
func CollectionIDGT(v xid.ID) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldGT(FieldCollectionID, v))
}
// CollectionIDGTE applies the GTE predicate on the "collection_id" field.
func CollectionIDGTE(v xid.ID) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldGTE(FieldCollectionID, v))
}
// CollectionIDLT applies the LT predicate on the "collection_id" field.
func CollectionIDLT(v xid.ID) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldLT(FieldCollectionID, v))
}
// CollectionIDLTE applies the LTE predicate on the "collection_id" field.
func CollectionIDLTE(v xid.ID) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldLTE(FieldCollectionID, v))
}
// CollectionIDContains applies the Contains predicate on the "collection_id" field.
func CollectionIDContains(v xid.ID) predicate.CollectionPost {
vc := v.String()
return predicate.CollectionPost(sql.FieldContains(FieldCollectionID, vc))
}
// CollectionIDHasPrefix applies the HasPrefix predicate on the "collection_id" field.
func CollectionIDHasPrefix(v xid.ID) predicate.CollectionPost {
vc := v.String()
return predicate.CollectionPost(sql.FieldHasPrefix(FieldCollectionID, vc))
}
// CollectionIDHasSuffix applies the HasSuffix predicate on the "collection_id" field.
func CollectionIDHasSuffix(v xid.ID) predicate.CollectionPost {
vc := v.String()
return predicate.CollectionPost(sql.FieldHasSuffix(FieldCollectionID, vc))
}
// CollectionIDEqualFold applies the EqualFold predicate on the "collection_id" field.
func CollectionIDEqualFold(v xid.ID) predicate.CollectionPost {
vc := v.String()
return predicate.CollectionPost(sql.FieldEqualFold(FieldCollectionID, vc))
}
// CollectionIDContainsFold applies the ContainsFold predicate on the "collection_id" field.
func CollectionIDContainsFold(v xid.ID) predicate.CollectionPost {
vc := v.String()
return predicate.CollectionPost(sql.FieldContainsFold(FieldCollectionID, vc))
}
// PostIDEQ applies the EQ predicate on the "post_id" field.
func PostIDEQ(v xid.ID) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldEQ(FieldPostID, v))
}
// PostIDNEQ applies the NEQ predicate on the "post_id" field.
func PostIDNEQ(v xid.ID) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldNEQ(FieldPostID, v))
}
// PostIDIn applies the In predicate on the "post_id" field.
func PostIDIn(vs ...xid.ID) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldIn(FieldPostID, vs...))
}
// PostIDNotIn applies the NotIn predicate on the "post_id" field.
func PostIDNotIn(vs ...xid.ID) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldNotIn(FieldPostID, vs...))
}
// PostIDGT applies the GT predicate on the "post_id" field.
func PostIDGT(v xid.ID) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldGT(FieldPostID, v))
}
// PostIDGTE applies the GTE predicate on the "post_id" field.
func PostIDGTE(v xid.ID) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldGTE(FieldPostID, v))
}
// PostIDLT applies the LT predicate on the "post_id" field.
func PostIDLT(v xid.ID) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldLT(FieldPostID, v))
}
// PostIDLTE applies the LTE predicate on the "post_id" field.
func PostIDLTE(v xid.ID) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldLTE(FieldPostID, v))
}
// PostIDContains applies the Contains predicate on the "post_id" field.
func PostIDContains(v xid.ID) predicate.CollectionPost {
vc := v.String()
return predicate.CollectionPost(sql.FieldContains(FieldPostID, vc))
}
// PostIDHasPrefix applies the HasPrefix predicate on the "post_id" field.
func PostIDHasPrefix(v xid.ID) predicate.CollectionPost {
vc := v.String()
return predicate.CollectionPost(sql.FieldHasPrefix(FieldPostID, vc))
}
// PostIDHasSuffix applies the HasSuffix predicate on the "post_id" field.
func PostIDHasSuffix(v xid.ID) predicate.CollectionPost {
vc := v.String()
return predicate.CollectionPost(sql.FieldHasSuffix(FieldPostID, vc))
}
// PostIDEqualFold applies the EqualFold predicate on the "post_id" field.
func PostIDEqualFold(v xid.ID) predicate.CollectionPost {
vc := v.String()
return predicate.CollectionPost(sql.FieldEqualFold(FieldPostID, vc))
}
// PostIDContainsFold applies the ContainsFold predicate on the "post_id" field.
func PostIDContainsFold(v xid.ID) predicate.CollectionPost {
vc := v.String()
return predicate.CollectionPost(sql.FieldContainsFold(FieldPostID, vc))
}
// MembershipTypeEQ applies the EQ predicate on the "membership_type" field.
func MembershipTypeEQ(v string) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldEQ(FieldMembershipType, v))
}
// MembershipTypeNEQ applies the NEQ predicate on the "membership_type" field.
func MembershipTypeNEQ(v string) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldNEQ(FieldMembershipType, v))
}
// MembershipTypeIn applies the In predicate on the "membership_type" field.
func MembershipTypeIn(vs ...string) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldIn(FieldMembershipType, vs...))
}
// MembershipTypeNotIn applies the NotIn predicate on the "membership_type" field.
func MembershipTypeNotIn(vs ...string) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldNotIn(FieldMembershipType, vs...))
}
// MembershipTypeGT applies the GT predicate on the "membership_type" field.
func MembershipTypeGT(v string) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldGT(FieldMembershipType, v))
}
// MembershipTypeGTE applies the GTE predicate on the "membership_type" field.
func MembershipTypeGTE(v string) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldGTE(FieldMembershipType, v))
}
// MembershipTypeLT applies the LT predicate on the "membership_type" field.
func MembershipTypeLT(v string) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldLT(FieldMembershipType, v))
}
// MembershipTypeLTE applies the LTE predicate on the "membership_type" field.
func MembershipTypeLTE(v string) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldLTE(FieldMembershipType, v))
}
// MembershipTypeContains applies the Contains predicate on the "membership_type" field.
func MembershipTypeContains(v string) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldContains(FieldMembershipType, v))
}
// MembershipTypeHasPrefix applies the HasPrefix predicate on the "membership_type" field.
func MembershipTypeHasPrefix(v string) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldHasPrefix(FieldMembershipType, v))
}
// MembershipTypeHasSuffix applies the HasSuffix predicate on the "membership_type" field.
func MembershipTypeHasSuffix(v string) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldHasSuffix(FieldMembershipType, v))
}
// MembershipTypeEqualFold applies the EqualFold predicate on the "membership_type" field.
func MembershipTypeEqualFold(v string) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldEqualFold(FieldMembershipType, v))
}
// MembershipTypeContainsFold applies the ContainsFold predicate on the "membership_type" field.
func MembershipTypeContainsFold(v string) predicate.CollectionPost {
return predicate.CollectionPost(sql.FieldContainsFold(FieldMembershipType, v))
}
// HasCollection applies the HasEdge predicate on the "collection" edge.
func HasCollection() predicate.CollectionPost {
return predicate.CollectionPost(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, CollectionColumn),
sqlgraph.Edge(sqlgraph.M2O, false, CollectionTable, CollectionColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasCollectionWith applies the HasEdge predicate on the "collection" edge with a given conditions (other predicates).
func HasCollectionWith(preds ...predicate.Collection) predicate.CollectionPost {
return predicate.CollectionPost(func(s *sql.Selector) {
step := newCollectionStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasPost applies the HasEdge predicate on the "post" edge.
func HasPost() predicate.CollectionPost {
return predicate.CollectionPost(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, PostColumn),
sqlgraph.Edge(sqlgraph.M2O, false, PostTable, PostColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasPostWith applies the HasEdge predicate on the "post" edge with a given conditions (other predicates).
func HasPostWith(preds ...predicate.Post) predicate.CollectionPost {
return predicate.CollectionPost(func(s *sql.Selector) {
step := newPostStep()
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.CollectionPost) predicate.CollectionPost {
return predicate.CollectionPost(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.CollectionPost) predicate.CollectionPost {
return predicate.CollectionPost(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.CollectionPost) predicate.CollectionPost {
return predicate.CollectionPost(sql.NotPredicates(p))
}