weapon

package
v0.0.0-...-c5055fb Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 3 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"
	// 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"
	// FieldEquipmentID holds the string denoting the equipment_id field in the database.
	FieldEquipmentID = "equipment_id"
	// FieldWeaponCategory holds the string denoting the weapon_category field in the database.
	FieldWeaponCategory = "weapon_category"
	// FieldWeaponRange holds the string denoting the weapon_range field in the database.
	FieldWeaponRange = "weapon_range"
	// EdgeEquipment holds the string denoting the equipment edge name in mutations.
	EdgeEquipment = "equipment"
	// EdgeWeaponDamage holds the string denoting the weapon_damage edge name in mutations.
	EdgeWeaponDamage = "weapon_damage"
	// EdgeWeaponProperties holds the string denoting the weapon_properties edge name in mutations.
	EdgeWeaponProperties = "weapon_properties"
	// Table holds the table name of the weapon in the database.
	Table = "weapons"
	// 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_id"
	// WeaponDamageTable is the table that holds the weapon_damage relation/edge.
	WeaponDamageTable = "weapon_damages"
	// WeaponDamageInverseTable is the table name for the WeaponDamage entity.
	// It exists in this package in order to avoid circular dependency with the "weapondamage" package.
	WeaponDamageInverseTable = "weapon_damages"
	// WeaponDamageColumn is the table column denoting the weapon_damage relation/edge.
	WeaponDamageColumn = "weapon_id"
	// WeaponPropertiesTable is the table that holds the weapon_properties relation/edge. The primary key declared below.
	WeaponPropertiesTable = "weapon_weapon_properties"
	// WeaponPropertiesInverseTable is the table name for the WeaponProperty entity.
	// It exists in this package in order to avoid circular dependency with the "weaponproperty" package.
	WeaponPropertiesInverseTable = "weapon_properties"
)

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 weapon fields.

View Source
var (
	// WeaponPropertiesPrimaryKey and WeaponPropertiesColumn2 are the table columns denoting the
	// primary key for the weapon_properties relation (M2M).
	WeaponPropertiesPrimaryKey = []string{"weapon_id", "weapon_property_id"}
)

Functions

func And

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

And groups predicates with the AND operator between them.

func EquipmentID

func EquipmentID(v int) predicate.Weapon

EquipmentID applies equality check predicate on the "equipment_id" field. It's identical to EquipmentIDEQ.

func EquipmentIDEQ

func EquipmentIDEQ(v int) predicate.Weapon

EquipmentIDEQ applies the EQ predicate on the "equipment_id" field.

func EquipmentIDIn

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

EquipmentIDIn applies the In predicate on the "equipment_id" field.

func EquipmentIDNEQ

func EquipmentIDNEQ(v int) predicate.Weapon

EquipmentIDNEQ applies the NEQ predicate on the "equipment_id" field.

func EquipmentIDNotIn

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

EquipmentIDNotIn applies the NotIn predicate on the "equipment_id" field.

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 HasWeaponDamage

func HasWeaponDamage() predicate.Weapon

HasWeaponDamage applies the HasEdge predicate on the "weapon_damage" edge.

func HasWeaponDamageWith

func HasWeaponDamageWith(preds ...predicate.WeaponDamage) predicate.Weapon

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

func HasWeaponProperties

func HasWeaponProperties() predicate.Weapon

HasWeaponProperties applies the HasEdge predicate on the "weapon_properties" edge.

func HasWeaponPropertiesWith

func HasWeaponPropertiesWith(preds ...predicate.WeaponProperty) predicate.Weapon

HasWeaponPropertiesWith applies the HasEdge predicate on the "weapon_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 Indx

func Indx(v string) predicate.Weapon

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

func IndxContains

func IndxContains(v string) predicate.Weapon

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

func IndxContainsFold

func IndxContainsFold(v string) predicate.Weapon

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

func IndxEQ

func IndxEQ(v string) predicate.Weapon

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

func IndxEqualFold

func IndxEqualFold(v string) predicate.Weapon

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

func IndxGT

func IndxGT(v string) predicate.Weapon

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

func IndxGTE

func IndxGTE(v string) predicate.Weapon

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

func IndxHasPrefix

func IndxHasPrefix(v string) predicate.Weapon

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

func IndxHasSuffix

func IndxHasSuffix(v string) predicate.Weapon

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

func IndxIn

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

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

func IndxLT

func IndxLT(v string) predicate.Weapon

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

func IndxLTE

func IndxLTE(v string) predicate.Weapon

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

func IndxNEQ

func IndxNEQ(v string) predicate.Weapon

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

func IndxNotIn

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

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

func Name

func Name(v string) predicate.Weapon

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

func NameContains

func NameContains(v string) predicate.Weapon

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

func NameContainsFold

func NameContainsFold(v string) predicate.Weapon

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

func NameEQ

func NameEQ(v string) predicate.Weapon

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

func NameEqualFold

func NameEqualFold(v string) predicate.Weapon

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

func NameGT

func NameGT(v string) predicate.Weapon

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

func NameGTE

func NameGTE(v string) predicate.Weapon

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Weapon

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Weapon

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Weapon

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

func NameLTE

func NameLTE(v string) predicate.Weapon

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

func NameNEQ

func NameNEQ(v string) predicate.Weapon

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

