// Code generated by ent, DO NOT EDIT.

package user

import (
	"ariga.io/ogent/internal/integration/ogent/ent/predicate"
	"ariga.io/ogent/internal/integration/ogent/ent/schema"
	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
)

// 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))
}

// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
func Name(v string) predicate.User {
	return predicate.User(sql.FieldEQ(FieldName, v))
}

// Age applies equality check predicate on the "age" field. It's identical to AgeEQ.
func Age(v uint) predicate.User {
	return predicate.User(sql.FieldEQ(FieldAge, v))
}

// Height applies equality check predicate on the "height" field. It's identical to HeightEQ.
func Height(v uint) predicate.User {
	return predicate.User(sql.FieldEQ(FieldHeight, v))
}

// NameEQ applies the EQ predicate on the "name" field.
func NameEQ(v string) predicate.User {
	return predicate.User(sql.FieldEQ(FieldName, v))
}

// NameNEQ applies the NEQ predicate on the "name" field.
func NameNEQ(v string) predicate.User {
	return predicate.User(sql.FieldNEQ(FieldName, v))
}

// NameIn applies the In predicate on the "name" field.
func NameIn(vs ...string) predicate.User {
	return predicate.User(sql.FieldIn(FieldName, vs...))
}

// NameNotIn applies the NotIn predicate on the "name" field.
func NameNotIn(vs ...string) predicate.User {
	return predicate.User(sql.FieldNotIn(FieldName, vs...))
}

// NameGT applies the GT predicate on the "name" field.
func NameGT(v string) predicate.User {
	return predicate.User(sql.FieldGT(FieldName, v))
}

// NameGTE applies the GTE predicate on the "name" field.
func NameGTE(v string) predicate.User {
	return predicate.User(sql.FieldGTE(FieldName, v))
}

// NameLT applies the LT predicate on the "name" field.
func NameLT(v string) predicate.User {
	return predicate.User(sql.FieldLT(FieldName, v))
}

// NameLTE applies the LTE predicate on the "name" field.
func NameLTE(v string) predicate.User {
	return predicate.User(sql.FieldLTE(FieldName, v))
}

// NameContains applies the Contains predicate on the "name" field.
func NameContains(v string) predicate.User {
	return predicate.User(sql.FieldContains(FieldName, v))
}

// NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasPrefix(v string) predicate.User {
	return predicate.User(sql.FieldHasPrefix(FieldName, v))
}

// NameHasSuffix applies the HasSuffix predicate on the "name" field.
func NameHasSuffix(v string) predicate.User {
	return predicate.User(sql.FieldHasSuffix(FieldName, v))
}

// NameEqualFold applies the EqualFold predicate on the "name" field.
func NameEqualFold(v string) predicate.User {
	return predicate.User(sql.FieldEqualFold(FieldName, v))
}

// NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameContainsFold(v string) predicate.User {
	return predicate.User(sql.FieldContainsFold(FieldName, v))
}

// AgeEQ applies the EQ predicate on the "age" field.
func AgeEQ(v uint) predicate.User {
	return predicate.User(sql.FieldEQ(FieldAge, v))
}

// AgeNEQ applies the NEQ predicate on the "age" field.
func AgeNEQ(v uint) predicate.User {
	return predicate.User(sql.FieldNEQ(FieldAge, v))
}

// AgeIn applies the In predicate on the "age" field.
func AgeIn(vs ...uint) predicate.User {
	return predicate.User(sql.FieldIn(FieldAge, vs...))
}

// AgeNotIn applies the NotIn predicate on the "age" field.
func AgeNotIn(vs ...uint) predicate.User {
	return predicate.User(sql.FieldNotIn(FieldAge, vs...))
}

// AgeGT applies the GT predicate on the "age" field.
func AgeGT(v uint) predicate.User {
	return predicate.User(sql.FieldGT(FieldAge, v))
}

// AgeGTE applies the GTE predicate on the "age" field.
func AgeGTE(v uint) predicate.User {
	return predicate.User(sql.FieldGTE(FieldAge, v))
}

// AgeLT applies the LT predicate on the "age" field.
func AgeLT(v uint) predicate.User {
	return predicate.User(sql.FieldLT(FieldAge, v))
}

// AgeLTE applies the LTE predicate on the "age" field.
func AgeLTE(v uint) predicate.User {
	return predicate.User(sql.FieldLTE(FieldAge, v))
}

// HeightEQ applies the EQ predicate on the "height" field.
func HeightEQ(v uint) predicate.User {
	return predicate.User(sql.FieldEQ(FieldHeight, v))
}

// HeightNEQ applies the NEQ predicate on the "height" field.
func HeightNEQ(v uint) predicate.User {
	return predicate.User(sql.FieldNEQ(FieldHeight, v))
}

// HeightIn applies the In predicate on the "height" field.
func HeightIn(vs ...uint) predicate.User {
	return predicate.User(sql.FieldIn(FieldHeight, vs...))
}

