292 lines
9.4 KiB
Go
292 lines
9.4 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 user
|
|
|
|
import (
|
|
"entgo.io/ent/dialect/sql"
|
|
"entgo.io/ent/dialect/sql/sqlgraph"
|
|
"entgo.io/ent/examples/migration/ent/predicate"
|
|
)
|
|
|
|
// ID filters vertices based on their ID field.
|
|
func ID(id int) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDEQ applies the EQ predicate on the ID field.
|
|
func IDEQ(id int) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDNEQ applies the NEQ predicate on the ID field.
|
|
func IDNEQ(id int) predicate.User {
|
|
return predicate.User(sql.FieldNEQ(FieldID, id))
|
|
}
|
|
|
|
// IDIn applies the In predicate on the ID field.
|
|
func IDIn(ids ...int) predicate.User {
|
|
return predicate.User(sql.FieldIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDNotIn applies the NotIn predicate on the ID field.
|
|
func IDNotIn(ids ...int) predicate.User {
|
|
return predicate.User(sql.FieldNotIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDGT applies the GT predicate on the ID field.
|
|
func IDGT(id int) predicate.User {
|
|
return predicate.User(sql.FieldGT(FieldID, id))
|
|
}
|
|
|
|
// IDGTE applies the GTE predicate on the ID field.
|
|
func IDGTE(id int) predicate.User {
|
|
return predicate.User(sql.FieldGTE(FieldID, id))
|
|
}
|
|
|
|
// IDLT applies the LT predicate on the ID field.
|
|
func IDLT(id int) predicate.User {
|
|
return predicate.User(sql.FieldLT(FieldID, id))
|
|
}
|
|
|
|
// IDLTE applies the LTE predicate on the ID field.
|
|
func IDLTE(id int) predicate.User {
|
|
return predicate.User(sql.FieldLTE(FieldID, id))
|
|
}
|
|
|
|
// Age applies equality check predicate on the "age" field. It's identical to AgeEQ.
|
|
func Age(v float64) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldAge, v))
|
|
}
|
|
|
|
// FirstName applies equality check predicate on the "first_name" field. It's identical to FirstNameEQ.
|
|
func FirstName(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldFirstName, v))
|
|
}
|
|
|
|
// LastName applies equality check predicate on the "last_name" field. It's identical to LastNameEQ.
|
|
func LastName(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldLastName, v))
|
|
}
|
|
|
|
// AgeEQ applies the EQ predicate on the "age" field.
|
|
func AgeEQ(v float64) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldAge, v))
|
|
}
|
|
|
|
// AgeNEQ applies the NEQ predicate on the "age" field.
|
|
func AgeNEQ(v float64) predicate.User {
|
|
return predicate.User(sql.FieldNEQ(FieldAge, v))
|
|
}
|
|
|
|
// AgeIn applies the In predicate on the "age" field.
|
|
func AgeIn(vs ...float64) predicate.User {
|
|
return predicate.User(sql.FieldIn(FieldAge, vs...))
|
|
}
|
|
|
|
// AgeNotIn applies the NotIn predicate on the "age" field.
|
|
func AgeNotIn(vs ...float64) predicate.User {
|
|
return predicate.User(sql.FieldNotIn(FieldAge, vs...))
|
|
}
|
|
|
|
// AgeGT applies the GT predicate on the "age" field.
|
|
func AgeGT(v float64) predicate.User {
|
|
return predicate.User(sql.FieldGT(FieldAge, v))
|
|
}
|
|
|
|
// AgeGTE applies the GTE predicate on the "age" field.
|
|
func AgeGTE(v float64) predicate.User {
|
|
return predicate.User(sql.FieldGTE(FieldAge, v))
|
|
}
|
|
|
|
// AgeLT applies the LT predicate on the "age" field.
|
|
func AgeLT(v float64) predicate.User {
|
|
return predicate.User(sql.FieldLT(FieldAge, v))
|
|
}
|
|
|
|
// AgeLTE applies the LTE predicate on the "age" field.
|
|
func AgeLTE(v float64) predicate.User {
|
|
return predicate.User(sql.FieldLTE(FieldAge, v))
|
|
}
|
|
|
|
// FirstNameEQ applies the EQ predicate on the "first_name" field.
|
|
func FirstNameEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldFirstName, v))
|
|
}
|
|
|
|
// FirstNameNEQ applies the NEQ predicate on the "first_name" field.
|
|
func FirstNameNEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldNEQ(FieldFirstName, v))
|
|
}
|
|
|
|
// FirstNameIn applies the In predicate on the "first_name" field.
|
|
func FirstNameIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldIn(FieldFirstName, vs...))
|
|
}
|
|
|
|
// FirstNameNotIn applies the NotIn predicate on the "first_name" field.
|
|
func FirstNameNotIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldNotIn(FieldFirstName, vs...))
|
|
}
|
|
|
|
// FirstNameGT applies the GT predicate on the "first_name" field.
|
|
func FirstNameGT(v string) predicate.User {
|
|
return predicate.User(sql.FieldGT(FieldFirstName, v))
|
|
}
|
|
|
|
// FirstNameGTE applies the GTE predicate on the "first_name" field.
|
|
func FirstNameGTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldGTE(FieldFirstName, v))
|
|
}
|
|
|
|
// FirstNameLT applies the LT predicate on the "first_name" field.
|
|
func FirstNameLT(v string) predicate.User {
|
|
return predicate.User(sql.FieldLT(FieldFirstName, v))
|
|
}
|
|
|
|
// FirstNameLTE applies the LTE predicate on the "first_name" field.
|
|
func FirstNameLTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldLTE(FieldFirstName, v))
|
|
}
|
|
|
|
// FirstNameContains applies the Contains predicate on the "first_name" field.
|
|
func FirstNameContains(v string) predicate.User {
|
|
return predicate.User(sql.FieldContains(FieldFirstName, v))
|
|
}
|
|
|
|
// FirstNameHasPrefix applies the HasPrefix predicate on the "first_name" field.
|
|
func FirstNameHasPrefix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasPrefix(FieldFirstName, v))
|
|
}
|
|
|
|
// FirstNameHasSuffix applies the HasSuffix predicate on the "first_name" field.
|
|
func FirstNameHasSuffix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasSuffix(FieldFirstName, v))
|
|
}
|
|
|
|
// FirstNameEqualFold applies the EqualFold predicate on the "first_name" field.
|
|
func FirstNameEqualFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldEqualFold(FieldFirstName, v))
|
|
}
|
|
|
|
// FirstNameContainsFold applies the ContainsFold predicate on the "first_name" field.
|
|
func FirstNameContainsFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldContainsFold(FieldFirstName, v))
|
|
}
|
|
|
|
// LastNameEQ applies the EQ predicate on the "last_name" field.
|
|
func LastNameEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldEQ(FieldLastName, v))
|
|
}
|
|
|
|
// LastNameNEQ applies the NEQ predicate on the "last_name" field.
|
|
func LastNameNEQ(v string) predicate.User {
|
|
return predicate.User(sql.FieldNEQ(FieldLastName, v))
|
|
}
|
|
|
|
// LastNameIn applies the In predicate on the "last_name" field.
|
|
func LastNameIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldIn(FieldLastName, vs...))
|
|
}
|
|
|
|
// LastNameNotIn applies the NotIn predicate on the "last_name" field.
|
|
func LastNameNotIn(vs ...string) predicate.User {
|
|
return predicate.User(sql.FieldNotIn(FieldLastName, vs...))
|
|
}
|
|
|
|
// LastNameGT applies the GT predicate on the "last_name" field.
|
|
func LastNameGT(v string) predicate.User {
|
|
return predicate.User(sql.FieldGT(FieldLastName, v))
|
|
}
|
|
|
|
// LastNameGTE applies the GTE predicate on the "last_name" field.
|
|
func LastNameGTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldGTE(FieldLastName, v))
|
|
}
|
|
|
|
// LastNameLT applies the LT predicate on the "last_name" field.
|
|
func LastNameLT(v string) predicate.User {
|
|
return predicate.User(sql.FieldLT(FieldLastName, v))
|
|
}
|
|
|
|
// LastNameLTE applies the LTE predicate on the "last_name" field.
|
|
func LastNameLTE(v string) predicate.User {
|
|
return predicate.User(sql.FieldLTE(FieldLastName, v))
|
|
}
|
|
|
|
// LastNameContains applies the Contains predicate on the "last_name" field.
|
|
func LastNameContains(v string) predicate.User {
|
|
return predicate.User(sql.FieldContains(FieldLastName, v))
|
|
}
|
|
|
|
// LastNameHasPrefix applies the HasPrefix predicate on the "last_name" field.
|
|
func LastNameHasPrefix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasPrefix(FieldLastName, v))
|
|
}
|
|
|
|
// LastNameHasSuffix applies the HasSuffix predicate on the "last_name" field.
|
|
func LastNameHasSuffix(v string) predicate.User {
|
|
return predicate.User(sql.FieldHasSuffix(FieldLastName, v))
|
|
}
|
|
|
|
// LastNameEqualFold applies the EqualFold predicate on the "last_name" field.
|
|
func LastNameEqualFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldEqualFold(FieldLastName, v))
|
|
}
|
|
|
|
// LastNameContainsFold applies the ContainsFold predicate on the "last_name" field.
|
|
func LastNameContainsFold(v string) predicate.User {
|
|
return predicate.User(sql.FieldContainsFold(FieldLastName, v))
|
|
}
|
|
|
|
// TagsIsNil applies the IsNil predicate on the "tags" field.
|
|
func TagsIsNil() predicate.User {
|
|
return predicate.User(sql.FieldIsNull(FieldTags))
|
|
}
|
|
|
|
// TagsNotNil applies the NotNil predicate on the "tags" field.
|
|
func TagsNotNil() predicate.User {
|
|
return predicate.User(sql.FieldNotNull(FieldTags))
|
|
}
|
|
|
|
// HasCards applies the HasEdge predicate on the "cards" edge.
|
|
func HasCards() predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, CardsTable, CardsColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasCardsWith applies the HasEdge predicate on the "cards" edge with a given conditions (other predicates).
|
|
func HasCardsWith(preds ...predicate.Card) predicate.User {
|
|
return predicate.User(func(s *sql.Selector) {
|
|
step := newCardsStep()
|
|
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.User) predicate.User {
|
|
return predicate.User(sql.AndPredicates(predicates...))
|
|
}
|
|
|
|
// Or groups predicates with the OR operator between them.
|
|
func Or(predicates ...predicate.User) predicate.User {
|
|
return predicate.User(sql.OrPredicates(predicates...))
|
|
}
|
|
|
|
// Not applies the not operator on the given predicate.
|
|
func Not(p predicate.User) predicate.User {
|
|
return predicate.User(sql.NotPredicates(p))
|
|
}
|