[feature] migrate to monorepo
Some checks failed
Build Backend / Build Docker Image (push) Successful in 3m33s
Test Backend / test (push) Failing after 31s

This commit is contained in:
CDN 2025-02-21 00:49:20 +08:00
commit 05ddc1f783
Signed by: CDN
GPG key ID: 0C656827F9F80080
267 changed files with 75165 additions and 0 deletions

View file

@ -0,0 +1,187 @@
// Code generated by ent, DO NOT EDIT.
package contributor
import (
"time"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
)
const (
// Label holds the string label denoting the contributor type in the database.
Label = "contributor"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldName holds the string denoting the name field in the database.
FieldName = "name"
// FieldAvatarURL holds the string denoting the avatar_url field in the database.
FieldAvatarURL = "avatar_url"
// FieldBio holds the string denoting the bio field in the database.
FieldBio = "bio"
// FieldCreatedAt holds the string denoting the created_at field in the database.
FieldCreatedAt = "created_at"
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
FieldUpdatedAt = "updated_at"
// EdgeUser holds the string denoting the user edge name in mutations.
EdgeUser = "user"
// EdgeSocialLinks holds the string denoting the social_links edge name in mutations.
EdgeSocialLinks = "social_links"
// EdgePosts holds the string denoting the posts edge name in mutations.
EdgePosts = "posts"
// Table holds the table name of the contributor in the database.
Table = "contributors"
// UserTable is the table that holds the user relation/edge.
UserTable = "contributors"
// UserInverseTable is the table name for the User entity.
// It exists in this package in order to avoid circular dependency with the "user" package.
UserInverseTable = "users"
// UserColumn is the table column denoting the user relation/edge.
UserColumn = "user_contributors"
// SocialLinksTable is the table that holds the social_links relation/edge.
SocialLinksTable = "contributor_social_links"
// SocialLinksInverseTable is the table name for the ContributorSocialLink entity.
// It exists in this package in order to avoid circular dependency with the "contributorsociallink" package.
SocialLinksInverseTable = "contributor_social_links"
// SocialLinksColumn is the table column denoting the social_links relation/edge.
SocialLinksColumn = "contributor_social_links"
// PostsTable is the table that holds the posts relation/edge.
PostsTable = "post_contributors"
// PostsInverseTable is the table name for the PostContributor entity.
// It exists in this package in order to avoid circular dependency with the "postcontributor" package.
PostsInverseTable = "post_contributors"
// PostsColumn is the table column denoting the posts relation/edge.
PostsColumn = "contributor_posts"
)
// Columns holds all SQL columns for contributor fields.
var Columns = []string{
FieldID,
FieldName,
FieldAvatarURL,
FieldBio,
FieldCreatedAt,
FieldUpdatedAt,
}
// ForeignKeys holds the SQL foreign-keys that are owned by the "contributors"
// table and are not defined as standalone fields in the schema.
var ForeignKeys = []string{
"user_contributors",
}
// ValidColumn reports if the column name is valid (part of the table columns).
func ValidColumn(column string) bool {
for i := range Columns {
if column == Columns[i] {
return true
}
}
for i := range ForeignKeys {
if column == ForeignKeys[i] {
return true
}
}
return false
}
var (
// NameValidator is a validator for the "name" field. It is called by the builders before save.
NameValidator func(string) error
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
DefaultCreatedAt func() time.Time
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
DefaultUpdatedAt func() time.Time
// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
UpdateDefaultUpdatedAt func() time.Time
)
// OrderOption defines the ordering options for the Contributor queries.
type OrderOption func(*sql.Selector)
// ByID orders the results by the id field.
func ByID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldID, opts...).ToFunc()
}
// ByName orders the results by the name field.
func ByName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldName, opts...).ToFunc()
}
// ByAvatarURL orders the results by the avatar_url field.
func ByAvatarURL(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldAvatarURL, opts...).ToFunc()
}
// ByBio orders the results by the bio field.
func ByBio(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBio, opts...).ToFunc()
}
// ByCreatedAt orders the results by the created_at field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}
// ByUpdatedAt orders the results by the updated_at field.
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
}
// ByUserField orders the results by user field.
func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newUserStep(), sql.OrderByField(field, opts...))
}
}
// BySocialLinksCount orders the results by social_links count.
func BySocialLinksCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newSocialLinksStep(), opts...)
}
}
// BySocialLinks orders the results by social_links terms.
func BySocialLinks(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newSocialLinksStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByPostsCount orders the results by posts count.
func ByPostsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newPostsStep(), opts...)
}
}
// ByPosts orders the results by posts terms.
func ByPosts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newPostsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
func newUserStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(UserInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
)
}
func newSocialLinksStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(SocialLinksInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, SocialLinksTable, SocialLinksColumn),
)
}
func newPostsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(PostsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, PostsTable, PostsColumn),
)
}

