Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Language) predicate.Language
- func DescIsNil() predicate.Language
- func DescNotNil() predicate.Language
- func HasOptions() predicate.Language
- func HasOptionsWith(preds ...predicate.LanguageChoice) predicate.Language
- func HasRace() predicate.Language
- func HasRaceWith(preds ...predicate.Race) predicate.Language
- func ID(id int) predicate.Language
- func IDEQ(id int) predicate.Language
- func IDGT(id int) predicate.Language
- func IDGTE(id int) predicate.Language
- func IDIn(ids ...int) predicate.Language
- func IDLT(id int) predicate.Language
- func IDLTE(id int) predicate.Language
- func IDNEQ(id int) predicate.Language
- func IDNotIn(ids ...int) predicate.Language
- func Indx(v string) predicate.Language
- func IndxContains(v string) predicate.Language
- func IndxContainsFold(v string) predicate.Language
- func IndxEQ(v string) predicate.Language
- func IndxEqualFold(v string) predicate.Language
- func IndxGT(v string) predicate.Language
- func IndxGTE(v string) predicate.Language
- func IndxHasPrefix(v string) predicate.Language
- func IndxHasSuffix(v string) predicate.Language
- func IndxIn(vs ...string) predicate.Language
- func IndxLT(v string) predicate.Language
- func IndxLTE(v string) predicate.Language
- func IndxNEQ(v string) predicate.Language
- func IndxNotIn(vs ...string) predicate.Language
- func LanguageTypeEQ(v LanguageType) predicate.Language
- func LanguageTypeIn(vs ...LanguageType) predicate.Language
- func LanguageTypeNEQ(v LanguageType) predicate.Language
- func LanguageTypeNotIn(vs ...LanguageType) predicate.Language
- func LanguageTypeValidator(lt LanguageType) error
- func Name(v string) predicate.Language
- func NameContains(v string) predicate.Language
- func NameContainsFold(v string) predicate.Language
- func NameEQ(v string) predicate.Language
- func NameEqualFold(v string) predicate.Language
- func NameGT(v string) predicate.Language
- func NameGTE(v string) predicate.Language
- func NameHasPrefix(v string) predicate.Language
- func NameHasSuffix(v string) predicate.Language
- func NameIn(vs ...string) predicate.Language
- func NameLT(v string) predicate.Language
- func NameLTE(v string) predicate.Language
- func NameNEQ(v string) predicate.Language
- func NameNotIn(vs ...string) predicate.Language
- func Not(p predicate.Language) predicate.Language
- func Or(predicates ...predicate.Language) predicate.Language
- func ScriptEQ(v Script) predicate.Language
- func ScriptIn(vs ...Script) predicate.Language
- func ScriptNEQ(v Script) predicate.Language
- func ScriptNotIn(vs ...Script) predicate.Language
- func ScriptValidator(s Script) error
- func ValidColumn(column string) bool
- type LanguageType
- type OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIndx(opts ...sql.OrderTermOption) OrderOption
- func ByLanguageType(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByOptions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByOptionsCount(opts ...sql.OrderTermOption) OrderOption
- func ByRace(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByRaceCount(opts ...sql.OrderTermOption) OrderOption
- func ByScript(opts ...sql.OrderTermOption) OrderOption
- type Script
Constants ¶
const ( // Label holds the string label denoting the language type in the database. Label = "language" // 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" // FieldLanguageType holds the string denoting the language_type field in the database. FieldLanguageType = "language_type" // FieldScript holds the string denoting the script field in the database. FieldScript = "script" // EdgeRace holds the string denoting the race edge name in mutations. EdgeRace = "race" // EdgeOptions holds the string denoting the options edge name in mutations. EdgeOptions = "options" // Table holds the table name of the language in the database. Table = "languages" // RaceTable is the table that holds the race relation/edge. The primary key declared below. RaceTable = "race_languages" // RaceInverseTable is the table name for the Race entity. // It exists in this package in order to avoid circular dependency with the "race" package. RaceInverseTable = "races" // OptionsTable is the table that holds the options relation/edge. The primary key declared below. OptionsTable = "language_choice_languages" // OptionsInverseTable is the table name for the LanguageChoice entity. // It exists in this package in order to avoid circular dependency with the "languagechoice" package. OptionsInverseTable = "language_choices" )
const DefaultLanguageType = LanguageTypeSTANDARD
LanguageTypeSTANDARD is the default value of the LanguageType enum.
const DefaultScript = ScriptCommon
ScriptCommon is the default value of the Script enum.
Variables ¶
var ( // RacePrimaryKey and RaceColumn2 are the table columns denoting the // primary key for the race relation (M2M). RacePrimaryKey = []string{"race_id", "language_id"} // OptionsPrimaryKey and OptionsColumn2 are the table columns denoting the // primary key for the options relation (M2M). OptionsPrimaryKey = []string{"language_choice_id", "language_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 )
var Columns = []string{ FieldID, FieldIndx, FieldName, FieldDesc, FieldLanguageType, FieldScript, }
Columns holds all SQL columns for language fields.
Functions ¶
func DescNotNil ¶
DescNotNil applies the NotNil predicate on the "desc" field.
func HasOptions ¶
HasOptions applies the HasEdge predicate on the "options" edge.
func HasOptionsWith ¶
func HasOptionsWith(preds ...predicate.LanguageChoice) predicate.Language
HasOptionsWith applies the HasEdge predicate on the "options" edge with a given conditions (other predicates).
func HasRaceWith ¶
HasRaceWith applies the HasEdge predicate on the "race" 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 LanguageTypeEQ ¶
func LanguageTypeEQ(v LanguageType) predicate.Language
LanguageTypeEQ applies the EQ predicate on the "language_type" field.
func LanguageTypeIn ¶
func LanguageTypeIn(vs ...LanguageType) predicate.Language
LanguageTypeIn applies the In predicate on the "language_type" field.
func LanguageTypeNEQ ¶
func LanguageTypeNEQ(v LanguageType) predicate.Language
LanguageTypeNEQ applies the NEQ predicate on the "language_type" field.
func LanguageTypeNotIn ¶
func LanguageTypeNotIn(vs ...LanguageType) predicate.Language
LanguageTypeNotIn applies the NotIn predicate on the "language_type" field.
func LanguageTypeValidator ¶
func LanguageTypeValidator(lt LanguageType) error
LanguageTypeValidator is a validator for the "language_type" field enum values. It is called by the builders before save.
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 ScriptNotIn ¶
ScriptNotIn applies the NotIn predicate on the "script" field.
func ScriptValidator ¶
ScriptValidator is a validator for the "script" field enum values. It is called by the builders before save.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type LanguageType ¶
type LanguageType string
LanguageType defines the type for the "language_type" enum field.
const ( LanguageTypeSTANDARD LanguageType = "STANDARD" LanguageTypeEXOTIC LanguageType = "EXOTIC" )
LanguageType values.
func (LanguageType) MarshalGQL ¶
func (e LanguageType) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (LanguageType) String ¶
func (lt LanguageType) String() string
func (*LanguageType) UnmarshalGQL ¶
func (e *LanguageType) UnmarshalGQL(val interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type OrderOption ¶
OrderOption defines the ordering options for the Language 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 ByLanguageType ¶
func ByLanguageType(opts ...sql.OrderTermOption) OrderOption
ByLanguageType orders the results by the language_type field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByOptions ¶
func ByOptions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByOptions orders the results by options terms.
func ByOptionsCount ¶
func ByOptionsCount(opts ...sql.OrderTermOption) OrderOption
ByOptionsCount orders the results by options count.
func ByRace ¶
func ByRace(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByRace orders the results by race terms.
func ByRaceCount ¶
func ByRaceCount(opts ...sql.OrderTermOption) OrderOption
ByRaceCount orders the results by race count.
func ByScript ¶
func ByScript(opts ...sql.OrderTermOption) OrderOption
ByScript orders the results by the script field.
type Script ¶
type Script string
Script defines the type for the "script" enum field.
const ( ScriptCommon Script = "Common" ScriptDwarvish Script = "Dwarvish" ScriptElvish Script = "Elvish" ScriptInfernal Script = "Infernal" ScriptDraconic Script = "Draconic" ScriptCelestial Script = "Celestial" ScriptAbyssal Script = "Abyssal" ScriptGiant Script = "Giant" ScriptGnomish Script = "Gnomish" ScriptGoblin Script = "Goblin" ScriptHalfling Script = "Halfling" ScriptOrc Script = "Orc" ScriptOther Script = "Other" )
Script values.
func (Script) MarshalGQL ¶
MarshalGQL implements graphql.Marshaler interface.
func (*Script) UnmarshalGQL ¶
UnmarshalGQL implements graphql.Unmarshaler interface.