Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Hat) predicate.Hat
- func HasWearer() predicate.Hat
- func HasWearerWith(preds ...predicate.User) predicate.Hat
- func ID(id int) predicate.Hat
- func IDEQ(id int) predicate.Hat
- func IDGT(id int) predicate.Hat
- func IDGTE(id int) predicate.Hat
- func IDIn(ids ...int) predicate.Hat
- func IDLT(id int) predicate.Hat
- func IDLTE(id int) predicate.Hat
- func IDNEQ(id int) predicate.Hat
- func IDNotIn(ids ...int) predicate.Hat
- func Name(v string) predicate.Hat
- func NameContains(v string) predicate.Hat
- func NameContainsFold(v string) predicate.Hat
- func NameEQ(v string) predicate.Hat
- func NameEqualFold(v string) predicate.Hat
- func NameGT(v string) predicate.Hat
- func NameGTE(v string) predicate.Hat
- func NameHasPrefix(v string) predicate.Hat
- func NameHasSuffix(v string) predicate.Hat
- func NameIn(vs ...string) predicate.Hat
- func NameLT(v string) predicate.Hat
- func NameLTE(v string) predicate.Hat
- func NameNEQ(v string) predicate.Hat
- func NameNotIn(vs ...string) predicate.Hat
- func Not(p predicate.Hat) predicate.Hat
- func Or(predicates ...predicate.Hat) predicate.Hat
- func TypeEQ(v Type) predicate.Hat
- func TypeIn(vs ...Type) predicate.Hat
- func TypeNEQ(v Type) predicate.Hat
- func TypeNotIn(vs ...Type) predicate.Hat
- func TypeValidator(_type Type) error
- func ValidColumn(column string) bool
- type Type
Constants ¶
const ( // Label holds the string label denoting the hat type in the database. Label = "hat" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldType holds the string denoting the type field in the database. FieldType = "type" // EdgeWearer holds the string denoting the wearer edge name in mutations. EdgeWearer = "wearer" // Table holds the table name of the hat in the database. Table = "hats" // WearerTable is the table that holds the wearer relation/edge. WearerTable = "hats" // WearerInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. WearerInverseTable = "users" // WearerColumn is the table column denoting the wearer relation/edge. WearerColumn = "user_favorite_hat" )
Variables ¶
var Columns = []string{ FieldID, FieldName, FieldType, }
Columns holds all SQL columns for hat fields.
var ForeignKeys = []string{
"user_favorite_hat",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "hats" table and are not defined as standalone fields in the schema.
Functions ¶
func HasWearerWith ¶
HasWearerWith applies the HasEdge predicate on the "wearer" edge with a given conditions (other predicates).
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
func TypeValidator ¶
TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).