user

package
v0.0.0-...-ed3e5d4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const DefaultFavoriteColor = FavoriteColorRed

FavoriteColorRed is the default value of the FavoriteColor enum.

Variables

View Source
var (
	// AnimalsSavedPrimaryKey and AnimalsSavedColumn2 are the table columns denoting the
	// primary key for the animals_saved relation (M2M).
	AnimalsSavedPrimaryKey = []string{"user_id", "pet_id"}
)

Columns holds all SQL columns for user fields.

View Source
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 Age

func Age(v uint) predicate.User

Age applies equality check predicate on the "age" field. It's identical to AgeEQ.

func AgeEQ

func AgeEQ(v uint) predicate.User

AgeEQ applies the EQ predicate on the "age" field.

func AgeGT

func AgeGT(v uint) predicate.User

AgeGT applies the GT predicate on the "age" field.

func AgeGTE

func AgeGTE(v uint) predicate.User

AgeGTE applies the GTE predicate on the "age" field.

func AgeIn

func AgeIn(vs ...uint) predicate.User

AgeIn applies the In predicate on the "age" field.

func AgeLT

func AgeLT(v uint) predicate.User

AgeLT applies the LT predicate on the "age" field.

func AgeLTE

func AgeLTE(v uint) predicate.User

AgeLTE applies the LTE predicate on the "age" field.

func AgeNEQ

func AgeNEQ(v uint) predicate.User

AgeNEQ applies the NEQ predicate on the "age" field.

func AgeNotIn

func AgeNotIn(vs ...uint) predicate.User

AgeNotIn applies the NotIn predicate on the "age" field.

func And

func And(predicates ...predicate.User) predicate.User

And groups predicates with the AND operator between them.

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

func FavoriteDogBreedIsNil() predicate.User

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

func FavoriteDogBreedNotNil() predicate.User

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

func FavoriteFishBreedEQ(v schema.FishBreed) predicate.User

FavoriteFishBreedEQ applies the EQ predicate on the "favorite_fish_breed" field.

func FavoriteFishBreedIn

func FavoriteFishBreedIn(vs ...schema.FishBreed) predicate.User

FavoriteFishBreedIn applies the In predicate on the "favorite_fish_breed" field.

func FavoriteFishBreedIsNil

func FavoriteFishBreedIsNil() predicate.User

FavoriteFishBreedIsNil applies the IsNil predicate on the "favorite_fish_breed" field.

func FavoriteFishBreedNEQ

func FavoriteFishBreedNEQ(v schema.FishBreed) predicate.User

FavoriteFishBreedNEQ applies the NEQ predicate on the "favorite_fish_breed" field.

func FavoriteFishBreedNotIn

func FavoriteFishBreedNotIn(vs ...schema.FishBreed) predicate.User

FavoriteFishBreedNotIn applies the NotIn predicate on the "favorite_fish_breed" field.

func FavoriteFishBreedNotNil

func FavoriteFishBreedNotNil() predicate.User

FavoriteFishBreedNotNil applies the NotNil predicate on the "favorite_fish_breed" field.

func FavoriteFishBreedValidator

func FavoriteFishBreedValidator(ffb schema.FishBreed) error

FavoriteFishBreedValidator is a validator for the "favorite_fish_breed" field enum values. It is called by the builders before save.

func HasAnimalsSaved

func HasAnimalsSaved() predicate.User

HasAnimalsSaved applies the HasEdge predicate on the "animals_saved" edge.

func HasAnimalsSavedWith

func HasAnimalsSavedWith(preds ...predicate.Pet) predicate.User

HasAnimalsSavedWith applies the HasEdge predicate on the "animals_saved" edge with a given conditions (other predicates).

func HasBestFriend

func HasBestFriend() predicate.User

HasBestFriend applies the HasEdge predicate on the "best_friend" edge.

func HasBestFriendWith

func HasBestFriendWith(preds ...predicate.User) predicate.User

HasBestFriendWith applies the HasEdge predicate on the "best_friend" edge with a given conditions (other predicates).

func HasFavoriteHat

func HasFavoriteHat() predicate.User

HasFavoriteHat applies the HasEdge predicate on the "favorite_hat" edge.

func HasFavoriteHatWith

func HasFavoriteHatWith(preds ...predicate.Hat) predicate.User

HasFavoriteHatWith applies the HasEdge predicate on the "favorite_hat" edge with a given conditions (other predicates).

func HasPets

func HasPets() predicate.User

HasPets applies the HasEdge predicate on the "pets" edge.

func HasPetsWith

func HasPetsWith(preds ...predicate.Pet) predicate.User

HasPetsWith applies the HasEdge predicate on the "pets" edge with a given conditions (other predicates).

func Height

func Height(v uint) predicate.User

Height applies equality check predicate on the "height" field. It's identical to HeightEQ.

func HeightEQ

func HeightEQ(v uint) predicate.User

HeightEQ applies the EQ predicate on the "height" field.

func HeightGT

func HeightGT(v uint) predicate.User

HeightGT applies the GT predicate on the "height" field.

func HeightGTE

func HeightGTE(v uint) predicate.User

HeightGTE applies the GTE predicate on the "height" field.

func HeightIn

func HeightIn(vs ...uint) predicate.User

HeightIn applies the In predicate on the "height" field.

func HeightIsNil

func HeightIsNil() predicate.User

HeightIsNil applies the IsNil predicate on the "height" field.

func HeightLT

func HeightLT(v uint) predicate.User

HeightLT applies the LT predicate on the "height" field.

func HeightLTE

func HeightLTE(v uint) predicate.User

HeightLTE applies the LTE predicate on the "height" field.

func HeightNEQ

func HeightNEQ(v uint) predicate.User

HeightNEQ applies the NEQ predicate on the "height" field.

func HeightNotIn

func HeightNotIn(vs ...uint) predicate.User

HeightNotIn applies the NotIn predicate on the "height" field.

func HeightNotNil

func HeightNotNil() predicate.User

HeightNotNil applies the NotNil predicate on the "height" field.

func ID

func ID(id int) predicate.User

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.User

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.User

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.User

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.User

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.User

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.User

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.User

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.User

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.User

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.User

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.User

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.User

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.User

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.User

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.User

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.User

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.User

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.User

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.User

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.User

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.User

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.User

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.User) predicate.User

Or groups predicates with the OR operator between them.

func ValidColumn

func ValidColumn(column string) bool

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL