equipment

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: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the equipment type in the database.
	Label = "equipment"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldIndx holds the string denoting the indx field in the database.
	FieldIndx = "indx"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldEquipmentCategory holds the string denoting the equipment_category field in the database.
	FieldEquipmentCategory = "equipment_category"
	// FieldWeight holds the string denoting the weight field in the database.
	FieldWeight = "weight"
	// EdgeCost holds the string denoting the cost edge name in mutations.
	EdgeCost = "cost"
	// EdgeGear holds the string denoting the gear edge name in mutations.
	EdgeGear = "gear"
	// EdgeTool holds the string denoting the tool edge name in mutations.
	EdgeTool = "tool"
	// EdgeWeapon holds the string denoting the weapon edge name in mutations.
	EdgeWeapon = "weapon"
	// EdgeVehicle holds the string denoting the vehicle edge name in mutations.
	EdgeVehicle = "vehicle"
	// EdgeArmor holds the string denoting the armor edge name in mutations.
	EdgeArmor = "armor"
	// EdgeEquipmentEntries holds the string denoting the equipment_entries edge name in mutations.
	EdgeEquipmentEntries = "equipment_entries"
	// Table holds the table name of the equipment in the database.
	Table = "equipment"
	// CostTable is the table that holds the cost relation/edge.
	CostTable = "costs"
	// CostInverseTable is the table name for the Cost entity.
	// It exists in this package in order to avoid circular dependency with the "cost" package.
	CostInverseTable = "costs"
	// CostColumn is the table column denoting the cost relation/edge.
	CostColumn = "equipment_cost"
	// GearTable is the table that holds the gear relation/edge.
	GearTable = "gears"
	// GearInverseTable is the table name for the Gear entity.
	// It exists in this package in order to avoid circular dependency with the "gear" package.
	GearInverseTable = "gears"
	// GearColumn is the table column denoting the gear relation/edge.
	GearColumn = "equipment_gear"
	// ToolTable is the table that holds the tool relation/edge.
	ToolTable = "tools"
	// ToolInverseTable is the table name for the Tool entity.
	// It exists in this package in order to avoid circular dependency with the "tool" package.
	ToolInverseTable = "tools"
	// ToolColumn is the table column denoting the tool relation/edge.
	ToolColumn = "equipment_tool"
	// WeaponTable is the table that holds the weapon relation/edge.
	WeaponTable = "weapons"
	// WeaponInverseTable is the table name for the Weapon entity.
	// It exists in this package in order to avoid circular dependency with the "weapon" package.
	WeaponInverseTable = "weapons"
	// WeaponColumn is the table column denoting the weapon relation/edge.
	WeaponColumn = "equipment_weapon"
	// VehicleTable is the table that holds the vehicle relation/edge.
	VehicleTable = "vehicles"
	// VehicleInverseTable is the table name for the Vehicle entity.
	// It exists in this package in order to avoid circular dependency with the "vehicle" package.
	VehicleInverseTable = "vehicles"
	// VehicleColumn is the table column denoting the vehicle relation/edge.
	VehicleColumn = "equipment_vehicle"
	// ArmorTable is the table that holds the armor relation/edge.
	ArmorTable = "armors"
	// ArmorInverseTable is the table name for the Armor entity.
	// It exists in this package in order to avoid circular dependency with the "armor" package.
	ArmorInverseTable = "armors"
	// ArmorColumn is the table column denoting the armor relation/edge.
	ArmorColumn = "equipment_armor"
	// EquipmentEntriesTable is the table that holds the equipment_entries relation/edge.
	EquipmentEntriesTable = "equipment_entries"
	// EquipmentEntriesInverseTable is the table name for the EquipmentEntry entity.
	// It exists in this package in order to avoid circular dependency with the "equipmententry" package.
	EquipmentEntriesInverseTable = "equipment_entries"
	// EquipmentEntriesColumn is the table column denoting the equipment_entries relation/edge.
	EquipmentEntriesColumn = "equipment_entry_equipment"
)

Variables

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

Columns holds all SQL columns for equipment fields.

Functions

func And

func And(predicates ...predicate.Equipment) predicate.Equipment

And groups predicates with the AND operator between them.

func EquipmentCategoryEQ

func EquipmentCategoryEQ(v EquipmentCategory) predicate.Equipment

EquipmentCategoryEQ applies the EQ predicate on the "equipment_category" field.

