toy

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: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the toy type in the database.
	Label = "toy"
	// 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"
	// FieldMaterial holds the string denoting the material field in the database.
	FieldMaterial = "material"
	// FieldTitle holds the string denoting the title field in the database.
	FieldTitle = "title"
	// EdgeOwner holds the string denoting the owner edge name in mutations.
	EdgeOwner = "owner"
	// Table holds the table name of the toy in the database.
	Table = "toys"
	// OwnerTable is the table that holds the owner relation/edge.
	OwnerTable = "toys"
	// OwnerInverseTable is the table name for the Pet entity.
	// It exists in this package in order to avoid circular dependency with the "pet" package.
	OwnerInverseTable = "pets"
	// OwnerColumn is the table column denoting the owner relation/edge.
	OwnerColumn = "pet_toys"
)

Variables

Columns holds all SQL columns for toy fields.

View Source
var (
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)
View Source
var ForeignKeys = []string{
	"pet_toys",
}

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

Functions

func And

func And(predicates ...predicate.Toy) predicate.Toy

And groups predicates with the AND operator between them.

func ColorEQ

func ColorEQ(v Color) predicate.Toy

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

func ColorIn

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

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

func ColorNEQ

func ColorNEQ(v Color) predicate.Toy

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

func ColorNotIn

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

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 HasOwner

func HasOwner() predicate.Toy

HasOwner applies the HasEdge predicate on the "owner" edge.

func HasOwnerWith

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

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

func ID

func ID(id uuid.UUID) predicate.Toy

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Toy

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Toy

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Toy

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Toy

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Toy

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Toy

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Toy

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Toy

IDNotIn applies the NotIn predicate on the ID field.

func MaterialEQ

func MaterialEQ(v Material) predicate.Toy

MaterialEQ applies the EQ predicate on the "material" field.

func MaterialIn

func MaterialIn(vs ...Material) predicate.Toy

MaterialIn applies the In predicate on the "material" field.

func MaterialNEQ

func MaterialNEQ(v Material) predicate.Toy

MaterialNEQ applies the NEQ predicate on the "material" field.

func MaterialNotIn

func MaterialNotIn(vs ...Material) predicate.Toy

MaterialNotIn applies the NotIn predicate on the "material" field.

func MaterialValidator

func MaterialValidator(m Material) error

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

func Not

func Not(p predicate.Toy) predicate.Toy

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Toy) predicate.Toy

Or groups predicates with the OR operator between them.

func Title

func Title(v string) predicate.Toy

Title applies equality check predicate on the "title" field. It's identical to TitleEQ.

func TitleContains

func TitleContains(v string) predicate.Toy

TitleContains applies the Contains predicate on the "title" field.

func TitleContainsFold

func TitleContainsFold(v string) predicate.Toy

TitleContainsFold applies the ContainsFold predicate on the "title" field.

func TitleEQ

func TitleEQ(v string) predicate.Toy

TitleEQ applies the EQ predicate on the "title" field.

func TitleEqualFold

func TitleEqualFold(v string) predicate.Toy

TitleEqualFold applies the EqualFold predicate on the "title" field.

func TitleGT

func TitleGT(v string) predicate.Toy

TitleGT applies the GT predicate on the "title" field.

func TitleGTE

func TitleGTE(v string) predicate.Toy

TitleGTE applies the GTE predicate on the "title" field.

func TitleHasPrefix

func TitleHasPrefix(v string) predicate.Toy

TitleHasPrefix applies the HasPrefix predicate on the "title" field.

func TitleHasSuffix

func TitleHasSuffix(v string) predicate.Toy

TitleHasSuffix applies the HasSuffix predicate on the "title" field.

func TitleIn

func TitleIn(vs ...string) predicate.Toy

TitleIn applies the In predicate on the "title" field.

func TitleLT

func TitleLT(v string) predicate.Toy

TitleLT applies the LT predicate on the "title" field.

func TitleLTE

func TitleLTE(v string) predicate.Toy

TitleLTE applies the LTE predicate on the "title" field.

func TitleNEQ

func TitleNEQ(v string) predicate.Toy

TitleNEQ applies the NEQ predicate on the "title" field.

func TitleNotIn

func TitleNotIn(vs ...string) predicate.Toy

TitleNotIn applies the NotIn predicate on the "title" field.

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 (
	ColorRed    Color = "red"
	ColorOrange Color = "orange"
	ColorYellow Color = "yellow"
	ColorGreen  Color = "green"
	ColorBlue   Color = "blue"
	ColorIndigo Color = "indigo"
	ColorViolet Color = "violet"
	ColorPurple Color = "purple"
	ColorPink   Color = "pink"
	ColorSilver Color = "silver"
	ColorGold   Color = "gold"
	ColorBeige  Color = "beige"
	ColorBrown  Color = "brown"
	ColorGrey   Color = "grey"
	ColorBlack  Color = "black"
	ColorWhite  Color = "white"
)

Color values.

func (Color) String

func (c Color) String() string

type Material

type Material string

Material defines the type for the "material" enum field.

const (
	MaterialLeather Material = "leather"
	MaterialPlastic Material = "plastic"
	MaterialFabric  Material = "fabric"
)

Material values.

func (Material) String

func (m Material) String() string

Jump to

Keyboard shortcuts

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