collar

package
v0.0.0-...-2e07358 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the collar type in the database.
	Label = "collar"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldColor holds the string denoting the color field in the database.
	FieldColor = "color"
	// EdgePet holds the string denoting the pet edge name in mutations.
	EdgePet = "pet"
	// Table holds the table name of the collar in the database.
	Table = "collars"
	// PetTable is the table that holds the pet relation/edge.
	PetTable = "collars"
	// 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_collar"
)

Variables

View Source
var Columns = []string{
	FieldID,
	FieldColor,
}

Columns holds all SQL columns for collar fields.

View Source
var ForeignKeys = []string{
	"pet_collar",
}

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

Functions

func And

func And(predicates ...predicate.Collar) predicate.Collar

And groups predicates with the AND operator between them.

func ColorEQ

func ColorEQ(v Color) predicate.Collar

ColorEQ applies the EQ predicate on the "color" field.

func ColorIn

func ColorIn(vs ...Color) predicate.Collar

ColorIn applies the In predicate on the "color" field.

func ColorNEQ

func ColorNEQ(v Color) predicate.Collar

ColorNEQ applies the NEQ predicate on the "color" field.

func ColorNotIn

func ColorNotIn(vs ...Color) predicate.Collar

ColorNotIn applies the NotIn predicate on the "color" field.

func ColorValidator

func ColorValidator(c Color) error

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

func HasPet

func HasPet() predicate.Collar

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

func HasPetWith

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

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

func ID

func ID(id int) predicate.Collar

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Collar

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Collar

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Collar

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Collar

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Collar

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Collar

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Collar) predicate.Collar

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 Color

type Color string

Color defines the type for the "color" enum field.

const (
	ColorGreen Color = "green"
	ColorRed   Color = "red"
	ColorBlue  Color = "blue"
)

Color values.

func (Color) String

func (c Color) String() string

Jump to

Keyboard shortcuts

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