Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Trait) predicate.Trait
- func HasRaces() predicate.Trait
- func HasRacesWith(preds ...predicate.Race) predicate.Trait
- func HasSubraces() predicate.Trait
- func HasSubracesWith(preds ...predicate.Subrace) predicate.Trait
- func ID(id int) predicate.Trait
- func IDEQ(id int) predicate.Trait
- func IDGT(id int) predicate.Trait
- func IDGTE(id int) predicate.Trait
- func IDIn(ids ...int) predicate.Trait
- func IDLT(id int) predicate.Trait
- func IDLTE(id int) predicate.Trait
- func IDNEQ(id int) predicate.Trait
- func IDNotIn(ids ...int) predicate.Trait
- func Indx(v string) predicate.Trait
- func IndxContains(v string) predicate.Trait
- func IndxContainsFold(v string) predicate.Trait
- func IndxEQ(v string) predicate.Trait
- func IndxEqualFold(v string) predicate.Trait
- func IndxGT(v string) predicate.Trait
- func IndxGTE(v string) predicate.Trait
- func IndxHasPrefix(v string) predicate.Trait
- func IndxHasSuffix(v string) predicate.Trait
- func IndxIn(vs ...string) predicate.Trait
- func IndxLT(v string) predicate.Trait
- func IndxLTE(v string) predicate.Trait
- func IndxNEQ(v string) predicate.Trait
- func IndxNotIn(vs ...string) predicate.Trait
- func Name(v string) predicate.Trait
- func NameContains(v string) predicate.Trait
- func NameContainsFold(v string) predicate.Trait
- func NameEQ(v string) predicate.Trait
- func NameEqualFold(v string) predicate.Trait
- func NameGT(v string) predicate.Trait
- func NameGTE(v string) predicate.Trait
- func NameHasPrefix(v string) predicate.Trait
- func NameHasSuffix(v string) predicate.Trait
- func NameIn(vs ...string) predicate.Trait
- func NameLT(v string) predicate.Trait
- func NameLTE(v string) predicate.Trait
- func NameNEQ(v string) predicate.Trait
- func NameNotIn(vs ...string) predicate.Trait
- func Not(p predicate.Trait) predicate.Trait
- func Or(predicates ...predicate.Trait) predicate.Trait
- func ValidColumn(column string) bool
- type OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIndx(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByRaces(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByRacesCount(opts ...sql.OrderTermOption) OrderOption
- func BySubraces(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func BySubracesCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the trait type in the database. Label = "trait" // 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" // EdgeRaces holds the string denoting the races edge name in mutations. EdgeRaces = "races" // EdgeSubraces holds the string denoting the subraces edge name in mutations. EdgeSubraces = "subraces" // Table holds the table name of the trait in the database. Table = "traits" // RacesTable is the table that holds the races relation/edge. The primary key declared below. RacesTable = "race_traits" // RacesInverseTable is the table name for the Race entity. // It exists in this package in order to avoid circular dependency with the "race" package. RacesInverseTable = "races" // SubracesTable is the table that holds the subraces relation/edge. The primary key declared below. SubracesTable = "subrace_traits" // SubracesInverseTable is the table name for the Subrace entity. // It exists in this package in order to avoid circular dependency with the "subrace" package. SubracesInverseTable = "subraces" )
Variables ¶
var ( // RacesPrimaryKey and RacesColumn2 are the table columns denoting the // primary key for the races relation (M2M). RacesPrimaryKey = []string{"race_id", "trait_id"} // SubracesPrimaryKey and SubracesColumn2 are the table columns denoting the // primary key for the subraces relation (M2M). SubracesPrimaryKey = []string{"subrace_id", "trait_id"} )
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 trait fields.
Functions ¶
func HasRacesWith ¶
HasRacesWith applies the HasEdge predicate on the "races" edge with a given conditions (other predicates).
func HasSubraces ¶
HasSubraces applies the HasEdge predicate on the "subraces" edge.
func HasSubracesWith ¶
HasSubracesWith applies the HasEdge predicate on the "subraces" 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 Trait 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 ByRaces ¶
func ByRaces(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByRaces orders the results by races terms.
func ByRacesCount ¶
func ByRacesCount(opts ...sql.OrderTermOption) OrderOption
ByRacesCount orders the results by races count.
func BySubraces ¶
func BySubraces(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
BySubraces orders the results by subraces terms.
func BySubracesCount ¶
func BySubracesCount(opts ...sql.OrderTermOption) OrderOption
BySubracesCount orders the results by subraces count.