Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Keyboard) predicate.Keyboard
- func Discount(v int64) predicate.Keyboard
- func DiscountEQ(v int64) predicate.Keyboard
- func DiscountGT(v int64) predicate.Keyboard
- func DiscountGTE(v int64) predicate.Keyboard
- func DiscountIn(vs ...int64) predicate.Keyboard
- func DiscountIsNil() predicate.Keyboard
- func DiscountLT(v int64) predicate.Keyboard
- func DiscountLTE(v int64) predicate.Keyboard
- func DiscountNEQ(v int64) predicate.Keyboard
- func DiscountNotIn(vs ...int64) predicate.Keyboard
- func DiscountNotNil() predicate.Keyboard
- func HasKeycaps() predicate.Keyboard
- func HasKeycapsWith(preds ...predicate.KeycapModel) predicate.Keyboard
- func HasSwitches() predicate.Keyboard
- func HasSwitchesWith(preds ...predicate.SwitchModel) predicate.Keyboard
- func ID(id int64) predicate.Keyboard
- func IDEQ(id int64) predicate.Keyboard
- func IDGT(id int64) predicate.Keyboard
- func IDGTE(id int64) predicate.Keyboard
- func IDIn(ids ...int64) predicate.Keyboard
- func IDLT(id int64) predicate.Keyboard
- func IDLTE(id int64) predicate.Keyboard
- func IDNEQ(id int64) predicate.Keyboard
- func IDNotIn(ids ...int64) predicate.Keyboard
- func Name(v string) predicate.Keyboard
- func NameContains(v string) predicate.Keyboard
- func NameContainsFold(v string) predicate.Keyboard
- func NameEQ(v string) predicate.Keyboard
- func NameEqualFold(v string) predicate.Keyboard
- func NameGT(v string) predicate.Keyboard
- func NameGTE(v string) predicate.Keyboard
- func NameHasPrefix(v string) predicate.Keyboard
- func NameHasSuffix(v string) predicate.Keyboard
- func NameIn(vs ...string) predicate.Keyboard
- func NameLT(v string) predicate.Keyboard
- func NameLTE(v string) predicate.Keyboard
- func NameNEQ(v string) predicate.Keyboard
- func NameNotIn(vs ...string) predicate.Keyboard
- func Not(p predicate.Keyboard) predicate.Keyboard
- func Or(predicates ...predicate.Keyboard) predicate.Keyboard
- func Price(v int64) predicate.Keyboard
- func PriceEQ(v int64) predicate.Keyboard
- func PriceGT(v int64) predicate.Keyboard
- func PriceGTE(v int64) predicate.Keyboard
- func PriceIn(vs ...int64) predicate.Keyboard
- func PriceLT(v int64) predicate.Keyboard
- func PriceLTE(v int64) predicate.Keyboard
- func PriceNEQ(v int64) predicate.Keyboard
- func PriceNotIn(vs ...int64) predicate.Keyboard
- func ValidColumn(column string) bool
- type OrderOption
- func ByDiscount(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByKeycapsField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByPrice(opts ...sql.OrderTermOption) OrderOption
- func BySwitchesField(field string, opts ...sql.OrderTermOption) OrderOption
Constants ¶
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 ¶
var Columns = []string{ FieldID, FieldName, FieldPrice, FieldDiscount, }
Columns holds all SQL columns for keyboard fields.
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.
var ( // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error )
Functions ¶
func Discount ¶
Discount applies equality check predicate on the "discount" field. It's identical to DiscountEQ.
func DiscountEQ ¶
DiscountEQ applies the EQ predicate on the "discount" field.
func DiscountGT ¶
DiscountGT applies the GT predicate on the "discount" field.
func DiscountGTE ¶
DiscountGTE applies the GTE predicate on the "discount" field.
func DiscountIn ¶
DiscountIn applies the In predicate on the "discount" field.
func DiscountIsNil ¶
DiscountIsNil applies the IsNil predicate on the "discount" field.
func DiscountLT ¶
DiscountLT applies the LT predicate on the "discount" field.
func DiscountLTE ¶
DiscountLTE applies the LTE predicate on the "discount" field.
func DiscountNEQ ¶
DiscountNEQ applies the NEQ predicate on the "discount" field.
func DiscountNotIn ¶
DiscountNotIn applies the NotIn predicate on the "discount" field.
func DiscountNotNil ¶
DiscountNotNil applies the NotNil predicate on the "discount" field.
func HasKeycaps ¶
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 ¶
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 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 Price ¶
Price applies equality check predicate on the "price" field. It's identical to PriceEQ.
func PriceNotIn ¶
PriceNotIn applies the NotIn predicate on the "price" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
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.