// HeightNotIn applies the NotIn predicate on the "height" field.
func HeightNotIn(vs ...uint) predicate.User {
	return predicate.User(sql.FieldNotIn(FieldHeight, vs...))
}

// HeightGT applies the GT predicate on the "height" field.
func HeightGT(v uint) predicate.User {
	return predicate.User(sql.FieldGT(FieldHeight, v))
}

// HeightGTE applies the GTE predicate on the "height" field.
func HeightGTE(v uint) predicate.User {
	return predicate.User(sql.FieldGTE(FieldHeight, v))
}

// HeightLT applies the LT predicate on the "height" field.
func HeightLT(v uint) predicate.User {
	return predicate.User(sql.FieldLT(FieldHeight, v))
}

// HeightLTE applies the LTE predicate on the "height" field.
func HeightLTE(v uint) predicate.User {
	return predicate.User(sql.FieldLTE(FieldHeight, v))
}

// HeightIsNil applies the IsNil predicate on the "height" field.
func HeightIsNil() predicate.User {
	return predicate.User(sql.FieldIsNull(FieldHeight))
}

// HeightNotNil applies the NotNil predicate on the "height" field.
func HeightNotNil() predicate.User {
	return predicate.User(sql.FieldNotNull(FieldHeight))
}

// FavoriteCatBreedEQ applies the EQ predicate on the "favorite_cat_breed" field.
func FavoriteCatBreedEQ(v FavoriteCatBreed) predicate.User {
	return predicate.User(sql.FieldEQ(FieldFavoriteCatBreed, v))
}

// FavoriteCatBreedNEQ applies the NEQ predicate on the "favorite_cat_breed" field.
func FavoriteCatBreedNEQ(v FavoriteCatBreed) predicate.User {
	return predicate.User(sql.FieldNEQ(FieldFavoriteCatBreed, v))
}

// FavoriteCatBreedIn applies the In predicate on the "favorite_cat_breed" field.
func FavoriteCatBreedIn(vs ...FavoriteCatBreed) predicate.User {
	return predicate.User(sql.FieldIn(FieldFavoriteCatBreed, vs...))
}

// FavoriteCatBreedNotIn applies the NotIn predicate on the "favorite_cat_breed" field.
func FavoriteCatBreedNotIn(vs ...FavoriteCatBreed) predicate.User {
	return predicate.User(sql.FieldNotIn(FieldFavoriteCatBreed, vs...))
}

// FavoriteColorEQ applies the EQ predicate on the "favorite_color" field.
func FavoriteColorEQ(v FavoriteColor) predicate.User {
	return predicate.User(sql.FieldEQ(FieldFavoriteColor, v))
}

// FavoriteColorNEQ applies the NEQ predicate on the "favorite_color" field.
func FavoriteColorNEQ(v FavoriteColor) predicate.User {
	return predicate.User(sql.FieldNEQ(FieldFavoriteColor, v))
}

// FavoriteColorIn applies the In predicate on the "favorite_color" field.
func FavoriteColorIn(vs ...FavoriteColor) predicate.User {
	return predicate.User(sql.FieldIn(FieldFavoriteColor, vs...))
}

// FavoriteColorNotIn applies the NotIn predicate on the "favorite_color" field.
func FavoriteColorNotIn(vs ...FavoriteColor) predicate.User {
	return predicate.User(sql.FieldNotIn(FieldFavoriteColor, vs...))
}

// FavoriteDogBreedEQ applies the EQ predicate on the "favorite_dog_breed" field.
func FavoriteDogBreedEQ(v FavoriteDogBreed) predicate.User {
	return predicate.User(sql.FieldEQ(FieldFavoriteDogBreed, v))
}

// FavoriteDogBreedNEQ applies the NEQ predicate on the "favorite_dog_breed" field.
func FavoriteDogBreedNEQ(v FavoriteDogBreed) predicate.User {
	return predicate.User(sql.FieldNEQ(FieldFavoriteDogBreed, v))
}

// FavoriteDogBreedIn applies the In predicate on the "favorite_dog_breed" field.
func FavoriteDogBreedIn(vs ...FavoriteDogBreed) predicate.User {
	return predicate.User(sql.FieldIn(FieldFavoriteDogBreed, vs...))
}

// FavoriteDogBreedNotIn applies the NotIn predicate on the "favorite_dog_breed" field.
func FavoriteDogBreedNotIn(vs ...FavoriteDogBreed) predicate.User {
	return predicate.User(sql.FieldNotIn(FieldFavoriteDogBreed, vs...))
}

// FavoriteDogBreedIsNil applies the IsNil predicate on the "favorite_dog_breed" field.
func FavoriteDogBreedIsNil() predicate.User {
	return predicate.User(sql.FieldIsNull(FieldFavoriteDogBreed))
}

