Files
upstream-mirror 4b3ad0b611
Some checks failed
Atlas CI Public / lint (push) Failing after 13s
Atlas CI Public / sync (push) Has been skipped
snapshot of https://github.com/ent/ent.git (master, 2026-09-15; blobs > 131072B omitted)
2026-09-15 22:12:36 +05:00

228 lines
7.7 KiB
Go

// Copyright 2019-present Facebook Inc. All rights reserved.
// This source code is licensed under the Apache 2.0 license found
// in the LICENSE file in the root directory of this source tree.
// Code generated by ent, DO NOT EDIT.
package relationship
import (
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/entc/integration/edgeschema/ent/predicate"
)
// Weight applies equality check predicate on the "weight" field. It's identical to WeightEQ.
func Weight(v int) predicate.Relationship {
return predicate.Relationship(sql.FieldEQ(FieldWeight, v))
}
// UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
func UserID(v int) predicate.Relationship {
return predicate.Relationship(sql.FieldEQ(FieldUserID, v))
}
// RelativeID applies equality check predicate on the "relative_id" field. It's identical to RelativeIDEQ.
func RelativeID(v int) predicate.Relationship {
return predicate.Relationship(sql.FieldEQ(FieldRelativeID, v))
}
// InfoID applies equality check predicate on the "info_id" field. It's identical to InfoIDEQ.
func InfoID(v int) predicate.Relationship {
return predicate.Relationship(sql.FieldEQ(FieldInfoID, v))
}
// WeightEQ applies the EQ predicate on the "weight" field.
func WeightEQ(v int) predicate.Relationship {
return predicate.Relationship(sql.FieldEQ(FieldWeight, v))
}
// WeightNEQ applies the NEQ predicate on the "weight" field.
func WeightNEQ(v int) predicate.Relationship {
return predicate.Relationship(sql.FieldNEQ(FieldWeight, v))
}
// WeightIn applies the In predicate on the "weight" field.
func WeightIn(vs ...int) predicate.Relationship {
return predicate.Relationship(sql.FieldIn(FieldWeight, vs...))
}
// WeightNotIn applies the NotIn predicate on the "weight" field.
func WeightNotIn(vs ...int) predicate.Relationship {
return predicate.Relationship(sql.FieldNotIn(FieldWeight, vs...))
}
// WeightGT applies the GT predicate on the "weight" field.
func WeightGT(v int) predicate.Relationship {
return predicate.Relationship(sql.FieldGT(FieldWeight, v))
}
// WeightGTE applies the GTE predicate on the "weight" field.
func WeightGTE(v int) predicate.Relationship {
return predicate.Relationship(sql.FieldGTE(FieldWeight, v))
}
// WeightLT applies the LT predicate on the "weight" field.
func WeightLT(v int) predicate.Relationship {
return predicate.Relationship(sql.FieldLT(FieldWeight, v))
}
// WeightLTE applies the LTE predicate on the "weight" field.
func WeightLTE(v int) predicate.Relationship {
return predicate.Relationship(sql.FieldLTE(FieldWeight, v))
}
// UserIDEQ applies the EQ predicate on the "user_id" field.
func UserIDEQ(v int) predicate.Relationship {
return predicate.Relationship(sql.FieldEQ(FieldUserID, v))
}
// UserIDNEQ applies the NEQ predicate on the "user_id" field.
func UserIDNEQ(v int) predicate.Relationship {
return predicate.Relationship(sql.FieldNEQ(FieldUserID, v))
}
// UserIDIn applies the In predicate on the "user_id" field.
func UserIDIn(vs ...int) predicate.Relationship {
return predicate.Relationship(sql.FieldIn(FieldUserID, vs...))
}
// UserIDNotIn applies the NotIn predicate on the "user_id" field.
func UserIDNotIn(vs ...int) predicate.Relationship {
return predicate.Relationship(sql.FieldNotIn(FieldUserID, vs...))
}
// RelativeIDEQ applies the EQ predicate on the "relative_id" field.
func RelativeIDEQ(v int) predicate.Relationship {
return predicate.Relationship(sql.FieldEQ(FieldRelativeID, v))
}
// RelativeIDNEQ applies the NEQ predicate on the "relative_id" field.
func RelativeIDNEQ(v int) predicate.Relationship {
return predicate.Relationship(sql.FieldNEQ(FieldRelativeID, v))
}
// RelativeIDIn applies the In predicate on the "relative_id" field.
func RelativeIDIn(vs ...int) predicate.Relationship {
return predicate.Relationship(sql.FieldIn(FieldRelativeID, vs...))
}
// RelativeIDNotIn applies the NotIn predicate on the "relative_id" field.
func RelativeIDNotIn(vs ...int) predicate.Relationship {
return predicate.Relationship(sql.FieldNotIn(FieldRelativeID, vs...))
}
// InfoIDEQ applies the EQ predicate on the "info_id" field.
func InfoIDEQ(v int) predicate.Relationship {
return predicate.Relationship(sql.FieldEQ(FieldInfoID, v))
}
// InfoIDNEQ applies the NEQ predicate on the "info_id" field.
func InfoIDNEQ(v int) predicate.Relationship {
return predicate.Relationship(sql.FieldNEQ(FieldInfoID, v))
}
// InfoIDIn applies the In predicate on the "info_id" field.
func InfoIDIn(vs ...int) predicate.Relationship {
return predicate.Relationship(sql.FieldIn(FieldInfoID, vs...))
}
// InfoIDNotIn applies the NotIn predicate on the "info_id" field.
func InfoIDNotIn(vs ...int) predicate.Relationship {
return predicate.Relationship(sql.FieldNotIn(FieldInfoID, vs...))
}
// InfoIDIsNil applies the IsNil predicate on the "info_id" field.
func InfoIDIsNil() predicate.Relationship {
return predicate.Relationship(sql.FieldIsNull(FieldInfoID))
}
// InfoIDNotNil applies the NotNil predicate on the "info_id" field.
func InfoIDNotNil() predicate.Relationship {
return predicate.Relationship(sql.FieldNotNull(FieldInfoID))
}
// HasUser applies the HasEdge predicate on the "user" edge.
func HasUser() predicate.Relationship {
return predicate.Relationship(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, UserColumn),
sqlgraph.Edge(sqlgraph.M2O, false, UserTable, UserColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
func HasUserWith(preds ...predicate.User) predicate.Relationship {
return predicate.Relationship(func(s *sql.Selector) {
step := newUserStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasRelative applies the HasEdge predicate on the "relative" edge.
func HasRelative() predicate.Relationship {
return predicate.Relationship(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, RelativeColumn),
sqlgraph.Edge(sqlgraph.M2O, false, RelativeTable, RelativeColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasRelativeWith applies the HasEdge predicate on the "relative" edge with a given conditions (other predicates).
func HasRelativeWith(preds ...predicate.User) predicate.Relationship {
return predicate.Relationship(func(s *sql.Selector) {
step := newRelativeStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasInfo applies the HasEdge predicate on the "info" edge.
func HasInfo() predicate.Relationship {
return predicate.Relationship(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, InfoColumn),
sqlgraph.Edge(sqlgraph.M2O, false, InfoTable, InfoColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasInfoWith applies the HasEdge predicate on the "info" edge with a given conditions (other predicates).
func HasInfoWith(preds ...predicate.RelationshipInfo) predicate.Relationship {
return predicate.Relationship(func(s *sql.Selector) {
step := newInfoStep()
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.Relationship) predicate.Relationship {
return predicate.Relationship(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.Relationship) predicate.Relationship {
return predicate.Relationship(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.Relationship) predicate.Relationship {
return predicate.Relationship(sql.NotPredicates(p))
}