View file

@ -0,0 +1,460 @@
// Code generated by ent, DO NOT EDIT.
package contributor
import (
"time"
"tss-rocks-be/ent/predicate"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
)
// ID filters vertices based on their ID field.
func ID(id int) predicate.Contributor {
return predicate.Contributor(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int) predicate.Contributor {
return predicate.Contributor(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int) predicate.Contributor {
return predicate.Contributor(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int) predicate.Contributor {
return predicate.Contributor(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int) predicate.Contributor {
return predicate.Contributor(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int) predicate.Contributor {
return predicate.Contributor(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int) predicate.Contributor {
return predicate.Contributor(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int) predicate.Contributor {
return predicate.Contributor(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int) predicate.Contributor {
return predicate.Contributor(sql.FieldLTE(FieldID, id))
}
// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
func Name(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldEQ(FieldName, v))
}
// AvatarURL applies equality check predicate on the "avatar_url" field. It's identical to AvatarURLEQ.
func AvatarURL(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldEQ(FieldAvatarURL, v))
}
// Bio applies equality check predicate on the "bio" field. It's identical to BioEQ.
func Bio(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldEQ(FieldBio, v))
}
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.Contributor {
return predicate.Contributor(sql.FieldEQ(FieldCreatedAt, v))
}
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAt(v time.Time) predicate.Contributor {
return predicate.Contributor(sql.FieldEQ(FieldUpdatedAt, v))
}
// NameEQ applies the EQ predicate on the "name" field.
func NameEQ(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldEQ(FieldName, v))
}
// NameNEQ applies the NEQ predicate on the "name" field.
func NameNEQ(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldNEQ(FieldName, v))
}
// NameIn applies the In predicate on the "name" field.
func NameIn(vs ...string) predicate.Contributor {
return predicate.Contributor(sql.FieldIn(FieldName, vs...))
}
// NameNotIn applies the NotIn predicate on the "name" field.
func NameNotIn(vs ...string) predicate.Contributor {
return predicate.Contributor(sql.FieldNotIn(FieldName, vs...))
}
// NameGT applies the GT predicate on the "name" field.
func NameGT(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldGT(FieldName, v))
}
// NameGTE applies the GTE predicate on the "name" field.
func NameGTE(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldGTE(FieldName, v))
}
// NameLT applies the LT predicate on the "name" field.
func NameLT(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldLT(FieldName, v))
}
// NameLTE applies the LTE predicate on the "name" field.
func NameLTE(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldLTE(FieldName, v))
}
// NameContains applies the Contains predicate on the "name" field.
func NameContains(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldContains(FieldName, v))
}
// NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasPrefix(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldHasPrefix(FieldName, v))
}
// NameHasSuffix applies the HasSuffix predicate on the "name" field.
func NameHasSuffix(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldHasSuffix(FieldName, v))
}
// NameEqualFold applies the EqualFold predicate on the "name" field.
func NameEqualFold(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldEqualFold(FieldName, v))
}
// NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameContainsFold(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldContainsFold(FieldName, v))
}
// AvatarURLEQ applies the EQ predicate on the "avatar_url" field.
func AvatarURLEQ(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldEQ(FieldAvatarURL, v))
}
// AvatarURLNEQ applies the NEQ predicate on the "avatar_url" field.
func AvatarURLNEQ(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldNEQ(FieldAvatarURL, v))
}
// AvatarURLIn applies the In predicate on the "avatar_url" field.
func AvatarURLIn(vs ...string) predicate.Contributor {
return predicate.Contributor(sql.FieldIn(FieldAvatarURL, vs...))
}
// AvatarURLNotIn applies the NotIn predicate on the "avatar_url" field.
func AvatarURLNotIn(vs ...string) predicate.Contributor {
return predicate.Contributor(sql.FieldNotIn(FieldAvatarURL, vs...))
}
// AvatarURLGT applies the GT predicate on the "avatar_url" field.
func AvatarURLGT(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldGT(FieldAvatarURL, v))
}
// AvatarURLGTE applies the GTE predicate on the "avatar_url" field.
func AvatarURLGTE(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldGTE(FieldAvatarURL, v))
}
// AvatarURLLT applies the LT predicate on the "avatar_url" field.
func AvatarURLLT(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldLT(FieldAvatarURL, v))
}
// AvatarURLLTE applies the LTE predicate on the "avatar_url" field.
func AvatarURLLTE(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldLTE(FieldAvatarURL, v))
}
// AvatarURLContains applies the Contains predicate on the "avatar_url" field.
func AvatarURLContains(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldContains(FieldAvatarURL, v))
}
// AvatarURLHasPrefix applies the HasPrefix predicate on the "avatar_url" field.
func AvatarURLHasPrefix(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldHasPrefix(FieldAvatarURL, v))
}
// AvatarURLHasSuffix applies the HasSuffix predicate on the "avatar_url" field.
func AvatarURLHasSuffix(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldHasSuffix(FieldAvatarURL, v))
}
// AvatarURLIsNil applies the IsNil predicate on the "avatar_url" field.
func AvatarURLIsNil() predicate.Contributor {
return predicate.Contributor(sql.FieldIsNull(FieldAvatarURL))
}
// AvatarURLNotNil applies the NotNil predicate on the "avatar_url" field.
func AvatarURLNotNil() predicate.Contributor {
return predicate.Contributor(sql.FieldNotNull(FieldAvatarURL))
}
// AvatarURLEqualFold applies the EqualFold predicate on the "avatar_url" field.
func AvatarURLEqualFold(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldEqualFold(FieldAvatarURL, v))
}
// AvatarURLContainsFold applies the ContainsFold predicate on the "avatar_url" field.
func AvatarURLContainsFold(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldContainsFold(FieldAvatarURL, v))
}
// BioEQ applies the EQ predicate on the "bio" field.
func BioEQ(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldEQ(FieldBio, v))
}
// BioNEQ applies the NEQ predicate on the "bio" field.
func BioNEQ(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldNEQ(FieldBio, v))
}
// BioIn applies the In predicate on the "bio" field.
func BioIn(vs ...string) predicate.Contributor {
return predicate.Contributor(sql.FieldIn(FieldBio, vs...))
}
// BioNotIn applies the NotIn predicate on the "bio" field.
func BioNotIn(vs ...string) predicate.Contributor {
return predicate.Contributor(sql.FieldNotIn(FieldBio, vs...))
}
// BioGT applies the GT predicate on the "bio" field.
func BioGT(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldGT(FieldBio, v))
}
// BioGTE applies the GTE predicate on the "bio" field.
func BioGTE(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldGTE(FieldBio, v))
}
// BioLT applies the LT predicate on the "bio" field.
func BioLT(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldLT(FieldBio, v))
}
// BioLTE applies the LTE predicate on the "bio" field.
func BioLTE(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldLTE(FieldBio, v))
}
// BioContains applies the Contains predicate on the "bio" field.
func BioContains(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldContains(FieldBio, v))
}
// BioHasPrefix applies the HasPrefix predicate on the "bio" field.
func BioHasPrefix(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldHasPrefix(FieldBio, v))
}
// BioHasSuffix applies the HasSuffix predicate on the "bio" field.
func BioHasSuffix(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldHasSuffix(FieldBio, v))
}
// BioIsNil applies the IsNil predicate on the "bio" field.
func BioIsNil() predicate.Contributor {
return predicate.Contributor(sql.FieldIsNull(FieldBio))
}
// BioNotNil applies the NotNil predicate on the "bio" field.
func BioNotNil() predicate.Contributor {
return predicate.Contributor(sql.FieldNotNull(FieldBio))
}
// BioEqualFold applies the EqualFold predicate on the "bio" field.
func BioEqualFold(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldEqualFold(FieldBio, v))
}
// BioContainsFold applies the ContainsFold predicate on the "bio" field.
func BioContainsFold(v string) predicate.Contributor {
return predicate.Contributor(sql.FieldContainsFold(FieldBio, v))
}
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtEQ(v time.Time) predicate.Contributor {
return predicate.Contributor(sql.FieldEQ(FieldCreatedAt, v))
}
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNEQ(v time.Time) predicate.Contributor {
return predicate.Contributor(sql.FieldNEQ(FieldCreatedAt, v))
}
// CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtIn(vs ...time.Time) predicate.Contributor {
return predicate.Contributor(sql.FieldIn(FieldCreatedAt, vs...))
}
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedAtNotIn(vs ...time.Time) predicate.Contributor {
return predicate.Contributor(sql.FieldNotIn(FieldCreatedAt, vs...))
}
// CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGT(v time.Time) predicate.Contributor {
return predicate.Contributor(sql.FieldGT(FieldCreatedAt, v))
}
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtGTE(v time.Time) predicate.Contributor {
return predicate.Contributor(sql.FieldGTE(FieldCreatedAt, v))
}
// CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLT(v time.Time) predicate.Contributor {
return predicate.Contributor(sql.FieldLT(FieldCreatedAt, v))
}
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtLTE(v time.Time) predicate.Contributor {
return predicate.Contributor(sql.FieldLTE(FieldCreatedAt, v))
}
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtEQ(v time.Time) predicate.Contributor {
return predicate.Contributor(sql.FieldEQ(FieldUpdatedAt, v))
}
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNEQ(v time.Time) predicate.Contributor {
return predicate.Contributor(sql.FieldNEQ(FieldUpdatedAt, v))
}
// UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtIn(vs ...time.Time) predicate.Contributor {
return predicate.Contributor(sql.FieldIn(FieldUpdatedAt, vs...))
}
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func UpdatedAtNotIn(vs ...time.Time) predicate.Contributor {
return predicate.Contributor(sql.FieldNotIn(FieldUpdatedAt, vs...))
}
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGT(v time.Time) predicate.Contributor {
return predicate.Contributor(sql.FieldGT(FieldUpdatedAt, v))
}
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtGTE(v time.Time) predicate.Contributor {
return predicate.Contributor(sql.FieldGTE(FieldUpdatedAt, v))
}
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLT(v time.Time) predicate.Contributor {
return predicate.Contributor(sql.FieldLT(FieldUpdatedAt, v))
}
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtLTE(v time.Time) predicate.Contributor {
return predicate.Contributor(sql.FieldLTE(FieldUpdatedAt, v))
}
// HasUser applies the HasEdge predicate on the "user" edge.
func HasUser() predicate.Contributor {
return predicate.Contributor(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, 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.Contributor {
return predicate.Contributor(func(s *sql.Selector) {
step := newUserStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasSocialLinks applies the HasEdge predicate on the "social_links" edge.
func HasSocialLinks() predicate.Contributor {
return predicate.Contributor(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, SocialLinksTable, SocialLinksColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasSocialLinksWith applies the HasEdge predicate on the "social_links" edge with a given conditions (other predicates).
func HasSocialLinksWith(preds ...predicate.ContributorSocialLink) predicate.Contributor {
return predicate.Contributor(func(s *sql.Selector) {
step := newSocialLinksStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasPosts applies the HasEdge predicate on the "posts" edge.
func HasPosts() predicate.Contributor {
return predicate.Contributor(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, PostsTable, PostsColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasPostsWith applies the HasEdge predicate on the "posts" edge with a given conditions (other predicates).
func HasPostsWith(preds ...predicate.PostContributor) predicate.Contributor {
return predicate.Contributor(func(s *sql.Selector) {
step := newPostsStep()
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.Contributor) predicate.Contributor {
return predicate.Contributor(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.Contributor) predicate.Contributor {
return predicate.Contributor(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.Contributor) predicate.Contributor {
return predicate.Contributor(sql.NotPredicates(p))
}