weapon

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 weapon type in the database.
	Label = "weapon"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldWeaponCategory holds the string denoting the weapon_category field in the database.
	FieldWeaponCategory = "weapon_category"
	// FieldWeaponSubcategory holds the string denoting the weapon_subcategory field in the database.
	FieldWeaponSubcategory = "weapon_subcategory"
	// FieldRangeNormal holds the string denoting the range_normal field in the database.
	FieldRangeNormal = "range_normal"
	// FieldRangeLong holds the string denoting the range_long field in the database.
	FieldRangeLong = "range_long"
	// FieldThrowRangeNormal holds the string denoting the throw_range_normal field in the database.
	FieldThrowRangeNormal = "throw_range_normal"
	// FieldThrowRangeLong holds the string denoting the throw_range_long field in the database.
	FieldThrowRangeLong = "throw_range_long"
	// FieldDamageDice holds the string denoting the damage_dice field in the database.
	FieldDamageDice = "damage_dice"
	// EdgeProperties holds the string denoting the properties edge name in mutations.
	EdgeProperties = "properties"
	// EdgeDamageType holds the string denoting the damage_type edge name in mutations.
	EdgeDamageType = "damage_type"
	// EdgeEquipment holds the string denoting the equipment edge name in mutations.
	EdgeEquipment = "equipment"
	// Table holds the table name of the weapon in the database.
	Table = "weapons"
	// PropertiesTable is the table that holds the properties relation/edge. The primary key declared below.
	PropertiesTable = "weapon_properties"
	// PropertiesInverseTable is the table name for the Property entity.
	// It exists in this package in order to avoid circular dependency with the "property" package.
	PropertiesInverseTable = "properties"
	// DamageTypeTable is the table that holds the damage_type relation/edge.
	DamageTypeTable = "weapons"
	// DamageTypeInverseTable is the table name for the DamageType entity.
	// It exists in this package in order to avoid circular dependency with the "damagetype" package.
	DamageTypeInverseTable = "damage_types"
	// DamageTypeColumn is the table column denoting the damage_type relation/edge.
	DamageTypeColumn = "weapon_damage_type"
	// EquipmentTable is the table that holds the equipment relation/edge.
	EquipmentTable = "weapons"
	// 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_weapon"
)

Variables

Columns holds all SQL columns for weapon fields.

View Source
var ForeignKeys = []string{
	"equipment_weapon",
	"weapon_damage_type",
}

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

View Source
var (
	// PropertiesPrimaryKey and PropertiesColumn2 are the table columns denoting the
	// primary key for the properties relation (M2M).
	PropertiesPrimaryKey = []string{"weapon_id", "property_id"}
)

Functions

func And

func And(predicates ...predicate.Weapon) predicate.Weapon

And groups predicates with the AND operator between them.

func DamageDice

func DamageDice(v string) predicate.Weapon

DamageDice applies equality check predicate on the "damage_dice" field. It's identical to DamageDiceEQ.

func DamageDiceContains

func DamageDiceContains(v string) predicate.Weapon

DamageDiceContains applies the Contains predicate on the "damage_dice" field.

func DamageDiceContainsFold

func DamageDiceContainsFold(v string) predicate.Weapon

DamageDiceContainsFold applies the ContainsFold predicate on the "damage_dice" field.

func DamageDiceEQ

func DamageDiceEQ(v string) predicate.Weapon

DamageDiceEQ applies the EQ predicate on the "damage_dice" field.

func DamageDiceEqualFold

func DamageDiceEqualFold(v string) predicate.Weapon

DamageDiceEqualFold applies the EqualFold predicate on the "damage_dice" field.

func DamageDiceGT

func DamageDiceGT(v string) predicate.Weapon

DamageDiceGT applies the GT predicate on the "damage_dice" field.

func DamageDiceGTE

func DamageDiceGTE(v string) predicate.Weapon

DamageDiceGTE applies the GTE predicate on the "damage_dice" field.

func DamageDiceHasPrefix

func DamageDiceHasPrefix(v string) predicate.Weapon

DamageDiceHasPrefix applies the HasPrefix predicate on the "damage_dice" field.

func DamageDiceHasSuffix

func DamageDiceHasSuffix(v string) predicate.Weapon

DamageDiceHasSuffix applies the HasSuffix predicate on the "damage_dice" field.

func DamageDiceIn

func DamageDiceIn(vs ...string) predicate.Weapon

DamageDiceIn applies the In predicate on the "damage_dice" field.

func DamageDiceIsNil

func DamageDiceIsNil() predicate.Weapon

