where.go•3.72 kB
// Code generated by ent, DO NOT EDIT.
package propertyschema
import (
"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.PropertySchema {
return predicate.PropertySchema(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id xid.ID) predicate.PropertySchema {
return predicate.PropertySchema(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id xid.ID) predicate.PropertySchema {
return predicate.PropertySchema(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...xid.ID) predicate.PropertySchema {
return predicate.PropertySchema(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...xid.ID) predicate.PropertySchema {
return predicate.PropertySchema(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id xid.ID) predicate.PropertySchema {
return predicate.PropertySchema(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id xid.ID) predicate.PropertySchema {
return predicate.PropertySchema(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id xid.ID) predicate.PropertySchema {
return predicate.PropertySchema(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id xid.ID) predicate.PropertySchema {
return predicate.PropertySchema(sql.FieldLTE(FieldID, id))
}
// HasNode applies the HasEdge predicate on the "node" edge.
func HasNode() predicate.PropertySchema {
return predicate.PropertySchema(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, NodeTable, NodeColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasNodeWith applies the HasEdge predicate on the "node" edge with a given conditions (other predicates).
func HasNodeWith(preds ...predicate.Node) predicate.PropertySchema {
return predicate.PropertySchema(func(s *sql.Selector) {
step := newNodeStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasFields applies the HasEdge predicate on the "fields" edge.
func HasFields() predicate.PropertySchema {
return predicate.PropertySchema(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, FieldsTable, FieldsColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasFieldsWith applies the HasEdge predicate on the "fields" edge with a given conditions (other predicates).
func HasFieldsWith(preds ...predicate.PropertySchemaField) predicate.PropertySchema {
return predicate.PropertySchema(func(s *sql.Selector) {
step := newFieldsStep()
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.PropertySchema) predicate.PropertySchema {
return predicate.PropertySchema(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.PropertySchema) predicate.PropertySchema {
return predicate.PropertySchema(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.PropertySchema) predicate.PropertySchema {
return predicate.PropertySchema(sql.NotPredicates(p))
}