class

package
v0.0.0-...-67bf1eb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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"}
)
View Source
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
)

Columns holds all SQL columns for class fields.

Functions

func And

func And(predicates ...predicate.Class) predicate.Class

And groups predicates with the AND operator between them.

func HasCharacters

func HasCharacters() predicate.Class

HasCharacters applies the HasEdge predicate on the "characters" edge.

func HasCharactersWith

func HasCharactersWith(preds ...predicate.Character) predicate.Class

HasCharactersWith applies the HasEdge predicate on the "characters" edge with a given conditions (other predicates).

func HasProficiencies

func HasProficiencies() predicate.Class

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

func HasProficiencyOptions() predicate.Class

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

func HasSavingThrows() predicate.Class

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

func HasStartingEquipment() predicate.Class

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

func HitDie(v int) predicate.Class

HitDie applies equality check predicate on the "hit_die" field. It's identical to HitDieEQ.

func HitDieEQ

func HitDieEQ(v int) predicate.Class

HitDieEQ applies the EQ predicate on the "hit_die" field.

func HitDieGT

func HitDieGT(v int) predicate.Class

HitDieGT applies the GT predicate on the "hit_die" field.

func HitDieGTE

func HitDieGTE(v int) predicate.Class

HitDieGTE applies the GTE predicate on the "hit_die" field.

func HitDieIn

func HitDieIn(vs ...int) predicate.Class

HitDieIn applies the In predicate on the "hit_die" field.

func HitDieLT

func HitDieLT(v int) predicate.Class

HitDieLT applies the LT predicate on the "hit_die" field.

func HitDieLTE

func HitDieLTE(v int) predicate.Class

HitDieLTE applies the LTE predicate on the "hit_die" field.

func HitDieNEQ

func HitDieNEQ(v int) predicate.Class

HitDieNEQ applies the NEQ predicate on the "hit_die" field.

func HitDieNotIn

func HitDieNotIn(vs ...int) predicate.Class

HitDieNotIn applies the NotIn predicate on the "hit_die" field.

func ID

func ID(id int) predicate.Class

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Class

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Class

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Class

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Class

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Class

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Class

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Class

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Class

IDNotIn applies the NotIn predicate on the ID field.

func Indx

func Indx(v string) predicate.Class

Indx applies equality check predicate on the "indx" field. It's identical to IndxEQ.

func IndxContains

func IndxContains(v string) predicate.Class

IndxContains applies the Contains predicate on the "indx" field.

func IndxContainsFold

func IndxContainsFold(v string) predicate.Class

IndxContainsFold applies the ContainsFold predicate on the "indx" field.

func IndxEQ

func IndxEQ(v string) predicate.Class

IndxEQ applies the EQ predicate on the "indx" field.

func IndxEqualFold

func IndxEqualFold(v string) predicate.Class

IndxEqualFold applies the EqualFold predicate on the "indx" field.

func IndxGT

func IndxGT(v string) predicate.Class

IndxGT applies the GT predicate on the "indx" field.

func IndxGTE

func IndxGTE(v string) predicate.Class

IndxGTE applies the GTE predicate on the "indx" field.

func IndxHasPrefix

func IndxHasPrefix(v string) predicate.Class

IndxHasPrefix applies the HasPrefix predicate on the "indx" field.

func IndxHasSuffix

func IndxHasSuffix(v string) predicate.Class

IndxHasSuffix applies the HasSuffix predicate on the "indx" field.

func IndxIn

func IndxIn(vs ...string) predicate.Class

IndxIn applies the In predicate on the "indx" field.

func IndxLT

func IndxLT(v string) predicate.Class

IndxLT applies the LT predicate on the "indx" field.

func IndxLTE

func IndxLTE(v string) predicate.Class

IndxLTE applies the LTE predicate on the "indx" field.

func IndxNEQ

func IndxNEQ(v string) predicate.Class

IndxNEQ applies the NEQ predicate on the "indx" field.

func IndxNotIn

func IndxNotIn(vs ...string) predicate.Class

IndxNotIn applies the NotIn predicate on the "indx" field.

func Name

func Name(v string) predicate.Class

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Class

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Class

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Class

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Class

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Class

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Class

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Class

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Class

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Class

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Class

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Class

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Class

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Class

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Class) predicate.Class

Or groups predicates with the OR operator between them.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL