pet

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the pet type in the database.
	Label = "pet"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldHeight holds the string denoting the height field in the database.
	FieldHeight = "height"
	// FieldWeight holds the string denoting the weight field in the database.
	FieldWeight = "weight"
	// FieldCastrated holds the string denoting the castrated field in the database.
	FieldCastrated = "castrated"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldBirthday holds the string denoting the birthday field in the database.
	FieldBirthday = "birthday"
	// FieldNicknames holds the string denoting the nicknames field in the database.
	FieldNicknames = "nicknames"
	// FieldSex holds the string denoting the sex field in the database.
	FieldSex = "sex"
	// FieldChip holds the string denoting the chip field in the database.
	FieldChip = "chip"
	// EdgeBadge holds the string denoting the badge edge name in mutations.
	EdgeBadge = "badge"
	// EdgeProtege holds the string denoting the protege edge name in mutations.
	EdgeProtege = "protege"
	// EdgeMentor holds the string denoting the mentor edge name in mutations.
	EdgeMentor = "mentor"
	// EdgeSpouse holds the string denoting the spouse edge name in mutations.
	EdgeSpouse = "spouse"
	// EdgeToys holds the string denoting the toys edge name in mutations.
	EdgeToys = "toys"
	// EdgeParent holds the string denoting the parent edge name in mutations.
	EdgeParent = "parent"
	// EdgeChildren holds the string denoting the children edge name in mutations.
	EdgeChildren = "children"
	// EdgePlayGroups holds the string denoting the play_groups edge name in mutations.
	EdgePlayGroups = "play_groups"
	// EdgeFriends holds the string denoting the friends edge name in mutations.
	EdgeFriends = "friends"
	// Table holds the table name of the pet in the database.
	Table = "pets"
	// BadgeTable is the table that holds the badge relation/edge.
	BadgeTable = "badges"
	// BadgeInverseTable is the table name for the Badge entity.
	// It exists in this package in order to avoid circular dependency with the "badge" package.
	BadgeInverseTable = "badges"
	// BadgeColumn is the table column denoting the badge relation/edge.
	BadgeColumn = "pet_badge"
	// ProtegeTable is the table that holds the protege relation/edge.
	ProtegeTable = "pets"
	// ProtegeColumn is the table column denoting the protege relation/edge.
	ProtegeColumn = "pet_mentor"
	// MentorTable is the table that holds the mentor relation/edge.
	MentorTable = "pets"
	// MentorColumn is the table column denoting the mentor relation/edge.
	MentorColumn = "pet_mentor"
	// SpouseTable is the table that holds the spouse relation/edge.
	SpouseTable = "pets"
	// SpouseColumn is the table column denoting the spouse relation/edge.
	SpouseColumn = "pet_spouse"
	// ToysTable is the table that holds the toys relation/edge.
	ToysTable = "toys"
	// ToysInverseTable is the table name for the Toy entity.
	// It exists in this package in order to avoid circular dependency with the "toy" package.
	ToysInverseTable = "toys"
	// ToysColumn is the table column denoting the toys relation/edge.
	ToysColumn = "pet_toys"
	// ParentTable is the table that holds the parent relation/edge.
	ParentTable = "pets"
	// ParentColumn is the table column denoting the parent relation/edge.
	ParentColumn = "pet_children"
	// ChildrenTable is the table that holds the children relation/edge.
	ChildrenTable = "pets"
	// ChildrenColumn is the table column denoting the children relation/edge.
	ChildrenColumn = "pet_children"
	// PlayGroupsTable is the table that holds the play_groups relation/edge. The primary key declared below.
	PlayGroupsTable = "pet_play_groups"
	// PlayGroupsInverseTable is the table name for the PlayGroup entity.
	// It exists in this package in order to avoid circular dependency with the "playgroup" package.
	PlayGroupsInverseTable = "play_groups"
	// FriendsTable is the table that holds the friends relation/edge. The primary key declared below.
	FriendsTable = "pet_friends"
)

Variables

View Source
var (
	// PlayGroupsPrimaryKey and PlayGroupsColumn2 are the table columns denoting the
	// primary key for the play_groups relation (M2M).
	PlayGroupsPrimaryKey = []string{"pet_id", "play_group_id"}
	// FriendsPrimaryKey and FriendsColumn2 are the table columns denoting the
	// primary key for the friends relation (M2M).
	FriendsPrimaryKey = []string{"pet_id", "friend_id"}
)
View Source
var (
	// HeightValidator is a validator for the "height" field. It is called by the builders before save.
	HeightValidator func(int) error
	// WeightValidator is a validator for the "weight" field. It is called by the builders before save.
	WeightValidator func(float64) error
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// DefaultChip holds the default value on creation for the "chip" field.
	DefaultChip func() uuid.UUID
)

Columns holds all SQL columns for pet fields.

