Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Class) predicate.Class
- func HasCharacters() predicate.Class
- func HasCharactersWith(preds ...predicate.Character) predicate.Class
- func HasProficiencies() predicate.Class
- func HasProficienciesWith(preds ...predicate.Proficiency) predicate.Class
- func HasProficiencyOptions() predicate.Class
- func HasProficiencyOptionsWith(preds ...predicate.ProficiencyChoice) predicate.Class
- func HasSavingThrows() predicate.Class
- func HasSavingThrowsWith(preds ...predicate.AbilityScore) predicate.Class
- func HasStartingEquipment() predicate.Class
- func HasStartingEquipmentWith(preds ...predicate.EquipmentEntry) predicate.Class
- func HitDie(v int) predicate.Class
- func HitDieEQ(v int) predicate.Class
- func HitDieGT(v int) predicate.Class
- func HitDieGTE(v int) predicate.Class
- func HitDieIn(vs ...int) predicate.Class
- func HitDieLT(v int) predicate.Class
- func HitDieLTE(v int) predicate.Class
- func HitDieNEQ(v int) predicate.Class
- func HitDieNotIn(vs ...int) predicate.Class
- func ID(id int) predicate.Class
- func IDEQ(id int) predicate.Class
- func IDGT(id int) predicate.Class
- func IDGTE(id int) predicate.Class
- func IDIn(ids ...int) predicate.Class
- func IDLT(id int) predicate.Class
- func IDLTE(id int) predicate.Class
- func IDNEQ(id int) predicate.Class
- func IDNotIn(ids ...int) predicate.Class
- func Indx(v string) predicate.Class
- func IndxContains(v string) predicate.Class
- func IndxContainsFold(v string) predicate.Class
- func IndxEQ(v string) predicate.Class
- func IndxEqualFold(v string) predicate.Class
- func IndxGT(v string) predicate.Class
- func IndxGTE(v string) predicate.Class
- func IndxHasPrefix(v string) predicate.Class
- func IndxHasSuffix(v string) predicate.Class
- func IndxIn(vs ...string) predicate.Class
- func IndxLT(v string) predicate.Class
- func IndxLTE(v string) predicate.Class
- func IndxNEQ(v string) predicate.Class
- func IndxNotIn(vs ...string) predicate.Class
- func Name(v string) predicate.Class
- func NameContains(v string) predicate.Class
- func NameContainsFold(v string) predicate.Class
- func NameEQ(v string) predicate.Class
- func NameEqualFold(v string) predicate.Class
- func NameGT(v string) predicate.Class
- func NameGTE(v string) predicate.Class
- func NameHasPrefix(v string) predicate.Class
- func NameHasSuffix(v string) predicate.Class
- func NameIn(vs ...string) predicate.Class
- func NameLT(v string) predicate.Class
- func NameLTE(v string) predicate.Class
- func NameNEQ(v string) predicate.Class
- func NameNotIn(vs ...string) predicate.Class
- func Not(p predicate.Class) predicate.Class
- func Or(predicates ...predicate.Class) predicate.Class
- func ValidColumn(column string) bool
- type OrderOption
- func ByCharacters(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByCharactersCount(opts ...sql.OrderTermOption) OrderOption
- func ByHitDie(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIndx(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByProficiencies(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByProficienciesCount(opts ...sql.OrderTermOption) OrderOption
- func ByProficiencyOptions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByProficiencyOptionsCount(opts ...sql.OrderTermOption) OrderOption
- func BySavingThrows(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func BySavingThrowsCount(opts ...sql.OrderTermOption) OrderOption
- func ByStartingEquipment(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByStartingEquipmentCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the class type in the database. Label = "class" // 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" // FieldHitDie holds the string denoting the hit_die field in the database. FieldHitDie = "hit_die" // EdgeProficiencies holds the string denoting the proficiencies edge name in mutations. EdgeProficiencies = "proficiencies" // EdgeProficiencyOptions holds the string denoting the proficiency_options edge name in mutations. EdgeProficiencyOptions = "proficiency_options" // EdgeStartingEquipment holds the string denoting the starting_equipment edge name in mutations. EdgeStartingEquipment = "starting_equipment" // EdgeSavingThrows holds the string denoting the saving_throws edge name in mutations. EdgeSavingThrows = "saving_throws" // EdgeCharacters holds the string denoting the characters edge name in mutations. EdgeCharacters = "characters" // Table holds the table name of the class in the database. Table = "classes" // ProficienciesTable is the table that holds the proficiencies relation/edge. The primary key declared below. ProficienciesTable = "class_proficiencies" // ProficienciesInverseTable is the table name for the Proficiency entity. // It exists in this package in order to avoid circular dependency with the "proficiency" package. ProficienciesInverseTable = "proficiencies" // ProficiencyOptionsTable is the table that holds the proficiency_options relation/edge. ProficiencyOptionsTable = "proficiency_choices" // ProficiencyOptionsInverseTable is the table name for the ProficiencyChoice entity. // It exists in this package in order to avoid circular dependency with the "proficiencychoice" package. ProficiencyOptionsInverseTable = "proficiency_choices" // ProficiencyOptionsColumn is the table column denoting the proficiency_options relation/edge. ProficiencyOptionsColumn = "class_proficiency_options" // StartingEquipmentTable is the table that holds the starting_equipment relation/edge. The primary key declared below. StartingEquipmentTable = "class_starting_equipment" // StartingEquipmentInverseTable is the table name for the EquipmentEntry entity. // It exists in this package in order to avoid circular dependency with the "equipmententry" package. StartingEquipmentInverseTable = "equipment_entries" // SavingThrowsTable is the table that holds the saving_throws relation/edge. The primary key declared below. SavingThrowsTable = "class_saving_throws" // SavingThrowsInverseTable is the table name for the AbilityScore entity. // It exists in this package in order to avoid circular dependency with the "abilityscore" package. SavingThrowsInverseTable = "ability_scores" // CharactersTable is the table that holds the characters relation/edge. CharactersTable = "characters" // CharactersInverseTable is the table name for the Character entity. // It exists in this package in order to avoid circular dependency with the "character" package. CharactersInverseTable = "characters" // CharactersColumn is the table column denoting the characters relation/edge. CharactersColumn = "character_class" )
Variables ¶
var ( // ProficienciesPrimaryKey and ProficienciesColumn2 are the table columns denoting the // primary key for the proficiencies relation (M2M). ProficienciesPrimaryKey = []string{"class_id", "proficiency_id"} // StartingEquipmentPrimaryKey and StartingEquipmentColumn2 are the table columns denoting the // primary key for the starting_equipment relation (M2M). StartingEquipmentPrimaryKey = []string{"class_id", "equipment_entry_id"} // SavingThrowsPrimaryKey and SavingThrowsColumn2 are the table columns denoting the // primary key for the saving_throws relation (M2M). SavingThrowsPrimaryKey = []string{"class_id", "ability_score_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 // HitDieValidator is a validator for the "hit_die" field. It is called by the builders before save. HitDieValidator func(int) error )
var Columns = []string{ FieldID, FieldIndx, FieldName, FieldHitDie, }
Columns holds all SQL columns for class fields.
Functions ¶
func HasCharacters ¶
HasCharacters applies the HasEdge predicate on the "characters" edge.
func HasCharactersWith ¶
HasCharactersWith applies the HasEdge predicate on the "characters" edge with a given conditions (other predicates).
func HasProficiencies ¶
HasProficiencies applies the HasEdge predicate on the "proficiencies" edge.
func HasProficienciesWith ¶
func HasProficienciesWith(preds ...predicate.Proficiency) predicate.Class
HasProficienciesWith applies the HasEdge predicate on the "proficiencies" edge with a given conditions (other predicates).
func HasProficiencyOptions ¶
HasProficiencyOptions applies the HasEdge predicate on the "proficiency_options" edge.
func HasProficiencyOptionsWith ¶
func HasProficiencyOptionsWith(preds ...predicate.ProficiencyChoice) predicate.Class
HasProficiencyOptionsWith applies the HasEdge predicate on the "proficiency_options" edge with a given conditions (other predicates).
func HasSavingThrows ¶
HasSavingThrows applies the HasEdge predicate on the "saving_throws" edge.
func HasSavingThrowsWith ¶
func HasSavingThrowsWith(preds ...predicate.AbilityScore) predicate.Class
HasSavingThrowsWith applies the HasEdge predicate on the "saving_throws" edge with a given conditions (other predicates).
func HasStartingEquipment ¶
HasStartingEquipment applies the HasEdge predicate on the "starting_equipment" edge.
func HasStartingEquipmentWith ¶
func HasStartingEquipmentWith(preds ...predicate.EquipmentEntry) predicate.Class
HasStartingEquipmentWith applies the HasEdge predicate on the "starting_equipment" edge with a given conditions (other predicates).
func HitDie ¶
HitDie applies equality check predicate on the "hit_die" field. It's identical to HitDieEQ.
func HitDieNotIn ¶
HitDieNotIn applies the NotIn predicate on the "hit_die" field.
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 Class queries.
func ByCharacters ¶
func ByCharacters(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByCharacters orders the results by characters terms.
func ByCharactersCount ¶
func ByCharactersCount(opts ...sql.OrderTermOption) OrderOption
ByCharactersCount orders the results by characters count.
func ByHitDie ¶
func ByHitDie(opts ...sql.OrderTermOption) OrderOption
ByHitDie orders the results by the hit_die 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 ByProficiencies ¶
func ByProficiencies(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByProficiencies orders the results by proficiencies terms.
func ByProficienciesCount ¶
func ByProficienciesCount(opts ...sql.OrderTermOption) OrderOption
ByProficienciesCount orders the results by proficiencies count.
func ByProficiencyOptions ¶
func ByProficiencyOptions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByProficiencyOptions orders the results by proficiency_options terms.
func ByProficiencyOptionsCount ¶
func ByProficiencyOptionsCount(opts ...sql.OrderTermOption) OrderOption
ByProficiencyOptionsCount orders the results by proficiency_options count.
func BySavingThrows ¶
func BySavingThrows(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
BySavingThrows orders the results by saving_throws terms.
func BySavingThrowsCount ¶
func BySavingThrowsCount(opts ...sql.OrderTermOption) OrderOption
BySavingThrowsCount orders the results by saving_throws count.
func ByStartingEquipment ¶
func ByStartingEquipment(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByStartingEquipment orders the results by starting_equipment terms.
func ByStartingEquipmentCount ¶
func ByStartingEquipmentCount(opts ...sql.OrderTermOption) OrderOption
ByStartingEquipmentCount orders the results by starting_equipment count.