cost

package
v0.0.0-...-67bf1eb Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

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

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

Columns holds all SQL columns for cost fields.

View Source
var (
	// DefaultQuantity holds the default value on creation for the "quantity" field.
	DefaultQuantity int
)
View Source
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 And

func And(predicates ...predicate.Cost) predicate.Cost

And groups predicates with the AND operator between them.

func HasCoin

func HasCoin() predicate.Cost

HasCoin applies the HasEdge predicate on the "coin" edge.

func HasCoinWith

func HasCoinWith(preds ...predicate.Coin) predicate.Cost

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

func HasEquipment

func HasEquipment() predicate.Cost

HasEquipment applies the HasEdge predicate on the "equipment" edge.

func HasEquipmentWith

func HasEquipmentWith(preds ...predicate.Equipment) predicate.Cost

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

func ID

func ID(id int) predicate.Cost

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Cost

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Cost

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Cost

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Cost

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Cost

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Cost

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Cost) predicate.Cost

Or groups predicates with the OR operator between them.

func Quantity

func Quantity(v int) predicate.Cost

Quantity applies equality check predicate on the "quantity" field. It's identical to QuantityEQ.

func QuantityEQ

func QuantityEQ(v int) predicate.Cost

QuantityEQ applies the EQ predicate on the "quantity" field.

func QuantityGT

func QuantityGT(v int) predicate.Cost

QuantityGT applies the GT predicate on the "quantity" field.

func QuantityGTE

func QuantityGTE(v int) predicate.Cost

QuantityGTE applies the GTE predicate on the "quantity" field.

func QuantityIn

func QuantityIn(vs ...int) predicate.Cost

QuantityIn applies the In predicate on the "quantity" field.

func QuantityLT

func QuantityLT(v int) predicate.Cost

QuantityLT applies the LT predicate on the "quantity" field.

func QuantityLTE

func QuantityLTE(v int) predicate.Cost

QuantityLTE applies the LTE predicate on the "quantity" field.

func QuantityNEQ

func QuantityNEQ(v int) predicate.Cost

QuantityNEQ applies the NEQ predicate on the "quantity" field.

func QuantityNotIn

func QuantityNotIn(vs ...int) predicate.Cost

QuantityNotIn applies the NotIn predicate on the "quantity" 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 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.

Jump to

Keyboard shortcuts

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