Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Property) predicate.Property
- func DescIsNil() predicate.Property
- func DescNotNil() predicate.Property
- func HasWeapons() predicate.Property
- func HasWeaponsWith(preds ...predicate.Weapon) predicate.Property
- func ID(id int) predicate.Property
- func IDEQ(id int) predicate.Property
- func IDGT(id int) predicate.Property
- func IDGTE(id int) predicate.Property
- func IDIn(ids ...int) predicate.Property
- func IDLT(id int) predicate.Property
- func IDLTE(id int) predicate.Property
- func IDNEQ(id int) predicate.Property
- func IDNotIn(ids ...int) predicate.Property
- func Indx(v string) predicate.Property
- func IndxContains(v string) predicate.Property
- func IndxContainsFold(v string) predicate.Property
- func IndxEQ(v string) predicate.Property
- func IndxEqualFold(v string) predicate.Property
- func IndxGT(v string) predicate.Property
- func IndxGTE(v string) predicate.Property
- func IndxHasPrefix(v string) predicate.Property
- func IndxHasSuffix(v string) predicate.Property
- func IndxIn(vs ...string) predicate.Property
- func IndxLT(v string) predicate.Property
- func IndxLTE(v string) predicate.Property
- func IndxNEQ(v string) predicate.Property
- func IndxNotIn(vs ...string) predicate.Property
- func Name(v string) predicate.Property
- func NameContains(v string) predicate.Property
- func NameContainsFold(v string) predicate.Property
- func NameEQ(v string) predicate.Property
- func NameEqualFold(v string) predicate.Property
- func NameGT(v string) predicate.Property
- func NameGTE(v string) predicate.Property
- func NameHasPrefix(v string) predicate.Property
- func NameHasSuffix(v string) predicate.Property
- func NameIn(vs ...string) predicate.Property
- func NameLT(v string) predicate.Property
- func NameLTE(v string) predicate.Property
- func NameNEQ(v string) predicate.Property
- func NameNotIn(vs ...string) predicate.Property
- func Not(p predicate.Property) predicate.Property
- func Or(predicates ...predicate.Property) predicate.Property
- func ValidColumn(column string) bool
- type OrderOption
Constants ¶
const ( // Label holds the string label denoting the property type in the database. Label = "property" // 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" // FieldDesc holds the string denoting the desc field in the database. FieldDesc = "desc" // EdgeWeapons holds the string denoting the weapons edge name in mutations. EdgeWeapons = "weapons" // Table holds the table name of the property in the database. Table = "properties" // WeaponsTable is the table that holds the weapons relation/edge. The primary key declared below. WeaponsTable = "weapon_properties" // WeaponsInverseTable is the table name for the Weapon entity. // It exists in this package in order to avoid circular dependency with the "weapon" package. WeaponsInverseTable = "weapons" )
Variables ¶
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 property fields.
var ( // WeaponsPrimaryKey and WeaponsColumn2 are the table columns denoting the // primary key for the weapons relation (M2M). WeaponsPrimaryKey = []string{"weapon_id", "property_id"} )
Functions ¶
func DescNotNil ¶
DescNotNil applies the NotNil predicate on the "desc" field.
func HasWeapons ¶
HasWeapons applies the HasEdge predicate on the "weapons" edge.
func HasWeaponsWith ¶
HasWeaponsWith applies the HasEdge predicate on the "weapons" edge with a given conditions (other predicates).
func IndxContains ¶
IndxContains applies the Contains predicate on the "indx" field.
func IndxContainsFold ¶
IndxContainsFold applies the ContainsFold predicate on the "indx" field.
func IndxEqualFold ¶
IndxEqualFold applies the EqualFold predicate on the "indx" field.
func IndxHasPrefix ¶
IndxHasPrefix applies the HasPrefix predicate on the "indx" field.
func IndxHasSuffix ¶
IndxHasSuffix applies the HasSuffix predicate on the "indx" field.
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Property queries.
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 ByWeapons ¶
func ByWeapons(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByWeapons orders the results by weapons terms.
func ByWeaponsCount ¶
func ByWeaponsCount(opts ...sql.OrderTermOption) OrderOption
ByWeaponsCount orders the results by weapons count.