keyboard

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the keyboard type in the database.
	Label = "keyboard"
	// 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"
	// FieldPrice holds the string denoting the price field in the database.
	FieldPrice = "price"
	// FieldDiscount holds the string denoting the discount field in the database.
	FieldDiscount = "discount"
	// EdgeSwitches holds the string denoting the switches edge name in mutations.
	EdgeSwitches = "switches"
	// EdgeKeycaps holds the string denoting the keycaps edge name in mutations.
	EdgeKeycaps = "keycaps"
	// Table holds the table name of the keyboard in the database.
	Table = "keyboards"
	// SwitchesTable is the table that holds the switches relation/edge.
	SwitchesTable = "keyboards"
	// SwitchesInverseTable is the table name for the SwitchModel entity.
	// It exists in this package in order to avoid circular dependency with the "switchmodel" package.
	SwitchesInverseTable = "switch_models"
	// SwitchesColumn is the table column denoting the switches relation/edge.
	SwitchesColumn = "keyboard_switches"
	// KeycapsTable is the table that holds the keycaps relation/edge.
	KeycapsTable = "keyboards"
	// KeycapsInverseTable is the table name for the KeycapModel entity.
	// It exists in this package in order to avoid circular dependency with the "keycapmodel" package.
	KeycapsInverseTable = "keycap_models"
	// KeycapsColumn is the table column denoting the keycaps relation/edge.
	KeycapsColumn = "keyboard_keycaps"
)

Variables

Columns holds all SQL columns for keyboard fields.

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

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

View Source
var (
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
)

Functions

func And

func And(predicates ...predicate.Keyboard) predicate.Keyboard

And groups predicates with the AND operator between them.

func Discount

func Discount(v int64) predicate.Keyboard

Discount applies equality check predicate on the "discount" field. It's identical to DiscountEQ.

func DiscountEQ

func DiscountEQ(v int64) predicate.Keyboard

DiscountEQ applies the EQ predicate on the "discount" field.

func DiscountGT

func DiscountGT(v int64) predicate.Keyboard

DiscountGT applies the GT predicate on the "discount" field.

func DiscountGTE

func DiscountGTE(v int64) predicate.Keyboard

DiscountGTE applies the GTE predicate on the "discount" field.

func DiscountIn

func DiscountIn(vs ...int64) predicate.Keyboard

DiscountIn applies the In predicate on the "discount" field.

func DiscountIsNil

func DiscountIsNil() predicate.Keyboard

DiscountIsNil applies the IsNil predicate on the "discount" field.

func DiscountLT

func DiscountLT(v int64) predicate.Keyboard

DiscountLT applies the LT predicate on the "discount" field.

func DiscountLTE

func DiscountLTE(v int64) predicate.Keyboard

DiscountLTE applies the LTE predicate on the "discount" field.

func DiscountNEQ

func DiscountNEQ(v int64) predicate.Keyboard

DiscountNEQ applies the NEQ predicate on the "discount" field.

func DiscountNotIn

func DiscountNotIn(vs ...int64) predicate.Keyboard

DiscountNotIn applies the NotIn predicate on the "discount" field.

func DiscountNotNil

func DiscountNotNil() predicate.Keyboard

DiscountNotNil applies the NotNil predicate on the "discount" field.

func HasKeycaps

func HasKeycaps() predicate.Keyboard

HasKeycaps applies the HasEdge predicate on the "keycaps" edge.

func HasKeycapsWith

func HasKeycapsWith(preds ...predicate.KeycapModel) predicate.Keyboard

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

func HasSwitches

func HasSwitches() predicate.Keyboard

HasSwitches applies the HasEdge predicate on the "switches" edge.

func HasSwitchesWith

func HasSwitchesWith(preds ...predicate.SwitchModel) predicate.Keyboard

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

func ID

func ID(id int64) predicate.Keyboard

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int64) predicate.Keyboard

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int64) predicate.Keyboard

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int64) predicate.Keyboard

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int64) predicate.Keyboard

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int64) predicate.Keyboard

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int64) predicate.Keyboard

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int64) predicate.Keyboard

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int64) predicate.Keyboard

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Keyboard

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

func NameContains

func NameContains(v string) predicate.Keyboard

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

func NameContainsFold

func NameContainsFold(v string) predicate.Keyboard

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

func NameEQ

func NameEQ(v string) predicate.Keyboard

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

func NameEqualFold

func NameEqualFold(v string) predicate.Keyboard

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

func NameGT

func NameGT(v string) predicate.Keyboard

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

func NameGTE

func NameGTE(v string) predicate.Keyboard

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Keyboard

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Keyboard

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Keyboard

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

func NameLTE

func NameLTE(v string) predicate.Keyboard

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

func NameNEQ

func NameNEQ(v string) predicate.Keyboard

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

func NameNotIn

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

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

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Keyboard) predicate.Keyboard

Or groups predicates with the OR operator between them.

func Price

func Price(v int64) predicate.Keyboard

Price applies equality check predicate on the "price" field. It's identical to PriceEQ.

func PriceEQ

func PriceEQ(v int64) predicate.Keyboard

PriceEQ applies the EQ predicate on the "price" field.

func PriceGT

func PriceGT(v int64) predicate.Keyboard

PriceGT applies the GT predicate on the "price" field.

func PriceGTE

func PriceGTE(v int64) predicate.Keyboard

PriceGTE applies the GTE predicate on the "price" field.

func PriceIn

func PriceIn(vs ...int64) predicate.Keyboard

PriceIn applies the In predicate on the "price" field.

func PriceLT

func PriceLT(v int64) predicate.Keyboard

PriceLT applies the LT predicate on the "price" field.

func PriceLTE

func PriceLTE(v int64) predicate.Keyboard

PriceLTE applies the LTE predicate on the "price" field.

func PriceNEQ

func PriceNEQ(v int64) predicate.Keyboard

PriceNEQ applies the NEQ predicate on the "price" field.

func PriceNotIn

func PriceNotIn(vs ...int64) predicate.Keyboard

PriceNotIn applies the NotIn predicate on the "price" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Keyboard queries.

func ByDiscount

func ByDiscount(opts ...sql.OrderTermOption) OrderOption

ByDiscount orders the results by the discount field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByKeycapsField

func ByKeycapsField(field string, opts ...sql.OrderTermOption) OrderOption

ByKeycapsField orders the results by keycaps field.

func ByName

func ByName(opts ...sql.OrderTermOption) OrderOption

ByName orders the results by the name field.

func ByPrice

func ByPrice(opts ...sql.OrderTermOption) OrderOption

ByPrice orders the results by the price field.

func BySwitchesField

func BySwitchesField(field string, opts ...sql.OrderTermOption) OrderOption

BySwitchesField orders the results by switches field.

Jump to

Keyboard shortcuts

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