Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Toy) predicate.Toy
- func ColorEQ(v Color) predicate.Toy
- func ColorIn(vs ...Color) predicate.Toy
- func ColorNEQ(v Color) predicate.Toy
- func ColorNotIn(vs ...Color) predicate.Toy
- func ColorValidator(c Color) error
- func HasOwner() predicate.Toy
- func HasOwnerWith(preds ...predicate.Pet) predicate.Toy
- func ID(id uuid.UUID) predicate.Toy
- func IDEQ(id uuid.UUID) predicate.Toy
- func IDGT(id uuid.UUID) predicate.Toy
- func IDGTE(id uuid.UUID) predicate.Toy
- func IDIn(ids ...uuid.UUID) predicate.Toy
- func IDLT(id uuid.UUID) predicate.Toy
- func IDLTE(id uuid.UUID) predicate.Toy
- func IDNEQ(id uuid.UUID) predicate.Toy
- func IDNotIn(ids ...uuid.UUID) predicate.Toy
- func MaterialEQ(v Material) predicate.Toy
- func MaterialIn(vs ...Material) predicate.Toy
- func MaterialNEQ(v Material) predicate.Toy
- func MaterialNotIn(vs ...Material) predicate.Toy
- func MaterialValidator(m Material) error
- func Not(p predicate.Toy) predicate.Toy
- func Or(predicates ...predicate.Toy) predicate.Toy
- func Title(v string) predicate.Toy
- func TitleContains(v string) predicate.Toy
- func TitleContainsFold(v string) predicate.Toy
- func TitleEQ(v string) predicate.Toy
- func TitleEqualFold(v string) predicate.Toy
- func TitleGT(v string) predicate.Toy
- func TitleGTE(v string) predicate.Toy
- func TitleHasPrefix(v string) predicate.Toy
- func TitleHasSuffix(v string) predicate.Toy
- func TitleIn(vs ...string) predicate.Toy
- func TitleLT(v string) predicate.Toy
- func TitleLTE(v string) predicate.Toy
- func TitleNEQ(v string) predicate.Toy
- func TitleNotIn(vs ...string) predicate.Toy
- func ValidColumn(column string) bool
- type Color
- type Material
Constants ¶
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 ¶
var Columns = []string{ FieldID, FieldColor, FieldMaterial, FieldTitle, }
Columns holds all SQL columns for toy fields.
var ( // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
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 ColorNotIn ¶
ColorNotIn applies the NotIn predicate on the "color" field.
func ColorValidator ¶
ColorValidator is a validator for the "color" field enum values. It is called by the builders before save.
func HasOwnerWith ¶
HasOwnerWith applies the HasEdge predicate on the "owner" edge with a given conditions (other predicates).
func MaterialEQ ¶
MaterialEQ applies the EQ predicate on the "material" field.
func MaterialIn ¶
MaterialIn applies the In predicate on the "material" field.
func MaterialNEQ ¶
MaterialNEQ applies the NEQ predicate on the "material" field.
func MaterialNotIn ¶
MaterialNotIn applies the NotIn predicate on the "material" field.
func MaterialValidator ¶
MaterialValidator is a validator for the "material" field enum values. It is called by the builders before save.
func Title ¶
Title applies equality check predicate on the "title" field. It's identical to TitleEQ.
func TitleContains ¶
TitleContains applies the Contains predicate on the "title" field.
func TitleContainsFold ¶
TitleContainsFold applies the ContainsFold predicate on the "title" field.
func TitleEqualFold ¶
TitleEqualFold applies the EqualFold predicate on the "title" field.
func TitleHasPrefix ¶
TitleHasPrefix applies the HasPrefix predicate on the "title" field.
func TitleHasSuffix ¶
TitleHasSuffix applies the HasSuffix predicate on the "title" field.
func TitleNotIn ¶
TitleNotIn applies the NotIn predicate on the "title" field.
func ValidColumn ¶
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.