where.go•11.9 kB
// Code generated by ent, DO NOT EDIT.
package accountroles
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.AccountRoles {
return predicate.AccountRoles(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(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.AccountRoles {
return predicate.AccountRoles(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.AccountRoles {
return predicate.AccountRoles(sql.FieldEQ(FieldAccountID, v))
}
// RoleID applies equality check predicate on the "role_id" field. It's identical to RoleIDEQ.
func RoleID(v xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldEQ(FieldRoleID, v))
}
// Badge applies equality check predicate on the "badge" field. It's identical to BadgeEQ.
func Badge(v bool) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldEQ(FieldBadge, v))
}
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtEQ(v time.Time) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldEQ(FieldCreatedAt, v))
}
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNEQ(v time.Time) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldNEQ(FieldCreatedAt, v))
}
// CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtIn(vs ...time.Time) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldIn(FieldCreatedAt, vs...))
}
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedAtNotIn(vs ...time.Time) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldNotIn(FieldCreatedAt, vs...))
}
// CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGT(v time.Time) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldGT(FieldCreatedAt, v))
}
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtGTE(v time.Time) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldGTE(FieldCreatedAt, v))
}
// CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLT(v time.Time) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldLT(FieldCreatedAt, v))
}
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtLTE(v time.Time) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldLTE(FieldCreatedAt, v))
}
// AccountIDEQ applies the EQ predicate on the "account_id" field.
func AccountIDEQ(v xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldEQ(FieldAccountID, v))
}
// AccountIDNEQ applies the NEQ predicate on the "account_id" field.
func AccountIDNEQ(v xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldNEQ(FieldAccountID, v))
}
// AccountIDIn applies the In predicate on the "account_id" field.
func AccountIDIn(vs ...xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldIn(FieldAccountID, vs...))
}
// AccountIDNotIn applies the NotIn predicate on the "account_id" field.
func AccountIDNotIn(vs ...xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldNotIn(FieldAccountID, vs...))
}
// AccountIDGT applies the GT predicate on the "account_id" field.
func AccountIDGT(v xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldGT(FieldAccountID, v))
}
// AccountIDGTE applies the GTE predicate on the "account_id" field.
func AccountIDGTE(v xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldGTE(FieldAccountID, v))
}
// AccountIDLT applies the LT predicate on the "account_id" field.
func AccountIDLT(v xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldLT(FieldAccountID, v))
}
// AccountIDLTE applies the LTE predicate on the "account_id" field.
func AccountIDLTE(v xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldLTE(FieldAccountID, v))
}
// AccountIDContains applies the Contains predicate on the "account_id" field.
func AccountIDContains(v xid.ID) predicate.AccountRoles {
vc := v.String()
return predicate.AccountRoles(sql.FieldContains(FieldAccountID, vc))
}
// AccountIDHasPrefix applies the HasPrefix predicate on the "account_id" field.
func AccountIDHasPrefix(v xid.ID) predicate.AccountRoles {
vc := v.String()
return predicate.AccountRoles(sql.FieldHasPrefix(FieldAccountID, vc))
}
// AccountIDHasSuffix applies the HasSuffix predicate on the "account_id" field.
func AccountIDHasSuffix(v xid.ID) predicate.AccountRoles {
vc := v.String()
return predicate.AccountRoles(sql.FieldHasSuffix(FieldAccountID, vc))
}
// AccountIDEqualFold applies the EqualFold predicate on the "account_id" field.
func AccountIDEqualFold(v xid.ID) predicate.AccountRoles {
vc := v.String()
return predicate.AccountRoles(sql.FieldEqualFold(FieldAccountID, vc))
}
// AccountIDContainsFold applies the ContainsFold predicate on the "account_id" field.
func AccountIDContainsFold(v xid.ID) predicate.AccountRoles {
vc := v.String()
return predicate.AccountRoles(sql.FieldContainsFold(FieldAccountID, vc))
}
// RoleIDEQ applies the EQ predicate on the "role_id" field.
func RoleIDEQ(v xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldEQ(FieldRoleID, v))
}
// RoleIDNEQ applies the NEQ predicate on the "role_id" field.
func RoleIDNEQ(v xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldNEQ(FieldRoleID, v))
}
// RoleIDIn applies the In predicate on the "role_id" field.
func RoleIDIn(vs ...xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldIn(FieldRoleID, vs...))
}
// RoleIDNotIn applies the NotIn predicate on the "role_id" field.
func RoleIDNotIn(vs ...xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldNotIn(FieldRoleID, vs...))
}
// RoleIDGT applies the GT predicate on the "role_id" field.
func RoleIDGT(v xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldGT(FieldRoleID, v))
}
// RoleIDGTE applies the GTE predicate on the "role_id" field.
func RoleIDGTE(v xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldGTE(FieldRoleID, v))
}
// RoleIDLT applies the LT predicate on the "role_id" field.
func RoleIDLT(v xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldLT(FieldRoleID, v))
}
// RoleIDLTE applies the LTE predicate on the "role_id" field.
func RoleIDLTE(v xid.ID) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldLTE(FieldRoleID, v))
}
// RoleIDContains applies the Contains predicate on the "role_id" field.
func RoleIDContains(v xid.ID) predicate.AccountRoles {
vc := v.String()
return predicate.AccountRoles(sql.FieldContains(FieldRoleID, vc))
}
// RoleIDHasPrefix applies the HasPrefix predicate on the "role_id" field.
func RoleIDHasPrefix(v xid.ID) predicate.AccountRoles {
vc := v.String()
return predicate.AccountRoles(sql.FieldHasPrefix(FieldRoleID, vc))
}
// RoleIDHasSuffix applies the HasSuffix predicate on the "role_id" field.
func RoleIDHasSuffix(v xid.ID) predicate.AccountRoles {
vc := v.String()
return predicate.AccountRoles(sql.FieldHasSuffix(FieldRoleID, vc))
}
// RoleIDEqualFold applies the EqualFold predicate on the "role_id" field.
func RoleIDEqualFold(v xid.ID) predicate.AccountRoles {
vc := v.String()
return predicate.AccountRoles(sql.FieldEqualFold(FieldRoleID, vc))
}
// RoleIDContainsFold applies the ContainsFold predicate on the "role_id" field.
func RoleIDContainsFold(v xid.ID) predicate.AccountRoles {
vc := v.String()
return predicate.AccountRoles(sql.FieldContainsFold(FieldRoleID, vc))
}
// BadgeEQ applies the EQ predicate on the "badge" field.
func BadgeEQ(v bool) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldEQ(FieldBadge, v))
}
// BadgeNEQ applies the NEQ predicate on the "badge" field.
func BadgeNEQ(v bool) predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldNEQ(FieldBadge, v))
}
// BadgeIsNil applies the IsNil predicate on the "badge" field.
func BadgeIsNil() predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldIsNull(FieldBadge))
}
// BadgeNotNil applies the NotNil predicate on the "badge" field.
func BadgeNotNil() predicate.AccountRoles {
return predicate.AccountRoles(sql.FieldNotNull(FieldBadge))
}
// HasAccount applies the HasEdge predicate on the "account" edge.
func HasAccount() predicate.AccountRoles {
return predicate.AccountRoles(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, false, 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.AccountRoles {
return predicate.AccountRoles(func(s *sql.Selector) {
step := newAccountStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasRole applies the HasEdge predicate on the "role" edge.
func HasRole() predicate.AccountRoles {
return predicate.AccountRoles(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, false, RoleTable, RoleColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasRoleWith applies the HasEdge predicate on the "role" edge with a given conditions (other predicates).
func HasRoleWith(preds ...predicate.Role) predicate.AccountRoles {
return predicate.AccountRoles(func(s *sql.Selector) {
step := newRoleStep()
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.AccountRoles) predicate.AccountRoles {
return predicate.AccountRoles(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.AccountRoles) predicate.AccountRoles {
return predicate.AccountRoles(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.AccountRoles) predicate.AccountRoles {
return predicate.AccountRoles(sql.NotPredicates(p))
}