// FavoriteDogBreedNotNil applies the NotNil predicate on the "favorite_dog_breed" field.
func FavoriteDogBreedNotNil() predicate.User {
	return predicate.User(sql.FieldNotNull(FieldFavoriteDogBreed))
}

// FavoriteFishBreedEQ applies the EQ predicate on the "favorite_fish_breed" field.
func FavoriteFishBreedEQ(v schema.FishBreed) predicate.User {
	vc := v
	return predicate.User(sql.FieldEQ(FieldFavoriteFishBreed, vc))
}

// FavoriteFishBreedNEQ applies the NEQ predicate on the "favorite_fish_breed" field.
func FavoriteFishBreedNEQ(v schema.FishBreed) predicate.User {
	vc := v
	return predicate.User(sql.FieldNEQ(FieldFavoriteFishBreed, vc))
}

// FavoriteFishBreedIn applies the In predicate on the "favorite_fish_breed" field.
func FavoriteFishBreedIn(vs ...schema.FishBreed) predicate.User {
	v := make([]any, len(vs))
	for i := range v {
		v[i] = vs[i]
	}
	return predicate.User(sql.FieldIn(FieldFavoriteFishBreed, v...))
}

// FavoriteFishBreedNotIn applies the NotIn predicate on the "favorite_fish_breed" field.
func FavoriteFishBreedNotIn(vs ...schema.FishBreed) predicate.User {
	v := make([]any, len(vs))
	for i := range v {
		v[i] = vs[i]
	}
	return predicate.User(sql.FieldNotIn(FieldFavoriteFishBreed, v...))
}

// FavoriteFishBreedIsNil applies the IsNil predicate on the "favorite_fish_breed" field.
func FavoriteFishBreedIsNil() predicate.User {
	return predicate.User(sql.FieldIsNull(FieldFavoriteFishBreed))
}

// FavoriteFishBreedNotNil applies the NotNil predicate on the "favorite_fish_breed" field.
func FavoriteFishBreedNotNil() predicate.User {
	return predicate.User(sql.FieldNotNull(FieldFavoriteFishBreed))
}

// HasPets applies the HasEdge predicate on the "pets" edge.
func HasPets() predicate.User {
	return predicate.User(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2M, false, PetsTable, PetsColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasPetsWith applies the HasEdge predicate on the "pets" edge with a given conditions (other predicates).
func HasPetsWith(preds ...predicate.Pet) predicate.User {
	return predicate.User(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.To(PetsInverseTable, FieldID),
			sqlgraph.Edge(sqlgraph.O2M, false, PetsTable, PetsColumn),
		)
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasAnimalsSaved applies the HasEdge predicate on the "animals_saved" edge.
func HasAnimalsSaved() predicate.User {
	return predicate.User(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2M, false, AnimalsSavedTable, AnimalsSavedPrimaryKey...),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasAnimalsSavedWith applies the HasEdge predicate on the "animals_saved" edge with a given conditions (other predicates).
func HasAnimalsSavedWith(preds ...predicate.Pet) predicate.User {
	return predicate.User(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.To(AnimalsSavedInverseTable, FieldID),
			sqlgraph.Edge(sqlgraph.M2M, false, AnimalsSavedTable, AnimalsSavedPrimaryKey...),
		)
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasBestFriend applies the HasEdge predicate on the "best_friend" edge.
func HasBestFriend() predicate.User {
	return predicate.User(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2O, false, BestFriendTable, BestFriendColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasBestFriendWith applies the HasEdge predicate on the "best_friend" edge with a given conditions (other predicates).
func HasBestFriendWith(preds ...predicate.User) predicate.User {
	return predicate.User(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.To(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2O, false, BestFriendTable, BestFriendColumn),
		)
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasFavoriteHat applies the HasEdge predicate on the "favorite_hat" edge.
func HasFavoriteHat() predicate.User {
	return predicate.User(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2O, false, FavoriteHatTable, FavoriteHatColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasFavoriteHatWith applies the HasEdge predicate on the "favorite_hat" edge with a given conditions (other predicates).
func HasFavoriteHatWith(preds ...predicate.Hat) predicate.User {
	return predicate.User(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.To(FavoriteHatInverseTable, FieldID),
			sqlgraph.Edge(sqlgraph.O2O, false, FavoriteHatTable, FavoriteHatColumn),
		)
		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(func(s *sql.Selector) {
		s1 := s.Clone().SetP(nil)
		for _, p := range predicates {
			p(s1)
		}
		s.Where(s1.P())
	})
}

// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.User) predicate.User {
	return predicate.User(func(s *sql.Selector) {
		s1 := s.Clone().SetP(nil)
		for i, p := range predicates {
			if i > 0 {
				s1.Or()
			}
			p(s1)
		}
		s.Where(s1.P())
	})
}

// Not applies the not operator on the given predicate.
func Not(p predicate.User) predicate.User {
	return predicate.User(func(s *sql.Selector) {
		p(s.Not())
	})
}
