Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Weapon) predicate.Weapon
- func DamageDice(v string) predicate.Weapon
- func DamageDiceContains(v string) predicate.Weapon
- func DamageDiceContainsFold(v string) predicate.Weapon
- func DamageDiceEQ(v string) predicate.Weapon
- func DamageDiceEqualFold(v string) predicate.Weapon
- func DamageDiceGT(v string) predicate.Weapon
- func DamageDiceGTE(v string) predicate.Weapon
- func DamageDiceHasPrefix(v string) predicate.Weapon
- func DamageDiceHasSuffix(v string) predicate.Weapon
- func DamageDiceIn(vs ...string) predicate.Weapon
- func DamageDiceIsNil() predicate.Weapon
- func DamageDiceLT(v string) predicate.Weapon
- func DamageDiceLTE(v string) predicate.Weapon
- func DamageDiceNEQ(v string) predicate.Weapon
- func DamageDiceNotIn(vs ...string) predicate.Weapon
- func DamageDiceNotNil() predicate.Weapon
- func HasDamageType() predicate.Weapon
- func HasDamageTypeWith(preds ...predicate.DamageType) predicate.Weapon
- func HasEquipment() predicate.Weapon
- func HasEquipmentWith(preds ...predicate.Equipment) predicate.Weapon
- func HasProperties() predicate.Weapon
- func HasPropertiesWith(preds ...predicate.Property) predicate.Weapon
- func ID(id int) predicate.Weapon
- func IDEQ(id int) predicate.Weapon
- func IDGT(id int) predicate.Weapon
- func IDGTE(id int) predicate.Weapon
- func IDIn(ids ...int) predicate.Weapon
- func IDLT(id int) predicate.Weapon
- func IDLTE(id int) predicate.Weapon
- func IDNEQ(id int) predicate.Weapon
- func IDNotIn(ids ...int) predicate.Weapon
- func Not(p predicate.Weapon) predicate.Weapon
- func Or(predicates ...predicate.Weapon) predicate.Weapon
- func RangeLong(v int) predicate.Weapon
- func RangeLongEQ(v int) predicate.Weapon
- func RangeLongGT(v int) predicate.Weapon
- func RangeLongGTE(v int) predicate.Weapon
- func RangeLongIn(vs ...int) predicate.Weapon
- func RangeLongIsNil() predicate.Weapon
- func RangeLongLT(v int) predicate.Weapon
- func RangeLongLTE(v int) predicate.Weapon
- func RangeLongNEQ(v int) predicate.Weapon
- func RangeLongNotIn(vs ...int) predicate.Weapon
- func RangeLongNotNil() predicate.Weapon
- func RangeNormal(v int) predicate.Weapon
- func RangeNormalEQ(v int) predicate.Weapon
- func RangeNormalGT(v int) predicate.Weapon
- func RangeNormalGTE(v int) predicate.Weapon
- func RangeNormalIn(vs ...int) predicate.Weapon
- func RangeNormalIsNil() predicate.Weapon
- func RangeNormalLT(v int) predicate.Weapon
- func RangeNormalLTE(v int) predicate.Weapon
- func RangeNormalNEQ(v int) predicate.Weapon
- func RangeNormalNotIn(vs ...int) predicate.Weapon
- func RangeNormalNotNil() predicate.Weapon
- func ThrowRangeLong(v int) predicate.Weapon
- func ThrowRangeLongEQ(v int) predicate.Weapon
- func ThrowRangeLongGT(v int) predicate.Weapon
- func ThrowRangeLongGTE(v int) predicate.Weapon
- func ThrowRangeLongIn(vs ...int) predicate.Weapon
- func ThrowRangeLongIsNil() predicate.Weapon
- func ThrowRangeLongLT(v int) predicate.Weapon
- func ThrowRangeLongLTE(v int) predicate.Weapon
- func ThrowRangeLongNEQ(v int) predicate.Weapon
- func ThrowRangeLongNotIn(vs ...int) predicate.Weapon
- func ThrowRangeLongNotNil() predicate.Weapon
- func ThrowRangeNormal(v int) predicate.Weapon
- func ThrowRangeNormalEQ(v int) predicate.Weapon
- func ThrowRangeNormalGT(v int) predicate.Weapon
- func ThrowRangeNormalGTE(v int) predicate.Weapon
- func ThrowRangeNormalIn(vs ...int) predicate.Weapon
- func ThrowRangeNormalIsNil() predicate.Weapon
- func ThrowRangeNormalLT(v int) predicate.Weapon
- func ThrowRangeNormalLTE(v int) predicate.Weapon
- func ThrowRangeNormalNEQ(v int) predicate.Weapon
- func ThrowRangeNormalNotIn(vs ...int) predicate.Weapon
- func ThrowRangeNormalNotNil() predicate.Weapon
- func ValidColumn(column string) bool
- func WeaponCategoryEQ(v WeaponCategory) predicate.Weapon
- func WeaponCategoryIn(vs ...WeaponCategory) predicate.Weapon
- func WeaponCategoryNEQ(v WeaponCategory) predicate.Weapon
- func WeaponCategoryNotIn(vs ...WeaponCategory) predicate.Weapon
- func WeaponCategoryValidator(wc WeaponCategory) error
- func WeaponSubcategoryEQ(v WeaponSubcategory) predicate.Weapon
- func WeaponSubcategoryIn(vs ...WeaponSubcategory) predicate.Weapon
- func WeaponSubcategoryNEQ(v WeaponSubcategory) predicate.Weapon
- func WeaponSubcategoryNotIn(vs ...WeaponSubcategory) predicate.Weapon
- func WeaponSubcategoryValidator(ws WeaponSubcategory) error
- type OrderOption
- func ByDamageDice(opts ...sql.OrderTermOption) OrderOption
- func ByDamageTypeField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByEquipmentField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByProperties(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByPropertiesCount(opts ...sql.OrderTermOption) OrderOption
- func ByRangeLong(opts ...sql.OrderTermOption) OrderOption
- func ByRangeNormal(opts ...sql.OrderTermOption) OrderOption
- func ByThrowRangeLong(opts ...sql.OrderTermOption) OrderOption
- func ByThrowRangeNormal(opts ...sql.OrderTermOption) OrderOption
- func ByWeaponCategory(opts ...sql.OrderTermOption) OrderOption
- func ByWeaponSubcategory(opts ...sql.OrderTermOption) OrderOption
- type WeaponCategory
- type WeaponSubcategory
Constants ¶
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 ¶
var Columns = []string{ FieldID, FieldWeaponCategory, FieldWeaponSubcategory, FieldRangeNormal, FieldRangeLong, FieldThrowRangeNormal, FieldThrowRangeLong, FieldDamageDice, }
Columns holds all SQL columns for weapon fields.
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.
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 DamageDice ¶
DamageDice applies equality check predicate on the "damage_dice" field. It's identical to DamageDiceEQ.
func DamageDiceContains ¶
DamageDiceContains applies the Contains predicate on the "damage_dice" field.
func DamageDiceContainsFold ¶
DamageDiceContainsFold applies the ContainsFold predicate on the "damage_dice" field.
func DamageDiceEQ ¶
DamageDiceEQ applies the EQ predicate on the "damage_dice" field.
func DamageDiceEqualFold ¶
DamageDiceEqualFold applies the EqualFold predicate on the "damage_dice" field.
func DamageDiceGT ¶
DamageDiceGT applies the GT predicate on the "damage_dice" field.
func DamageDiceGTE ¶
DamageDiceGTE applies the GTE predicate on the "damage_dice" field.
func DamageDiceHasPrefix ¶
DamageDiceHasPrefix applies the HasPrefix predicate on the "damage_dice" field.
func DamageDiceHasSuffix ¶
DamageDiceHasSuffix applies the HasSuffix predicate on the "damage_dice" field.
func DamageDiceIn ¶
DamageDiceIn applies the In predicate on the "damage_dice" field.
func DamageDiceIsNil ¶
DamageDiceIsNil applies the IsNil predicate on the "damage_dice" field.
func DamageDiceLT ¶
DamageDiceLT applies the LT predicate on the "damage_dice" field.
func DamageDiceLTE ¶
DamageDiceLTE applies the LTE predicate on the "damage_dice" field.
func DamageDiceNEQ ¶
DamageDiceNEQ applies the NEQ predicate on the "damage_dice" field.
func DamageDiceNotIn ¶
DamageDiceNotIn applies the NotIn predicate on the "damage_dice" field.
func DamageDiceNotNil ¶
DamageDiceNotNil applies the NotNil predicate on the "damage_dice" field.
func HasDamageType ¶
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 ¶
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 HasProperties ¶
HasProperties applies the HasEdge predicate on the "properties" edge.
func HasPropertiesWith ¶
HasPropertiesWith applies the HasEdge predicate on the "properties" edge with a given conditions (other predicates).
func RangeLong ¶
RangeLong applies equality check predicate on the "range_long" field. It's identical to RangeLongEQ.
func RangeLongEQ ¶
RangeLongEQ applies the EQ predicate on the "range_long" field.
func RangeLongGT ¶
RangeLongGT applies the GT predicate on the "range_long" field.
func RangeLongGTE ¶
RangeLongGTE applies the GTE predicate on the "range_long" field.
func RangeLongIn ¶
RangeLongIn applies the In predicate on the "range_long" field.
func RangeLongIsNil ¶
RangeLongIsNil applies the IsNil predicate on the "range_long" field.
func RangeLongLT ¶
RangeLongLT applies the LT predicate on the "range_long" field.
func RangeLongLTE ¶
RangeLongLTE applies the LTE predicate on the "range_long" field.
func RangeLongNEQ ¶
RangeLongNEQ applies the NEQ predicate on the "range_long" field.
func RangeLongNotIn ¶
RangeLongNotIn applies the NotIn predicate on the "range_long" field.
func RangeLongNotNil ¶
RangeLongNotNil applies the NotNil predicate on the "range_long" field.
func RangeNormal ¶
RangeNormal applies equality check predicate on the "range_normal" field. It's identical to RangeNormalEQ.
func RangeNormalEQ ¶
RangeNormalEQ applies the EQ predicate on the "range_normal" field.
func RangeNormalGT ¶
RangeNormalGT applies the GT predicate on the "range_normal" field.
func RangeNormalGTE ¶
RangeNormalGTE applies the GTE predicate on the "range_normal" field.
func RangeNormalIn ¶
RangeNormalIn applies the In predicate on the "range_normal" field.
func RangeNormalIsNil ¶
RangeNormalIsNil applies the IsNil predicate on the "range_normal" field.
func RangeNormalLT ¶
RangeNormalLT applies the LT predicate on the "range_normal" field.
func RangeNormalLTE ¶
RangeNormalLTE applies the LTE predicate on the "range_normal" field.
func RangeNormalNEQ ¶
RangeNormalNEQ applies the NEQ predicate on the "range_normal" field.
func RangeNormalNotIn ¶
RangeNormalNotIn applies the NotIn predicate on the "range_normal" field.
func RangeNormalNotNil ¶
RangeNormalNotNil applies the NotNil predicate on the "range_normal" field.
func ThrowRangeLong ¶
ThrowRangeLong applies equality check predicate on the "throw_range_long" field. It's identical to ThrowRangeLongEQ.
func ThrowRangeLongEQ ¶
ThrowRangeLongEQ applies the EQ predicate on the "throw_range_long" field.
func ThrowRangeLongGT ¶
ThrowRangeLongGT applies the GT predicate on the "throw_range_long" field.
func ThrowRangeLongGTE ¶
ThrowRangeLongGTE applies the GTE predicate on the "throw_range_long" field.
func ThrowRangeLongIn ¶
ThrowRangeLongIn applies the In predicate on the "throw_range_long" field.
func ThrowRangeLongIsNil ¶
ThrowRangeLongIsNil applies the IsNil predicate on the "throw_range_long" field.
func ThrowRangeLongLT ¶
ThrowRangeLongLT applies the LT predicate on the "throw_range_long" field.
func ThrowRangeLongLTE ¶
ThrowRangeLongLTE applies the LTE predicate on the "throw_range_long" field.
func ThrowRangeLongNEQ ¶
ThrowRangeLongNEQ applies the NEQ predicate on the "throw_range_long" field.
func ThrowRangeLongNotIn ¶
ThrowRangeLongNotIn applies the NotIn predicate on the "throw_range_long" field.
func ThrowRangeLongNotNil ¶
ThrowRangeLongNotNil applies the NotNil predicate on the "throw_range_long" field.
func ThrowRangeNormal ¶
ThrowRangeNormal applies equality check predicate on the "throw_range_normal" field. It's identical to ThrowRangeNormalEQ.
func ThrowRangeNormalEQ ¶
ThrowRangeNormalEQ applies the EQ predicate on the "throw_range_normal" field.
func ThrowRangeNormalGT ¶
ThrowRangeNormalGT applies the GT predicate on the "throw_range_normal" field.
func ThrowRangeNormalGTE ¶
ThrowRangeNormalGTE applies the GTE predicate on the "throw_range_normal" field.
func ThrowRangeNormalIn ¶
ThrowRangeNormalIn applies the In predicate on the "throw_range_normal" field.
func ThrowRangeNormalIsNil ¶
ThrowRangeNormalIsNil applies the IsNil predicate on the "throw_range_normal" field.
func ThrowRangeNormalLT ¶
ThrowRangeNormalLT applies the LT predicate on the "throw_range_normal" field.
func ThrowRangeNormalLTE ¶
ThrowRangeNormalLTE applies the LTE predicate on the "throw_range_normal" field.
func ThrowRangeNormalNEQ ¶
ThrowRangeNormalNEQ applies the NEQ predicate on the "throw_range_normal" field.
func ThrowRangeNormalNotIn ¶
ThrowRangeNormalNotIn applies the NotIn predicate on the "throw_range_normal" field.
func ThrowRangeNormalNotNil ¶
ThrowRangeNormalNotNil applies the NotNil predicate on the "throw_range_normal" field.
func ValidColumn ¶
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 ¶
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.