func EquipmentCategoryIn

func EquipmentCategoryIn(vs ...EquipmentCategory) predicate.Equipment

EquipmentCategoryIn applies the In predicate on the "equipment_category" field.

func EquipmentCategoryNEQ

func EquipmentCategoryNEQ(v EquipmentCategory) predicate.Equipment

EquipmentCategoryNEQ applies the NEQ predicate on the "equipment_category" field.

func EquipmentCategoryNotIn

func EquipmentCategoryNotIn(vs ...EquipmentCategory) predicate.Equipment

EquipmentCategoryNotIn applies the NotIn predicate on the "equipment_category" field.

func EquipmentCategoryValidator

func EquipmentCategoryValidator(ec EquipmentCategory) error

EquipmentCategoryValidator is a validator for the "equipment_category" field enum values. It is called by the builders before save.

func HasArmor

func HasArmor() predicate.Equipment

HasArmor applies the HasEdge predicate on the "armor" edge.

func HasArmorWith

func HasArmorWith(preds ...predicate.Armor) predicate.Equipment

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

func HasCost

func HasCost() predicate.Equipment

HasCost applies the HasEdge predicate on the "cost" edge.

func HasCostWith

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

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

func HasEquipmentEntries

func HasEquipmentEntries() predicate.Equipment

HasEquipmentEntries applies the HasEdge predicate on the "equipment_entries" edge.

func HasEquipmentEntriesWith

func HasEquipmentEntriesWith(preds ...predicate.EquipmentEntry) predicate.Equipment

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

func HasGear

func HasGear() predicate.Equipment

HasGear applies the HasEdge predicate on the "gear" edge.

func HasGearWith

func HasGearWith(preds ...predicate.Gear) predicate.Equipment

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

func HasTool

func HasTool() predicate.Equipment

HasTool applies the HasEdge predicate on the "tool" edge.

func HasToolWith

func HasToolWith(preds ...predicate.Tool) predicate.Equipment

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

func HasVehicle

func HasVehicle() predicate.Equipment

HasVehicle applies the HasEdge predicate on the "vehicle" edge.

func HasVehicleWith

func HasVehicleWith(preds ...predicate.Vehicle) predicate.Equipment

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

func HasWeapon

func HasWeapon() predicate.Equipment

HasWeapon applies the HasEdge predicate on the "weapon" edge.

func HasWeaponWith

func HasWeaponWith(preds ...predicate.Weapon) predicate.Equipment

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

func ID

func ID(id int) predicate.Equipment

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Equipment

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Equipment

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Equipment

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Equipment

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Equipment

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Equipment

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Indx

func Indx(v string) predicate.Equipment

Indx applies equality check predicate on the "indx" field. It's identical to IndxEQ.

func IndxContains

func IndxContains(v string) predicate.Equipment

IndxContains applies the Contains predicate on the "indx" field.

func IndxContainsFold

func IndxContainsFold(v string) predicate.Equipment

IndxContainsFold applies the ContainsFold predicate on the "indx" field.

func IndxEQ

func IndxEQ(v string) predicate.Equipment

IndxEQ applies the EQ predicate on the "indx" field.

func IndxEqualFold

func IndxEqualFold(v string) predicate.Equipment

IndxEqualFold applies the EqualFold predicate on the "indx" field.

func IndxGT

func IndxGT(v string) predicate.Equipment

IndxGT applies the GT predicate on the "indx" field.

func IndxGTE

func IndxGTE(v string) predicate.Equipment

IndxGTE applies the GTE predicate on the "indx" field.

func IndxHasPrefix

func IndxHasPrefix(v string) predicate.Equipment

IndxHasPrefix applies the HasPrefix predicate on the "indx" field.

func IndxHasSuffix

func IndxHasSuffix(v string) predicate.Equipment

IndxHasSuffix applies the HasSuffix predicate on the "indx" field.

func IndxIn

func IndxIn(vs ...string) predicate.Equipment

IndxIn applies the In predicate on the "indx" field.

func IndxLT

func IndxLT(v string) predicate.Equipment

IndxLT applies the LT predicate on the "indx" field.

func IndxLTE

func IndxLTE(v string) predicate.Equipment

IndxLTE applies the LTE predicate on the "indx" field.

func IndxNEQ

func IndxNEQ(v string) predicate.Equipment