View Source
var ForeignKeys = []string{
	"pet_mentor",
	"pet_spouse",
	"pet_children",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "pets" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.Pet) predicate.Pet

And groups predicates with the AND operator between them.

func Birthday

func Birthday(v time.Time) predicate.Pet

Birthday applies equality check predicate on the "birthday" field. It's identical to BirthdayEQ.

func BirthdayEQ

func BirthdayEQ(v time.Time) predicate.Pet

BirthdayEQ applies the EQ predicate on the "birthday" field.

func BirthdayGT

func BirthdayGT(v time.Time) predicate.Pet

BirthdayGT applies the GT predicate on the "birthday" field.

func BirthdayGTE

func BirthdayGTE(v time.Time) predicate.Pet

BirthdayGTE applies the GTE predicate on the "birthday" field.

func BirthdayIn

func BirthdayIn(vs ...time.Time) predicate.Pet

BirthdayIn applies the In predicate on the "birthday" field.

func BirthdayIsNil

func BirthdayIsNil() predicate.Pet

BirthdayIsNil applies the IsNil predicate on the "birthday" field.

func BirthdayLT

func BirthdayLT(v time.Time) predicate.Pet

BirthdayLT applies the LT predicate on the "birthday" field.

func BirthdayLTE

func BirthdayLTE(v time.Time) predicate.Pet

BirthdayLTE applies the LTE predicate on the "birthday" field.

func BirthdayNEQ

func BirthdayNEQ(v time.Time) predicate.Pet

BirthdayNEQ applies the NEQ predicate on the "birthday" field.

func BirthdayNotIn

func BirthdayNotIn(vs ...time.Time) predicate.Pet

BirthdayNotIn applies the NotIn predicate on the "birthday" field.

func BirthdayNotNil

func BirthdayNotNil() predicate.Pet

BirthdayNotNil applies the NotNil predicate on the "birthday" field.

func Castrated

func Castrated(v bool) predicate.Pet

Castrated applies equality check predicate on the "castrated" field. It's identical to CastratedEQ.

func CastratedEQ

func CastratedEQ(v bool) predicate.Pet

CastratedEQ applies the EQ predicate on the "castrated" field.

func CastratedNEQ

func CastratedNEQ(v bool) predicate.Pet

CastratedNEQ applies the NEQ predicate on the "castrated" field.

func Chip

func Chip(v uuid.UUID) predicate.Pet

Chip applies equality check predicate on the "chip" field. It's identical to ChipEQ.

func ChipEQ

func ChipEQ(v uuid.UUID) predicate.Pet

ChipEQ applies the EQ predicate on the "chip" field.

func ChipGT

func ChipGT(v uuid.UUID) predicate.Pet

ChipGT applies the GT predicate on the "chip" field.

func ChipGTE

func ChipGTE(v uuid.UUID) predicate.Pet

ChipGTE applies the GTE predicate on the "chip" field.

func ChipIn

func ChipIn(vs ...uuid.UUID) predicate.Pet

ChipIn applies the In predicate on the "chip" field.

func ChipLT

func ChipLT(v uuid.UUID) predicate.Pet

ChipLT applies the LT predicate on the "chip" field.

func ChipLTE

func ChipLTE(v uuid.UUID) predicate.Pet

ChipLTE applies the LTE predicate on the "chip" field.

func ChipNEQ

func ChipNEQ(v uuid.UUID) predicate.Pet

ChipNEQ applies the NEQ predicate on the "chip" field.

func ChipNotIn

func ChipNotIn(vs ...uuid.UUID) predicate.Pet

ChipNotIn applies the NotIn predicate on the "chip" field.

func HasBadge

func HasBadge() predicate.Pet

HasBadge applies the HasEdge predicate on the "badge" edge.

func HasBadgeWith

func HasBadgeWith(preds ...predicate.Badge) predicate.Pet

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

func HasChildren

func HasChildren() predicate.Pet

HasChildren applies the HasEdge predicate on the "children" edge.

func HasChildrenWith

func HasChildrenWith(preds ...predicate.Pet) predicate.Pet

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

func HasFriends

func HasFriends() predicate.Pet

HasFriends applies the HasEdge predicate on the "friends" edge.

func HasFriendsWith

func HasFriendsWith(preds ...predicate.Pet) predicate.Pet

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

func HasMentor

func HasMentor() predicate.Pet

HasMentor applies the HasEdge predicate on the "mentor" edge.

func HasMentorWith

func HasMentorWith(preds ...predicate.Pet) predicate.Pet

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

func HasParent

func HasParent() predicate.Pet

HasParent applies the HasEdge predicate on the "parent" edge.

func HasParentWith

func HasParentWith(preds ...predicate.Pet) predicate.Pet

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

func HasPlayGroups

func HasPlayGroups() predicate.Pet

HasPlayGroups applies the HasEdge predicate on the "play_groups" edge.

func HasPlayGroupsWith

func HasPlayGroupsWith(preds ...predicate.PlayGroup) predicate.Pet

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

func HasProtege

func HasProtege() predicate.Pet

HasProtege applies the HasEdge predicate on the "protege" edge.

func HasProtegeWith

func HasProtegeWith(preds ...predicate.Pet) predicate.Pet

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

func HasSpouse

func HasSpouse() predicate.Pet

HasSpouse applies the HasEdge predicate on the "spouse" edge.

func HasSpouseWith

func HasSpouseWith(preds ...predicate.Pet) predicate.Pet

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

func HasToys

func HasToys() predicate.Pet

HasToys applies the HasEdge predicate on the "toys" edge.

func HasToysWith

func HasToysWith(preds ...predicate.Toy) predicate.Pet

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

func Height

func Height(v int) predicate.Pet

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

func HeightEQ

func HeightEQ(v int) predicate.Pet

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

func HeightGT

func HeightGT(v int) predicate.Pet

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

func HeightGTE

func HeightGTE(v int) predicate.Pet

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

func HeightIn

func HeightIn(vs ...int) predicate.Pet

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

func HeightLT

func HeightLT(v int) predicate.Pet

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

func HeightLTE

func HeightLTE(v int) predicate.Pet

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

func HeightNEQ

func HeightNEQ(v int) predicate.Pet

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

func HeightNotIn

func HeightNotIn(vs ...int) predicate.Pet

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

func ID

func ID(id int) predicate.Pet

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Pet

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Pet

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Pet

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Pet

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Pet

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Pet

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Pet

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

func NameContains

func NameContains(v string) predicate.Pet

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

func NameContainsFold

func NameContainsFold(v string) predicate.Pet

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

func NameEQ

func NameEQ(v string) predicate.Pet

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

func NameEqualFold

func NameEqualFold(v string) predicate.Pet

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

func NameGT

func NameGT(v string) predicate.Pet

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

func NameGTE

func NameGTE(v string) predicate.Pet

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Pet

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Pet

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Pet

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

func NameLTE

func NameLTE(v string) predicate.Pet

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

func NameNEQ

func NameNEQ(v string) predicate.Pet

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

func NameNotIn

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

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

func NicknamesIsNil

func NicknamesIsNil() predicate.Pet

NicknamesIsNil applies the IsNil predicate on the "nicknames" field.

func NicknamesNotNil

func NicknamesNotNil() predicate.Pet

NicknamesNotNil applies the NotNil predicate on the "nicknames" field.

func Not

func Not(p predicate.Pet) predicate.Pet

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Pet) predicate.Pet

Or groups predicates with the OR operator between them.

func SexEQ

func SexEQ(v Sex) predicate.Pet

SexEQ applies the EQ predicate on the "sex" field.

func SexIn

func SexIn(vs ...Sex) predicate.Pet

SexIn applies the In predicate on the "sex" field.

func SexNEQ

func SexNEQ(v Sex) predicate.Pet

SexNEQ applies the NEQ predicate on the "sex" field.

func SexNotIn

func SexNotIn(vs ...Sex) predicate.Pet

SexNotIn applies the NotIn predicate on the "sex" field.

func SexValidator

func SexValidator(s Sex) error

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

func ValidColumn

func ValidColumn(column string) bool

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

func Weight

func Weight(v float64) predicate.Pet

Weight applies equality check predicate on the "weight" field. It's identical to WeightEQ.

func WeightEQ

func WeightEQ(v float64) predicate.Pet

WeightEQ applies the EQ predicate on the "weight" field.

func WeightGT

func WeightGT(v float64) predicate.Pet

WeightGT applies the GT predicate on the "weight" field.

func WeightGTE

func WeightGTE(v float64) predicate.Pet

WeightGTE applies the GTE predicate on the "weight" field.

func WeightIn

func WeightIn(vs ...float64) predicate.Pet

WeightIn applies the In predicate on the "weight" field.

func WeightIsNil

func WeightIsNil() predicate.Pet

WeightIsNil applies the IsNil predicate on the "weight" field.

func WeightLT

func WeightLT(v float64) predicate.Pet

WeightLT applies the LT predicate on the "weight" field.

func WeightLTE

func WeightLTE(v float64) predicate.Pet

WeightLTE applies the LTE predicate on the "weight" field.

func WeightNEQ

func WeightNEQ(v float64) predicate.Pet

WeightNEQ applies the NEQ predicate on the "weight" field.

func WeightNotIn

func WeightNotIn(vs ...float64) predicate.Pet

WeightNotIn applies the NotIn predicate on the "weight" field.

func WeightNotNil

func WeightNotNil() predicate.Pet

WeightNotNil applies the NotNil predicate on the "weight" field.

Types

type Sex

type Sex string

Sex defines the type for the "sex" enum field.

const (
	SexMale   Sex = "male"
	SexFemale Sex = "female"
)

Sex values.

func (Sex) String

func (s Sex) String() string

Jump to

Keyboard shortcuts

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