DamageDiceIsNil applies the IsNil predicate on the "damage_dice" field.

func DamageDiceLT

func DamageDiceLT(v string) predicate.Weapon

DamageDiceLT applies the LT predicate on the "damage_dice" field.

func DamageDiceLTE

func DamageDiceLTE(v string) predicate.Weapon

DamageDiceLTE applies the LTE predicate on the "damage_dice" field.

func DamageDiceNEQ

func DamageDiceNEQ(v string) predicate.Weapon

DamageDiceNEQ applies the NEQ predicate on the "damage_dice" field.

func DamageDiceNotIn

func DamageDiceNotIn(vs ...string) predicate.Weapon

DamageDiceNotIn applies the NotIn predicate on the "damage_dice" field.

func DamageDiceNotNil

func DamageDiceNotNil() predicate.Weapon

DamageDiceNotNil applies the NotNil predicate on the "damage_dice" field.

func HasDamageType

func HasDamageType() predicate.Weapon

HasDamageType applies the HasEdge predicate on the "damage_type" edge.

func HasDamageTypeWith

func HasDamageTypeWith(preds ...predicate.DamageType) predicate.Weapon

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

func HasEquipment

func HasEquipment() predicate.Weapon

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

func HasEquipmentWith

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

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

func HasProperties

func HasProperties() predicate.Weapon

HasProperties applies the HasEdge predicate on the "properties" edge.

func HasPropertiesWith

func HasPropertiesWith(preds ...predicate.Property) predicate.Weapon

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

func ID

func ID(id int) predicate.Weapon

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Weapon

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Weapon

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Weapon

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Weapon

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Weapon

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Weapon

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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

Or groups predicates with the OR operator between them.

func RangeLong

func RangeLong(v int) predicate.Weapon

RangeLong applies equality check predicate on the "range_long" field. It's identical to RangeLongEQ.

func RangeLongEQ

func RangeLongEQ(v int) predicate.Weapon

RangeLongEQ applies the EQ predicate on the "range_long" field.

func RangeLongGT

func RangeLongGT(v int) predicate.Weapon

RangeLongGT applies the GT predicate on the "range_long" field.

func RangeLongGTE

func RangeLongGTE(v int) predicate.Weapon

RangeLongGTE applies the GTE predicate on the "range_long" field.

func RangeLongIn

func RangeLongIn(vs ...int) predicate.Weapon

RangeLongIn applies the In predicate on the "range_long" field.

func RangeLongIsNil

func RangeLongIsNil() predicate.Weapon

RangeLongIsNil applies the IsNil predicate on the "range_long" field.

func RangeLongLT

func RangeLongLT(v int) predicate.Weapon

RangeLongLT applies the LT predicate on the "range_long" field.

func RangeLongLTE

func RangeLongLTE(v int) predicate.Weapon

RangeLongLTE applies the LTE predicate on the "range_long" field.

func RangeLongNEQ

func RangeLongNEQ(v int) predicate.Weapon

RangeLongNEQ applies the NEQ predicate on the "range_long" field.

func RangeLongNotIn

func RangeLongNotIn(vs ...int) predicate.Weapon

RangeLongNotIn applies the NotIn predicate on the "range_long" field.

func RangeLongNotNil

func RangeLongNotNil() predicate.Weapon

RangeLongNotNil applies the NotNil predicate on the "range_long" field.

func RangeNormal

func RangeNormal(v int) predicate.Weapon

RangeNormal applies equality check predicate on the "range_normal" field. It's identical to RangeNormalEQ.

func RangeNormalEQ

func RangeNormalEQ(v int) predicate.Weapon

RangeNormalEQ applies the EQ predicate on the "range_normal" field.

func RangeNormalGT

func RangeNormalGT(v int) predicate.Weapon

RangeNormalGT applies the GT predicate on the "range_normal" field.

func RangeNormalGTE

func RangeNormalGTE(v int) predicate.Weapon

RangeNormalGTE applies the GTE predicate on the "range_normal" field.

func RangeNormalIn

func RangeNormalIn(vs ...int) predicate.Weapon

RangeNormalIn applies the In predicate on the "range_normal" field.

func RangeNormalIsNil

func RangeNormalIsNil() predicate.Weapon

RangeNormalIsNil applies the IsNil predicate on the "range_normal" field.

func RangeNormalLT

func RangeNormalLT(v int) predicate.Weapon

RangeNormalLT applies the LT predicate on the "range_normal" field.

func RangeNormalLTE

func RangeNormalLTE(v int) predicate.Weapon

RangeNormalLTE applies the LTE predicate on the "range_normal" field.