IndxNEQ applies the NEQ predicate on the "indx" field.

func IndxNotIn

func IndxNotIn(vs ...string) predicate.Equipment

IndxNotIn applies the NotIn predicate on the "indx" field.

func Name

func Name(v string) predicate.Equipment

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

func NameContains

func NameContains(v string) predicate.Equipment

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

func NameContainsFold

func NameContainsFold(v string) predicate.Equipment

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

func NameEQ

func NameEQ(v string) predicate.Equipment

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

func NameEqualFold

func NameEqualFold(v string) predicate.Equipment

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

func NameGT

func NameGT(v string) predicate.Equipment

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

func NameGTE

func NameGTE(v string) predicate.Equipment

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Equipment

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Equipment

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Equipment

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

func NameLTE

func NameLTE(v string) predicate.Equipment

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

func NameNEQ

func NameNEQ(v string) predicate.Equipment

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

func NameNotIn

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

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.Equipment) predicate.Equipment

Or groups predicates with the OR operator between them.

func ValidColumn

func ValidColumn(column string) bool

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

func Weight

func Weight(v float64) predicate.Equipment

Weight applies equality check predicate on the "weight" field. It's identical to WeightEQ.

func WeightEQ

func WeightEQ(v float64) predicate.Equipment

WeightEQ applies the EQ predicate on the "weight" field.

func WeightGT

func WeightGT(v float64) predicate.Equipment

WeightGT applies the GT predicate on the "weight" field.

func WeightGTE

func WeightGTE(v float64) predicate.Equipment

WeightGTE applies the GTE predicate on the "weight" field.

func WeightIn

func WeightIn(vs ...float64) predicate.Equipment

WeightIn applies the In predicate on the "weight" field.

func WeightIsNil

func WeightIsNil() predicate.Equipment

WeightIsNil applies the IsNil predicate on the "weight" field.

func WeightLT

func WeightLT(v float64) predicate.Equipment

WeightLT applies the LT predicate on the "weight" field.

func WeightLTE

func WeightLTE(v float64) predicate.Equipment

WeightLTE applies the LTE predicate on the "weight" field.

func WeightNEQ

func WeightNEQ(v float64) predicate.Equipment

WeightNEQ applies the NEQ predicate on the "weight" field.

func WeightNotIn

func WeightNotIn(vs ...float64) predicate.Equipment

WeightNotIn applies the NotIn predicate on the "weight" field.

func WeightNotNil

func WeightNotNil() predicate.Equipment

WeightNotNil applies the NotNil predicate on the "weight" field.

Types

type EquipmentCategory

type EquipmentCategory string

EquipmentCategory defines the type for the "equipment_category" enum field.

const (
	EquipmentCategoryGear    EquipmentCategory = "GEAR"
	EquipmentCategoryTool    EquipmentCategory = "TOOL"
	EquipmentCategoryWeapon  EquipmentCategory = "WEAPON"
	EquipmentCategoryVehicle EquipmentCategory = "VEHICLE"
	EquipmentCategoryArmor   EquipmentCategory = "ARMOR"
)

EquipmentCategory values.

func (EquipmentCategory) MarshalGQL

func (e EquipmentCategory) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (EquipmentCategory) String

func (ec EquipmentCategory) String() string

func (*EquipmentCategory) UnmarshalGQL

func (e *EquipmentCategory) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Equipment queries.

func ByArmorField

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

ByArmorField orders the results by armor field.

func ByCostField

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

ByCostField orders the results by cost field.

func ByEquipmentCategory

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

ByEquipmentCategory orders the results by the equipment_category field.

func ByEquipmentEntries

func ByEquipmentEntries(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByEquipmentEntries orders the results by equipment_entries terms.

func ByEquipmentEntriesCount

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

ByEquipmentEntriesCount orders the results by equipment_entries count.

func ByGearField

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

ByGearField orders the results by gear field.

func ByID

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

ByID orders the results by the id field.

func ByIndx

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

ByIndx orders the results by the indx field.

func ByName

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

ByName orders the results by the name field.

func ByToolField

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

ByToolField orders the results by tool field.

func ByVehicleField

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

ByVehicleField orders the results by vehicle field.

func ByWeaponField

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

ByWeaponField orders the results by weapon field.

func ByWeight

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

ByWeight orders the results by the weight field.

Jump to

Keyboard shortcuts

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