func NameNotIn

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

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

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 WeaponCategory

func WeaponCategory(v string) predicate.Weapon

WeaponCategory applies equality check predicate on the "weapon_category" field. It's identical to WeaponCategoryEQ.

func WeaponCategoryContains

func WeaponCategoryContains(v string) predicate.Weapon

WeaponCategoryContains applies the Contains predicate on the "weapon_category" field.

func WeaponCategoryContainsFold

func WeaponCategoryContainsFold(v string) predicate.Weapon

WeaponCategoryContainsFold applies the ContainsFold predicate on the "weapon_category" field.

func WeaponCategoryEQ

func WeaponCategoryEQ(v string) predicate.Weapon

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

func WeaponCategoryEqualFold

func WeaponCategoryEqualFold(v string) predicate.Weapon

WeaponCategoryEqualFold applies the EqualFold predicate on the "weapon_category" field.

func WeaponCategoryGT

func WeaponCategoryGT(v string) predicate.Weapon

WeaponCategoryGT applies the GT predicate on the "weapon_category" field.

func WeaponCategoryGTE

func WeaponCategoryGTE(v string) predicate.Weapon

WeaponCategoryGTE applies the GTE predicate on the "weapon_category" field.

func WeaponCategoryHasPrefix

func WeaponCategoryHasPrefix(v string) predicate.Weapon

WeaponCategoryHasPrefix applies the HasPrefix predicate on the "weapon_category" field.

func WeaponCategoryHasSuffix

func WeaponCategoryHasSuffix(v string) predicate.Weapon

WeaponCategoryHasSuffix applies the HasSuffix predicate on the "weapon_category" field.

func WeaponCategoryIn

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

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

func WeaponCategoryLT

func WeaponCategoryLT(v string) predicate.Weapon

WeaponCategoryLT applies the LT predicate on the "weapon_category" field.

func WeaponCategoryLTE

func WeaponCategoryLTE(v string) predicate.Weapon

WeaponCategoryLTE applies the LTE predicate on the "weapon_category" field.

func WeaponCategoryNEQ

func WeaponCategoryNEQ(v string) predicate.Weapon

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

func WeaponCategoryNotIn

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

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

func WeaponRange

func WeaponRange(v string) predicate.Weapon

WeaponRange applies equality check predicate on the "weapon_range" field. It's identical to WeaponRangeEQ.

func WeaponRangeContains

func WeaponRangeContains(v string) predicate.Weapon

WeaponRangeContains applies the Contains predicate on the "weapon_range" field.

func WeaponRangeContainsFold

func WeaponRangeContainsFold(v string) predicate.Weapon

WeaponRangeContainsFold applies the ContainsFold predicate on the "weapon_range" field.

func WeaponRangeEQ

func WeaponRangeEQ(v string) predicate.Weapon

WeaponRangeEQ applies the EQ predicate on the "weapon_range" field.

func WeaponRangeEqualFold

func WeaponRangeEqualFold(v string) predicate.Weapon

WeaponRangeEqualFold applies the EqualFold predicate on the "weapon_range" field.

func WeaponRangeGT

func WeaponRangeGT(v string) predicate.Weapon

WeaponRangeGT applies the GT predicate on the "weapon_range" field.

func WeaponRangeGTE

func WeaponRangeGTE(v string) predicate.Weapon

WeaponRangeGTE applies the GTE predicate on the "weapon_range" field.

func WeaponRangeHasPrefix

func WeaponRangeHasPrefix(v string) predicate.Weapon

WeaponRangeHasPrefix applies the HasPrefix predicate on the "weapon_range" field.

func WeaponRangeHasSuffix

func WeaponRangeHasSuffix(v string) predicate.Weapon

WeaponRangeHasSuffix applies the HasSuffix predicate on the "weapon_range" field.

func WeaponRangeIn

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

WeaponRangeIn applies the In predicate on the "weapon_range" field.

func WeaponRangeLT

func WeaponRangeLT(v string) predicate.Weapon

WeaponRangeLT applies the LT predicate on the "weapon_range" field.

func WeaponRangeLTE

func WeaponRangeLTE(v string) predicate.Weapon

WeaponRangeLTE applies the LTE predicate on the "weapon_range" field.

func WeaponRangeNEQ

func WeaponRangeNEQ(v string) predicate.Weapon

WeaponRangeNEQ applies the NEQ predicate on the "weapon_range" field.

func WeaponRangeNotIn

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

WeaponRangeNotIn applies the NotIn predicate on the "weapon_range" field.

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Weapon queries.

func ByEquipmentField

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

ByEquipmentField orders the results by equipment field.

func ByEquipmentID

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

ByEquipmentID orders the results by the equipment_id 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 ByWeaponCategory

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

ByWeaponCategory orders the results by the weapon_category field.

func ByWeaponDamage

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

ByWeaponDamage orders the results by weapon_damage terms.

func ByWeaponDamageCount

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

ByWeaponDamageCount orders the results by weapon_damage count.

func ByWeaponProperties

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

ByWeaponProperties orders the results by weapon_properties terms.

func ByWeaponPropertiesCount

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

ByWeaponPropertiesCount orders the results by weapon_properties count.

func ByWeaponRange

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

ByWeaponRange orders the results by the weapon_range field.

Jump to

Keyboard shortcuts

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