func RangeNormalNEQ

func RangeNormalNEQ(v int) predicate.Weapon

RangeNormalNEQ applies the NEQ predicate on the "range_normal" field.

func RangeNormalNotIn

func RangeNormalNotIn(vs ...int) predicate.Weapon

RangeNormalNotIn applies the NotIn predicate on the "range_normal" field.

func RangeNormalNotNil

func RangeNormalNotNil() predicate.Weapon

RangeNormalNotNil applies the NotNil predicate on the "range_normal" field.

func ThrowRangeLong

func ThrowRangeLong(v int) predicate.Weapon

ThrowRangeLong applies equality check predicate on the "throw_range_long" field. It's identical to ThrowRangeLongEQ.

func ThrowRangeLongEQ

func ThrowRangeLongEQ(v int) predicate.Weapon

ThrowRangeLongEQ applies the EQ predicate on the "throw_range_long" field.

func ThrowRangeLongGT

func ThrowRangeLongGT(v int) predicate.Weapon

ThrowRangeLongGT applies the GT predicate on the "throw_range_long" field.

func ThrowRangeLongGTE

func ThrowRangeLongGTE(v int) predicate.Weapon

ThrowRangeLongGTE applies the GTE predicate on the "throw_range_long" field.

func ThrowRangeLongIn

func ThrowRangeLongIn(vs ...int) predicate.Weapon

ThrowRangeLongIn applies the In predicate on the "throw_range_long" field.

func ThrowRangeLongIsNil

func ThrowRangeLongIsNil() predicate.Weapon

ThrowRangeLongIsNil applies the IsNil predicate on the "throw_range_long" field.

func ThrowRangeLongLT

func ThrowRangeLongLT(v int) predicate.Weapon

ThrowRangeLongLT applies the LT predicate on the "throw_range_long" field.

func ThrowRangeLongLTE

func ThrowRangeLongLTE(v int) predicate.Weapon

ThrowRangeLongLTE applies the LTE predicate on the "throw_range_long" field.

func ThrowRangeLongNEQ

func ThrowRangeLongNEQ(v int) predicate.Weapon

ThrowRangeLongNEQ applies the NEQ predicate on the "throw_range_long" field.

func ThrowRangeLongNotIn

func ThrowRangeLongNotIn(vs ...int) predicate.Weapon

ThrowRangeLongNotIn applies the NotIn predicate on the "throw_range_long" field.

func ThrowRangeLongNotNil

func ThrowRangeLongNotNil() predicate.Weapon

ThrowRangeLongNotNil applies the NotNil predicate on the "throw_range_long" field.

func ThrowRangeNormal

func ThrowRangeNormal(v int) predicate.Weapon

ThrowRangeNormal applies equality check predicate on the "throw_range_normal" field. It's identical to ThrowRangeNormalEQ.

func ThrowRangeNormalEQ

func ThrowRangeNormalEQ(v int) predicate.Weapon

ThrowRangeNormalEQ applies the EQ predicate on the "throw_range_normal" field.

func ThrowRangeNormalGT

func ThrowRangeNormalGT(v int) predicate.Weapon

ThrowRangeNormalGT applies the GT predicate on the "throw_range_normal" field.

func ThrowRangeNormalGTE

func ThrowRangeNormalGTE(v int) predicate.Weapon

ThrowRangeNormalGTE applies the GTE predicate on the "throw_range_normal" field.

func ThrowRangeNormalIn

func ThrowRangeNormalIn(vs ...int) predicate.Weapon

ThrowRangeNormalIn applies the In predicate on the "throw_range_normal" field.

func ThrowRangeNormalIsNil

func ThrowRangeNormalIsNil() predicate.Weapon

ThrowRangeNormalIsNil applies the IsNil predicate on the "throw_range_normal" field.

func ThrowRangeNormalLT

func ThrowRangeNormalLT(v int) predicate.Weapon

ThrowRangeNormalLT applies the LT predicate on the "throw_range_normal" field.

func ThrowRangeNormalLTE

func ThrowRangeNormalLTE(v int) predicate.Weapon

ThrowRangeNormalLTE applies the LTE predicate on the "throw_range_normal" field.

func ThrowRangeNormalNEQ

func ThrowRangeNormalNEQ(v int) predicate.Weapon

ThrowRangeNormalNEQ applies the NEQ predicate on the "throw_range_normal" field.

func ThrowRangeNormalNotIn

func ThrowRangeNormalNotIn(vs ...int) predicate.Weapon

ThrowRangeNormalNotIn applies the NotIn predicate on the "throw_range_normal" field.

