snapshot of https://github.com/ent/ent.git (master, 2026-09-15; blobs > 131072B omitted)
This commit is contained in:
323
examples/migration/ent/payment/where.go
Normal file
323
examples/migration/ent/payment/where.go
Normal file
@@ -0,0 +1,323 @@
|
||||
// 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 payment
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"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.Payment {
|
||||
return predicate.Payment(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// CardID applies equality check predicate on the "card_id" field. It's identical to CardIDEQ.
|
||||
func CardID(v int) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldEQ(FieldCardID, v))
|
||||
}
|
||||
|
||||
// Amount applies equality check predicate on the "amount" field. It's identical to AmountEQ.
|
||||
func Amount(v float64) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldEQ(FieldAmount, v))
|
||||
}
|
||||
|
||||
// Time applies equality check predicate on the "time" field. It's identical to TimeEQ.
|
||||
func Time(v time.Time) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldEQ(FieldTime, v))
|
||||
}
|
||||
|
||||
// Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.
|
||||
func Description(v string) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldEQ(FieldDescription, v))
|
||||
}
|
||||
|
||||
// CardIDEQ applies the EQ predicate on the "card_id" field.
|
||||
func CardIDEQ(v int) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldEQ(FieldCardID, v))
|
||||
}
|
||||
|
||||
// CardIDNEQ applies the NEQ predicate on the "card_id" field.
|
||||
func CardIDNEQ(v int) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldNEQ(FieldCardID, v))
|
||||
}
|
||||
|
||||
// CardIDIn applies the In predicate on the "card_id" field.
|
||||
func CardIDIn(vs ...int) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldIn(FieldCardID, vs...))
|
||||
}
|
||||
|
||||
// CardIDNotIn applies the NotIn predicate on the "card_id" field.
|
||||
func CardIDNotIn(vs ...int) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldNotIn(FieldCardID, vs...))
|
||||
}
|
||||
|
||||
// AmountEQ applies the EQ predicate on the "amount" field.
|
||||
func AmountEQ(v float64) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldEQ(FieldAmount, v))
|
||||
}
|
||||
|
||||
// AmountNEQ applies the NEQ predicate on the "amount" field.
|
||||
func AmountNEQ(v float64) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldNEQ(FieldAmount, v))
|
||||
}
|
||||
|
||||
// AmountIn applies the In predicate on the "amount" field.
|
||||
func AmountIn(vs ...float64) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldIn(FieldAmount, vs...))
|
||||
}
|
||||
|
||||
// AmountNotIn applies the NotIn predicate on the "amount" field.
|
||||
func AmountNotIn(vs ...float64) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldNotIn(FieldAmount, vs...))
|
||||
}
|
||||
|
||||
// AmountGT applies the GT predicate on the "amount" field.
|
||||
func AmountGT(v float64) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldGT(FieldAmount, v))
|
||||
}
|
||||
|
||||
// AmountGTE applies the GTE predicate on the "amount" field.
|
||||
func AmountGTE(v float64) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldGTE(FieldAmount, v))
|
||||
}
|
||||
|
||||
// AmountLT applies the LT predicate on the "amount" field.
|
||||
func AmountLT(v float64) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldLT(FieldAmount, v))
|
||||
}
|
||||
|
||||
// AmountLTE applies the LTE predicate on the "amount" field.
|
||||
func AmountLTE(v float64) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldLTE(FieldAmount, v))
|
||||
}
|
||||
|
||||
// CurrencyEQ applies the EQ predicate on the "currency" field.
|
||||
func CurrencyEQ(v Currency) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldEQ(FieldCurrency, v))
|
||||
}
|
||||
|
||||
// CurrencyNEQ applies the NEQ predicate on the "currency" field.
|
||||
func CurrencyNEQ(v Currency) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldNEQ(FieldCurrency, v))
|
||||
}
|
||||
|
||||
// CurrencyIn applies the In predicate on the "currency" field.
|
||||
func CurrencyIn(vs ...Currency) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldIn(FieldCurrency, vs...))
|
||||
}
|
||||
|
||||
// CurrencyNotIn applies the NotIn predicate on the "currency" field.
|
||||
func CurrencyNotIn(vs ...Currency) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldNotIn(FieldCurrency, vs...))
|
||||
}
|
||||
|
||||
// TimeEQ applies the EQ predicate on the "time" field.
|
||||
func TimeEQ(v time.Time) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldEQ(FieldTime, v))
|
||||
}
|
||||
|
||||
// TimeNEQ applies the NEQ predicate on the "time" field.
|
||||
func TimeNEQ(v time.Time) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldNEQ(FieldTime, v))
|
||||
}
|
||||
|
||||
// TimeIn applies the In predicate on the "time" field.
|
||||
func TimeIn(vs ...time.Time) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldIn(FieldTime, vs...))
|
||||
}
|
||||
|
||||
// TimeNotIn applies the NotIn predicate on the "time" field.
|
||||
func TimeNotIn(vs ...time.Time) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldNotIn(FieldTime, vs...))
|
||||
}
|
||||
|
||||
// TimeGT applies the GT predicate on the "time" field.
|
||||
func TimeGT(v time.Time) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldGT(FieldTime, v))
|
||||
}
|
||||
|
||||
// TimeGTE applies the GTE predicate on the "time" field.
|
||||
func TimeGTE(v time.Time) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldGTE(FieldTime, v))
|
||||
}
|
||||
|
||||
// TimeLT applies the LT predicate on the "time" field.
|
||||
func TimeLT(v time.Time) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldLT(FieldTime, v))
|
||||
}
|
||||
|
||||
// TimeLTE applies the LTE predicate on the "time" field.
|
||||
func TimeLTE(v time.Time) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldLTE(FieldTime, v))
|
||||
}
|
||||
|
||||
// DescriptionEQ applies the EQ predicate on the "description" field.
|
||||
func DescriptionEQ(v string) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldEQ(FieldDescription, v))
|
||||
}
|
||||
|
||||
// DescriptionNEQ applies the NEQ predicate on the "description" field.
|
||||
func DescriptionNEQ(v string) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldNEQ(FieldDescription, v))
|
||||
}
|
||||
|
||||
// DescriptionIn applies the In predicate on the "description" field.
|
||||
func DescriptionIn(vs ...string) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldIn(FieldDescription, vs...))
|
||||
}
|
||||
|
||||
// DescriptionNotIn applies the NotIn predicate on the "description" field.
|
||||
func DescriptionNotIn(vs ...string) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldNotIn(FieldDescription, vs...))
|
||||
}
|
||||
|
||||
// DescriptionGT applies the GT predicate on the "description" field.
|
||||
func DescriptionGT(v string) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldGT(FieldDescription, v))
|
||||
}
|
||||
|
||||
// DescriptionGTE applies the GTE predicate on the "description" field.
|
||||
func DescriptionGTE(v string) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldGTE(FieldDescription, v))
|
||||
}
|
||||
|
||||
// DescriptionLT applies the LT predicate on the "description" field.
|
||||
func DescriptionLT(v string) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldLT(FieldDescription, v))
|
||||
}
|
||||
|
||||
// DescriptionLTE applies the LTE predicate on the "description" field.
|
||||
func DescriptionLTE(v string) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldLTE(FieldDescription, v))
|
||||
}
|
||||
|
||||
// DescriptionContains applies the Contains predicate on the "description" field.
|
||||
func DescriptionContains(v string) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldContains(FieldDescription, v))
|
||||
}
|
||||
|
||||
// DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.
|
||||
func DescriptionHasPrefix(v string) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldHasPrefix(FieldDescription, v))
|
||||
}
|
||||
|
||||
// DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.
|
||||
func DescriptionHasSuffix(v string) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldHasSuffix(FieldDescription, v))
|
||||
}
|
||||
|
||||
// DescriptionEqualFold applies the EqualFold predicate on the "description" field.
|
||||
func DescriptionEqualFold(v string) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldEqualFold(FieldDescription, v))
|
||||
}
|
||||
|
||||
// DescriptionContainsFold applies the ContainsFold predicate on the "description" field.
|
||||
func DescriptionContainsFold(v string) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldContainsFold(FieldDescription, v))
|
||||
}
|
||||
|
||||
// StatusEQ applies the EQ predicate on the "status" field.
|
||||
func StatusEQ(v Status) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldEQ(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusNEQ applies the NEQ predicate on the "status" field.
|
||||
func StatusNEQ(v Status) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldNEQ(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusIn applies the In predicate on the "status" field.
|
||||
func StatusIn(vs ...Status) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldIn(FieldStatus, vs...))
|
||||
}
|
||||
|
||||
// StatusNotIn applies the NotIn predicate on the "status" field.
|
||||
func StatusNotIn(vs ...Status) predicate.Payment {
|
||||
return predicate.Payment(sql.FieldNotIn(FieldStatus, vs...))
|
||||
}
|
||||
|
||||
// HasCard applies the HasEdge predicate on the "card" edge.
|
||||
func HasCard() predicate.Payment {
|
||||
return predicate.Payment(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, CardTable, CardColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasCardWith applies the HasEdge predicate on the "card" edge with a given conditions (other predicates).
|
||||
func HasCardWith(preds ...predicate.Card) predicate.Payment {
|
||||
return predicate.Payment(func(s *sql.Selector) {
|
||||
step := newCardStep()
|
||||
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.Payment) predicate.Payment {
|
||||
return predicate.Payment(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.Payment) predicate.Payment {
|
||||
return predicate.Payment(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.Payment) predicate.Payment {
|
||||
return predicate.Payment(sql.NotPredicates(p))
|
||||
}
|
||||
Reference in New Issue
Block a user