snapshot of https://github.com/ent/ent.git (master, 2026-09-15; blobs > 131072B omitted)
This commit is contained in:
281
entc/integration/edgeschema/ent/tweet/where.go
Normal file
281
entc/integration/edgeschema/ent/tweet/where.go
Normal file
@@ -0,0 +1,281 @@
|
||||
// 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 tweet
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/entc/integration/edgeschema/ent/predicate"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id int) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// Text applies equality check predicate on the "text" field. It's identical to TextEQ.
|
||||
func Text(v string) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldEQ(FieldText, v))
|
||||
}
|
||||
|
||||
// TextEQ applies the EQ predicate on the "text" field.
|
||||
func TextEQ(v string) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldEQ(FieldText, v))
|
||||
}
|
||||
|
||||
// TextNEQ applies the NEQ predicate on the "text" field.
|
||||
func TextNEQ(v string) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldNEQ(FieldText, v))
|
||||
}
|
||||
|
||||
// TextIn applies the In predicate on the "text" field.
|
||||
func TextIn(vs ...string) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldIn(FieldText, vs...))
|
||||
}
|
||||
|
||||
// TextNotIn applies the NotIn predicate on the "text" field.
|
||||
func TextNotIn(vs ...string) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldNotIn(FieldText, vs...))
|
||||
}
|
||||
|
||||
// TextGT applies the GT predicate on the "text" field.
|
||||
func TextGT(v string) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldGT(FieldText, v))
|
||||
}
|
||||
|
||||
// TextGTE applies the GTE predicate on the "text" field.
|
||||
func TextGTE(v string) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldGTE(FieldText, v))
|
||||
}
|
||||
|
||||
// TextLT applies the LT predicate on the "text" field.
|
||||
func TextLT(v string) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldLT(FieldText, v))
|
||||
}
|
||||
|
||||
// TextLTE applies the LTE predicate on the "text" field.
|
||||
func TextLTE(v string) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldLTE(FieldText, v))
|
||||
}
|
||||
|
||||
// TextContains applies the Contains predicate on the "text" field.
|
||||
func TextContains(v string) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldContains(FieldText, v))
|
||||
}
|
||||
|
||||
// TextHasPrefix applies the HasPrefix predicate on the "text" field.
|
||||
func TextHasPrefix(v string) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldHasPrefix(FieldText, v))
|
||||
}
|
||||
|
||||
// TextHasSuffix applies the HasSuffix predicate on the "text" field.
|
||||
func TextHasSuffix(v string) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldHasSuffix(FieldText, v))
|
||||
}
|
||||
|
||||
// TextEqualFold applies the EqualFold predicate on the "text" field.
|
||||
func TextEqualFold(v string) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldEqualFold(FieldText, v))
|
||||
}
|
||||
|
||||
// TextContainsFold applies the ContainsFold predicate on the "text" field.
|
||||
func TextContainsFold(v string) predicate.Tweet {
|
||||
return predicate.Tweet(sql.FieldContainsFold(FieldText, v))
|
||||
}
|
||||
|
||||
// HasLikedUsers applies the HasEdge predicate on the "liked_users" edge.
|
||||
func HasLikedUsers() predicate.Tweet {
|
||||
return predicate.Tweet(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2M, true, LikedUsersTable, LikedUsersPrimaryKey...),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasLikedUsersWith applies the HasEdge predicate on the "liked_users" edge with a given conditions (other predicates).
|
||||
func HasLikedUsersWith(preds ...predicate.User) predicate.Tweet {
|
||||
return predicate.Tweet(func(s *sql.Selector) {
|
||||
step := newLikedUsersStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// HasUser applies the HasEdge predicate on the "user" edge.
|
||||
func HasUser() predicate.Tweet {
|
||||
return predicate.Tweet(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2M, true, UserTable, UserPrimaryKey...),
|
||||
)
|
||||
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.Tweet {
|
||||
return predicate.Tweet(func(s *sql.Selector) {
|
||||
step := newUserStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// HasTags applies the HasEdge predicate on the "tags" edge.
|
||||
func HasTags() predicate.Tweet {
|
||||
return predicate.Tweet(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2M, true, TagsTable, TagsPrimaryKey...),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasTagsWith applies the HasEdge predicate on the "tags" edge with a given conditions (other predicates).
|
||||
func HasTagsWith(preds ...predicate.Tag) predicate.Tweet {
|
||||
return predicate.Tweet(func(s *sql.Selector) {
|
||||
step := newTagsStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// HasLikes applies the HasEdge predicate on the "likes" edge.
|
||||
func HasLikes() predicate.Tweet {
|
||||
return predicate.Tweet(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, true, LikesTable, LikesColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasLikesWith applies the HasEdge predicate on the "likes" edge with a given conditions (other predicates).
|
||||
func HasLikesWith(preds ...predicate.TweetLike) predicate.Tweet {
|
||||
return predicate.Tweet(func(s *sql.Selector) {
|
||||
step := newLikesStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// HasTweetUser applies the HasEdge predicate on the "tweet_user" edge.
|
||||
func HasTweetUser() predicate.Tweet {
|
||||
return predicate.Tweet(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, true, TweetUserTable, TweetUserColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasTweetUserWith applies the HasEdge predicate on the "tweet_user" edge with a given conditions (other predicates).
|
||||
func HasTweetUserWith(preds ...predicate.UserTweet) predicate.Tweet {
|
||||
return predicate.Tweet(func(s *sql.Selector) {
|
||||
step := newTweetUserStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// HasTweetTags applies the HasEdge predicate on the "tweet_tags" edge.
|
||||
func HasTweetTags() predicate.Tweet {
|
||||
return predicate.Tweet(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, true, TweetTagsTable, TweetTagsColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasTweetTagsWith applies the HasEdge predicate on the "tweet_tags" edge with a given conditions (other predicates).
|
||||
func HasTweetTagsWith(preds ...predicate.TweetTag) predicate.Tweet {
|
||||
return predicate.Tweet(func(s *sql.Selector) {
|
||||
step := newTweetTagsStep()
|
||||
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.Tweet) predicate.Tweet {
|
||||
return predicate.Tweet(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.Tweet) predicate.Tweet {
|
||||
return predicate.Tweet(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.Tweet) predicate.Tweet {
|
||||
return predicate.Tweet(sql.NotPredicates(p))
|
||||
}
|
||||
Reference in New Issue
Block a user