func ThrowRangeNormalNotNil

func ThrowRangeNormalNotNil() predicate.Weapon

ThrowRangeNormalNotNil applies the NotNil predicate on the "throw_range_normal" field.

func ValidColumn

func ValidColumn(column string) bool

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

func WeaponCategoryEQ

func WeaponCategoryEQ(v WeaponCategory) predicate.Weapon

WeaponCategoryEQ applies the EQ predicate on the "weapon_category" field.

func WeaponCategoryIn

func WeaponCategoryIn(vs ...WeaponCategory) predicate.Weapon

WeaponCategoryIn applies the In predicate on the "weapon_category" field.

func WeaponCategoryNEQ

func WeaponCategoryNEQ(v WeaponCategory) predicate.Weapon

WeaponCategoryNEQ applies the NEQ predicate on the "weapon_category" field.

func WeaponCategoryNotIn

func WeaponCategoryNotIn(vs ...WeaponCategory) predicate.Weapon

WeaponCategoryNotIn applies the NotIn predicate on the "weapon_category" field.

func WeaponCategoryValidator

func WeaponCategoryValidator(wc WeaponCategory) error

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

func WeaponSubcategoryEQ

func WeaponSubcategoryEQ(v WeaponSubcategory) predicate.Weapon

WeaponSubcategoryEQ applies the EQ predicate on the "weapon_subcategory" field.

func WeaponSubcategoryIn

func WeaponSubcategoryIn(vs ...WeaponSubcategory) predicate.Weapon

WeaponSubcategoryIn applies the In predicate on the "weapon_subcategory" field.

func WeaponSubcategoryNEQ

func WeaponSubcategoryNEQ(v WeaponSubcategory) predicate.Weapon

WeaponSubcategoryNEQ applies the NEQ predicate on the "weapon_subcategory" field.

func WeaponSubcategoryNotIn

func WeaponSubcategoryNotIn(vs ...WeaponSubcategory) predicate.Weapon

WeaponSubcategoryNotIn applies the NotIn predicate on the "weapon_subcategory" field.

func WeaponSubcategoryValidator

func WeaponSubcategoryValidator(ws WeaponSubcategory) error

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

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Weapon queries.

func ByDamageDice

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

ByDamageDice orders the results by the damage_dice field.

func ByDamageTypeField

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

ByDamageTypeField orders the results by damage_type 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 ByProperties

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

ByProperties orders the results by properties terms.

func ByPropertiesCount

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

ByPropertiesCount orders the results by properties count.

func ByRangeLong

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

ByRangeLong orders the results by the range_long field.

func ByRangeNormal

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

ByRangeNormal orders the results by the range_normal field.

func ByThrowRangeLong

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

ByThrowRangeLong orders the results by the throw_range_long field.

func ByThrowRangeNormal

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

ByThrowRangeNormal orders the results by the throw_range_normal field.

func ByWeaponCategory

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

ByWeaponCategory orders the results by the weapon_category field.

func ByWeaponSubcategory

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

ByWeaponSubcategory orders the results by the weapon_subcategory field.

type WeaponCategory

type WeaponCategory string

WeaponCategory defines the type for the "weapon_category" enum field.

const (
	WeaponCategorySimple  WeaponCategory = "simple"
	WeaponCategoryMartial WeaponCategory = "martial"
	WeaponCategoryExotic  WeaponCategory = "exotic"
	WeaponCategoryOther   WeaponCategory = "other"
)

WeaponCategory values.

func (WeaponCategory) MarshalGQL

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

MarshalGQL implements graphql.Marshaler interface.

func (WeaponCategory) String

func (wc WeaponCategory) String() string

func (*WeaponCategory) UnmarshalGQL

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

UnmarshalGQL implements graphql.Unmarshaler interface.

type WeaponSubcategory

type WeaponSubcategory string

WeaponSubcategory defines the type for the "weapon_subcategory" enum field.

const (
	WeaponSubcategoryMelee  WeaponSubcategory = "melee"
	WeaponSubcategoryRanged WeaponSubcategory = "ranged"
	WeaponSubcategoryOther  WeaponSubcategory = "other"
)

WeaponSubcategory values.

func (WeaponSubcategory) MarshalGQL

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

MarshalGQL implements graphql.Marshaler interface.

func (WeaponSubcategory) String

func (ws WeaponSubcategory) String() string

func (*WeaponSubcategory) UnmarshalGQL

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

UnmarshalGQL implements graphql.Unmarshaler interface.

Jump to

Keyboard shortcuts

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