hat

package
v0.0.0-...-ed3e5d4 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
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

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

Columns holds all SQL columns for hat fields.

View Source
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 And

func And(predicates ...predicate.Hat) predicate.Hat

And groups predicates with the AND operator between them.

func HasWearer

func HasWearer() predicate.Hat

HasWearer applies the HasEdge predicate on the "wearer" edge.

func HasWearerWith

func HasWearerWith(preds ...predicate.User) predicate.Hat

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

func ID

func ID(id int) predicate.Hat

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Hat

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Hat

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Hat

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Hat

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Hat

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Hat

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Hat

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

func NameContains

func NameContains(v string) predicate.Hat

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

func NameContainsFold

func NameContainsFold(v string) predicate.Hat

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

func NameEQ

func NameEQ(v string) predicate.Hat

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

func NameEqualFold

func NameEqualFold(v string) predicate.Hat

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

func NameGT

func NameGT(v string) predicate.Hat

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

func NameGTE

func NameGTE(v string) predicate.Hat

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Hat

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Hat

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Hat

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

func NameLTE

func NameLTE(v string) predicate.Hat

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

func NameNEQ

func NameNEQ(v string) predicate.Hat

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

func NameNotIn

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

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

func Not

func Not(p predicate.Hat) predicate.Hat

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Hat) predicate.Hat

Or groups predicates with the OR operator between them.

func TypeEQ

func TypeEQ(v Type) predicate.Hat

TypeEQ applies the EQ predicate on the "type" field.

func TypeIn

func TypeIn(vs ...Type) predicate.Hat

TypeIn applies the In predicate on the "type" field.

func TypeNEQ

func TypeNEQ(v Type) predicate.Hat

TypeNEQ applies the NEQ predicate on the "type" field.

func TypeNotIn

func TypeNotIn(vs ...Type) predicate.Hat

TypeNotIn applies the NotIn predicate on the "type" field.

func TypeValidator

func TypeValidator(_type Type) error

TypeValidator is a validator for the "type" 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).

Types

type Type

type Type string

Type defines the type for the "type" enum field.

const (
	TypeDad      Type = "dad"
	TypeTrucker  Type = "trucker"
	TypeSnapback Type = "snapback"
)

Type values.

func (Type) String

func (_type Type) String() string

Jump to

Keyboard shortcuts

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