Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Cost) predicate.Cost
- func HasCoin() predicate.Cost
- func HasCoinWith(preds ...predicate.Coin) predicate.Cost
- func HasEquipment() predicate.Cost
- func HasEquipmentWith(preds ...predicate.Equipment) predicate.Cost
- func ID(id int) predicate.Cost
- func IDEQ(id int) predicate.Cost
- func IDGT(id int) predicate.Cost
- func IDGTE(id int) predicate.Cost
- func IDIn(ids ...int) predicate.Cost
- func IDLT(id int) predicate.Cost
- func IDLTE(id int) predicate.Cost
- func IDNEQ(id int) predicate.Cost
- func IDNotIn(ids ...int) predicate.Cost
- func Not(p predicate.Cost) predicate.Cost
- func Or(predicates ...predicate.Cost) predicate.Cost
- func Quantity(v int) predicate.Cost
- func QuantityEQ(v int) predicate.Cost
- func QuantityGT(v int) predicate.Cost
- func QuantityGTE(v int) predicate.Cost
- func QuantityIn(vs ...int) predicate.Cost
- func QuantityLT(v int) predicate.Cost
- func QuantityLTE(v int) predicate.Cost
- func QuantityNEQ(v int) predicate.Cost
- func QuantityNotIn(vs ...int) predicate.Cost
- func ValidColumn(column string) bool
- type OrderOption
Constants ¶
const ( // Label holds the string label denoting the cost type in the database. Label = "cost" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldQuantity holds the string denoting the quantity field in the database. FieldQuantity = "quantity" // EdgeCoin holds the string denoting the coin edge name in mutations. EdgeCoin = "coin" // EdgeEquipment holds the string denoting the equipment edge name in mutations. EdgeEquipment = "equipment" // Table holds the table name of the cost in the database. Table = "costs" // CoinTable is the table that holds the coin relation/edge. CoinTable = "costs" // CoinInverseTable is the table name for the Coin entity. // It exists in this package in order to avoid circular dependency with the "coin" package. CoinInverseTable = "coins" // CoinColumn is the table column denoting the coin relation/edge. CoinColumn = "cost_coin" // EquipmentTable is the table that holds the equipment relation/edge. EquipmentTable = "costs" // EquipmentInverseTable is the table name for the Equipment entity. // It exists in this package in order to avoid circular dependency with the "equipment" package. EquipmentInverseTable = "equipment" // EquipmentColumn is the table column denoting the equipment relation/edge. EquipmentColumn = "equipment_cost" )
Variables ¶
var Columns = []string{ FieldID, FieldQuantity, }
Columns holds all SQL columns for cost fields.
var ( // DefaultQuantity holds the default value on creation for the "quantity" field. DefaultQuantity int )
var ForeignKeys = []string{
"cost_coin",
"equipment_cost",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "costs" table and are not defined as standalone fields in the schema.
Functions ¶
func HasCoinWith ¶
HasCoinWith applies the HasEdge predicate on the "coin" edge with a given conditions (other predicates).
func HasEquipment ¶
HasEquipment applies the HasEdge predicate on the "equipment" edge.
func HasEquipmentWith ¶
HasEquipmentWith applies the HasEdge predicate on the "equipment" edge with a given conditions (other predicates).
func Quantity ¶
Quantity applies equality check predicate on the "quantity" field. It's identical to QuantityEQ.
func QuantityEQ ¶
QuantityEQ applies the EQ predicate on the "quantity" field.
func QuantityGT ¶
QuantityGT applies the GT predicate on the "quantity" field.
func QuantityGTE ¶
QuantityGTE applies the GTE predicate on the "quantity" field.
func QuantityIn ¶
QuantityIn applies the In predicate on the "quantity" field.
func QuantityLT ¶
QuantityLT applies the LT predicate on the "quantity" field.
func QuantityLTE ¶
QuantityLTE applies the LTE predicate on the "quantity" field.
func QuantityNEQ ¶
QuantityNEQ applies the NEQ predicate on the "quantity" field.
func QuantityNotIn ¶
QuantityNotIn applies the NotIn predicate on the "quantity" 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 Cost queries.
func ByCoinField ¶
func ByCoinField(field string, opts ...sql.OrderTermOption) OrderOption
ByCoinField orders the results by coin field.
func ByEquipmentField ¶
func ByEquipmentField(field string, opts ...sql.OrderTermOption) OrderOption
ByEquipmentField orders the results by equipment field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByQuantity ¶
func ByQuantity(opts ...sql.OrderTermOption) OrderOption
ByQuantity orders the results by the quantity field.