userpet

package
v0.0.0-...-20f649f Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the userpet type in the database.
	Label = "user_pet"
	// FieldHungerPercentage holds the string denoting the hunger_percentage field in the database.
	FieldHungerPercentage = "hunger_percentage"
	// FieldEnabledSvgGroupElementIds holds the string denoting the enabled_svg_group_element_ids field in the database.
	FieldEnabledSvgGroupElementIds = "enabled_svg_group_element_ids"
	// FieldPetID holds the string denoting the pet_id field in the database.
	FieldPetID = "pet_id"
	// FieldUserID holds the string denoting the user_id field in the database.
	FieldUserID = "user_id"
	// EdgePet holds the string denoting the pet edge name in mutations.
	EdgePet = "pet"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// PetFieldID holds the string denoting the ID field of the Pet.
	PetFieldID = "id"
	// UserFieldID holds the string denoting the ID field of the User.
	UserFieldID = "id"
	// Table holds the table name of the userpet in the database.
	Table = "user_pets"
	// PetTable is the table that holds the pet relation/edge.
	PetTable = "user_pets"
	// PetInverseTable is the table name for the Pet entity.
	// It exists in this package in order to avoid circular dependency with the "pet" package.
	PetInverseTable = "pets"
	// PetColumn is the table column denoting the pet relation/edge.
	PetColumn = "pet_id"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "user_pets"
	// 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_id"
)

Variables

View Source
var (
	// HungerPercentageValidator is a validator for the "hunger_percentage" field. It is called by the builders before save.
	HungerPercentageValidator func(float64) error
	// DefaultEnabledSvgGroupElementIds holds the default value on creation for the "enabled_svg_group_element_ids" field.
	DefaultEnabledSvgGroupElementIds map[string]bool
)

Columns holds all SQL columns for userpet fields.

Functions

func And

func And(predicates ...predicate.UserPet) predicate.UserPet

And groups predicates with the AND operator between them.

func HasPet

func HasPet() predicate.UserPet

HasPet applies the HasEdge predicate on the "pet" edge.

func HasPetWith

func HasPetWith(preds ...predicate.Pet) predicate.UserPet

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

func HasUser

func HasUser() predicate.UserPet

HasUser applies the HasEdge predicate on the "user" edge.

func HasUserWith

func HasUserWith(preds ...predicate.User) predicate.UserPet

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

func HungerPercentage

func HungerPercentage(v float64) predicate.UserPet

HungerPercentage applies equality check predicate on the "hunger_percentage" field. It's identical to HungerPercentageEQ.

func HungerPercentageEQ

func HungerPercentageEQ(v float64) predicate.UserPet

HungerPercentageEQ applies the EQ predicate on the "hunger_percentage" field.

func HungerPercentageGT

func HungerPercentageGT(v float64) predicate.UserPet

HungerPercentageGT applies the GT predicate on the "hunger_percentage" field.

func HungerPercentageGTE

func HungerPercentageGTE(v float64) predicate.UserPet

HungerPercentageGTE applies the GTE predicate on the "hunger_percentage" field.

func HungerPercentageIn

func HungerPercentageIn(vs ...float64) predicate.UserPet

HungerPercentageIn applies the In predicate on the "hunger_percentage" field.

func HungerPercentageLT

func HungerPercentageLT(v float64) predicate.UserPet

HungerPercentageLT applies the LT predicate on the "hunger_percentage" field.

func HungerPercentageLTE

func HungerPercentageLTE(v float64) predicate.UserPet

HungerPercentageLTE applies the LTE predicate on the "hunger_percentage" field.

func HungerPercentageNEQ

func HungerPercentageNEQ(v float64) predicate.UserPet

HungerPercentageNEQ applies the NEQ predicate on the "hunger_percentage" field.

func HungerPercentageNotIn

func HungerPercentageNotIn(vs ...float64) predicate.UserPet

HungerPercentageNotIn applies the NotIn predicate on the "hunger_percentage" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.UserPet) predicate.UserPet

Or groups predicates with the OR operator between them.

func PetID

func PetID(v int) predicate.UserPet

PetID applies equality check predicate on the "pet_id" field. It's identical to PetIDEQ.

func PetIDEQ

func PetIDEQ(v int) predicate.UserPet

PetIDEQ applies the EQ predicate on the "pet_id" field.

func PetIDIn

func PetIDIn(vs ...int) predicate.UserPet

PetIDIn applies the In predicate on the "pet_id" field.

func PetIDNEQ

func PetIDNEQ(v int) predicate.UserPet

PetIDNEQ applies the NEQ predicate on the "pet_id" field.

func PetIDNotIn

func PetIDNotIn(vs ...int) predicate.UserPet

PetIDNotIn applies the NotIn predicate on the "pet_id" field.

func UserID

func UserID(v int) predicate.UserPet

UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.

func UserIDEQ

func UserIDEQ(v int) predicate.UserPet

UserIDEQ applies the EQ predicate on the "user_id" field.

func UserIDIn

func UserIDIn(vs ...int) predicate.UserPet

UserIDIn applies the In predicate on the "user_id" field.

func UserIDNEQ

func UserIDNEQ(v int) predicate.UserPet

UserIDNEQ applies the NEQ predicate on the "user_id" field.

func UserIDNotIn

func UserIDNotIn(vs ...int) predicate.UserPet

UserIDNotIn applies the NotIn predicate on the "user_id" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the UserPet queries.

func ByHungerPercentage

func ByHungerPercentage(opts ...sql.OrderTermOption) OrderOption

ByHungerPercentage orders the results by the hunger_percentage field.

func ByPetField

func ByPetField(field string, opts ...sql.OrderTermOption) OrderOption

ByPetField orders the results by pet field.

func ByPetID

func ByPetID(opts ...sql.OrderTermOption) OrderOption

ByPetID orders the results by the pet_id field.

func ByUserField

func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption

ByUserField orders the results by user field.

func ByUserID

func ByUserID(opts ...sql.OrderTermOption) OrderOption

ByUserID orders the results by the user_id field.

Jump to

Keyboard shortcuts

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