Documentation ¶
Index ¶
- Constants
- Variables
- func Age(v uint) predicate.User
- func AgeEQ(v uint) predicate.User
- func AgeGT(v uint) predicate.User
- func AgeGTE(v uint) predicate.User
- func AgeIn(vs ...uint) predicate.User
- func AgeLT(v uint) predicate.User
- func AgeLTE(v uint) predicate.User
- func AgeNEQ(v uint) predicate.User
- func AgeNotIn(vs ...uint) predicate.User
- func And(predicates ...predicate.User) predicate.User
- func FavoriteCatBreedEQ(v FavoriteCatBreed) predicate.User
- func FavoriteCatBreedIn(vs ...FavoriteCatBreed) predicate.User
- func FavoriteCatBreedNEQ(v FavoriteCatBreed) predicate.User
- func FavoriteCatBreedNotIn(vs ...FavoriteCatBreed) predicate.User
- func FavoriteCatBreedValidator(fcb FavoriteCatBreed) error
- func FavoriteColorEQ(v FavoriteColor) predicate.User
- func FavoriteColorIn(vs ...FavoriteColor) predicate.User
- func FavoriteColorNEQ(v FavoriteColor) predicate.User
- func FavoriteColorNotIn(vs ...FavoriteColor) predicate.User
- func FavoriteColorValidator(fc FavoriteColor) error
- func FavoriteDogBreedEQ(v FavoriteDogBreed) predicate.User
- func FavoriteDogBreedIn(vs ...FavoriteDogBreed) predicate.User
- func FavoriteDogBreedIsNil() predicate.User
- func FavoriteDogBreedNEQ(v FavoriteDogBreed) predicate.User
- func FavoriteDogBreedNotIn(vs ...FavoriteDogBreed) predicate.User
- func FavoriteDogBreedNotNil() predicate.User
- func FavoriteDogBreedValidator(fdb FavoriteDogBreed) error
- func FavoriteFishBreedEQ(v schema.FishBreed) predicate.User
- func FavoriteFishBreedIn(vs ...schema.FishBreed) predicate.User
- func FavoriteFishBreedIsNil() predicate.User
- func FavoriteFishBreedNEQ(v schema.FishBreed) predicate.User
- func FavoriteFishBreedNotIn(vs ...schema.FishBreed) predicate.User
- func FavoriteFishBreedNotNil() predicate.User
- func FavoriteFishBreedValidator(ffb schema.FishBreed) error
- func HasAnimalsSaved() predicate.User
- func HasAnimalsSavedWith(preds ...predicate.Pet) predicate.User
- func HasBestFriend() predicate.User
- func HasBestFriendWith(preds ...predicate.User) predicate.User
- func HasFavoriteHat() predicate.User
- func HasFavoriteHatWith(preds ...predicate.Hat) predicate.User
- func HasPets() predicate.User
- func HasPetsWith(preds ...predicate.Pet) predicate.User
- func Height(v uint) predicate.User
- func HeightEQ(v uint) predicate.User
- func HeightGT(v uint) predicate.User
- func HeightGTE(v uint) predicate.User
- func HeightIn(vs ...uint) predicate.User
- func HeightIsNil() predicate.User
- func HeightLT(v uint) predicate.User
- func HeightLTE(v uint) predicate.User
- func HeightNEQ(v uint) predicate.User
- func HeightNotIn(vs ...uint) predicate.User
- func HeightNotNil() predicate.User
- func ID(id int) predicate.User
- func IDEQ(id int) predicate.User
- func IDGT(id int) predicate.User
- func IDGTE(id int) predicate.User
- func IDIn(ids ...int) predicate.User
- func IDLT(id int) predicate.User
- func IDLTE(id int) predicate.User
- func IDNEQ(id int) predicate.User
- func IDNotIn(ids ...int) predicate.User
- func Name(v string) predicate.User
- func NameContains(v string) predicate.User
- func NameContainsFold(v string) predicate.User
- func NameEQ(v string) predicate.User
- func NameEqualFold(v string) predicate.User
- func NameGT(v string) predicate.User
- func NameGTE(v string) predicate.User
- func NameHasPrefix(v string) predicate.User
- func NameHasSuffix(v string) predicate.User
- func NameIn(vs ...string) predicate.User
- func NameLT(v string) predicate.User
- func NameLTE(v string) predicate.User
- func NameNEQ(v string) predicate.User
- func NameNotIn(vs ...string) predicate.User
- func Not(p predicate.User) predicate.User
- func Or(predicates ...predicate.User) predicate.User
- func ValidColumn(column string) bool
- type FavoriteCatBreed
- type FavoriteColor
- type FavoriteDogBreed
- type OrderOption
- func ByAge(opts ...sql.OrderTermOption) OrderOption
- func ByAnimalsSaved(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByAnimalsSavedCount(opts ...sql.OrderTermOption) OrderOption
- func ByBestFriendField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByFavoriteCatBreed(opts ...sql.OrderTermOption) OrderOption
- func ByFavoriteColor(opts ...sql.OrderTermOption) OrderOption
- func ByFavoriteDogBreed(opts ...sql.OrderTermOption) OrderOption
- func ByFavoriteFishBreed(opts ...sql.OrderTermOption) OrderOption
- func ByFavoriteHatField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByHeight(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByPets(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByPetsCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the user type in the database. Label = "user" // 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" // FieldAge holds the string denoting the age field in the database. FieldAge = "age" // FieldHeight holds the string denoting the height field in the database. FieldHeight = "height" // FieldFavoriteCatBreed holds the string denoting the favorite_cat_breed field in the database. FieldFavoriteCatBreed = "favorite_cat_breed" // FieldFavoriteColor holds the string denoting the favorite_color field in the database. FieldFavoriteColor = "favorite_color" // FieldFavoriteDogBreed holds the string denoting the favorite_dog_breed field in the database. FieldFavoriteDogBreed = "favorite_dog_breed" // FieldFavoriteFishBreed holds the string denoting the favorite_fish_breed field in the database. FieldFavoriteFishBreed = "favorite_fish_breed" // EdgePets holds the string denoting the pets edge name in mutations. EdgePets = "pets" // EdgeAnimalsSaved holds the string denoting the animals_saved edge name in mutations. EdgeAnimalsSaved = "animals_saved" // EdgeBestFriend holds the string denoting the best_friend edge name in mutations. EdgeBestFriend = "best_friend" // EdgeFavoriteHat holds the string denoting the favorite_hat edge name in mutations. EdgeFavoriteHat = "favorite_hat" // Table holds the table name of the user in the database. Table = "users" // PetsTable is the table that holds the pets relation/edge. PetsTable = "pets" // PetsInverseTable is the table name for the Pet entity. // It exists in this package in order to avoid circular dependency with the "pet" package. PetsInverseTable = "pets" // PetsColumn is the table column denoting the pets relation/edge. PetsColumn = "user_pets" // AnimalsSavedTable is the table that holds the animals_saved relation/edge. The primary key declared below. AnimalsSavedTable = "user_animals_saved" // AnimalsSavedInverseTable is the table name for the Pet entity. // It exists in this package in order to avoid circular dependency with the "pet" package. AnimalsSavedInverseTable = "pets" // BestFriendTable is the table that holds the best_friend relation/edge. BestFriendTable = "users" // BestFriendColumn is the table column denoting the best_friend relation/edge. BestFriendColumn = "user_best_friend" // FavoriteHatTable is the table that holds the favorite_hat relation/edge. FavoriteHatTable = "hats" // FavoriteHatInverseTable is the table name for the Hat entity. // It exists in this package in order to avoid circular dependency with the "hat" package. FavoriteHatInverseTable = "hats" // FavoriteHatColumn is the table column denoting the favorite_hat relation/edge. FavoriteHatColumn = "user_favorite_hat" )
const DefaultFavoriteColor = FavoriteColorRed
FavoriteColorRed is the default value of the FavoriteColor enum.
Variables ¶
var ( // AnimalsSavedPrimaryKey and AnimalsSavedColumn2 are the table columns denoting the // primary key for the animals_saved relation (M2M). AnimalsSavedPrimaryKey = []string{"user_id", "pet_id"} )
var Columns = []string{ FieldID, FieldName, FieldAge, FieldHeight, FieldFavoriteCatBreed, FieldFavoriteColor, FieldFavoriteDogBreed, FieldFavoriteFishBreed, }
Columns holds all SQL columns for user fields.
var ForeignKeys = []string{
"user_best_friend",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "users" table and are not defined as standalone fields in the schema.
Functions ¶
func FavoriteCatBreedEQ ¶
func FavoriteCatBreedEQ(v FavoriteCatBreed) predicate.User
FavoriteCatBreedEQ applies the EQ predicate on the "favorite_cat_breed" field.
func FavoriteCatBreedIn ¶
func FavoriteCatBreedIn(vs ...FavoriteCatBreed) predicate.User
FavoriteCatBreedIn applies the In predicate on the "favorite_cat_breed" field.
func FavoriteCatBreedNEQ ¶
func FavoriteCatBreedNEQ(v FavoriteCatBreed) predicate.User
FavoriteCatBreedNEQ applies the NEQ predicate on the "favorite_cat_breed" field.
func FavoriteCatBreedNotIn ¶
func FavoriteCatBreedNotIn(vs ...FavoriteCatBreed) predicate.User
FavoriteCatBreedNotIn applies the NotIn predicate on the "favorite_cat_breed" field.
func FavoriteCatBreedValidator ¶
func FavoriteCatBreedValidator(fcb FavoriteCatBreed) error
FavoriteCatBreedValidator is a validator for the "favorite_cat_breed" field enum values. It is called by the builders before save.
func FavoriteColorEQ ¶
func FavoriteColorEQ(v FavoriteColor) predicate.User
FavoriteColorEQ applies the EQ predicate on the "favorite_color" field.
func FavoriteColorIn ¶
func FavoriteColorIn(vs ...FavoriteColor) predicate.User
FavoriteColorIn applies the In predicate on the "favorite_color" field.
func FavoriteColorNEQ ¶
func FavoriteColorNEQ(v FavoriteColor) predicate.User
FavoriteColorNEQ applies the NEQ predicate on the "favorite_color" field.
func FavoriteColorNotIn ¶
func FavoriteColorNotIn(vs ...FavoriteColor) predicate.User
FavoriteColorNotIn applies the NotIn predicate on the "favorite_color" field.
func FavoriteColorValidator ¶
func FavoriteColorValidator(fc FavoriteColor) error
FavoriteColorValidator is a validator for the "favorite_color" field enum values. It is called by the builders before save.
func FavoriteDogBreedEQ ¶
func FavoriteDogBreedEQ(v FavoriteDogBreed) predicate.User
FavoriteDogBreedEQ applies the EQ predicate on the "favorite_dog_breed" field.
func FavoriteDogBreedIn ¶
func FavoriteDogBreedIn(vs ...FavoriteDogBreed) predicate.User
FavoriteDogBreedIn applies the In predicate on the "favorite_dog_breed" field.
func FavoriteDogBreedIsNil ¶
FavoriteDogBreedIsNil applies the IsNil predicate on the "favorite_dog_breed" field.
func FavoriteDogBreedNEQ ¶
func FavoriteDogBreedNEQ(v FavoriteDogBreed) predicate.User
FavoriteDogBreedNEQ applies the NEQ predicate on the "favorite_dog_breed" field.
func FavoriteDogBreedNotIn ¶
func FavoriteDogBreedNotIn(vs ...FavoriteDogBreed) predicate.User
FavoriteDogBreedNotIn applies the NotIn predicate on the "favorite_dog_breed" field.
func FavoriteDogBreedNotNil ¶
FavoriteDogBreedNotNil applies the NotNil predicate on the "favorite_dog_breed" field.
func FavoriteDogBreedValidator ¶
func FavoriteDogBreedValidator(fdb FavoriteDogBreed) error
FavoriteDogBreedValidator is a validator for the "favorite_dog_breed" field enum values. It is called by the builders before save.
func FavoriteFishBreedEQ ¶
FavoriteFishBreedEQ applies the EQ predicate on the "favorite_fish_breed" field.
func FavoriteFishBreedIn ¶
FavoriteFishBreedIn applies the In predicate on the "favorite_fish_breed" field.
func FavoriteFishBreedIsNil ¶
FavoriteFishBreedIsNil applies the IsNil predicate on the "favorite_fish_breed" field.
func FavoriteFishBreedNEQ ¶
FavoriteFishBreedNEQ applies the NEQ predicate on the "favorite_fish_breed" field.
func FavoriteFishBreedNotIn ¶
FavoriteFishBreedNotIn applies the NotIn predicate on the "favorite_fish_breed" field.
func FavoriteFishBreedNotNil ¶
FavoriteFishBreedNotNil applies the NotNil predicate on the "favorite_fish_breed" field.
func FavoriteFishBreedValidator ¶
FavoriteFishBreedValidator is a validator for the "favorite_fish_breed" field enum values. It is called by the builders before save.
func HasAnimalsSaved ¶
HasAnimalsSaved applies the HasEdge predicate on the "animals_saved" edge.
func HasAnimalsSavedWith ¶
HasAnimalsSavedWith applies the HasEdge predicate on the "animals_saved" edge with a given conditions (other predicates).
func HasBestFriend ¶
HasBestFriend applies the HasEdge predicate on the "best_friend" edge.
func HasBestFriendWith ¶
HasBestFriendWith applies the HasEdge predicate on the "best_friend" edge with a given conditions (other predicates).
func HasFavoriteHat ¶
HasFavoriteHat applies the HasEdge predicate on the "favorite_hat" edge.
func HasFavoriteHatWith ¶
HasFavoriteHatWith applies the HasEdge predicate on the "favorite_hat" edge with a given conditions (other predicates).
func HasPetsWith ¶
HasPetsWith applies the HasEdge predicate on the "pets" edge with a given conditions (other predicates).
func Height ¶
Height applies equality check predicate on the "height" field. It's identical to HeightEQ.
func HeightIsNil ¶
HeightIsNil applies the IsNil predicate on the "height" field.
func HeightNotIn ¶
HeightNotIn applies the NotIn predicate on the "height" field.
func HeightNotNil ¶
HeightNotNil applies the NotNil predicate on the "height" field.
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type FavoriteCatBreed ¶
type FavoriteCatBreed string
FavoriteCatBreed defines the type for the "favorite_cat_breed" enum field.
const ( FavoriteCatBreedSiamese FavoriteCatBreed = "siamese" FavoriteCatBreedBengal FavoriteCatBreed = "bengal" FavoriteCatBreedLion FavoriteCatBreed = "lion" FavoriteCatBreedTiger FavoriteCatBreed = "tiger" FavoriteCatBreedLeopard FavoriteCatBreed = "leopard" FavoriteCatBreedOther FavoriteCatBreed = "other" )
FavoriteCatBreed values.
func (FavoriteCatBreed) String ¶
func (fcb FavoriteCatBreed) String() string
type FavoriteColor ¶
type FavoriteColor string
FavoriteColor defines the type for the "favorite_color" enum field.
const ( FavoriteColorRed FavoriteColor = "red" FavoriteColorGreen FavoriteColor = "green" FavoriteColorBlue FavoriteColor = "blue" )
FavoriteColor values.
func (FavoriteColor) String ¶
func (fc FavoriteColor) String() string
type FavoriteDogBreed ¶
type FavoriteDogBreed string
FavoriteDogBreed defines the type for the "favorite_dog_breed" enum field.
const (
FavoriteDogBreedKuro FavoriteDogBreed = "Kuro"
)
FavoriteDogBreed values.
func (FavoriteDogBreed) String ¶
func (fdb FavoriteDogBreed) String() string
type OrderOption ¶
OrderOption defines the ordering options for the User queries.
func ByAge ¶
func ByAge(opts ...sql.OrderTermOption) OrderOption
ByAge orders the results by the age field.
func ByAnimalsSaved ¶
func ByAnimalsSaved(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByAnimalsSaved orders the results by animals_saved terms.
func ByAnimalsSavedCount ¶
func ByAnimalsSavedCount(opts ...sql.OrderTermOption) OrderOption
ByAnimalsSavedCount orders the results by animals_saved count.
func ByBestFriendField ¶
func ByBestFriendField(field string, opts ...sql.OrderTermOption) OrderOption
ByBestFriendField orders the results by best_friend field.
func ByFavoriteCatBreed ¶
func ByFavoriteCatBreed(opts ...sql.OrderTermOption) OrderOption
ByFavoriteCatBreed orders the results by the favorite_cat_breed field.
func ByFavoriteColor ¶
func ByFavoriteColor(opts ...sql.OrderTermOption) OrderOption
ByFavoriteColor orders the results by the favorite_color field.
func ByFavoriteDogBreed ¶
func ByFavoriteDogBreed(opts ...sql.OrderTermOption) OrderOption
ByFavoriteDogBreed orders the results by the favorite_dog_breed field.
func ByFavoriteFishBreed ¶
func ByFavoriteFishBreed(opts ...sql.OrderTermOption) OrderOption
ByFavoriteFishBreed orders the results by the favorite_fish_breed field.
func ByFavoriteHatField ¶
func ByFavoriteHatField(field string, opts ...sql.OrderTermOption) OrderOption
ByFavoriteHatField orders the results by favorite_hat field.
func ByHeight ¶
func ByHeight(opts ...sql.OrderTermOption) OrderOption
ByHeight orders the results by the height field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByPets ¶
func ByPets(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByPets orders the results by pets terms.
func ByPetsCount ¶
func ByPetsCount(opts ...sql.OrderTermOption) OrderOption
ByPetsCount orders the results by pets count.