ent

package
v0.0.0-...-c5055fb Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 60 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Operation types.
	OpCreate    = ent.OpCreate
	OpDelete    = ent.OpDelete
	OpDeleteOne = ent.OpDeleteOne
	OpUpdate    = ent.OpUpdate
	OpUpdateOne = ent.OpUpdateOne

	// Node types.
	TypeAbilityBonus      = "AbilityBonus"
	TypeAbilityScore      = "AbilityScore"
	TypeArmor             = "Armor"
	TypeArmorClass        = "ArmorClass"
	TypeClass             = "Class"
	TypeClassEquipment    = "ClassEquipment"
	TypeCoin              = "Coin"
	TypeDamageType        = "DamageType"
	TypeEquipment         = "Equipment"
	TypeEquipmentCategory = "EquipmentCategory"
	TypeEquipmentChoice   = "EquipmentChoice"
	TypeEquipmentCost     = "EquipmentCost"
	TypeGear              = "Gear"
	TypeLanguage          = "Language"
	TypeMagicSchool       = "MagicSchool"
	TypeProficiency       = "Proficiency"
	TypeProficiencyChoice = "ProficiencyChoice"
	TypeRace              = "Race"
	TypeRule              = "Rule"
	TypeRuleSection       = "RuleSection"
	TypeSkill             = "Skill"
	TypeSubrace           = "Subrace"
	TypeTool              = "Tool"
	TypeTrait             = "Trait"
	TypeVehicle           = "Vehicle"
	TypeWeapon            = "Weapon"
	TypeWeaponDamage      = "WeaponDamage"
	TypeWeaponProperty    = "WeaponProperty"
)

Variables

View Source
var (
	// AbilityScoreOrderFieldIndx orders AbilityScore by indx.
	AbilityScoreOrderFieldIndx = &AbilityScoreOrderField{
		Value: func(as *AbilityScore) (ent.Value, error) {
			return as.Indx, nil
		},
		column: abilityscore.FieldIndx,
		toTerm: abilityscore.ByIndx,
		toCursor: func(as *AbilityScore) Cursor {
			return Cursor{
				ID:    as.ID,
				Value: as.Indx,
			}
		},
	}
	// AbilityScoreOrderFieldName orders AbilityScore by name.
	AbilityScoreOrderFieldName = &AbilityScoreOrderField{
		Value: func(as *AbilityScore) (ent.Value, error) {
			return as.Name, nil
		},
		column: abilityscore.FieldName,
		toTerm: abilityscore.ByName,
		toCursor: func(as *AbilityScore) Cursor {
			return Cursor{
				ID:    as.ID,
				Value: as.Name,
			}
		},
	}
	// AbilityScoreOrderFieldFullName orders AbilityScore by full_name.
	AbilityScoreOrderFieldFullName = &AbilityScoreOrderField{
		Value: func(as *AbilityScore) (ent.Value, error) {
			return as.FullName, nil
		},
		column: abilityscore.FieldFullName,
		toTerm: abilityscore.ByFullName,
		toCursor: func(as *AbilityScore) Cursor {
			return Cursor{
				ID:    as.ID,
				Value: as.FullName,
			}
		},
	}
)
View Source
var (
	// ArmorOrderFieldIndx orders Armor by indx.
	ArmorOrderFieldIndx = &ArmorOrderField{
		Value: func(a *Armor) (ent.Value, error) {
			return a.Indx, nil
		},
		column: armor.FieldIndx,
		toTerm: armor.ByIndx,
		toCursor: func(a *Armor) Cursor {
			return Cursor{
				ID:    a.ID,
				Value: a.Indx,
			}
		},
	}
	// ArmorOrderFieldName orders Armor by name.
	ArmorOrderFieldName = &ArmorOrderField{
		Value: func(a *Armor) (ent.Value, error) {
			return a.Name, nil
		},
		column: armor.FieldName,
		toTerm: armor.ByName,
		toCursor: func(a *Armor) Cursor {
			return Cursor{
				ID:    a.ID,
				Value: a.Name,
			}
		},
	}
)
View Source
var (
	// ClassOrderFieldIndx orders Class by indx.
	ClassOrderFieldIndx = &ClassOrderField{
		Value: func(c *Class) (ent.Value, error) {
			return c.Indx, nil
		},
		column: class.FieldIndx,
		toTerm: class.ByIndx,
		toCursor: func(c *Class) Cursor {
			return Cursor{
				ID:    c.ID,
				Value: c.Indx,
			}
		},
	}
	// ClassOrderFieldName orders Class by name.
	ClassOrderFieldName = &ClassOrderField{
		Value: func(c *Class) (ent.Value, error) {
			return c.Name, nil
		},
		column: class.FieldName,
		toTerm: class.ByName,
		toCursor: func(c *Class) Cursor {
			return Cursor{
				ID:    c.ID,
				Value: c.Name,
			}
		},
	}
)
View Source
var (
	// DamageTypeOrderFieldIndx orders DamageType by indx.
	DamageTypeOrderFieldIndx = &DamageTypeOrderField{
		Value: func(dt *DamageType) (ent.Value, error) {
			return dt.Indx, nil
		},
		column: damagetype.FieldIndx,
		toTerm: damagetype.ByIndx,
		toCursor: func(dt *DamageType) Cursor {
			return Cursor{
				ID:    dt.ID,
				Value: dt.Indx,
			}
		},
	}
	// DamageTypeOrderFieldName orders DamageType by name.
	DamageTypeOrderFieldName = &DamageTypeOrderField{
		Value: func(dt *DamageType) (ent.Value, error) {
			return dt.Name, nil
		},
		column: damagetype.FieldName,
		toTerm: damagetype.ByName,
		toCursor: func(dt *DamageType) Cursor {
			return Cursor{
				ID:    dt.ID,
				Value: dt.Name,
			}
		},
	}
)
View Source
var (
	// EquipmentOrderFieldIndx orders Equipment by indx.
	EquipmentOrderFieldIndx = &EquipmentOrderField{
		Value: func(e *Equipment) (ent.Value, error) {
			return e.Indx, nil
		},
		column: equipment.FieldIndx,
		toTerm: equipment.ByIndx,
		toCursor: func(e *Equipment) Cursor {
			return Cursor{
				ID:    e.ID,
				Value: e.Indx,
			}
		},
	}
	// EquipmentOrderFieldName orders Equipment by name.
	EquipmentOrderFieldName = &EquipmentOrderField{
		Value: func(e *Equipment) (ent.Value, error) {
			return e.Name, nil
		},
		column: equipment.FieldName,
		toTerm: equipment.ByName,
		toCursor: func(e *Equipment) Cursor {
			return Cursor{
				ID:    e.ID,
				Value: e.Name,
			}
		},
	}
)
View Source
var (
	// GearOrderFieldIndx orders Gear by indx.
	GearOrderFieldIndx = &GearOrderField{
		Value: func(ge *Gear) (ent.Value, error) {
			return ge.Indx, nil
		},
		column: gear.FieldIndx,
		toTerm: gear.ByIndx,
		toCursor: func(ge *Gear) Cursor {
			return Cursor{
				ID:    ge.ID,
				Value: ge.Indx,
			}
		},
	}
	// GearOrderFieldName orders Gear by name.
	GearOrderFieldName = &GearOrderField{
		Value: func(ge *Gear) (ent.Value, error) {
			return ge.Name, nil
		},
		column: gear.FieldName,
		toTerm: gear.ByName,
		toCursor: func(ge *Gear) Cursor {
			return Cursor{
				ID:    ge.ID,
				Value: ge.Name,
			}
		},
	}
)
View Source
var (
	// LanguageOrderFieldIndx orders Language by indx.
	LanguageOrderFieldIndx = &LanguageOrderField{
		Value: func(l *Language) (ent.Value, error) {
			return l.Indx, nil
		},
		column: language.FieldIndx,
		toTerm: language.ByIndx,
		toCursor: func(l *Language) Cursor {
			return Cursor{
				ID:    l.ID,
				Value: l.Indx,
			}
		},
	}
	// LanguageOrderFieldName orders Language by name.
	LanguageOrderFieldName = &LanguageOrderField{
		Value: func(l *Language) (ent.Value, error) {
			return l.Name, nil
		},
		column: language.FieldName,
		toTerm: language.ByName,
		toCursor: func(l *Language) Cursor {
			return Cursor{
				ID:    l.ID,
				Value: l.Name,
			}
		},
	}
)
View Source
var (
	// MagicSchoolOrderFieldIndx orders MagicSchool by indx.
	MagicSchoolOrderFieldIndx = &MagicSchoolOrderField{
		Value: func(ms *MagicSchool) (ent.Value, error) {
			return ms.Indx, nil
		},
		column: magicschool.FieldIndx,
		toTerm: magicschool.ByIndx,
		toCursor: func(ms *MagicSchool) Cursor {
			return Cursor{
				ID:    ms.ID,
				Value: ms.Indx,
			}
		},
	}
	// MagicSchoolOrderFieldName orders MagicSchool by name.
	MagicSchoolOrderFieldName = &MagicSchoolOrderField{
		Value: func(ms *MagicSchool) (ent.Value, error) {
			return ms.Name, nil
		},
		column: magicschool.FieldName,
		toTerm: magicschool.ByName,
		toCursor: func(ms *MagicSchool) Cursor {
			return Cursor{
				ID:    ms.ID,
				Value: ms.Name,
			}
		},
	}
)
View Source
var (
	// ProficiencyOrderFieldIndx orders Proficiency by indx.
	ProficiencyOrderFieldIndx = &ProficiencyOrderField{
		Value: func(pr *Proficiency) (ent.Value, error) {
			return pr.Indx, nil
		},
		column: proficiency.FieldIndx,
		toTerm: proficiency.ByIndx,
		toCursor: func(pr *Proficiency) Cursor {
			return Cursor{
				ID:    pr.ID,
				Value: pr.Indx,
			}
		},
	}
	// ProficiencyOrderFieldName orders Proficiency by name.
	ProficiencyOrderFieldName = &ProficiencyOrderField{
		Value: func(pr *Proficiency) (ent.Value, error) {
			return pr.Name, nil
		},
		column: proficiency.FieldName,
		toTerm: proficiency.ByName,
		toCursor: func(pr *Proficiency) Cursor {
			return Cursor{
				ID:    pr.ID,
				Value: pr.Name,
			}
		},
	}
)
View Source
var (
	// RaceOrderFieldIndx orders Race by indx.
	RaceOrderFieldIndx = &RaceOrderField{
		Value: func(r *Race) (ent.Value, error) {
			return r.Indx, nil
		},
		column: race.FieldIndx,
		toTerm: race.ByIndx,
		toCursor: func(r *Race) Cursor {
			return Cursor{
				ID:    r.ID,
				Value: r.Indx,
			}
		},
	}
	// RaceOrderFieldName orders Race by name.
	RaceOrderFieldName = &RaceOrderField{
		Value: func(r *Race) (ent.Value, error) {
			return r.Name, nil
		},
		column: race.FieldName,
		toTerm: race.ByName,
		toCursor: func(r *Race) Cursor {
			return Cursor{
				ID:    r.ID,
				Value: r.Name,
			}
		},
	}
)
View Source
var (
	// RuleOrderFieldIndx orders Rule by indx.
	RuleOrderFieldIndx = &RuleOrderField{
		Value: func(r *Rule) (ent.Value, error) {
			return r.Indx, nil
		},
		column: rule.FieldIndx,
		toTerm: rule.ByIndx,
		toCursor: func(r *Rule) Cursor {
			return Cursor{
				ID:    r.ID,
				Value: r.Indx,
			}
		},
	}
	// RuleOrderFieldName orders Rule by name.
	RuleOrderFieldName = &RuleOrderField{
		Value: func(r *Rule) (ent.Value, error) {
			return r.Name, nil
		},
		column: rule.FieldName,
		toTerm: rule.ByName,
		toCursor: func(r *Rule) Cursor {
			return Cursor{
				ID:    r.ID,
				Value: r.Name,
			}
		},
	}
)
View Source
var (
	// RuleSectionOrderFieldIndx orders RuleSection by indx.
	RuleSectionOrderFieldIndx = &RuleSectionOrderField{
		Value: func(rs *RuleSection) (ent.Value, error) {
			return rs.Indx, nil
		},
		column: rulesection.FieldIndx,
		toTerm: rulesection.ByIndx,
		toCursor: func(rs *RuleSection) Cursor {
			return Cursor{
				ID:    rs.ID,
				Value: rs.Indx,
			}
		},
	}
	// RuleSectionOrderFieldName orders RuleSection by name.
	RuleSectionOrderFieldName = &RuleSectionOrderField{
		Value: func(rs *RuleSection) (ent.Value, error) {
			return rs.Name, nil
		},
		column: rulesection.FieldName,
		toTerm: rulesection.ByName,
		toCursor: func(rs *RuleSection) Cursor {
			return Cursor{
				ID:    rs.ID,
				Value: rs.Name,
			}
		},
	}
)
View Source
var (
	// SkillOrderFieldIndx orders Skill by indx.
	SkillOrderFieldIndx = &SkillOrderField{
		Value: func(s *Skill) (ent.Value, error) {
			return s.Indx, nil
		},
		column: skill.FieldIndx,
		toTerm: skill.ByIndx,
		toCursor: func(s *Skill) Cursor {
			return Cursor{
				ID:    s.ID,
				Value: s.Indx,
			}
		},
	}
	// SkillOrderFieldName orders Skill by name.
	SkillOrderFieldName = &SkillOrderField{
		Value: func(s *Skill) (ent.Value, error) {
			return s.Name, nil
		},
		column: skill.FieldName,
		toTerm: skill.ByName,
		toCursor: func(s *Skill) Cursor {
			return Cursor{
				ID:    s.ID,
				Value: s.Name,
			}
		},
	}
)
View Source
var (
	// SubraceOrderFieldIndx orders Subrace by indx.
	SubraceOrderFieldIndx = &SubraceOrderField{
		Value: func(s *Subrace) (ent.Value, error) {
			return s.Indx, nil
		},
		column: subrace.FieldIndx,
		toTerm: subrace.ByIndx,
		toCursor: func(s *Subrace) Cursor {
			return Cursor{
				ID:    s.ID,
				Value: s.Indx,
			}
		},
	}
	// SubraceOrderFieldName orders Subrace by name.
	SubraceOrderFieldName = &SubraceOrderField{
		Value: func(s *Subrace) (ent.Value, error) {
			return s.Name, nil
		},
		column: subrace.FieldName,
		toTerm: subrace.ByName,
		toCursor: func(s *Subrace) Cursor {
			return Cursor{
				ID:    s.ID,
				Value: s.Name,
			}
		},
	}
)
View Source
var (
	// ToolOrderFieldIndx orders Tool by indx.
	ToolOrderFieldIndx = &ToolOrderField{
		Value: func(t *Tool) (ent.Value, error) {
			return t.Indx, nil
		},
		column: tool.FieldIndx,
		toTerm: tool.ByIndx,
		toCursor: func(t *Tool) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.Indx,
			}
		},
	}
	// ToolOrderFieldName orders Tool by name.
	ToolOrderFieldName = &ToolOrderField{
		Value: func(t *Tool) (ent.Value, error) {
			return t.Name, nil
		},
		column: tool.FieldName,
		toTerm: tool.ByName,
		toCursor: func(t *Tool) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.Name,
			}
		},
	}
)
View Source
var (
	// TraitOrderFieldIndx orders Trait by indx.
	TraitOrderFieldIndx = &TraitOrderField{
		Value: func(t *Trait) (ent.Value, error) {
			return t.Indx, nil
		},
		column: trait.FieldIndx,
		toTerm: trait.ByIndx,
		toCursor: func(t *Trait) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.Indx,
			}
		},
	}
	// TraitOrderFieldName orders Trait by name.
	TraitOrderFieldName = &TraitOrderField{
		Value: func(t *Trait) (ent.Value, error) {
			return t.Name, nil
		},
		column: trait.FieldName,
		toTerm: trait.ByName,
		toCursor: func(t *Trait) Cursor {
			return Cursor{
				ID:    t.ID,
				Value: t.Name,
			}
		},
	}
)
View Source
var (
	// VehicleOrderFieldIndx orders Vehicle by indx.
	VehicleOrderFieldIndx = &VehicleOrderField{
		Value: func(v *Vehicle) (ent.Value, error) {
			return v.Indx, nil
		},
		column: vehicle.FieldIndx,
		toTerm: vehicle.ByIndx,
		toCursor: func(v *Vehicle) Cursor {
			return Cursor{
				ID:    v.ID,
				Value: v.Indx,
			}
		},
	}
	// VehicleOrderFieldName orders Vehicle by name.
	VehicleOrderFieldName = &VehicleOrderField{
		Value: func(v *Vehicle) (ent.Value, error) {
			return v.Name, nil
		},
		column: vehicle.FieldName,
		toTerm: vehicle.ByName,
		toCursor: func(v *Vehicle) Cursor {
			return Cursor{
				ID:    v.ID,
				Value: v.Name,
			}
		},
	}
)
View Source
var (
	// WeaponOrderFieldIndx orders Weapon by indx.
	WeaponOrderFieldIndx = &WeaponOrderField{
		Value: func(w *Weapon) (ent.Value, error) {
			return w.Indx, nil
		},
		column: weapon.FieldIndx,
		toTerm: weapon.ByIndx,
		toCursor: func(w *Weapon) Cursor {
			return Cursor{
				ID:    w.ID,
				Value: w.Indx,
			}
		},
	}
	// WeaponOrderFieldName orders Weapon by name.
	WeaponOrderFieldName = &WeaponOrderField{
		Value: func(w *Weapon) (ent.Value, error) {
			return w.Name, nil
		},
		column: weapon.FieldName,
		toTerm: weapon.ByName,
		toCursor: func(w *Weapon) Cursor {
			return Cursor{
				ID:    w.ID,
				Value: w.Name,
			}
		},
	}
)
View Source
var (
	// WeaponPropertyOrderFieldIndx orders WeaponProperty by indx.
	WeaponPropertyOrderFieldIndx = &WeaponPropertyOrderField{
		Value: func(wp *WeaponProperty) (ent.Value, error) {
			return wp.Indx, nil
		},
		column: weaponproperty.FieldIndx,
		toTerm: weaponproperty.ByIndx,
		toCursor: func(wp *WeaponProperty) Cursor {
			return Cursor{
				ID:    wp.ID,
				Value: wp.Indx,
			}
		},
	}
	// WeaponPropertyOrderFieldName orders WeaponProperty by name.
	WeaponPropertyOrderFieldName = &WeaponPropertyOrderField{
		Value: func(wp *WeaponProperty) (ent.Value, error) {
			return wp.Name, nil
		},
		column: weaponproperty.FieldName,
		toTerm: weaponproperty.ByName,
		toCursor: func(wp *WeaponProperty) Cursor {
			return Cursor{
				ID:    wp.ID,
				Value: wp.Name,
			}
		},
	}
)
View Source
var DefaultAbilityBonusOrder = &AbilityBonusOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &AbilityBonusOrderField{
		Value: func(ab *AbilityBonus) (ent.Value, error) {
			return ab.ID, nil
		},
		column: abilitybonus.FieldID,
		toTerm: abilitybonus.ByID,
		toCursor: func(ab *AbilityBonus) Cursor {
			return Cursor{ID: ab.ID}
		},
	},
}

DefaultAbilityBonusOrder is the default ordering of AbilityBonus.

View Source
var DefaultAbilityScoreOrder = &AbilityScoreOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &AbilityScoreOrderField{
		Value: func(as *AbilityScore) (ent.Value, error) {
			return as.ID, nil
		},
		column: abilityscore.FieldID,
		toTerm: abilityscore.ByID,
		toCursor: func(as *AbilityScore) Cursor {
			return Cursor{ID: as.ID}
		},
	},
}

DefaultAbilityScoreOrder is the default ordering of AbilityScore.

View Source
var DefaultArmorClassOrder = &ArmorClassOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &ArmorClassOrderField{
		Value: func(ac *ArmorClass) (ent.Value, error) {
			return ac.ID, nil
		},
		column: armorclass.FieldID,
		toTerm: armorclass.ByID,
		toCursor: func(ac *ArmorClass) Cursor {
			return Cursor{ID: ac.ID}
		},
	},
}

DefaultArmorClassOrder is the default ordering of ArmorClass.

View Source
var DefaultArmorOrder = &ArmorOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &ArmorOrderField{
		Value: func(a *Armor) (ent.Value, error) {
			return a.ID, nil
		},
		column: armor.FieldID,
		toTerm: armor.ByID,
		toCursor: func(a *Armor) Cursor {
			return Cursor{ID: a.ID}
		},
	},
}

DefaultArmorOrder is the default ordering of Armor.

View Source
var DefaultClassOrder = &ClassOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &ClassOrderField{
		Value: func(c *Class) (ent.Value, error) {
			return c.ID, nil
		},
		column: class.FieldID,
		toTerm: class.ByID,
		toCursor: func(c *Class) Cursor {
			return Cursor{ID: c.ID}
		},
	},
}

DefaultClassOrder is the default ordering of Class.

View Source
var DefaultCoinOrder = &CoinOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &CoinOrderField{
		Value: func(c *Coin) (ent.Value, error) {
			return c.ID, nil
		},
		column: coin.FieldID,
		toTerm: coin.ByID,
		toCursor: func(c *Coin) Cursor {
			return Cursor{ID: c.ID}
		},
	},
}

DefaultCoinOrder is the default ordering of Coin.

View Source
var DefaultDamageTypeOrder = &DamageTypeOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &DamageTypeOrderField{
		Value: func(dt *DamageType) (ent.Value, error) {
			return dt.ID, nil
		},
		column: damagetype.FieldID,
		toTerm: damagetype.ByID,
		toCursor: func(dt *DamageType) Cursor {
			return Cursor{ID: dt.ID}
		},
	},
}

DefaultDamageTypeOrder is the default ordering of DamageType.

View Source
var DefaultEquipmentCategoryOrder = &EquipmentCategoryOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &EquipmentCategoryOrderField{
		Value: func(ec *EquipmentCategory) (ent.Value, error) {
			return ec.ID, nil
		},
		column: equipmentcategory.FieldID,
		toTerm: equipmentcategory.ByID,
		toCursor: func(ec *EquipmentCategory) Cursor {
			return Cursor{ID: ec.ID}
		},
	},
}

DefaultEquipmentCategoryOrder is the default ordering of EquipmentCategory.

View Source
var DefaultEquipmentChoiceOrder = &EquipmentChoiceOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &EquipmentChoiceOrderField{
		Value: func(ec *EquipmentChoice) (ent.Value, error) {
			return ec.ID, nil
		},
		column: equipmentchoice.FieldID,
		toTerm: equipmentchoice.ByID,
		toCursor: func(ec *EquipmentChoice) Cursor {
			return Cursor{ID: ec.ID}
		},
	},
}

DefaultEquipmentChoiceOrder is the default ordering of EquipmentChoice.

View Source
var DefaultEquipmentCostOrder = &EquipmentCostOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &EquipmentCostOrderField{
		Value: func(ec *EquipmentCost) (ent.Value, error) {
			return ec.ID, nil
		},
		column: equipmentcost.FieldID,
		toTerm: equipmentcost.ByID,
		toCursor: func(ec *EquipmentCost) Cursor {
			return Cursor{ID: ec.ID}
		},
	},
}

DefaultEquipmentCostOrder is the default ordering of EquipmentCost.

View Source
var DefaultEquipmentOrder = &EquipmentOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &EquipmentOrderField{
		Value: func(e *Equipment) (ent.Value, error) {
			return e.ID, nil
		},
		column: equipment.FieldID,
		toTerm: equipment.ByID,
		toCursor: func(e *Equipment) Cursor {
			return Cursor{ID: e.ID}
		},
	},
}

DefaultEquipmentOrder is the default ordering of Equipment.

View Source
var DefaultGearOrder = &GearOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &GearOrderField{
		Value: func(ge *Gear) (ent.Value, error) {
			return ge.ID, nil
		},
		column: gear.FieldID,
		toTerm: gear.ByID,
		toCursor: func(ge *Gear) Cursor {
			return Cursor{ID: ge.ID}
		},
	},
}

DefaultGearOrder is the default ordering of Gear.

View Source
var DefaultLanguageOrder = &LanguageOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &LanguageOrderField{
		Value: func(l *Language) (ent.Value, error) {
			return l.ID, nil
		},
		column: language.FieldID,
		toTerm: language.ByID,
		toCursor: func(l *Language) Cursor {
			return Cursor{ID: l.ID}
		},
	},
}

DefaultLanguageOrder is the default ordering of Language.

View Source
var DefaultMagicSchoolOrder = &MagicSchoolOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &MagicSchoolOrderField{
		Value: func(ms *MagicSchool) (ent.Value, error) {
			return ms.ID, nil
		},
		column: magicschool.FieldID,
		toTerm: magicschool.ByID,
		toCursor: func(ms *MagicSchool) Cursor {
			return Cursor{ID: ms.ID}
		},
	},
}

DefaultMagicSchoolOrder is the default ordering of MagicSchool.

View Source
var DefaultProficiencyChoiceOrder = &ProficiencyChoiceOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &ProficiencyChoiceOrderField{
		Value: func(pc *ProficiencyChoice) (ent.Value, error) {
			return pc.ID, nil
		},
		column: proficiencychoice.FieldID,
		toTerm: proficiencychoice.ByID,
		toCursor: func(pc *ProficiencyChoice) Cursor {
			return Cursor{ID: pc.ID}
		},
	},
}

DefaultProficiencyChoiceOrder is the default ordering of ProficiencyChoice.

View Source
var DefaultProficiencyOrder = &ProficiencyOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &ProficiencyOrderField{
		Value: func(pr *Proficiency) (ent.Value, error) {
			return pr.ID, nil
		},
		column: proficiency.FieldID,
		toTerm: proficiency.ByID,
		toCursor: func(pr *Proficiency) Cursor {
			return Cursor{ID: pr.ID}
		},
	},
}

DefaultProficiencyOrder is the default ordering of Proficiency.

View Source
var DefaultRaceOrder = &RaceOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &RaceOrderField{
		Value: func(r *Race) (ent.Value, error) {
			return r.ID, nil
		},
		column: race.FieldID,
		toTerm: race.ByID,
		toCursor: func(r *Race) Cursor {
			return Cursor{ID: r.ID}
		},
	},
}

DefaultRaceOrder is the default ordering of Race.

View Source
var DefaultRuleOrder = &RuleOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &RuleOrderField{
		Value: func(r *Rule) (ent.Value, error) {
			return r.ID, nil
		},
		column: rule.FieldID,
		toTerm: rule.ByID,
		toCursor: func(r *Rule) Cursor {
			return Cursor{ID: r.ID}
		},
	},
}

DefaultRuleOrder is the default ordering of Rule.

View Source
var DefaultRuleSectionOrder = &RuleSectionOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &RuleSectionOrderField{
		Value: func(rs *RuleSection) (ent.Value, error) {
			return rs.ID, nil
		},
		column: rulesection.FieldID,
		toTerm: rulesection.ByID,
		toCursor: func(rs *RuleSection) Cursor {
			return Cursor{ID: rs.ID}
		},
	},
}

DefaultRuleSectionOrder is the default ordering of RuleSection.

View Source
var DefaultSkillOrder = &SkillOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &SkillOrderField{
		Value: func(s *Skill) (ent.Value, error) {
			return s.ID, nil
		},
		column: skill.FieldID,
		toTerm: skill.ByID,
		toCursor: func(s *Skill) Cursor {
			return Cursor{ID: s.ID}
		},
	},
}

DefaultSkillOrder is the default ordering of Skill.

View Source
var DefaultSubraceOrder = &SubraceOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &SubraceOrderField{
		Value: func(s *Subrace) (ent.Value, error) {
			return s.ID, nil
		},
		column: subrace.FieldID,
		toTerm: subrace.ByID,
		toCursor: func(s *Subrace) Cursor {
			return Cursor{ID: s.ID}
		},
	},
}

DefaultSubraceOrder is the default ordering of Subrace.

View Source
var DefaultToolOrder = &ToolOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &ToolOrderField{
		Value: func(t *Tool) (ent.Value, error) {
			return t.ID, nil
		},
		column: tool.FieldID,
		toTerm: tool.ByID,
		toCursor: func(t *Tool) Cursor {
			return Cursor{ID: t.ID}
		},
	},
}

DefaultToolOrder is the default ordering of Tool.

View Source
var DefaultTraitOrder = &TraitOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &TraitOrderField{
		Value: func(t *Trait) (ent.Value, error) {
			return t.ID, nil
		},
		column: trait.FieldID,
		toTerm: trait.ByID,
		toCursor: func(t *Trait) Cursor {
			return Cursor{ID: t.ID}
		},
	},
}

DefaultTraitOrder is the default ordering of Trait.

View Source
var DefaultVehicleOrder = &VehicleOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &VehicleOrderField{
		Value: func(v *Vehicle) (ent.Value, error) {
			return v.ID, nil
		},
		column: vehicle.FieldID,
		toTerm: vehicle.ByID,
		toCursor: func(v *Vehicle) Cursor {
			return Cursor{ID: v.ID}
		},
	},
}

DefaultVehicleOrder is the default ordering of Vehicle.

View Source
var DefaultWeaponDamageOrder = &WeaponDamageOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &WeaponDamageOrderField{
		Value: func(wd *WeaponDamage) (ent.Value, error) {
			return wd.ID, nil
		},
		column: weapondamage.FieldID,
		toTerm: weapondamage.ByID,
		toCursor: func(wd *WeaponDamage) Cursor {
			return Cursor{ID: wd.ID}
		},
	},
}

DefaultWeaponDamageOrder is the default ordering of WeaponDamage.

View Source
var DefaultWeaponOrder = &WeaponOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &WeaponOrderField{
		Value: func(w *Weapon) (ent.Value, error) {
			return w.ID, nil
		},
		column: weapon.FieldID,
		toTerm: weapon.ByID,
		toCursor: func(w *Weapon) Cursor {
			return Cursor{ID: w.ID}
		},
	},
}

DefaultWeaponOrder is the default ordering of Weapon.

View Source
var DefaultWeaponPropertyOrder = &WeaponPropertyOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &WeaponPropertyOrderField{
		Value: func(wp *WeaponProperty) (ent.Value, error) {
			return wp.ID, nil
		},
		column: weaponproperty.FieldID,
		toTerm: weaponproperty.ByID,
		toCursor: func(wp *WeaponProperty) Cursor {
			return Cursor{ID: wp.ID}
		},
	},
}

DefaultWeaponPropertyOrder is the default ordering of WeaponProperty.

View Source
var ErrEmptyAbilityBonusWhereInput = errors.New("ent: empty predicate AbilityBonusWhereInput")

ErrEmptyAbilityBonusWhereInput is returned in case the AbilityBonusWhereInput is empty.

View Source
var ErrEmptyAbilityScoreWhereInput = errors.New("ent: empty predicate AbilityScoreWhereInput")

ErrEmptyAbilityScoreWhereInput is returned in case the AbilityScoreWhereInput is empty.

View Source
var ErrEmptyArmorClassWhereInput = errors.New("ent: empty predicate ArmorClassWhereInput")

ErrEmptyArmorClassWhereInput is returned in case the ArmorClassWhereInput is empty.

View Source
var ErrEmptyArmorWhereInput = errors.New("ent: empty predicate ArmorWhereInput")

ErrEmptyArmorWhereInput is returned in case the ArmorWhereInput is empty.

View Source
var ErrEmptyClassWhereInput = errors.New("ent: empty predicate ClassWhereInput")

ErrEmptyClassWhereInput is returned in case the ClassWhereInput is empty.

View Source
var ErrEmptyCoinWhereInput = errors.New("ent: empty predicate CoinWhereInput")

ErrEmptyCoinWhereInput is returned in case the CoinWhereInput is empty.

View Source
var ErrEmptyDamageTypeWhereInput = errors.New("ent: empty predicate DamageTypeWhereInput")

ErrEmptyDamageTypeWhereInput is returned in case the DamageTypeWhereInput is empty.

View Source
var ErrEmptyEquipmentCategoryWhereInput = errors.New("ent: empty predicate EquipmentCategoryWhereInput")

ErrEmptyEquipmentCategoryWhereInput is returned in case the EquipmentCategoryWhereInput is empty.

View Source
var ErrEmptyEquipmentChoiceWhereInput = errors.New("ent: empty predicate EquipmentChoiceWhereInput")

ErrEmptyEquipmentChoiceWhereInput is returned in case the EquipmentChoiceWhereInput is empty.

View Source
var ErrEmptyEquipmentCostWhereInput = errors.New("ent: empty predicate EquipmentCostWhereInput")

ErrEmptyEquipmentCostWhereInput is returned in case the EquipmentCostWhereInput is empty.

View Source
var ErrEmptyEquipmentWhereInput = errors.New("ent: empty predicate EquipmentWhereInput")

ErrEmptyEquipmentWhereInput is returned in case the EquipmentWhereInput is empty.

View Source
var ErrEmptyGearWhereInput = errors.New("ent: empty predicate GearWhereInput")

ErrEmptyGearWhereInput is returned in case the GearWhereInput is empty.

View Source
var ErrEmptyLanguageWhereInput = errors.New("ent: empty predicate LanguageWhereInput")

ErrEmptyLanguageWhereInput is returned in case the LanguageWhereInput is empty.

View Source
var ErrEmptyMagicSchoolWhereInput = errors.New("ent: empty predicate MagicSchoolWhereInput")

ErrEmptyMagicSchoolWhereInput is returned in case the MagicSchoolWhereInput is empty.

View Source
var ErrEmptyProficiencyChoiceWhereInput = errors.New("ent: empty predicate ProficiencyChoiceWhereInput")

ErrEmptyProficiencyChoiceWhereInput is returned in case the ProficiencyChoiceWhereInput is empty.

View Source
var ErrEmptyProficiencyWhereInput = errors.New("ent: empty predicate ProficiencyWhereInput")

ErrEmptyProficiencyWhereInput is returned in case the ProficiencyWhereInput is empty.

View Source
var ErrEmptyRaceWhereInput = errors.New("ent: empty predicate RaceWhereInput")

ErrEmptyRaceWhereInput is returned in case the RaceWhereInput is empty.

View Source
var ErrEmptyRuleSectionWhereInput = errors.New("ent: empty predicate RuleSectionWhereInput")

ErrEmptyRuleSectionWhereInput is returned in case the RuleSectionWhereInput is empty.

View Source
var ErrEmptyRuleWhereInput = errors.New("ent: empty predicate RuleWhereInput")

ErrEmptyRuleWhereInput is returned in case the RuleWhereInput is empty.

View Source
var ErrEmptySkillWhereInput = errors.New("ent: empty predicate SkillWhereInput")

ErrEmptySkillWhereInput is returned in case the SkillWhereInput is empty.

View Source
var ErrEmptySubraceWhereInput = errors.New("ent: empty predicate SubraceWhereInput")

ErrEmptySubraceWhereInput is returned in case the SubraceWhereInput is empty.

View Source
var ErrEmptyToolWhereInput = errors.New("ent: empty predicate ToolWhereInput")

ErrEmptyToolWhereInput is returned in case the ToolWhereInput is empty.

View Source
var ErrEmptyTraitWhereInput = errors.New("ent: empty predicate TraitWhereInput")

ErrEmptyTraitWhereInput is returned in case the TraitWhereInput is empty.

View Source
var ErrEmptyVehicleWhereInput = errors.New("ent: empty predicate VehicleWhereInput")

ErrEmptyVehicleWhereInput is returned in case the VehicleWhereInput is empty.

View Source
var ErrEmptyWeaponDamageWhereInput = errors.New("ent: empty predicate WeaponDamageWhereInput")

ErrEmptyWeaponDamageWhereInput is returned in case the WeaponDamageWhereInput is empty.

View Source
var ErrEmptyWeaponPropertyWhereInput = errors.New("ent: empty predicate WeaponPropertyWhereInput")

ErrEmptyWeaponPropertyWhereInput is returned in case the WeaponPropertyWhereInput is empty.

View Source
var ErrEmptyWeaponWhereInput = errors.New("ent: empty predicate WeaponWhereInput")

ErrEmptyWeaponWhereInput is returned in case the WeaponWhereInput is empty.

Functions

func Asc

func Asc(fields ...string) func(*sql.Selector)

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) func(*sql.Selector)

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

IsConstraintError returns a boolean indicating whether the error is a constraint failure.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns a boolean indicating whether the error is a not found error.

func IsNotLoaded

func IsNotLoaded(err error) bool

IsNotLoaded returns a boolean indicating whether the error is a not loaded error.

func IsNotSingular

func IsNotSingular(err error) bool

IsNotSingular returns a boolean indicating whether the error is a not singular error.

func IsValidationError

func IsValidationError(err error) bool

IsValidationError returns a boolean indicating whether the error is a validation error.

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

func NewContext(parent context.Context, c *Client) context.Context

NewContext returns a new context with the given Client attached.

func NewTxContext

func NewTxContext(parent context.Context, tx *Tx) context.Context

NewTxContext returns a new context with the given Tx attached.

func OpenTxFromContext

func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)

OpenTxFromContext open transactions from client stored in context.

func ServeEntviz

func ServeEntviz() http.Handler

Types

type AbilityBonus

type AbilityBonus struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// AbilityScoreID holds the value of the "ability_score_id" field.
	AbilityScoreID int `json:"ability_score_id,omitempty"`
	// Bonus holds the value of the "bonus" field.
	Bonus int `json:"bonus,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AbilityBonusQuery when eager-loading is set.
	Edges AbilityBonusEdges `json:"-"`
	// contains filtered or unexported fields
}

AbilityBonus is the model entity for the AbilityBonus schema.

func (*AbilityBonus) AbilityScore

func (ab *AbilityBonus) AbilityScore(ctx context.Context) (*AbilityScore, error)

func (*AbilityBonus) IsNode

func (n *AbilityBonus) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*AbilityBonus) MarshalJSON

func (ab *AbilityBonus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*AbilityBonus) Node

func (ab *AbilityBonus) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*AbilityBonus) QueryAbilityScore

func (ab *AbilityBonus) QueryAbilityScore() *AbilityScoreQuery

QueryAbilityScore queries the "ability_score" edge of the AbilityBonus entity.

func (*AbilityBonus) QueryRace

func (ab *AbilityBonus) QueryRace() *RaceQuery

QueryRace queries the "race" edge of the AbilityBonus entity.

func (*AbilityBonus) QuerySubrace

func (ab *AbilityBonus) QuerySubrace() *SubraceQuery

QuerySubrace queries the "subrace" edge of the AbilityBonus entity.

func (*AbilityBonus) Race

func (ab *AbilityBonus) Race(ctx context.Context) (*Race, error)

func (*AbilityBonus) String

func (ab *AbilityBonus) String() string

String implements the fmt.Stringer.

func (*AbilityBonus) Subrace

func (ab *AbilityBonus) Subrace(ctx context.Context) (*Subrace, error)

func (*AbilityBonus) ToEdge

func (ab *AbilityBonus) ToEdge(order *AbilityBonusOrder) *AbilityBonusEdge

ToEdge converts AbilityBonus into AbilityBonusEdge.

func (*AbilityBonus) UnmarshalJSON

func (ab *AbilityBonus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*AbilityBonus) Unwrap

func (ab *AbilityBonus) Unwrap() *AbilityBonus

Unwrap unwraps the AbilityBonus entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*AbilityBonus) Update

func (ab *AbilityBonus) Update() *AbilityBonusUpdateOne

Update returns a builder for updating this AbilityBonus. Note that you need to call AbilityBonus.Unwrap() before calling this method if this AbilityBonus was returned from a transaction, and the transaction was committed or rolled back.

func (*AbilityBonus) Value

func (ab *AbilityBonus) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the AbilityBonus. This includes values selected through modifiers, order, etc.

type AbilityBonusClient

type AbilityBonusClient struct {
	// contains filtered or unexported fields
}

AbilityBonusClient is a client for the AbilityBonus schema.

func NewAbilityBonusClient

func NewAbilityBonusClient(c config) *AbilityBonusClient

NewAbilityBonusClient returns a client for the AbilityBonus from the given config.

func (*AbilityBonusClient) Create

Create returns a builder for creating a AbilityBonus entity.

func (*AbilityBonusClient) CreateBulk

func (c *AbilityBonusClient) CreateBulk(builders ...*AbilityBonusCreate) *AbilityBonusCreateBulk

CreateBulk returns a builder for creating a bulk of AbilityBonus entities.

func (*AbilityBonusClient) Delete

Delete returns a delete builder for AbilityBonus.

func (*AbilityBonusClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AbilityBonusClient) DeleteOneID

func (c *AbilityBonusClient) DeleteOneID(id int) *AbilityBonusDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*AbilityBonusClient) Get

Get returns a AbilityBonus entity by its id.

func (*AbilityBonusClient) GetX

GetX is like Get, but panics if an error occurs.

func (*AbilityBonusClient) Hooks

func (c *AbilityBonusClient) Hooks() []Hook

Hooks returns the client hooks.

func (*AbilityBonusClient) Intercept

func (c *AbilityBonusClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `abilitybonus.Intercept(f(g(h())))`.

func (*AbilityBonusClient) Interceptors

func (c *AbilityBonusClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*AbilityBonusClient) Query

Query returns a query builder for AbilityBonus.

func (*AbilityBonusClient) QueryAbilityScore

func (c *AbilityBonusClient) QueryAbilityScore(ab *AbilityBonus) *AbilityScoreQuery

QueryAbilityScore queries the ability_score edge of a AbilityBonus.

func (*AbilityBonusClient) QueryRace

func (c *AbilityBonusClient) QueryRace(ab *AbilityBonus) *RaceQuery

QueryRace queries the race edge of a AbilityBonus.

func (*AbilityBonusClient) QuerySubrace

func (c *AbilityBonusClient) QuerySubrace(ab *AbilityBonus) *SubraceQuery

QuerySubrace queries the subrace edge of a AbilityBonus.

func (*AbilityBonusClient) Update

Update returns an update builder for AbilityBonus.

func (*AbilityBonusClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*AbilityBonusClient) UpdateOneID

func (c *AbilityBonusClient) UpdateOneID(id int) *AbilityBonusUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AbilityBonusClient) Use

func (c *AbilityBonusClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `abilitybonus.Hooks(f(g(h())))`.

type AbilityBonusConnection

type AbilityBonusConnection struct {
	Edges      []*AbilityBonusEdge `json:"edges"`
	PageInfo   PageInfo            `json:"pageInfo"`
	TotalCount int                 `json:"totalCount"`
}

AbilityBonusConnection is the connection containing edges to AbilityBonus.

type AbilityBonusCreate

type AbilityBonusCreate struct {
	// contains filtered or unexported fields
}

AbilityBonusCreate is the builder for creating a AbilityBonus entity.

func (*AbilityBonusCreate) Exec

func (abc *AbilityBonusCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AbilityBonusCreate) ExecX

func (abc *AbilityBonusCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AbilityBonusCreate) Mutation

func (abc *AbilityBonusCreate) Mutation() *AbilityBonusMutation

Mutation returns the AbilityBonusMutation object of the builder.

func (*AbilityBonusCreate) Save

Save creates the AbilityBonus in the database.

func (*AbilityBonusCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*AbilityBonusCreate) SetAbilityBonus

func (abc *AbilityBonusCreate) SetAbilityBonus(input *AbilityBonus) *AbilityBonusCreate

func (*AbilityBonusCreate) SetAbilityScore

func (abc *AbilityBonusCreate) SetAbilityScore(a *AbilityScore) *AbilityBonusCreate

SetAbilityScore sets the "ability_score" edge to the AbilityScore entity.

func (*AbilityBonusCreate) SetAbilityScoreID

func (abc *AbilityBonusCreate) SetAbilityScoreID(i int) *AbilityBonusCreate

SetAbilityScoreID sets the "ability_score_id" field.

func (*AbilityBonusCreate) SetBonus

func (abc *AbilityBonusCreate) SetBonus(i int) *AbilityBonusCreate

SetBonus sets the "bonus" field.

func (*AbilityBonusCreate) SetNillableRaceID

func (abc *AbilityBonusCreate) SetNillableRaceID(id *int) *AbilityBonusCreate

SetNillableRaceID sets the "race" edge to the Race entity by ID if the given value is not nil.

func (*AbilityBonusCreate) SetNillableSubraceID

func (abc *AbilityBonusCreate) SetNillableSubraceID(id *int) *AbilityBonusCreate

SetNillableSubraceID sets the "subrace" edge to the Subrace entity by ID if the given value is not nil.

func (*AbilityBonusCreate) SetRace

func (abc *AbilityBonusCreate) SetRace(r *Race) *AbilityBonusCreate

SetRace sets the "race" edge to the Race entity.

func (*AbilityBonusCreate) SetRaceID

func (abc *AbilityBonusCreate) SetRaceID(id int) *AbilityBonusCreate

SetRaceID sets the "race" edge to the Race entity by ID.

func (*AbilityBonusCreate) SetSubrace

func (abc *AbilityBonusCreate) SetSubrace(s *Subrace) *AbilityBonusCreate

SetSubrace sets the "subrace" edge to the Subrace entity.

func (*AbilityBonusCreate) SetSubraceID

func (abc *AbilityBonusCreate) SetSubraceID(id int) *AbilityBonusCreate

SetSubraceID sets the "subrace" edge to the Subrace entity by ID.

type AbilityBonusCreateBulk

type AbilityBonusCreateBulk struct {
	// contains filtered or unexported fields
}

AbilityBonusCreateBulk is the builder for creating many AbilityBonus entities in bulk.

func (*AbilityBonusCreateBulk) Exec

func (abcb *AbilityBonusCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AbilityBonusCreateBulk) ExecX

func (abcb *AbilityBonusCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AbilityBonusCreateBulk) Save

Save creates the AbilityBonus entities in the database.

func (*AbilityBonusCreateBulk) SaveX

func (abcb *AbilityBonusCreateBulk) SaveX(ctx context.Context) []*AbilityBonus

SaveX is like Save, but panics if an error occurs.

type AbilityBonusDelete

type AbilityBonusDelete struct {
	// contains filtered or unexported fields
}

AbilityBonusDelete is the builder for deleting a AbilityBonus entity.

func (*AbilityBonusDelete) Exec

func (abd *AbilityBonusDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*AbilityBonusDelete) ExecX

func (abd *AbilityBonusDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*AbilityBonusDelete) Where

Where appends a list predicates to the AbilityBonusDelete builder.

type AbilityBonusDeleteOne

type AbilityBonusDeleteOne struct {
	// contains filtered or unexported fields
}

AbilityBonusDeleteOne is the builder for deleting a single AbilityBonus entity.

func (*AbilityBonusDeleteOne) Exec

func (abdo *AbilityBonusDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AbilityBonusDeleteOne) ExecX

func (abdo *AbilityBonusDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AbilityBonusDeleteOne) Where

Where appends a list predicates to the AbilityBonusDelete builder.

type AbilityBonusEdge

type AbilityBonusEdge struct {
	Node   *AbilityBonus `json:"node"`
	Cursor Cursor        `json:"cursor"`
}

AbilityBonusEdge is the edge representation of AbilityBonus.

type AbilityBonusEdges

type AbilityBonusEdges struct {
	// AbilityScore holds the value of the ability_score edge.
	AbilityScore *AbilityScore `json:"ability_score,omitempty"`
	// Race holds the value of the race edge.
	Race *Race `json:"race,omitempty"`
	// Subrace holds the value of the subrace edge.
	Subrace *Subrace `json:"subrace,omitempty"`
	// contains filtered or unexported fields
}

AbilityBonusEdges holds the relations/edges for other nodes in the graph.

func (AbilityBonusEdges) AbilityScoreOrErr

func (e AbilityBonusEdges) AbilityScoreOrErr() (*AbilityScore, error)

AbilityScoreOrErr returns the AbilityScore value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (AbilityBonusEdges) RaceOrErr

func (e AbilityBonusEdges) RaceOrErr() (*Race, error)

RaceOrErr returns the Race value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (AbilityBonusEdges) SubraceOrErr

func (e AbilityBonusEdges) SubraceOrErr() (*Subrace, error)

SubraceOrErr returns the Subrace value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type AbilityBonusGroupBy

type AbilityBonusGroupBy struct {
	// contains filtered or unexported fields
}

AbilityBonusGroupBy is the group-by builder for AbilityBonus entities.

func (*AbilityBonusGroupBy) Aggregate

func (abgb *AbilityBonusGroupBy) Aggregate(fns ...AggregateFunc) *AbilityBonusGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*AbilityBonusGroupBy) Bool

func (s *AbilityBonusGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AbilityBonusGroupBy) BoolX

func (s *AbilityBonusGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AbilityBonusGroupBy) Bools

func (s *AbilityBonusGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AbilityBonusGroupBy) BoolsX

func (s *AbilityBonusGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AbilityBonusGroupBy) Float64

func (s *AbilityBonusGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AbilityBonusGroupBy) Float64X

func (s *AbilityBonusGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AbilityBonusGroupBy) Float64s

func (s *AbilityBonusGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AbilityBonusGroupBy) Float64sX

func (s *AbilityBonusGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AbilityBonusGroupBy) Int

func (s *AbilityBonusGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AbilityBonusGroupBy) IntX

func (s *AbilityBonusGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AbilityBonusGroupBy) Ints

func (s *AbilityBonusGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AbilityBonusGroupBy) IntsX

func (s *AbilityBonusGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AbilityBonusGroupBy) Scan

func (abgb *AbilityBonusGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AbilityBonusGroupBy) ScanX

func (s *AbilityBonusGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AbilityBonusGroupBy) String

func (s *AbilityBonusGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AbilityBonusGroupBy) StringX

func (s *AbilityBonusGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AbilityBonusGroupBy) Strings

func (s *AbilityBonusGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AbilityBonusGroupBy) StringsX

func (s *AbilityBonusGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AbilityBonusMutation

type AbilityBonusMutation struct {
	// contains filtered or unexported fields
}

AbilityBonusMutation represents an operation that mutates the AbilityBonus nodes in the graph.

func (*AbilityBonusMutation) AbilityScoreCleared

func (m *AbilityBonusMutation) AbilityScoreCleared() bool

AbilityScoreCleared reports if the "ability_score" edge to the AbilityScore entity was cleared.

func (*AbilityBonusMutation) AbilityScoreID

func (m *AbilityBonusMutation) AbilityScoreID() (r int, exists bool)

AbilityScoreID returns the value of the "ability_score_id" field in the mutation.

func (*AbilityBonusMutation) AbilityScoreIDs

func (m *AbilityBonusMutation) AbilityScoreIDs() (ids []int)

AbilityScoreIDs returns the "ability_score" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AbilityScoreID instead. It exists only for internal usage by the builders.

func (*AbilityBonusMutation) AddBonus

func (m *AbilityBonusMutation) AddBonus(i int)

AddBonus adds i to the "bonus" field.

func (*AbilityBonusMutation) AddField

func (m *AbilityBonusMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AbilityBonusMutation) AddedBonus

func (m *AbilityBonusMutation) AddedBonus() (r int, exists bool)

AddedBonus returns the value that was added to the "bonus" field in this mutation.

func (*AbilityBonusMutation) AddedEdges

func (m *AbilityBonusMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*AbilityBonusMutation) AddedField

func (m *AbilityBonusMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AbilityBonusMutation) AddedFields

func (m *AbilityBonusMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*AbilityBonusMutation) AddedIDs

func (m *AbilityBonusMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*AbilityBonusMutation) Bonus

func (m *AbilityBonusMutation) Bonus() (r int, exists bool)

Bonus returns the value of the "bonus" field in the mutation.

func (*AbilityBonusMutation) ClearAbilityScore

func (m *AbilityBonusMutation) ClearAbilityScore()

ClearAbilityScore clears the "ability_score" edge to the AbilityScore entity.

func (*AbilityBonusMutation) ClearEdge

func (m *AbilityBonusMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*AbilityBonusMutation) ClearField

func (m *AbilityBonusMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*AbilityBonusMutation) ClearRace

func (m *AbilityBonusMutation) ClearRace()

ClearRace clears the "race" edge to the Race entity.

func (*AbilityBonusMutation) ClearSubrace

func (m *AbilityBonusMutation) ClearSubrace()

ClearSubrace clears the "subrace" edge to the Subrace entity.

func (*AbilityBonusMutation) ClearedEdges

func (m *AbilityBonusMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*AbilityBonusMutation) ClearedFields

func (m *AbilityBonusMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (AbilityBonusMutation) Client

func (m AbilityBonusMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*AbilityBonusMutation) EdgeCleared

func (m *AbilityBonusMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*AbilityBonusMutation) Field

func (m *AbilityBonusMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AbilityBonusMutation) FieldCleared

func (m *AbilityBonusMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*AbilityBonusMutation) Fields

func (m *AbilityBonusMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*AbilityBonusMutation) ID

func (m *AbilityBonusMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*AbilityBonusMutation) IDs

func (m *AbilityBonusMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*AbilityBonusMutation) OldAbilityScoreID

func (m *AbilityBonusMutation) OldAbilityScoreID(ctx context.Context) (v int, err error)

OldAbilityScoreID returns the old "ability_score_id" field's value of the AbilityBonus entity. If the AbilityBonus object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AbilityBonusMutation) OldBonus

func (m *AbilityBonusMutation) OldBonus(ctx context.Context) (v int, err error)

OldBonus returns the old "bonus" field's value of the AbilityBonus entity. If the AbilityBonus object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AbilityBonusMutation) OldField

func (m *AbilityBonusMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*AbilityBonusMutation) Op

func (m *AbilityBonusMutation) Op() Op

Op returns the operation name.

func (*AbilityBonusMutation) RaceCleared

func (m *AbilityBonusMutation) RaceCleared() bool

RaceCleared reports if the "race" edge to the Race entity was cleared.

func (*AbilityBonusMutation) RaceID

func (m *AbilityBonusMutation) RaceID() (id int, exists bool)

RaceID returns the "race" edge ID in the mutation.

func (*AbilityBonusMutation) RaceIDs

func (m *AbilityBonusMutation) RaceIDs() (ids []int)

RaceIDs returns the "race" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RaceID instead. It exists only for internal usage by the builders.

func (*AbilityBonusMutation) RemovedEdges

func (m *AbilityBonusMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*AbilityBonusMutation) RemovedIDs

func (m *AbilityBonusMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*AbilityBonusMutation) ResetAbilityScore

func (m *AbilityBonusMutation) ResetAbilityScore()

ResetAbilityScore resets all changes to the "ability_score" edge.

func (*AbilityBonusMutation) ResetAbilityScoreID

func (m *AbilityBonusMutation) ResetAbilityScoreID()

ResetAbilityScoreID resets all changes to the "ability_score_id" field.

func (*AbilityBonusMutation) ResetBonus

func (m *AbilityBonusMutation) ResetBonus()

ResetBonus resets all changes to the "bonus" field.

func (*AbilityBonusMutation) ResetEdge

func (m *AbilityBonusMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*AbilityBonusMutation) ResetField

func (m *AbilityBonusMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*AbilityBonusMutation) ResetRace

func (m *AbilityBonusMutation) ResetRace()

ResetRace resets all changes to the "race" edge.

func (*AbilityBonusMutation) ResetSubrace

func (m *AbilityBonusMutation) ResetSubrace()

ResetSubrace resets all changes to the "subrace" edge.

func (*AbilityBonusMutation) SetAbilityScoreID

func (m *AbilityBonusMutation) SetAbilityScoreID(i int)

SetAbilityScoreID sets the "ability_score_id" field.

func (*AbilityBonusMutation) SetBonus

func (m *AbilityBonusMutation) SetBonus(i int)

SetBonus sets the "bonus" field.

func (*AbilityBonusMutation) SetField

func (m *AbilityBonusMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AbilityBonusMutation) SetOp

func (m *AbilityBonusMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AbilityBonusMutation) SetRaceID

func (m *AbilityBonusMutation) SetRaceID(id int)

SetRaceID sets the "race" edge to the Race entity by id.

func (*AbilityBonusMutation) SetSubraceID

func (m *AbilityBonusMutation) SetSubraceID(id int)

SetSubraceID sets the "subrace" edge to the Subrace entity by id.

func (*AbilityBonusMutation) SubraceCleared

func (m *AbilityBonusMutation) SubraceCleared() bool

SubraceCleared reports if the "subrace" edge to the Subrace entity was cleared.

func (*AbilityBonusMutation) SubraceID

func (m *AbilityBonusMutation) SubraceID() (id int, exists bool)

SubraceID returns the "subrace" edge ID in the mutation.

func (*AbilityBonusMutation) SubraceIDs

func (m *AbilityBonusMutation) SubraceIDs() (ids []int)

SubraceIDs returns the "subrace" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SubraceID instead. It exists only for internal usage by the builders.

func (AbilityBonusMutation) Tx

func (m AbilityBonusMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*AbilityBonusMutation) Type

func (m *AbilityBonusMutation) Type() string

Type returns the node type of this mutation (AbilityBonus).

func (*AbilityBonusMutation) Where

Where appends a list predicates to the AbilityBonusMutation builder.

func (*AbilityBonusMutation) WhereP

func (m *AbilityBonusMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the AbilityBonusMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type AbilityBonusOrder

type AbilityBonusOrder struct {
	Direction OrderDirection          `json:"direction"`
	Field     *AbilityBonusOrderField `json:"field"`
}

AbilityBonusOrder defines the ordering of AbilityBonus.

type AbilityBonusOrderField

type AbilityBonusOrderField struct {
	// Value extracts the ordering value from the given AbilityBonus.
	Value func(*AbilityBonus) (ent.Value, error)
	// contains filtered or unexported fields
}

AbilityBonusOrderField defines the ordering field of AbilityBonus.

type AbilityBonusPaginateOption

type AbilityBonusPaginateOption func(*abilitybonusPager) error

AbilityBonusPaginateOption enables pagination customization.

func WithAbilityBonusFilter

func WithAbilityBonusFilter(filter func(*AbilityBonusQuery) (*AbilityBonusQuery, error)) AbilityBonusPaginateOption

WithAbilityBonusFilter configures pagination filter.

func WithAbilityBonusOrder

func WithAbilityBonusOrder(order *AbilityBonusOrder) AbilityBonusPaginateOption

WithAbilityBonusOrder configures pagination ordering.

type AbilityBonusQuery

type AbilityBonusQuery struct {
	// contains filtered or unexported fields
}

AbilityBonusQuery is the builder for querying AbilityBonus entities.

func (*AbilityBonusQuery) Aggregate

func (abq *AbilityBonusQuery) Aggregate(fns ...AggregateFunc) *AbilityBonusSelect

Aggregate returns a AbilityBonusSelect configured with the given aggregations.

func (*AbilityBonusQuery) All

func (abq *AbilityBonusQuery) All(ctx context.Context) ([]*AbilityBonus, error)

All executes the query and returns a list of AbilityBonusSlice.

func (*AbilityBonusQuery) AllX

func (abq *AbilityBonusQuery) AllX(ctx context.Context) []*AbilityBonus

AllX is like All, but panics if an error occurs.

func (*AbilityBonusQuery) Clone

func (abq *AbilityBonusQuery) Clone() *AbilityBonusQuery

Clone returns a duplicate of the AbilityBonusQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*AbilityBonusQuery) CollectFields

func (ab *AbilityBonusQuery) CollectFields(ctx context.Context, satisfies ...string) (*AbilityBonusQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*AbilityBonusQuery) Count

func (abq *AbilityBonusQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AbilityBonusQuery) CountX

func (abq *AbilityBonusQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*AbilityBonusQuery) Exist

func (abq *AbilityBonusQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*AbilityBonusQuery) ExistX

func (abq *AbilityBonusQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*AbilityBonusQuery) First

func (abq *AbilityBonusQuery) First(ctx context.Context) (*AbilityBonus, error)

First returns the first AbilityBonus entity from the query. Returns a *NotFoundError when no AbilityBonus was found.

func (*AbilityBonusQuery) FirstID

func (abq *AbilityBonusQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first AbilityBonus ID from the query. Returns a *NotFoundError when no AbilityBonus ID was found.

func (*AbilityBonusQuery) FirstIDX

func (abq *AbilityBonusQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*AbilityBonusQuery) FirstX

func (abq *AbilityBonusQuery) FirstX(ctx context.Context) *AbilityBonus

FirstX is like First, but panics if an error occurs.

func (*AbilityBonusQuery) GroupBy

func (abq *AbilityBonusQuery) GroupBy(field string, fields ...string) *AbilityBonusGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	AbilityScoreID int `json:"ability_score_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.AbilityBonus.Query().
	GroupBy(abilitybonus.FieldAbilityScoreID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AbilityBonusQuery) IDs

func (abq *AbilityBonusQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of AbilityBonus IDs.

func (*AbilityBonusQuery) IDsX

func (abq *AbilityBonusQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*AbilityBonusQuery) Limit

func (abq *AbilityBonusQuery) Limit(limit int) *AbilityBonusQuery

Limit the number of records to be returned by this query.

func (*AbilityBonusQuery) Offset

func (abq *AbilityBonusQuery) Offset(offset int) *AbilityBonusQuery

Offset to start from.

func (*AbilityBonusQuery) Only

func (abq *AbilityBonusQuery) Only(ctx context.Context) (*AbilityBonus, error)

Only returns a single AbilityBonus entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AbilityBonus entity is found. Returns a *NotFoundError when no AbilityBonus entities are found.

func (*AbilityBonusQuery) OnlyID

func (abq *AbilityBonusQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only AbilityBonus ID in the query. Returns a *NotSingularError when more than one AbilityBonus ID is found. Returns a *NotFoundError when no entities are found.

func (*AbilityBonusQuery) OnlyIDX

func (abq *AbilityBonusQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*AbilityBonusQuery) OnlyX

func (abq *AbilityBonusQuery) OnlyX(ctx context.Context) *AbilityBonus

OnlyX is like Only, but panics if an error occurs.

func (*AbilityBonusQuery) Order

Order specifies how the records should be ordered.

func (*AbilityBonusQuery) Paginate

func (ab *AbilityBonusQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...AbilityBonusPaginateOption,
) (*AbilityBonusConnection, error)

Paginate executes the query and returns a relay based cursor connection to AbilityBonus.

func (*AbilityBonusQuery) QueryAbilityScore

func (abq *AbilityBonusQuery) QueryAbilityScore() *AbilityScoreQuery

QueryAbilityScore chains the current query on the "ability_score" edge.

func (*AbilityBonusQuery) QueryRace

func (abq *AbilityBonusQuery) QueryRace() *RaceQuery

QueryRace chains the current query on the "race" edge.

func (*AbilityBonusQuery) QuerySubrace

func (abq *AbilityBonusQuery) QuerySubrace() *SubraceQuery

QuerySubrace chains the current query on the "subrace" edge.

func (*AbilityBonusQuery) Select

func (abq *AbilityBonusQuery) Select(fields ...string) *AbilityBonusSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	AbilityScoreID int `json:"ability_score_id,omitempty"`
}

client.AbilityBonus.Query().
	Select(abilitybonus.FieldAbilityScoreID).
	Scan(ctx, &v)

func (*AbilityBonusQuery) Unique

func (abq *AbilityBonusQuery) Unique(unique bool) *AbilityBonusQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*AbilityBonusQuery) Where

Where adds a new predicate for the AbilityBonusQuery builder.

func (*AbilityBonusQuery) WithAbilityScore

func (abq *AbilityBonusQuery) WithAbilityScore(opts ...func(*AbilityScoreQuery)) *AbilityBonusQuery

WithAbilityScore tells the query-builder to eager-load the nodes that are connected to the "ability_score" edge. The optional arguments are used to configure the query builder of the edge.

func (*AbilityBonusQuery) WithRace

func (abq *AbilityBonusQuery) WithRace(opts ...func(*RaceQuery)) *AbilityBonusQuery

WithRace tells the query-builder to eager-load the nodes that are connected to the "race" edge. The optional arguments are used to configure the query builder of the edge.

func (*AbilityBonusQuery) WithSubrace

func (abq *AbilityBonusQuery) WithSubrace(opts ...func(*SubraceQuery)) *AbilityBonusQuery

WithSubrace tells the query-builder to eager-load the nodes that are connected to the "subrace" edge. The optional arguments are used to configure the query builder of the edge.

type AbilityBonusSelect

type AbilityBonusSelect struct {
	*AbilityBonusQuery
	// contains filtered or unexported fields
}

AbilityBonusSelect is the builder for selecting fields of AbilityBonus entities.

func (*AbilityBonusSelect) Aggregate

func (abs *AbilityBonusSelect) Aggregate(fns ...AggregateFunc) *AbilityBonusSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AbilityBonusSelect) Bool

func (s *AbilityBonusSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AbilityBonusSelect) BoolX

func (s *AbilityBonusSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AbilityBonusSelect) Bools

func (s *AbilityBonusSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AbilityBonusSelect) BoolsX

func (s *AbilityBonusSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AbilityBonusSelect) Float64

func (s *AbilityBonusSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AbilityBonusSelect) Float64X

func (s *AbilityBonusSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AbilityBonusSelect) Float64s

func (s *AbilityBonusSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AbilityBonusSelect) Float64sX

func (s *AbilityBonusSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AbilityBonusSelect) Int

func (s *AbilityBonusSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AbilityBonusSelect) IntX

func (s *AbilityBonusSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AbilityBonusSelect) Ints

func (s *AbilityBonusSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AbilityBonusSelect) IntsX

func (s *AbilityBonusSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AbilityBonusSelect) Scan

func (abs *AbilityBonusSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AbilityBonusSelect) ScanX

func (s *AbilityBonusSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AbilityBonusSelect) String

func (s *AbilityBonusSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AbilityBonusSelect) StringX

func (s *AbilityBonusSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AbilityBonusSelect) Strings

func (s *AbilityBonusSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AbilityBonusSelect) StringsX

func (s *AbilityBonusSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AbilityBonusSlice

type AbilityBonusSlice []*AbilityBonus

AbilityBonusSlice is a parsable slice of AbilityBonus.

type AbilityBonusUpdate

type AbilityBonusUpdate struct {
	// contains filtered or unexported fields
}

AbilityBonusUpdate is the builder for updating AbilityBonus entities.

func (*AbilityBonusUpdate) AddBonus

func (abu *AbilityBonusUpdate) AddBonus(i int) *AbilityBonusUpdate

AddBonus adds i to the "bonus" field.

func (*AbilityBonusUpdate) ClearAbilityScore

func (abu *AbilityBonusUpdate) ClearAbilityScore() *AbilityBonusUpdate

ClearAbilityScore clears the "ability_score" edge to the AbilityScore entity.

func (*AbilityBonusUpdate) ClearRace

func (abu *AbilityBonusUpdate) ClearRace() *AbilityBonusUpdate

ClearRace clears the "race" edge to the Race entity.

func (*AbilityBonusUpdate) ClearSubrace

func (abu *AbilityBonusUpdate) ClearSubrace() *AbilityBonusUpdate

ClearSubrace clears the "subrace" edge to the Subrace entity.

func (*AbilityBonusUpdate) Exec

func (abu *AbilityBonusUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AbilityBonusUpdate) ExecX

func (abu *AbilityBonusUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AbilityBonusUpdate) Mutation

func (abu *AbilityBonusUpdate) Mutation() *AbilityBonusMutation

Mutation returns the AbilityBonusMutation object of the builder.

func (*AbilityBonusUpdate) Save

func (abu *AbilityBonusUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*AbilityBonusUpdate) SaveX

func (abu *AbilityBonusUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*AbilityBonusUpdate) SetAbilityScore

func (abu *AbilityBonusUpdate) SetAbilityScore(a *AbilityScore) *AbilityBonusUpdate

SetAbilityScore sets the "ability_score" edge to the AbilityScore entity.

func (*AbilityBonusUpdate) SetAbilityScoreID

func (abu *AbilityBonusUpdate) SetAbilityScoreID(i int) *AbilityBonusUpdate

SetAbilityScoreID sets the "ability_score_id" field.

func (*AbilityBonusUpdate) SetBonus

func (abu *AbilityBonusUpdate) SetBonus(i int) *AbilityBonusUpdate

SetBonus sets the "bonus" field.

func (*AbilityBonusUpdate) SetNillableRaceID

func (abu *AbilityBonusUpdate) SetNillableRaceID(id *int) *AbilityBonusUpdate

SetNillableRaceID sets the "race" edge to the Race entity by ID if the given value is not nil.

func (*AbilityBonusUpdate) SetNillableSubraceID

func (abu *AbilityBonusUpdate) SetNillableSubraceID(id *int) *AbilityBonusUpdate

SetNillableSubraceID sets the "subrace" edge to the Subrace entity by ID if the given value is not nil.

func (*AbilityBonusUpdate) SetRace

func (abu *AbilityBonusUpdate) SetRace(r *Race) *AbilityBonusUpdate

SetRace sets the "race" edge to the Race entity.

func (*AbilityBonusUpdate) SetRaceID

func (abu *AbilityBonusUpdate) SetRaceID(id int) *AbilityBonusUpdate

SetRaceID sets the "race" edge to the Race entity by ID.

func (*AbilityBonusUpdate) SetSubrace

func (abu *AbilityBonusUpdate) SetSubrace(s *Subrace) *AbilityBonusUpdate

SetSubrace sets the "subrace" edge to the Subrace entity.

func (*AbilityBonusUpdate) SetSubraceID

func (abu *AbilityBonusUpdate) SetSubraceID(id int) *AbilityBonusUpdate

SetSubraceID sets the "subrace" edge to the Subrace entity by ID.

func (*AbilityBonusUpdate) Where

Where appends a list predicates to the AbilityBonusUpdate builder.

type AbilityBonusUpdateOne

type AbilityBonusUpdateOne struct {
	// contains filtered or unexported fields
}

AbilityBonusUpdateOne is the builder for updating a single AbilityBonus entity.

func (*AbilityBonusUpdateOne) AddBonus

func (abuo *AbilityBonusUpdateOne) AddBonus(i int) *AbilityBonusUpdateOne

AddBonus adds i to the "bonus" field.

func (*AbilityBonusUpdateOne) ClearAbilityScore

func (abuo *AbilityBonusUpdateOne) ClearAbilityScore() *AbilityBonusUpdateOne

ClearAbilityScore clears the "ability_score" edge to the AbilityScore entity.

func (*AbilityBonusUpdateOne) ClearRace

func (abuo *AbilityBonusUpdateOne) ClearRace() *AbilityBonusUpdateOne

ClearRace clears the "race" edge to the Race entity.

func (*AbilityBonusUpdateOne) ClearSubrace

func (abuo *AbilityBonusUpdateOne) ClearSubrace() *AbilityBonusUpdateOne

ClearSubrace clears the "subrace" edge to the Subrace entity.

func (*AbilityBonusUpdateOne) Exec

func (abuo *AbilityBonusUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AbilityBonusUpdateOne) ExecX

func (abuo *AbilityBonusUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AbilityBonusUpdateOne) Mutation

func (abuo *AbilityBonusUpdateOne) Mutation() *AbilityBonusMutation

Mutation returns the AbilityBonusMutation object of the builder.

func (*AbilityBonusUpdateOne) Save

Save executes the query and returns the updated AbilityBonus entity.

func (*AbilityBonusUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*AbilityBonusUpdateOne) Select

func (abuo *AbilityBonusUpdateOne) Select(field string, fields ...string) *AbilityBonusUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AbilityBonusUpdateOne) SetAbilityScore

func (abuo *AbilityBonusUpdateOne) SetAbilityScore(a *AbilityScore) *AbilityBonusUpdateOne

SetAbilityScore sets the "ability_score" edge to the AbilityScore entity.

func (*AbilityBonusUpdateOne) SetAbilityScoreID

func (abuo *AbilityBonusUpdateOne) SetAbilityScoreID(i int) *AbilityBonusUpdateOne

SetAbilityScoreID sets the "ability_score_id" field.

func (*AbilityBonusUpdateOne) SetBonus

func (abuo *AbilityBonusUpdateOne) SetBonus(i int) *AbilityBonusUpdateOne

SetBonus sets the "bonus" field.

func (*AbilityBonusUpdateOne) SetNillableRaceID

func (abuo *AbilityBonusUpdateOne) SetNillableRaceID(id *int) *AbilityBonusUpdateOne

SetNillableRaceID sets the "race" edge to the Race entity by ID if the given value is not nil.

func (*AbilityBonusUpdateOne) SetNillableSubraceID

func (abuo *AbilityBonusUpdateOne) SetNillableSubraceID(id *int) *AbilityBonusUpdateOne

SetNillableSubraceID sets the "subrace" edge to the Subrace entity by ID if the given value is not nil.

func (*AbilityBonusUpdateOne) SetRace

SetRace sets the "race" edge to the Race entity.

func (*AbilityBonusUpdateOne) SetRaceID

func (abuo *AbilityBonusUpdateOne) SetRaceID(id int) *AbilityBonusUpdateOne

SetRaceID sets the "race" edge to the Race entity by ID.

func (*AbilityBonusUpdateOne) SetSubrace

func (abuo *AbilityBonusUpdateOne) SetSubrace(s *Subrace) *AbilityBonusUpdateOne

SetSubrace sets the "subrace" edge to the Subrace entity.

func (*AbilityBonusUpdateOne) SetSubraceID

func (abuo *AbilityBonusUpdateOne) SetSubraceID(id int) *AbilityBonusUpdateOne

SetSubraceID sets the "subrace" edge to the Subrace entity by ID.

func (*AbilityBonusUpdateOne) Where

Where appends a list predicates to the AbilityBonusUpdate builder.

type AbilityBonusWhereInput

type AbilityBonusWhereInput struct {
	Predicates []predicate.AbilityBonus  `json:"-"`
	Not        *AbilityBonusWhereInput   `json:"not,omitempty"`
	Or         []*AbilityBonusWhereInput `json:"or,omitempty"`
	And        []*AbilityBonusWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "ability_score_id" field predicates.
	AbilityScoreID      *int  `json:"abilityScoreID,omitempty"`
	AbilityScoreIDNEQ   *int  `json:"abilityScoreIDNEQ,omitempty"`
	AbilityScoreIDIn    []int `json:"abilityScoreIDIn,omitempty"`
	AbilityScoreIDNotIn []int `json:"abilityScoreIDNotIn,omitempty"`

	// "bonus" field predicates.
	Bonus      *int  `json:"bonus,omitempty"`
	BonusNEQ   *int  `json:"bonusNEQ,omitempty"`
	BonusIn    []int `json:"bonusIn,omitempty"`
	BonusNotIn []int `json:"bonusNotIn,omitempty"`
	BonusGT    *int  `json:"bonusGT,omitempty"`
	BonusGTE   *int  `json:"bonusGTE,omitempty"`
	BonusLT    *int  `json:"bonusLT,omitempty"`
	BonusLTE   *int  `json:"bonusLTE,omitempty"`

	// "ability_score" edge predicates.
	HasAbilityScore     *bool                     `json:"hasAbilityScore,omitempty"`
	HasAbilityScoreWith []*AbilityScoreWhereInput `json:"hasAbilityScoreWith,omitempty"`

	// "race" edge predicates.
	HasRace     *bool             `json:"hasRace,omitempty"`
	HasRaceWith []*RaceWhereInput `json:"hasRaceWith,omitempty"`

	// "subrace" edge predicates.
	HasSubrace     *bool                `json:"hasSubrace,omitempty"`
	HasSubraceWith []*SubraceWhereInput `json:"hasSubraceWith,omitempty"`
}

AbilityBonusWhereInput represents a where input for filtering AbilityBonus queries.

func (*AbilityBonusWhereInput) AddPredicates

func (i *AbilityBonusWhereInput) AddPredicates(predicates ...predicate.AbilityBonus)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*AbilityBonusWhereInput) Filter

Filter applies the AbilityBonusWhereInput filter on the AbilityBonusQuery builder.

func (*AbilityBonusWhereInput) P

P returns a predicate for filtering abilitybonusslice. An error is returned if the input is empty or invalid.

type AbilityScore

type AbilityScore struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Indx holds the value of the "indx" field.
	Indx string `json:"index"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// FullName holds the value of the "full_name" field.
	FullName string `json:"full_name,omitempty"`
	// Desc holds the value of the "desc" field.
	Desc []string `json:"desc,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AbilityScoreQuery when eager-loading is set.
	Edges AbilityScoreEdges `json:"-"`
	// contains filtered or unexported fields
}

AbilityScore is the model entity for the AbilityScore schema.

func (*AbilityScore) AbilityBonuses

func (as *AbilityScore) AbilityBonuses(ctx context.Context) (result []*AbilityBonus, err error)

func (*AbilityScore) IsNode

func (n *AbilityScore) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*AbilityScore) MarshalJSON

func (as *AbilityScore) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*AbilityScore) NamedAbilityBonuses

func (as *AbilityScore) NamedAbilityBonuses(name string) ([]*AbilityBonus, error)

NamedAbilityBonuses returns the AbilityBonuses named value or an error if the edge was not loaded in eager-loading with this name.

func (*AbilityScore) NamedSkills

func (as *AbilityScore) NamedSkills(name string) ([]*Skill, error)

NamedSkills returns the Skills named value or an error if the edge was not loaded in eager-loading with this name.

func (*AbilityScore) Node

func (as *AbilityScore) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*AbilityScore) QueryAbilityBonuses

func (as *AbilityScore) QueryAbilityBonuses() *AbilityBonusQuery

QueryAbilityBonuses queries the "ability_bonuses" edge of the AbilityScore entity.

func (*AbilityScore) QuerySkills

func (as *AbilityScore) QuerySkills() *SkillQuery

QuerySkills queries the "skills" edge of the AbilityScore entity.

func (*AbilityScore) Skills

func (as *AbilityScore) Skills(ctx context.Context) (result []*Skill, err error)

func (*AbilityScore) String

func (as *AbilityScore) String() string

String implements the fmt.Stringer.

func (*AbilityScore) ToEdge

func (as *AbilityScore) ToEdge(order *AbilityScoreOrder) *AbilityScoreEdge

ToEdge converts AbilityScore into AbilityScoreEdge.

func (*AbilityScore) UnmarshalJSON

func (as *AbilityScore) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*AbilityScore) Unwrap

func (as *AbilityScore) Unwrap() *AbilityScore

Unwrap unwraps the AbilityScore entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*AbilityScore) Update

func (as *AbilityScore) Update() *AbilityScoreUpdateOne

Update returns a builder for updating this AbilityScore. Note that you need to call AbilityScore.Unwrap() before calling this method if this AbilityScore was returned from a transaction, and the transaction was committed or rolled back.

func (*AbilityScore) Value

func (as *AbilityScore) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the AbilityScore. This includes values selected through modifiers, order, etc.

type AbilityScoreClient

type AbilityScoreClient struct {
	// contains filtered or unexported fields
}

AbilityScoreClient is a client for the AbilityScore schema.

func NewAbilityScoreClient

func NewAbilityScoreClient(c config) *AbilityScoreClient

NewAbilityScoreClient returns a client for the AbilityScore from the given config.

func (*AbilityScoreClient) Create

Create returns a builder for creating a AbilityScore entity.

func (*AbilityScoreClient) CreateBulk

func (c *AbilityScoreClient) CreateBulk(builders ...*AbilityScoreCreate) *AbilityScoreCreateBulk

CreateBulk returns a builder for creating a bulk of AbilityScore entities.

func (*AbilityScoreClient) Delete

Delete returns a delete builder for AbilityScore.

func (*AbilityScoreClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AbilityScoreClient) DeleteOneID

func (c *AbilityScoreClient) DeleteOneID(id int) *AbilityScoreDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*AbilityScoreClient) Get

Get returns a AbilityScore entity by its id.

func (*AbilityScoreClient) GetX

GetX is like Get, but panics if an error occurs.

func (*AbilityScoreClient) Hooks

func (c *AbilityScoreClient) Hooks() []Hook

Hooks returns the client hooks.

func (*AbilityScoreClient) Intercept

func (c *AbilityScoreClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `abilityscore.Intercept(f(g(h())))`.

func (*AbilityScoreClient) Interceptors

func (c *AbilityScoreClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*AbilityScoreClient) Query

Query returns a query builder for AbilityScore.

func (*AbilityScoreClient) QueryAbilityBonuses

func (c *AbilityScoreClient) QueryAbilityBonuses(as *AbilityScore) *AbilityBonusQuery

QueryAbilityBonuses queries the ability_bonuses edge of a AbilityScore.

func (*AbilityScoreClient) QuerySkills

func (c *AbilityScoreClient) QuerySkills(as *AbilityScore) *SkillQuery

QuerySkills queries the skills edge of a AbilityScore.

func (*AbilityScoreClient) Update

Update returns an update builder for AbilityScore.

func (*AbilityScoreClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*AbilityScoreClient) UpdateOneID

func (c *AbilityScoreClient) UpdateOneID(id int) *AbilityScoreUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AbilityScoreClient) Use

func (c *AbilityScoreClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `abilityscore.Hooks(f(g(h())))`.

type AbilityScoreConnection

type AbilityScoreConnection struct {
	Edges      []*AbilityScoreEdge `json:"edges"`
	PageInfo   PageInfo            `json:"pageInfo"`
	TotalCount int                 `json:"totalCount"`
}

AbilityScoreConnection is the connection containing edges to AbilityScore.

type AbilityScoreCreate

type AbilityScoreCreate struct {
	// contains filtered or unexported fields
}

AbilityScoreCreate is the builder for creating a AbilityScore entity.

func (*AbilityScoreCreate) AddAbilityBonuseIDs

func (asc *AbilityScoreCreate) AddAbilityBonuseIDs(ids ...int) *AbilityScoreCreate

AddAbilityBonuseIDs adds the "ability_bonuses" edge to the AbilityBonus entity by IDs.

func (*AbilityScoreCreate) AddAbilityBonuses

func (asc *AbilityScoreCreate) AddAbilityBonuses(a ...*AbilityBonus) *AbilityScoreCreate

AddAbilityBonuses adds the "ability_bonuses" edges to the AbilityBonus entity.

func (*AbilityScoreCreate) AddSkillIDs

func (asc *AbilityScoreCreate) AddSkillIDs(ids ...int) *AbilityScoreCreate

AddSkillIDs adds the "skills" edge to the Skill entity by IDs.

func (*AbilityScoreCreate) AddSkills

func (asc *AbilityScoreCreate) AddSkills(s ...*Skill) *AbilityScoreCreate

AddSkills adds the "skills" edges to the Skill entity.

func (*AbilityScoreCreate) Exec

func (asc *AbilityScoreCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AbilityScoreCreate) ExecX

func (asc *AbilityScoreCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AbilityScoreCreate) Mutation

func (asc *AbilityScoreCreate) Mutation() *AbilityScoreMutation

Mutation returns the AbilityScoreMutation object of the builder.

func (*AbilityScoreCreate) Save

Save creates the AbilityScore in the database.

func (*AbilityScoreCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*AbilityScoreCreate) SetAbilityScore

func (asc *AbilityScoreCreate) SetAbilityScore(input *AbilityScore) *AbilityScoreCreate

func (*AbilityScoreCreate) SetDesc

func (asc *AbilityScoreCreate) SetDesc(s []string) *AbilityScoreCreate

SetDesc sets the "desc" field.

func (*AbilityScoreCreate) SetFullName

func (asc *AbilityScoreCreate) SetFullName(s string) *AbilityScoreCreate

SetFullName sets the "full_name" field.

func (*AbilityScoreCreate) SetIndx

func (asc *AbilityScoreCreate) SetIndx(s string) *AbilityScoreCreate

SetIndx sets the "indx" field.

func (*AbilityScoreCreate) SetName

func (asc *AbilityScoreCreate) SetName(s string) *AbilityScoreCreate

SetName sets the "name" field.

type AbilityScoreCreateBulk

type AbilityScoreCreateBulk struct {
	// contains filtered or unexported fields
}

AbilityScoreCreateBulk is the builder for creating many AbilityScore entities in bulk.

func (*AbilityScoreCreateBulk) Exec

func (ascb *AbilityScoreCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AbilityScoreCreateBulk) ExecX

func (ascb *AbilityScoreCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AbilityScoreCreateBulk) Save

Save creates the AbilityScore entities in the database.

func (*AbilityScoreCreateBulk) SaveX

func (ascb *AbilityScoreCreateBulk) SaveX(ctx context.Context) []*AbilityScore

SaveX is like Save, but panics if an error occurs.

type AbilityScoreDelete

type AbilityScoreDelete struct {
	// contains filtered or unexported fields
}

AbilityScoreDelete is the builder for deleting a AbilityScore entity.

func (*AbilityScoreDelete) Exec

func (asd *AbilityScoreDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*AbilityScoreDelete) ExecX

func (asd *AbilityScoreDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*AbilityScoreDelete) Where

Where appends a list predicates to the AbilityScoreDelete builder.

type AbilityScoreDeleteOne

type AbilityScoreDeleteOne struct {
	// contains filtered or unexported fields
}

AbilityScoreDeleteOne is the builder for deleting a single AbilityScore entity.

func (*AbilityScoreDeleteOne) Exec

func (asdo *AbilityScoreDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AbilityScoreDeleteOne) ExecX

func (asdo *AbilityScoreDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AbilityScoreDeleteOne) Where

Where appends a list predicates to the AbilityScoreDelete builder.

type AbilityScoreEdge

type AbilityScoreEdge struct {
	Node   *AbilityScore `json:"node"`
	Cursor Cursor        `json:"cursor"`
}

AbilityScoreEdge is the edge representation of AbilityScore.

type AbilityScoreEdges

type AbilityScoreEdges struct {
	// Skills holds the value of the skills edge.
	Skills []*Skill `json:"skills,omitempty"`
	// AbilityBonuses holds the value of the ability_bonuses edge.
	AbilityBonuses []*AbilityBonus `json:"ability_bonuses,omitempty"`
	// contains filtered or unexported fields
}

AbilityScoreEdges holds the relations/edges for other nodes in the graph.

func (AbilityScoreEdges) AbilityBonusesOrErr

func (e AbilityScoreEdges) AbilityBonusesOrErr() ([]*AbilityBonus, error)

AbilityBonusesOrErr returns the AbilityBonuses value or an error if the edge was not loaded in eager-loading.

func (AbilityScoreEdges) SkillsOrErr

func (e AbilityScoreEdges) SkillsOrErr() ([]*Skill, error)

SkillsOrErr returns the Skills value or an error if the edge was not loaded in eager-loading.

type AbilityScoreGroupBy

type AbilityScoreGroupBy struct {
	// contains filtered or unexported fields
}

AbilityScoreGroupBy is the group-by builder for AbilityScore entities.

func (*AbilityScoreGroupBy) Aggregate

func (asgb *AbilityScoreGroupBy) Aggregate(fns ...AggregateFunc) *AbilityScoreGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*AbilityScoreGroupBy) Bool

func (s *AbilityScoreGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AbilityScoreGroupBy) BoolX

func (s *AbilityScoreGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AbilityScoreGroupBy) Bools

func (s *AbilityScoreGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AbilityScoreGroupBy) BoolsX

func (s *AbilityScoreGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AbilityScoreGroupBy) Float64

func (s *AbilityScoreGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AbilityScoreGroupBy) Float64X

func (s *AbilityScoreGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AbilityScoreGroupBy) Float64s

func (s *AbilityScoreGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AbilityScoreGroupBy) Float64sX

func (s *AbilityScoreGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AbilityScoreGroupBy) Int

func (s *AbilityScoreGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AbilityScoreGroupBy) IntX

func (s *AbilityScoreGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AbilityScoreGroupBy) Ints

func (s *AbilityScoreGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AbilityScoreGroupBy) IntsX

func (s *AbilityScoreGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AbilityScoreGroupBy) Scan

func (asgb *AbilityScoreGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AbilityScoreGroupBy) ScanX

func (s *AbilityScoreGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AbilityScoreGroupBy) String

func (s *AbilityScoreGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AbilityScoreGroupBy) StringX

func (s *AbilityScoreGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AbilityScoreGroupBy) Strings

func (s *AbilityScoreGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AbilityScoreGroupBy) StringsX

func (s *AbilityScoreGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AbilityScoreMutation

type AbilityScoreMutation struct {
	// contains filtered or unexported fields
}

AbilityScoreMutation represents an operation that mutates the AbilityScore nodes in the graph.

func (*AbilityScoreMutation) AbilityBonusesCleared

func (m *AbilityScoreMutation) AbilityBonusesCleared() bool

AbilityBonusesCleared reports if the "ability_bonuses" edge to the AbilityBonus entity was cleared.

func (*AbilityScoreMutation) AbilityBonusesIDs

func (m *AbilityScoreMutation) AbilityBonusesIDs() (ids []int)

AbilityBonusesIDs returns the "ability_bonuses" edge IDs in the mutation.

func (*AbilityScoreMutation) AddAbilityBonuseIDs

func (m *AbilityScoreMutation) AddAbilityBonuseIDs(ids ...int)

AddAbilityBonuseIDs adds the "ability_bonuses" edge to the AbilityBonus entity by ids.

func (*AbilityScoreMutation) AddField

func (m *AbilityScoreMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AbilityScoreMutation) AddSkillIDs

func (m *AbilityScoreMutation) AddSkillIDs(ids ...int)

AddSkillIDs adds the "skills" edge to the Skill entity by ids.

func (*AbilityScoreMutation) AddedEdges

func (m *AbilityScoreMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*AbilityScoreMutation) AddedField

func (m *AbilityScoreMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AbilityScoreMutation) AddedFields

func (m *AbilityScoreMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*AbilityScoreMutation) AddedIDs

func (m *AbilityScoreMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*AbilityScoreMutation) AppendDesc

func (m *AbilityScoreMutation) AppendDesc(s []string)

AppendDesc adds s to the "desc" field.

func (*AbilityScoreMutation) AppendedDesc

func (m *AbilityScoreMutation) AppendedDesc() ([]string, bool)

AppendedDesc returns the list of values that were appended to the "desc" field in this mutation.

func (*AbilityScoreMutation) ClearAbilityBonuses

func (m *AbilityScoreMutation) ClearAbilityBonuses()

ClearAbilityBonuses clears the "ability_bonuses" edge to the AbilityBonus entity.

func (*AbilityScoreMutation) ClearEdge

func (m *AbilityScoreMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*AbilityScoreMutation) ClearField

func (m *AbilityScoreMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*AbilityScoreMutation) ClearSkills

func (m *AbilityScoreMutation) ClearSkills()

ClearSkills clears the "skills" edge to the Skill entity.

func (*AbilityScoreMutation) ClearedEdges

func (m *AbilityScoreMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*AbilityScoreMutation) ClearedFields

func (m *AbilityScoreMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (AbilityScoreMutation) Client

func (m AbilityScoreMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*AbilityScoreMutation) Desc

func (m *AbilityScoreMutation) Desc() (r []string, exists bool)

Desc returns the value of the "desc" field in the mutation.

func (*AbilityScoreMutation) EdgeCleared

func (m *AbilityScoreMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*AbilityScoreMutation) Field

func (m *AbilityScoreMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*AbilityScoreMutation) FieldCleared

func (m *AbilityScoreMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*AbilityScoreMutation) Fields

func (m *AbilityScoreMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*AbilityScoreMutation) FullName

func (m *AbilityScoreMutation) FullName() (r string, exists bool)

FullName returns the value of the "full_name" field in the mutation.

func (*AbilityScoreMutation) ID

func (m *AbilityScoreMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*AbilityScoreMutation) IDs

func (m *AbilityScoreMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*AbilityScoreMutation) Indx

func (m *AbilityScoreMutation) Indx() (r string, exists bool)

Indx returns the value of the "indx" field in the mutation.

func (*AbilityScoreMutation) Name

func (m *AbilityScoreMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*AbilityScoreMutation) OldDesc

func (m *AbilityScoreMutation) OldDesc(ctx context.Context) (v []string, err error)

OldDesc returns the old "desc" field's value of the AbilityScore entity. If the AbilityScore object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AbilityScoreMutation) OldField

func (m *AbilityScoreMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*AbilityScoreMutation) OldFullName

func (m *AbilityScoreMutation) OldFullName(ctx context.Context) (v string, err error)

OldFullName returns the old "full_name" field's value of the AbilityScore entity. If the AbilityScore object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AbilityScoreMutation) OldIndx

func (m *AbilityScoreMutation) OldIndx(ctx context.Context) (v string, err error)

OldIndx returns the old "indx" field's value of the AbilityScore entity. If the AbilityScore object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AbilityScoreMutation) OldName

func (m *AbilityScoreMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the AbilityScore entity. If the AbilityScore object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AbilityScoreMutation) Op

func (m *AbilityScoreMutation) Op() Op

Op returns the operation name.

func (*AbilityScoreMutation) RemoveAbilityBonuseIDs

func (m *AbilityScoreMutation) RemoveAbilityBonuseIDs(ids ...int)

RemoveAbilityBonuseIDs removes the "ability_bonuses" edge to the AbilityBonus entity by IDs.

func (*AbilityScoreMutation) RemoveSkillIDs

func (m *AbilityScoreMutation) RemoveSkillIDs(ids ...int)

RemoveSkillIDs removes the "skills" edge to the Skill entity by IDs.

func (*AbilityScoreMutation) RemovedAbilityBonusesIDs

func (m *AbilityScoreMutation) RemovedAbilityBonusesIDs() (ids []int)

RemovedAbilityBonuses returns the removed IDs of the "ability_bonuses" edge to the AbilityBonus entity.

func (*AbilityScoreMutation) RemovedEdges

func (m *AbilityScoreMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*AbilityScoreMutation) RemovedIDs

func (m *AbilityScoreMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*AbilityScoreMutation) RemovedSkillsIDs

func (m *AbilityScoreMutation) RemovedSkillsIDs() (ids []int)

RemovedSkills returns the removed IDs of the "skills" edge to the Skill entity.

func (*AbilityScoreMutation) ResetAbilityBonuses

func (m *AbilityScoreMutation) ResetAbilityBonuses()

ResetAbilityBonuses resets all changes to the "ability_bonuses" edge.

func (*AbilityScoreMutation) ResetDesc

func (m *AbilityScoreMutation) ResetDesc()

ResetDesc resets all changes to the "desc" field.

func (*AbilityScoreMutation) ResetEdge

func (m *AbilityScoreMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*AbilityScoreMutation) ResetField

func (m *AbilityScoreMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*AbilityScoreMutation) ResetFullName

func (m *AbilityScoreMutation) ResetFullName()

ResetFullName resets all changes to the "full_name" field.

func (*AbilityScoreMutation) ResetIndx

func (m *AbilityScoreMutation) ResetIndx()

ResetIndx resets all changes to the "indx" field.

func (*AbilityScoreMutation) ResetName

func (m *AbilityScoreMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AbilityScoreMutation) ResetSkills

func (m *AbilityScoreMutation) ResetSkills()

ResetSkills resets all changes to the "skills" edge.

func (*AbilityScoreMutation) SetDesc

func (m *AbilityScoreMutation) SetDesc(s []string)

SetDesc sets the "desc" field.

func (*AbilityScoreMutation) SetField

func (m *AbilityScoreMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*AbilityScoreMutation) SetFullName

func (m *AbilityScoreMutation) SetFullName(s string)

SetFullName sets the "full_name" field.

func (*AbilityScoreMutation) SetIndx

func (m *AbilityScoreMutation) SetIndx(s string)

SetIndx sets the "indx" field.

func (*AbilityScoreMutation) SetName

func (m *AbilityScoreMutation) SetName(s string)

SetName sets the "name" field.

func (*AbilityScoreMutation) SetOp

func (m *AbilityScoreMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AbilityScoreMutation) SkillsCleared

func (m *AbilityScoreMutation) SkillsCleared() bool

SkillsCleared reports if the "skills" edge to the Skill entity was cleared.

func (*AbilityScoreMutation) SkillsIDs

func (m *AbilityScoreMutation) SkillsIDs() (ids []int)

SkillsIDs returns the "skills" edge IDs in the mutation.

func (AbilityScoreMutation) Tx

func (m AbilityScoreMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*AbilityScoreMutation) Type

func (m *AbilityScoreMutation) Type() string

Type returns the node type of this mutation (AbilityScore).

func (*AbilityScoreMutation) Where

Where appends a list predicates to the AbilityScoreMutation builder.

func (*AbilityScoreMutation) WhereP

func (m *AbilityScoreMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the AbilityScoreMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type AbilityScoreOrder

type AbilityScoreOrder struct {
	Direction OrderDirection          `json:"direction"`
	Field     *AbilityScoreOrderField `json:"field"`
}

AbilityScoreOrder defines the ordering of AbilityScore.

type AbilityScoreOrderField

type AbilityScoreOrderField struct {
	// Value extracts the ordering value from the given AbilityScore.
	Value func(*AbilityScore) (ent.Value, error)
	// contains filtered or unexported fields
}

AbilityScoreOrderField defines the ordering field of AbilityScore.

func (AbilityScoreOrderField) MarshalGQL

func (f AbilityScoreOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (AbilityScoreOrderField) String

func (f AbilityScoreOrderField) String() string

String implement fmt.Stringer interface.

func (*AbilityScoreOrderField) UnmarshalGQL

func (f *AbilityScoreOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type AbilityScorePaginateOption

type AbilityScorePaginateOption func(*abilityscorePager) error

AbilityScorePaginateOption enables pagination customization.

func WithAbilityScoreFilter

func WithAbilityScoreFilter(filter func(*AbilityScoreQuery) (*AbilityScoreQuery, error)) AbilityScorePaginateOption

WithAbilityScoreFilter configures pagination filter.

func WithAbilityScoreOrder

func WithAbilityScoreOrder(order *AbilityScoreOrder) AbilityScorePaginateOption

WithAbilityScoreOrder configures pagination ordering.

type AbilityScoreQuery

type AbilityScoreQuery struct {
	// contains filtered or unexported fields
}

AbilityScoreQuery is the builder for querying AbilityScore entities.

func (*AbilityScoreQuery) Aggregate

func (asq *AbilityScoreQuery) Aggregate(fns ...AggregateFunc) *AbilityScoreSelect

Aggregate returns a AbilityScoreSelect configured with the given aggregations.

func (*AbilityScoreQuery) All

func (asq *AbilityScoreQuery) All(ctx context.Context) ([]*AbilityScore, error)

All executes the query and returns a list of AbilityScores.

func (*AbilityScoreQuery) AllX

func (asq *AbilityScoreQuery) AllX(ctx context.Context) []*AbilityScore

AllX is like All, but panics if an error occurs.

func (*AbilityScoreQuery) Clone

func (asq *AbilityScoreQuery) Clone() *AbilityScoreQuery

Clone returns a duplicate of the AbilityScoreQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*AbilityScoreQuery) CollectFields

func (as *AbilityScoreQuery) CollectFields(ctx context.Context, satisfies ...string) (*AbilityScoreQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*AbilityScoreQuery) Count

func (asq *AbilityScoreQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AbilityScoreQuery) CountX

func (asq *AbilityScoreQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*AbilityScoreQuery) Exist

func (asq *AbilityScoreQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*AbilityScoreQuery) ExistX

func (asq *AbilityScoreQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*AbilityScoreQuery) First

func (asq *AbilityScoreQuery) First(ctx context.Context) (*AbilityScore, error)

First returns the first AbilityScore entity from the query. Returns a *NotFoundError when no AbilityScore was found.

func (*AbilityScoreQuery) FirstID

func (asq *AbilityScoreQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first AbilityScore ID from the query. Returns a *NotFoundError when no AbilityScore ID was found.

func (*AbilityScoreQuery) FirstIDX

func (asq *AbilityScoreQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*AbilityScoreQuery) FirstX

func (asq *AbilityScoreQuery) FirstX(ctx context.Context) *AbilityScore

FirstX is like First, but panics if an error occurs.

func (*AbilityScoreQuery) GroupBy

func (asq *AbilityScoreQuery) GroupBy(field string, fields ...string) *AbilityScoreGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Indx string `json:"index"`
	Count int `json:"count,omitempty"`
}

client.AbilityScore.Query().
	GroupBy(abilityscore.FieldIndx).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AbilityScoreQuery) IDs

func (asq *AbilityScoreQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of AbilityScore IDs.

func (*AbilityScoreQuery) IDsX

func (asq *AbilityScoreQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*AbilityScoreQuery) Limit

func (asq *AbilityScoreQuery) Limit(limit int) *AbilityScoreQuery

Limit the number of records to be returned by this query.

func (*AbilityScoreQuery) Offset

func (asq *AbilityScoreQuery) Offset(offset int) *AbilityScoreQuery

Offset to start from.

func (*AbilityScoreQuery) Only

func (asq *AbilityScoreQuery) Only(ctx context.Context) (*AbilityScore, error)

Only returns a single AbilityScore entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AbilityScore entity is found. Returns a *NotFoundError when no AbilityScore entities are found.

func (*AbilityScoreQuery) OnlyID

func (asq *AbilityScoreQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only AbilityScore ID in the query. Returns a *NotSingularError when more than one AbilityScore ID is found. Returns a *NotFoundError when no entities are found.

func (*AbilityScoreQuery) OnlyIDX

func (asq *AbilityScoreQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*AbilityScoreQuery) OnlyX

func (asq *AbilityScoreQuery) OnlyX(ctx context.Context) *AbilityScore

OnlyX is like Only, but panics if an error occurs.

func (*AbilityScoreQuery) Order

Order specifies how the records should be ordered.

func (*AbilityScoreQuery) Paginate

func (as *AbilityScoreQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...AbilityScorePaginateOption,
) (*AbilityScoreConnection, error)

Paginate executes the query and returns a relay based cursor connection to AbilityScore.

func (*AbilityScoreQuery) QueryAbilityBonuses

func (asq *AbilityScoreQuery) QueryAbilityBonuses() *AbilityBonusQuery

QueryAbilityBonuses chains the current query on the "ability_bonuses" edge.

func (*AbilityScoreQuery) QuerySkills

func (asq *AbilityScoreQuery) QuerySkills() *SkillQuery

QuerySkills chains the current query on the "skills" edge.

func (*AbilityScoreQuery) Select

func (asq *AbilityScoreQuery) Select(fields ...string) *AbilityScoreSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Indx string `json:"index"`
}

client.AbilityScore.Query().
	Select(abilityscore.FieldIndx).
	Scan(ctx, &v)

func (*AbilityScoreQuery) Unique

func (asq *AbilityScoreQuery) Unique(unique bool) *AbilityScoreQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*AbilityScoreQuery) Where

Where adds a new predicate for the AbilityScoreQuery builder.

func (*AbilityScoreQuery) WithAbilityBonuses

func (asq *AbilityScoreQuery) WithAbilityBonuses(opts ...func(*AbilityBonusQuery)) *AbilityScoreQuery

WithAbilityBonuses tells the query-builder to eager-load the nodes that are connected to the "ability_bonuses" edge. The optional arguments are used to configure the query builder of the edge.

func (*AbilityScoreQuery) WithNamedAbilityBonuses

func (asq *AbilityScoreQuery) WithNamedAbilityBonuses(name string, opts ...func(*AbilityBonusQuery)) *AbilityScoreQuery

WithNamedAbilityBonuses tells the query-builder to eager-load the nodes that are connected to the "ability_bonuses" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*AbilityScoreQuery) WithNamedSkills

func (asq *AbilityScoreQuery) WithNamedSkills(name string, opts ...func(*SkillQuery)) *AbilityScoreQuery

WithNamedSkills tells the query-builder to eager-load the nodes that are connected to the "skills" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*AbilityScoreQuery) WithSkills

func (asq *AbilityScoreQuery) WithSkills(opts ...func(*SkillQuery)) *AbilityScoreQuery

WithSkills tells the query-builder to eager-load the nodes that are connected to the "skills" edge. The optional arguments are used to configure the query builder of the edge.

type AbilityScoreSelect

type AbilityScoreSelect struct {
	*AbilityScoreQuery
	// contains filtered or unexported fields
}

AbilityScoreSelect is the builder for selecting fields of AbilityScore entities.

func (*AbilityScoreSelect) Aggregate

func (ass *AbilityScoreSelect) Aggregate(fns ...AggregateFunc) *AbilityScoreSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AbilityScoreSelect) Bool

func (s *AbilityScoreSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AbilityScoreSelect) BoolX

func (s *AbilityScoreSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AbilityScoreSelect) Bools

func (s *AbilityScoreSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AbilityScoreSelect) BoolsX

func (s *AbilityScoreSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AbilityScoreSelect) Float64

func (s *AbilityScoreSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AbilityScoreSelect) Float64X

func (s *AbilityScoreSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AbilityScoreSelect) Float64s

func (s *AbilityScoreSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AbilityScoreSelect) Float64sX

func (s *AbilityScoreSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AbilityScoreSelect) Int

func (s *AbilityScoreSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AbilityScoreSelect) IntX

func (s *AbilityScoreSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AbilityScoreSelect) Ints

func (s *AbilityScoreSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AbilityScoreSelect) IntsX

func (s *AbilityScoreSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AbilityScoreSelect) Scan

func (ass *AbilityScoreSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AbilityScoreSelect) ScanX

func (s *AbilityScoreSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AbilityScoreSelect) String

func (s *AbilityScoreSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AbilityScoreSelect) StringX

func (s *AbilityScoreSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AbilityScoreSelect) Strings

func (s *AbilityScoreSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AbilityScoreSelect) StringsX

func (s *AbilityScoreSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AbilityScoreUpdate

type AbilityScoreUpdate struct {
	// contains filtered or unexported fields
}

AbilityScoreUpdate is the builder for updating AbilityScore entities.

func (*AbilityScoreUpdate) AddAbilityBonuseIDs

func (asu *AbilityScoreUpdate) AddAbilityBonuseIDs(ids ...int) *AbilityScoreUpdate

AddAbilityBonuseIDs adds the "ability_bonuses" edge to the AbilityBonus entity by IDs.

func (*AbilityScoreUpdate) AddAbilityBonuses

func (asu *AbilityScoreUpdate) AddAbilityBonuses(a ...*AbilityBonus) *AbilityScoreUpdate

AddAbilityBonuses adds the "ability_bonuses" edges to the AbilityBonus entity.

func (*AbilityScoreUpdate) AddSkillIDs

func (asu *AbilityScoreUpdate) AddSkillIDs(ids ...int) *AbilityScoreUpdate

AddSkillIDs adds the "skills" edge to the Skill entity by IDs.

func (*AbilityScoreUpdate) AddSkills

func (asu *AbilityScoreUpdate) AddSkills(s ...*Skill) *AbilityScoreUpdate

AddSkills adds the "skills" edges to the Skill entity.

func (*AbilityScoreUpdate) AppendDesc

func (asu *AbilityScoreUpdate) AppendDesc(s []string) *AbilityScoreUpdate

AppendDesc appends s to the "desc" field.

func (*AbilityScoreUpdate) ClearAbilityBonuses

func (asu *AbilityScoreUpdate) ClearAbilityBonuses() *AbilityScoreUpdate

ClearAbilityBonuses clears all "ability_bonuses" edges to the AbilityBonus entity.

func (*AbilityScoreUpdate) ClearSkills

func (asu *AbilityScoreUpdate) ClearSkills() *AbilityScoreUpdate

ClearSkills clears all "skills" edges to the Skill entity.

func (*AbilityScoreUpdate) Exec

func (asu *AbilityScoreUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AbilityScoreUpdate) ExecX

func (asu *AbilityScoreUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AbilityScoreUpdate) Mutation

func (asu *AbilityScoreUpdate) Mutation() *AbilityScoreMutation

Mutation returns the AbilityScoreMutation object of the builder.

func (*AbilityScoreUpdate) RemoveAbilityBonuseIDs

func (asu *AbilityScoreUpdate) RemoveAbilityBonuseIDs(ids ...int) *AbilityScoreUpdate

RemoveAbilityBonuseIDs removes the "ability_bonuses" edge to AbilityBonus entities by IDs.

func (*AbilityScoreUpdate) RemoveAbilityBonuses

func (asu *AbilityScoreUpdate) RemoveAbilityBonuses(a ...*AbilityBonus) *AbilityScoreUpdate

RemoveAbilityBonuses removes "ability_bonuses" edges to AbilityBonus entities.

func (*AbilityScoreUpdate) RemoveSkillIDs

func (asu *AbilityScoreUpdate) RemoveSkillIDs(ids ...int) *AbilityScoreUpdate

RemoveSkillIDs removes the "skills" edge to Skill entities by IDs.

func (*AbilityScoreUpdate) RemoveSkills

func (asu *AbilityScoreUpdate) RemoveSkills(s ...*Skill) *AbilityScoreUpdate

RemoveSkills removes "skills" edges to Skill entities.

func (*AbilityScoreUpdate) Save

func (asu *AbilityScoreUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*AbilityScoreUpdate) SaveX

func (asu *AbilityScoreUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*AbilityScoreUpdate) SetDesc

func (asu *AbilityScoreUpdate) SetDesc(s []string) *AbilityScoreUpdate

SetDesc sets the "desc" field.

func (*AbilityScoreUpdate) SetFullName

func (asu *AbilityScoreUpdate) SetFullName(s string) *AbilityScoreUpdate

SetFullName sets the "full_name" field.

func (*AbilityScoreUpdate) SetIndx

func (asu *AbilityScoreUpdate) SetIndx(s string) *AbilityScoreUpdate

SetIndx sets the "indx" field.

func (*AbilityScoreUpdate) SetName

func (asu *AbilityScoreUpdate) SetName(s string) *AbilityScoreUpdate

SetName sets the "name" field.

func (*AbilityScoreUpdate) Where

Where appends a list predicates to the AbilityScoreUpdate builder.

type AbilityScoreUpdateOne

type AbilityScoreUpdateOne struct {
	// contains filtered or unexported fields
}

AbilityScoreUpdateOne is the builder for updating a single AbilityScore entity.

func (*AbilityScoreUpdateOne) AddAbilityBonuseIDs

func (asuo *AbilityScoreUpdateOne) AddAbilityBonuseIDs(ids ...int) *AbilityScoreUpdateOne

AddAbilityBonuseIDs adds the "ability_bonuses" edge to the AbilityBonus entity by IDs.

func (*AbilityScoreUpdateOne) AddAbilityBonuses

func (asuo *AbilityScoreUpdateOne) AddAbilityBonuses(a ...*AbilityBonus) *AbilityScoreUpdateOne

AddAbilityBonuses adds the "ability_bonuses" edges to the AbilityBonus entity.

func (*AbilityScoreUpdateOne) AddSkillIDs

func (asuo *AbilityScoreUpdateOne) AddSkillIDs(ids ...int) *AbilityScoreUpdateOne

AddSkillIDs adds the "skills" edge to the Skill entity by IDs.

func (*AbilityScoreUpdateOne) AddSkills

func (asuo *AbilityScoreUpdateOne) AddSkills(s ...*Skill) *AbilityScoreUpdateOne

AddSkills adds the "skills" edges to the Skill entity.

func (*AbilityScoreUpdateOne) AppendDesc

func (asuo *AbilityScoreUpdateOne) AppendDesc(s []string) *AbilityScoreUpdateOne

AppendDesc appends s to the "desc" field.

func (*AbilityScoreUpdateOne) ClearAbilityBonuses

func (asuo *AbilityScoreUpdateOne) ClearAbilityBonuses() *AbilityScoreUpdateOne

ClearAbilityBonuses clears all "ability_bonuses" edges to the AbilityBonus entity.

func (*AbilityScoreUpdateOne) ClearSkills

func (asuo *AbilityScoreUpdateOne) ClearSkills() *AbilityScoreUpdateOne

ClearSkills clears all "skills" edges to the Skill entity.

func (*AbilityScoreUpdateOne) Exec

func (asuo *AbilityScoreUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AbilityScoreUpdateOne) ExecX

func (asuo *AbilityScoreUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AbilityScoreUpdateOne) Mutation

func (asuo *AbilityScoreUpdateOne) Mutation() *AbilityScoreMutation

Mutation returns the AbilityScoreMutation object of the builder.

func (*AbilityScoreUpdateOne) RemoveAbilityBonuseIDs

func (asuo *AbilityScoreUpdateOne) RemoveAbilityBonuseIDs(ids ...int) *AbilityScoreUpdateOne

RemoveAbilityBonuseIDs removes the "ability_bonuses" edge to AbilityBonus entities by IDs.

func (*AbilityScoreUpdateOne) RemoveAbilityBonuses

func (asuo *AbilityScoreUpdateOne) RemoveAbilityBonuses(a ...*AbilityBonus) *AbilityScoreUpdateOne

RemoveAbilityBonuses removes "ability_bonuses" edges to AbilityBonus entities.

func (*AbilityScoreUpdateOne) RemoveSkillIDs

func (asuo *AbilityScoreUpdateOne) RemoveSkillIDs(ids ...int) *AbilityScoreUpdateOne

RemoveSkillIDs removes the "skills" edge to Skill entities by IDs.

func (*AbilityScoreUpdateOne) RemoveSkills

func (asuo *AbilityScoreUpdateOne) RemoveSkills(s ...*Skill) *AbilityScoreUpdateOne

RemoveSkills removes "skills" edges to Skill entities.

func (*AbilityScoreUpdateOne) Save

Save executes the query and returns the updated AbilityScore entity.

func (*AbilityScoreUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*AbilityScoreUpdateOne) Select

func (asuo *AbilityScoreUpdateOne) Select(field string, fields ...string) *AbilityScoreUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AbilityScoreUpdateOne) SetDesc

SetDesc sets the "desc" field.

func (*AbilityScoreUpdateOne) SetFullName

func (asuo *AbilityScoreUpdateOne) SetFullName(s string) *AbilityScoreUpdateOne

SetFullName sets the "full_name" field.

func (*AbilityScoreUpdateOne) SetIndx

SetIndx sets the "indx" field.

func (*AbilityScoreUpdateOne) SetName

SetName sets the "name" field.

func (*AbilityScoreUpdateOne) Where

Where appends a list predicates to the AbilityScoreUpdate builder.

type AbilityScoreWhereInput

type AbilityScoreWhereInput struct {
	Predicates []predicate.AbilityScore  `json:"-"`
	Not        *AbilityScoreWhereInput   `json:"not,omitempty"`
	Or         []*AbilityScoreWhereInput `json:"or,omitempty"`
	And        []*AbilityScoreWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "indx" field predicates.
	Indx             *string  `json:"indx,omitempty"`
	IndxNEQ          *string  `json:"indxNEQ,omitempty"`
	IndxIn           []string `json:"indxIn,omitempty"`
	IndxNotIn        []string `json:"indxNotIn,omitempty"`
	IndxGT           *string  `json:"indxGT,omitempty"`
	IndxGTE          *string  `json:"indxGTE,omitempty"`
	IndxLT           *string  `json:"indxLT,omitempty"`
	IndxLTE          *string  `json:"indxLTE,omitempty"`
	IndxContains     *string  `json:"indxContains,omitempty"`
	IndxHasPrefix    *string  `json:"indxHasPrefix,omitempty"`
	IndxHasSuffix    *string  `json:"indxHasSuffix,omitempty"`
	IndxEqualFold    *string  `json:"indxEqualFold,omitempty"`
	IndxContainsFold *string  `json:"indxContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "full_name" field predicates.
	FullName             *string  `json:"fullName,omitempty"`
	FullNameNEQ          *string  `json:"fullNameNEQ,omitempty"`
	FullNameIn           []string `json:"fullNameIn,omitempty"`
	FullNameNotIn        []string `json:"fullNameNotIn,omitempty"`
	FullNameGT           *string  `json:"fullNameGT,omitempty"`
	FullNameGTE          *string  `json:"fullNameGTE,omitempty"`
	FullNameLT           *string  `json:"fullNameLT,omitempty"`
	FullNameLTE          *string  `json:"fullNameLTE,omitempty"`
	FullNameContains     *string  `json:"fullNameContains,omitempty"`
	FullNameHasPrefix    *string  `json:"fullNameHasPrefix,omitempty"`
	FullNameHasSuffix    *string  `json:"fullNameHasSuffix,omitempty"`
	FullNameEqualFold    *string  `json:"fullNameEqualFold,omitempty"`
	FullNameContainsFold *string  `json:"fullNameContainsFold,omitempty"`

	// "skills" edge predicates.
	HasSkills     *bool              `json:"hasSkills,omitempty"`
	HasSkillsWith []*SkillWhereInput `json:"hasSkillsWith,omitempty"`

	// "ability_bonuses" edge predicates.
	HasAbilityBonuses     *bool                     `json:"hasAbilityBonuses,omitempty"`
	HasAbilityBonusesWith []*AbilityBonusWhereInput `json:"hasAbilityBonusesWith,omitempty"`
}

AbilityScoreWhereInput represents a where input for filtering AbilityScore queries.

func (*AbilityScoreWhereInput) AddPredicates

func (i *AbilityScoreWhereInput) AddPredicates(predicates ...predicate.AbilityScore)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*AbilityScoreWhereInput) Filter

Filter applies the AbilityScoreWhereInput filter on the AbilityScoreQuery builder.

func (*AbilityScoreWhereInput) P

P returns a predicate for filtering abilityscores. An error is returned if the input is empty or invalid.

type AbilityScores

type AbilityScores []*AbilityScore

AbilityScores is a parsable slice of AbilityScore.

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

AggregateFunc applies an aggregation step on the group-by traversal/selector.

func As

As is a pseudo aggregation function for renaming another other functions with custom names. For example:

GroupBy(field1, field2).
Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")).
Scan(ctx, &v)

func Count

func Count() AggregateFunc

Count applies the "count" aggregation function on each group.

func Max

func Max(field string) AggregateFunc

Max applies the "max" aggregation function on the given field of each group.

func Mean

func Mean(field string) AggregateFunc

Mean applies the "mean" aggregation function on the given field of each group.

func Min

func Min(field string) AggregateFunc

Min applies the "min" aggregation function on the given field of each group.

func Sum

func Sum(field string) AggregateFunc

Sum applies the "sum" aggregation function on the given field of each group.

type Armor

type Armor struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Indx holds the value of the "indx" field.
	Indx string `json:"index"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// ArmorCategory holds the value of the "armor_category" field.
	ArmorCategory string `json:"armor_category,omitempty"`
	// StealthDisadvantage holds the value of the "stealth_disadvantage" field.
	StealthDisadvantage bool `json:"stealth_disadvantage,omitempty"`
	// MinStrength holds the value of the "min_strength" field.
	MinStrength int `json:"min_strength,omitempty"`
	// EquipmentID holds the value of the "equipment_id" field.
	EquipmentID int `json:"equipment_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ArmorQuery when eager-loading is set.
	Edges ArmorEdges `json:"-"`
	// contains filtered or unexported fields
}

Armor is the model entity for the Armor schema.

func (*Armor) ArmorClass

func (a *Armor) ArmorClass(ctx context.Context) (result []*ArmorClass, err error)

func (*Armor) Equipment

func (a *Armor) Equipment(ctx context.Context) (*Equipment, error)

func (*Armor) IsNode

func (n *Armor) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Armor) MarshalJSON

func (a *Armor) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Armor) NamedArmorClass

func (a *Armor) NamedArmorClass(name string) ([]*ArmorClass, error)

NamedArmorClass returns the ArmorClass named value or an error if the edge was not loaded in eager-loading with this name.

func (*Armor) Node

func (a *Armor) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*Armor) QueryArmorClass

func (a *Armor) QueryArmorClass() *ArmorClassQuery

QueryArmorClass queries the "armor_class" edge of the Armor entity.

func (*Armor) QueryEquipment

func (a *Armor) QueryEquipment() *EquipmentQuery

QueryEquipment queries the "equipment" edge of the Armor entity.

func (*Armor) String

func (a *Armor) String() string

String implements the fmt.Stringer.

func (*Armor) ToEdge

func (a *Armor) ToEdge(order *ArmorOrder) *ArmorEdge

ToEdge converts Armor into ArmorEdge.

func (*Armor) UnmarshalJSON

func (a *Armor) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*Armor) Unwrap

func (a *Armor) Unwrap() *Armor

Unwrap unwraps the Armor entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Armor) Update

func (a *Armor) Update() *ArmorUpdateOne

Update returns a builder for updating this Armor. Note that you need to call Armor.Unwrap() before calling this method if this Armor was returned from a transaction, and the transaction was committed or rolled back.

func (*Armor) Value

func (a *Armor) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Armor. This includes values selected through modifiers, order, etc.

type ArmorClass

type ArmorClass struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Base holds the value of the "base" field.
	Base int `json:"base,omitempty"`
	// DexBonus holds the value of the "dex_bonus" field.
	DexBonus bool `json:"dex_bonus,omitempty"`
	// MaxBonus holds the value of the "max_bonus" field.
	MaxBonus int `json:"max_bonus,omitempty"`
	// contains filtered or unexported fields
}

ArmorClass is the model entity for the ArmorClass schema.

func (*ArmorClass) IsNode

func (n *ArmorClass) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*ArmorClass) Node

func (ac *ArmorClass) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*ArmorClass) String

func (ac *ArmorClass) String() string

String implements the fmt.Stringer.

func (*ArmorClass) ToEdge

func (ac *ArmorClass) ToEdge(order *ArmorClassOrder) *ArmorClassEdge

ToEdge converts ArmorClass into ArmorClassEdge.

func (*ArmorClass) Unwrap

func (ac *ArmorClass) Unwrap() *ArmorClass

Unwrap unwraps the ArmorClass entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*ArmorClass) Update

func (ac *ArmorClass) Update() *ArmorClassUpdateOne

Update returns a builder for updating this ArmorClass. Note that you need to call ArmorClass.Unwrap() before calling this method if this ArmorClass was returned from a transaction, and the transaction was committed or rolled back.

func (*ArmorClass) Value

func (ac *ArmorClass) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ArmorClass. This includes values selected through modifiers, order, etc.

type ArmorClassClient

type ArmorClassClient struct {
	// contains filtered or unexported fields
}

ArmorClassClient is a client for the ArmorClass schema.

func NewArmorClassClient

func NewArmorClassClient(c config) *ArmorClassClient

NewArmorClassClient returns a client for the ArmorClass from the given config.

func (*ArmorClassClient) Create

func (c *ArmorClassClient) Create() *ArmorClassCreate

Create returns a builder for creating a ArmorClass entity.

func (*ArmorClassClient) CreateBulk

func (c *ArmorClassClient) CreateBulk(builders ...*ArmorClassCreate) *ArmorClassCreateBulk

CreateBulk returns a builder for creating a bulk of ArmorClass entities.

func (*ArmorClassClient) Delete

func (c *ArmorClassClient) Delete() *ArmorClassDelete

Delete returns a delete builder for ArmorClass.

func (*ArmorClassClient) DeleteOne

func (c *ArmorClassClient) DeleteOne(ac *ArmorClass) *ArmorClassDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ArmorClassClient) DeleteOneID

func (c *ArmorClassClient) DeleteOneID(id int) *ArmorClassDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ArmorClassClient) Get

func (c *ArmorClassClient) Get(ctx context.Context, id int) (*ArmorClass, error)

Get returns a ArmorClass entity by its id.

func (*ArmorClassClient) GetX

func (c *ArmorClassClient) GetX(ctx context.Context, id int) *ArmorClass

GetX is like Get, but panics if an error occurs.

func (*ArmorClassClient) Hooks

func (c *ArmorClassClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ArmorClassClient) Intercept

func (c *ArmorClassClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `armorclass.Intercept(f(g(h())))`.

func (*ArmorClassClient) Interceptors

func (c *ArmorClassClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ArmorClassClient) Query

func (c *ArmorClassClient) Query() *ArmorClassQuery

Query returns a query builder for ArmorClass.

func (*ArmorClassClient) Update

func (c *ArmorClassClient) Update() *ArmorClassUpdate

Update returns an update builder for ArmorClass.

func (*ArmorClassClient) UpdateOne

func (c *ArmorClassClient) UpdateOne(ac *ArmorClass) *ArmorClassUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ArmorClassClient) UpdateOneID

func (c *ArmorClassClient) UpdateOneID(id int) *ArmorClassUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ArmorClassClient) Use

func (c *ArmorClassClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `armorclass.Hooks(f(g(h())))`.

type ArmorClassConnection

type ArmorClassConnection struct {
	Edges      []*ArmorClassEdge `json:"edges"`
	PageInfo   PageInfo          `json:"pageInfo"`
	TotalCount int               `json:"totalCount"`
}

ArmorClassConnection is the connection containing edges to ArmorClass.

type ArmorClassCreate

type ArmorClassCreate struct {
	// contains filtered or unexported fields
}

ArmorClassCreate is the builder for creating a ArmorClass entity.

func (*ArmorClassCreate) Exec

func (acc *ArmorClassCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ArmorClassCreate) ExecX

func (acc *ArmorClassCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ArmorClassCreate) Mutation

func (acc *ArmorClassCreate) Mutation() *ArmorClassMutation

Mutation returns the ArmorClassMutation object of the builder.

func (*ArmorClassCreate) Save

func (acc *ArmorClassCreate) Save(ctx context.Context) (*ArmorClass, error)

Save creates the ArmorClass in the database.

func (*ArmorClassCreate) SaveX

func (acc *ArmorClassCreate) SaveX(ctx context.Context) *ArmorClass

SaveX calls Save and panics if Save returns an error.

func (*ArmorClassCreate) SetArmorClass

func (acc *ArmorClassCreate) SetArmorClass(input *ArmorClass) *ArmorClassCreate

func (*ArmorClassCreate) SetBase

func (acc *ArmorClassCreate) SetBase(i int) *ArmorClassCreate

SetBase sets the "base" field.

func (*ArmorClassCreate) SetDexBonus

func (acc *ArmorClassCreate) SetDexBonus(b bool) *ArmorClassCreate

SetDexBonus sets the "dex_bonus" field.

func (*ArmorClassCreate) SetMaxBonus

func (acc *ArmorClassCreate) SetMaxBonus(i int) *ArmorClassCreate

SetMaxBonus sets the "max_bonus" field.

func (*ArmorClassCreate) SetNillableMaxBonus

func (acc *ArmorClassCreate) SetNillableMaxBonus(i *int) *ArmorClassCreate

SetNillableMaxBonus sets the "max_bonus" field if the given value is not nil.

type ArmorClassCreateBulk

type ArmorClassCreateBulk struct {
	// contains filtered or unexported fields
}

ArmorClassCreateBulk is the builder for creating many ArmorClass entities in bulk.

func (*ArmorClassCreateBulk) Exec

func (accb *ArmorClassCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ArmorClassCreateBulk) ExecX

func (accb *ArmorClassCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ArmorClassCreateBulk) Save

func (accb *ArmorClassCreateBulk) Save(ctx context.Context) ([]*ArmorClass, error)

Save creates the ArmorClass entities in the database.

func (*ArmorClassCreateBulk) SaveX

func (accb *ArmorClassCreateBulk) SaveX(ctx context.Context) []*ArmorClass

SaveX is like Save, but panics if an error occurs.

type ArmorClassDelete

type ArmorClassDelete struct {
	// contains filtered or unexported fields
}

ArmorClassDelete is the builder for deleting a ArmorClass entity.

func (*ArmorClassDelete) Exec

func (acd *ArmorClassDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ArmorClassDelete) ExecX

func (acd *ArmorClassDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ArmorClassDelete) Where

Where appends a list predicates to the ArmorClassDelete builder.

type ArmorClassDeleteOne

type ArmorClassDeleteOne struct {
	// contains filtered or unexported fields
}

ArmorClassDeleteOne is the builder for deleting a single ArmorClass entity.

func (*ArmorClassDeleteOne) Exec

func (acdo *ArmorClassDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ArmorClassDeleteOne) ExecX

func (acdo *ArmorClassDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ArmorClassDeleteOne) Where

Where appends a list predicates to the ArmorClassDelete builder.

type ArmorClassEdge

type ArmorClassEdge struct {
	Node   *ArmorClass `json:"node"`
	Cursor Cursor      `json:"cursor"`
}

ArmorClassEdge is the edge representation of ArmorClass.

type ArmorClassGroupBy

type ArmorClassGroupBy struct {
	// contains filtered or unexported fields
}

ArmorClassGroupBy is the group-by builder for ArmorClass entities.

func (*ArmorClassGroupBy) Aggregate

func (acgb *ArmorClassGroupBy) Aggregate(fns ...AggregateFunc) *ArmorClassGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ArmorClassGroupBy) Bool

func (s *ArmorClassGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ArmorClassGroupBy) BoolX

func (s *ArmorClassGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ArmorClassGroupBy) Bools

func (s *ArmorClassGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ArmorClassGroupBy) BoolsX

func (s *ArmorClassGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ArmorClassGroupBy) Float64

func (s *ArmorClassGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ArmorClassGroupBy) Float64X

func (s *ArmorClassGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ArmorClassGroupBy) Float64s

func (s *ArmorClassGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ArmorClassGroupBy) Float64sX

func (s *ArmorClassGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ArmorClassGroupBy) Int

func (s *ArmorClassGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ArmorClassGroupBy) IntX

func (s *ArmorClassGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ArmorClassGroupBy) Ints

func (s *ArmorClassGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ArmorClassGroupBy) IntsX

func (s *ArmorClassGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ArmorClassGroupBy) Scan

func (acgb *ArmorClassGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ArmorClassGroupBy) ScanX

func (s *ArmorClassGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ArmorClassGroupBy) String

func (s *ArmorClassGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ArmorClassGroupBy) StringX

func (s *ArmorClassGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ArmorClassGroupBy) Strings

func (s *ArmorClassGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ArmorClassGroupBy) StringsX

func (s *ArmorClassGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ArmorClassMutation

type ArmorClassMutation struct {
	// contains filtered or unexported fields
}

ArmorClassMutation represents an operation that mutates the ArmorClass nodes in the graph.

func (*ArmorClassMutation) AddBase

func (m *ArmorClassMutation) AddBase(i int)

AddBase adds i to the "base" field.

func (*ArmorClassMutation) AddField

func (m *ArmorClassMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ArmorClassMutation) AddMaxBonus

func (m *ArmorClassMutation) AddMaxBonus(i int)

AddMaxBonus adds i to the "max_bonus" field.

func (*ArmorClassMutation) AddedBase

func (m *ArmorClassMutation) AddedBase() (r int, exists bool)

AddedBase returns the value that was added to the "base" field in this mutation.

func (*ArmorClassMutation) AddedEdges

func (m *ArmorClassMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ArmorClassMutation) AddedField

func (m *ArmorClassMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ArmorClassMutation) AddedFields

func (m *ArmorClassMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ArmorClassMutation) AddedIDs

func (m *ArmorClassMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ArmorClassMutation) AddedMaxBonus

func (m *ArmorClassMutation) AddedMaxBonus() (r int, exists bool)

AddedMaxBonus returns the value that was added to the "max_bonus" field in this mutation.

func (*ArmorClassMutation) Base

func (m *ArmorClassMutation) Base() (r int, exists bool)

Base returns the value of the "base" field in the mutation.

func (*ArmorClassMutation) ClearEdge

func (m *ArmorClassMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*ArmorClassMutation) ClearField

func (m *ArmorClassMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*ArmorClassMutation) ClearMaxBonus

func (m *ArmorClassMutation) ClearMaxBonus()

ClearMaxBonus clears the value of the "max_bonus" field.

func (*ArmorClassMutation) ClearedEdges

func (m *ArmorClassMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ArmorClassMutation) ClearedFields

func (m *ArmorClassMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ArmorClassMutation) Client

func (m ArmorClassMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*ArmorClassMutation) DexBonus

func (m *ArmorClassMutation) DexBonus() (r bool, exists bool)

DexBonus returns the value of the "dex_bonus" field in the mutation.

func (*ArmorClassMutation) EdgeCleared

func (m *ArmorClassMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ArmorClassMutation) Field

func (m *ArmorClassMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ArmorClassMutation) FieldCleared

func (m *ArmorClassMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ArmorClassMutation) Fields

func (m *ArmorClassMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*ArmorClassMutation) ID

func (m *ArmorClassMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*ArmorClassMutation) IDs

func (m *ArmorClassMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*ArmorClassMutation) MaxBonus

func (m *ArmorClassMutation) MaxBonus() (r int, exists bool)

MaxBonus returns the value of the "max_bonus" field in the mutation.

func (*ArmorClassMutation) MaxBonusCleared

func (m *ArmorClassMutation) MaxBonusCleared() bool

MaxBonusCleared returns if the "max_bonus" field was cleared in this mutation.

func (*ArmorClassMutation) OldBase

func (m *ArmorClassMutation) OldBase(ctx context.Context) (v int, err error)

OldBase returns the old "base" field's value of the ArmorClass entity. If the ArmorClass object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ArmorClassMutation) OldDexBonus

func (m *ArmorClassMutation) OldDexBonus(ctx context.Context) (v bool, err error)

OldDexBonus returns the old "dex_bonus" field's value of the ArmorClass entity. If the ArmorClass object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ArmorClassMutation) OldField

func (m *ArmorClassMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*ArmorClassMutation) OldMaxBonus

func (m *ArmorClassMutation) OldMaxBonus(ctx context.Context) (v int, err error)

OldMaxBonus returns the old "max_bonus" field's value of the ArmorClass entity. If the ArmorClass object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ArmorClassMutation) Op

func (m *ArmorClassMutation) Op() Op

Op returns the operation name.

func (*ArmorClassMutation) RemovedEdges

func (m *ArmorClassMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ArmorClassMutation) RemovedIDs

func (m *ArmorClassMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*ArmorClassMutation) ResetBase

func (m *ArmorClassMutation) ResetBase()

ResetBase resets all changes to the "base" field.

func (*ArmorClassMutation) ResetDexBonus

func (m *ArmorClassMutation) ResetDexBonus()

ResetDexBonus resets all changes to the "dex_bonus" field.

func (*ArmorClassMutation) ResetEdge

func (m *ArmorClassMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*ArmorClassMutation) ResetField

func (m *ArmorClassMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*ArmorClassMutation) ResetMaxBonus

func (m *ArmorClassMutation) ResetMaxBonus()

ResetMaxBonus resets all changes to the "max_bonus" field.

func (*ArmorClassMutation) SetBase

func (m *ArmorClassMutation) SetBase(i int)

SetBase sets the "base" field.

func (*ArmorClassMutation) SetDexBonus

func (m *ArmorClassMutation) SetDexBonus(b bool)

SetDexBonus sets the "dex_bonus" field.

func (*ArmorClassMutation) SetField

func (m *ArmorClassMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ArmorClassMutation) SetMaxBonus

func (m *ArmorClassMutation) SetMaxBonus(i int)

SetMaxBonus sets the "max_bonus" field.

func (*ArmorClassMutation) SetOp

func (m *ArmorClassMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (ArmorClassMutation) Tx

func (m ArmorClassMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ArmorClassMutation) Type

func (m *ArmorClassMutation) Type() string

Type returns the node type of this mutation (ArmorClass).

func (*ArmorClassMutation) Where

func (m *ArmorClassMutation) Where(ps ...predicate.ArmorClass)

Where appends a list predicates to the ArmorClassMutation builder.

func (*ArmorClassMutation) WhereP

func (m *ArmorClassMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ArmorClassMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ArmorClassOrder

type ArmorClassOrder struct {
	Direction OrderDirection        `json:"direction"`
	Field     *ArmorClassOrderField `json:"field"`
}

ArmorClassOrder defines the ordering of ArmorClass.

type ArmorClassOrderField

type ArmorClassOrderField struct {
	// Value extracts the ordering value from the given ArmorClass.
	Value func(*ArmorClass) (ent.Value, error)
	// contains filtered or unexported fields
}

ArmorClassOrderField defines the ordering field of ArmorClass.

type ArmorClassPaginateOption

type ArmorClassPaginateOption func(*armorclassPager) error

ArmorClassPaginateOption enables pagination customization.

func WithArmorClassFilter

func WithArmorClassFilter(filter func(*ArmorClassQuery) (*ArmorClassQuery, error)) ArmorClassPaginateOption

WithArmorClassFilter configures pagination filter.

func WithArmorClassOrder

func WithArmorClassOrder(order *ArmorClassOrder) ArmorClassPaginateOption

WithArmorClassOrder configures pagination ordering.

type ArmorClassQuery

type ArmorClassQuery struct {
	// contains filtered or unexported fields
}

ArmorClassQuery is the builder for querying ArmorClass entities.

func (*ArmorClassQuery) Aggregate

func (acq *ArmorClassQuery) Aggregate(fns ...AggregateFunc) *ArmorClassSelect

Aggregate returns a ArmorClassSelect configured with the given aggregations.

func (*ArmorClassQuery) All

func (acq *ArmorClassQuery) All(ctx context.Context) ([]*ArmorClass, error)

All executes the query and returns a list of ArmorClasses.

func (*ArmorClassQuery) AllX

func (acq *ArmorClassQuery) AllX(ctx context.Context) []*ArmorClass

AllX is like All, but panics if an error occurs.

func (*ArmorClassQuery) Clone

func (acq *ArmorClassQuery) Clone() *ArmorClassQuery

Clone returns a duplicate of the ArmorClassQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ArmorClassQuery) CollectFields

func (ac *ArmorClassQuery) CollectFields(ctx context.Context, satisfies ...string) (*ArmorClassQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*ArmorClassQuery) Count

func (acq *ArmorClassQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ArmorClassQuery) CountX

func (acq *ArmorClassQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ArmorClassQuery) Exist

func (acq *ArmorClassQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ArmorClassQuery) ExistX

func (acq *ArmorClassQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ArmorClassQuery) First

func (acq *ArmorClassQuery) First(ctx context.Context) (*ArmorClass, error)

First returns the first ArmorClass entity from the query. Returns a *NotFoundError when no ArmorClass was found.

func (*ArmorClassQuery) FirstID

func (acq *ArmorClassQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first ArmorClass ID from the query. Returns a *NotFoundError when no ArmorClass ID was found.

func (*ArmorClassQuery) FirstIDX

func (acq *ArmorClassQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*ArmorClassQuery) FirstX

func (acq *ArmorClassQuery) FirstX(ctx context.Context) *ArmorClass

FirstX is like First, but panics if an error occurs.

func (*ArmorClassQuery) GroupBy

func (acq *ArmorClassQuery) GroupBy(field string, fields ...string) *ArmorClassGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Base int `json:"base,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ArmorClass.Query().
	GroupBy(armorclass.FieldBase).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ArmorClassQuery) IDs

func (acq *ArmorClassQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of ArmorClass IDs.

func (*ArmorClassQuery) IDsX

func (acq *ArmorClassQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*ArmorClassQuery) Limit

func (acq *ArmorClassQuery) Limit(limit int) *ArmorClassQuery

Limit the number of records to be returned by this query.

func (*ArmorClassQuery) Offset

func (acq *ArmorClassQuery) Offset(offset int) *ArmorClassQuery

Offset to start from.

func (*ArmorClassQuery) Only

func (acq *ArmorClassQuery) Only(ctx context.Context) (*ArmorClass, error)

Only returns a single ArmorClass entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ArmorClass entity is found. Returns a *NotFoundError when no ArmorClass entities are found.

func (*ArmorClassQuery) OnlyID

func (acq *ArmorClassQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only ArmorClass ID in the query. Returns a *NotSingularError when more than one ArmorClass ID is found. Returns a *NotFoundError when no entities are found.

func (*ArmorClassQuery) OnlyIDX

func (acq *ArmorClassQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ArmorClassQuery) OnlyX

func (acq *ArmorClassQuery) OnlyX(ctx context.Context) *ArmorClass

OnlyX is like Only, but panics if an error occurs.

func (*ArmorClassQuery) Order

Order specifies how the records should be ordered.

func (*ArmorClassQuery) Paginate

func (ac *ArmorClassQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...ArmorClassPaginateOption,
) (*ArmorClassConnection, error)

Paginate executes the query and returns a relay based cursor connection to ArmorClass.

func (*ArmorClassQuery) Select

func (acq *ArmorClassQuery) Select(fields ...string) *ArmorClassSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Base int `json:"base,omitempty"`
}

client.ArmorClass.Query().
	Select(armorclass.FieldBase).
	Scan(ctx, &v)

func (*ArmorClassQuery) Unique

func (acq *ArmorClassQuery) Unique(unique bool) *ArmorClassQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*ArmorClassQuery) Where

Where adds a new predicate for the ArmorClassQuery builder.

type ArmorClassSelect

type ArmorClassSelect struct {
	*ArmorClassQuery
	// contains filtered or unexported fields
}

ArmorClassSelect is the builder for selecting fields of ArmorClass entities.

func (*ArmorClassSelect) Aggregate

func (acs *ArmorClassSelect) Aggregate(fns ...AggregateFunc) *ArmorClassSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ArmorClassSelect) Bool

func (s *ArmorClassSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ArmorClassSelect) BoolX

func (s *ArmorClassSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ArmorClassSelect) Bools

func (s *ArmorClassSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ArmorClassSelect) BoolsX

func (s *ArmorClassSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ArmorClassSelect) Float64

func (s *ArmorClassSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ArmorClassSelect) Float64X

func (s *ArmorClassSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ArmorClassSelect) Float64s

func (s *ArmorClassSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ArmorClassSelect) Float64sX

func (s *ArmorClassSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ArmorClassSelect) Int

func (s *ArmorClassSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ArmorClassSelect) IntX

func (s *ArmorClassSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ArmorClassSelect) Ints

func (s *ArmorClassSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ArmorClassSelect) IntsX

func (s *ArmorClassSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ArmorClassSelect) Scan

func (acs *ArmorClassSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ArmorClassSelect) ScanX

func (s *ArmorClassSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ArmorClassSelect) String

func (s *ArmorClassSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ArmorClassSelect) StringX

func (s *ArmorClassSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ArmorClassSelect) Strings

func (s *ArmorClassSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ArmorClassSelect) StringsX

func (s *ArmorClassSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ArmorClassUpdate

type ArmorClassUpdate struct {
	// contains filtered or unexported fields
}

ArmorClassUpdate is the builder for updating ArmorClass entities.

func (*ArmorClassUpdate) AddBase

func (acu *ArmorClassUpdate) AddBase(i int) *ArmorClassUpdate

AddBase adds i to the "base" field.

func (*ArmorClassUpdate) AddMaxBonus

func (acu *ArmorClassUpdate) AddMaxBonus(i int) *ArmorClassUpdate

AddMaxBonus adds i to the "max_bonus" field.

func (*ArmorClassUpdate) ClearMaxBonus

func (acu *ArmorClassUpdate) ClearMaxBonus() *ArmorClassUpdate

ClearMaxBonus clears the value of the "max_bonus" field.

func (*ArmorClassUpdate) Exec

func (acu *ArmorClassUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ArmorClassUpdate) ExecX

func (acu *ArmorClassUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ArmorClassUpdate) Mutation

func (acu *ArmorClassUpdate) Mutation() *ArmorClassMutation

Mutation returns the ArmorClassMutation object of the builder.

func (*ArmorClassUpdate) Save

func (acu *ArmorClassUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ArmorClassUpdate) SaveX

func (acu *ArmorClassUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ArmorClassUpdate) SetBase

func (acu *ArmorClassUpdate) SetBase(i int) *ArmorClassUpdate

SetBase sets the "base" field.

func (*ArmorClassUpdate) SetDexBonus

func (acu *ArmorClassUpdate) SetDexBonus(b bool) *ArmorClassUpdate

SetDexBonus sets the "dex_bonus" field.

func (*ArmorClassUpdate) SetMaxBonus

func (acu *ArmorClassUpdate) SetMaxBonus(i int) *ArmorClassUpdate

SetMaxBonus sets the "max_bonus" field.

func (*ArmorClassUpdate) SetNillableMaxBonus

func (acu *ArmorClassUpdate) SetNillableMaxBonus(i *int) *ArmorClassUpdate

SetNillableMaxBonus sets the "max_bonus" field if the given value is not nil.

func (*ArmorClassUpdate) Where

Where appends a list predicates to the ArmorClassUpdate builder.

type ArmorClassUpdateOne

type ArmorClassUpdateOne struct {
	// contains filtered or unexported fields
}

ArmorClassUpdateOne is the builder for updating a single ArmorClass entity.

func (*ArmorClassUpdateOne) AddBase

func (acuo *ArmorClassUpdateOne) AddBase(i int) *ArmorClassUpdateOne

AddBase adds i to the "base" field.

func (*ArmorClassUpdateOne) AddMaxBonus

func (acuo *ArmorClassUpdateOne) AddMaxBonus(i int) *ArmorClassUpdateOne

AddMaxBonus adds i to the "max_bonus" field.

func (*ArmorClassUpdateOne) ClearMaxBonus

func (acuo *ArmorClassUpdateOne) ClearMaxBonus() *ArmorClassUpdateOne

ClearMaxBonus clears the value of the "max_bonus" field.

func (*ArmorClassUpdateOne) Exec

func (acuo *ArmorClassUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ArmorClassUpdateOne) ExecX

func (acuo *ArmorClassUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ArmorClassUpdateOne) Mutation

func (acuo *ArmorClassUpdateOne) Mutation() *ArmorClassMutation

Mutation returns the ArmorClassMutation object of the builder.

func (*ArmorClassUpdateOne) Save

func (acuo *ArmorClassUpdateOne) Save(ctx context.Context) (*ArmorClass, error)

Save executes the query and returns the updated ArmorClass entity.

func (*ArmorClassUpdateOne) SaveX

func (acuo *ArmorClassUpdateOne) SaveX(ctx context.Context) *ArmorClass

SaveX is like Save, but panics if an error occurs.

func (*ArmorClassUpdateOne) Select

func (acuo *ArmorClassUpdateOne) Select(field string, fields ...string) *ArmorClassUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ArmorClassUpdateOne) SetBase

func (acuo *ArmorClassUpdateOne) SetBase(i int) *ArmorClassUpdateOne

SetBase sets the "base" field.

func (*ArmorClassUpdateOne) SetDexBonus

func (acuo *ArmorClassUpdateOne) SetDexBonus(b bool) *ArmorClassUpdateOne

SetDexBonus sets the "dex_bonus" field.

func (*ArmorClassUpdateOne) SetMaxBonus

func (acuo *ArmorClassUpdateOne) SetMaxBonus(i int) *ArmorClassUpdateOne

SetMaxBonus sets the "max_bonus" field.

func (*ArmorClassUpdateOne) SetNillableMaxBonus

func (acuo *ArmorClassUpdateOne) SetNillableMaxBonus(i *int) *ArmorClassUpdateOne

SetNillableMaxBonus sets the "max_bonus" field if the given value is not nil.

func (*ArmorClassUpdateOne) Where

Where appends a list predicates to the ArmorClassUpdate builder.

type ArmorClassWhereInput

type ArmorClassWhereInput struct {
	Predicates []predicate.ArmorClass  `json:"-"`
	Not        *ArmorClassWhereInput   `json:"not,omitempty"`
	Or         []*ArmorClassWhereInput `json:"or,omitempty"`
	And        []*ArmorClassWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "base" field predicates.
	Base      *int  `json:"base,omitempty"`
	BaseNEQ   *int  `json:"baseNEQ,omitempty"`
	BaseIn    []int `json:"baseIn,omitempty"`
	BaseNotIn []int `json:"baseNotIn,omitempty"`
	BaseGT    *int  `json:"baseGT,omitempty"`
	BaseGTE   *int  `json:"baseGTE,omitempty"`
	BaseLT    *int  `json:"baseLT,omitempty"`
	BaseLTE   *int  `json:"baseLTE,omitempty"`

	// "dex_bonus" field predicates.
	DexBonus    *bool `json:"dexBonus,omitempty"`
	DexBonusNEQ *bool `json:"dexBonusNEQ,omitempty"`

	// "max_bonus" field predicates.
	MaxBonus       *int  `json:"maxBonus,omitempty"`
	MaxBonusNEQ    *int  `json:"maxBonusNEQ,omitempty"`
	MaxBonusIn     []int `json:"maxBonusIn,omitempty"`
	MaxBonusNotIn  []int `json:"maxBonusNotIn,omitempty"`
	MaxBonusGT     *int  `json:"maxBonusGT,omitempty"`
	MaxBonusGTE    *int  `json:"maxBonusGTE,omitempty"`
	MaxBonusLT     *int  `json:"maxBonusLT,omitempty"`
	MaxBonusLTE    *int  `json:"maxBonusLTE,omitempty"`
	MaxBonusIsNil  bool  `json:"maxBonusIsNil,omitempty"`
	MaxBonusNotNil bool  `json:"maxBonusNotNil,omitempty"`
}

ArmorClassWhereInput represents a where input for filtering ArmorClass queries.

func (*ArmorClassWhereInput) AddPredicates

func (i *ArmorClassWhereInput) AddPredicates(predicates ...predicate.ArmorClass)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*ArmorClassWhereInput) Filter

Filter applies the ArmorClassWhereInput filter on the ArmorClassQuery builder.

func (*ArmorClassWhereInput) P

P returns a predicate for filtering armorclasses. An error is returned if the input is empty or invalid.

type ArmorClasses

type ArmorClasses []*ArmorClass

ArmorClasses is a parsable slice of ArmorClass.

type ArmorClient

type ArmorClient struct {
	// contains filtered or unexported fields
}

ArmorClient is a client for the Armor schema.

func NewArmorClient

func NewArmorClient(c config) *ArmorClient

NewArmorClient returns a client for the Armor from the given config.

func (*ArmorClient) Create

func (c *ArmorClient) Create() *ArmorCreate

Create returns a builder for creating a Armor entity.

func (*ArmorClient) CreateBulk

func (c *ArmorClient) CreateBulk(builders ...*ArmorCreate) *ArmorCreateBulk

CreateBulk returns a builder for creating a bulk of Armor entities.

func (*ArmorClient) Delete

func (c *ArmorClient) Delete() *ArmorDelete

Delete returns a delete builder for Armor.

func (*ArmorClient) DeleteOne

func (c *ArmorClient) DeleteOne(a *Armor) *ArmorDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ArmorClient) DeleteOneID

func (c *ArmorClient) DeleteOneID(id int) *ArmorDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ArmorClient) Get

func (c *ArmorClient) Get(ctx context.Context, id int) (*Armor, error)

Get returns a Armor entity by its id.

func (*ArmorClient) GetX

func (c *ArmorClient) GetX(ctx context.Context, id int) *Armor

GetX is like Get, but panics if an error occurs.

func (*ArmorClient) Hooks

func (c *ArmorClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ArmorClient) Intercept

func (c *ArmorClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `armor.Intercept(f(g(h())))`.

func (*ArmorClient) Interceptors

func (c *ArmorClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ArmorClient) Query

func (c *ArmorClient) Query() *ArmorQuery

Query returns a query builder for Armor.

func (*ArmorClient) QueryArmorClass

func (c *ArmorClient) QueryArmorClass(a *Armor) *ArmorClassQuery

QueryArmorClass queries the armor_class edge of a Armor.

func (*ArmorClient) QueryEquipment

func (c *ArmorClient) QueryEquipment(a *Armor) *EquipmentQuery

QueryEquipment queries the equipment edge of a Armor.

func (*ArmorClient) Update

func (c *ArmorClient) Update() *ArmorUpdate

Update returns an update builder for Armor.

func (*ArmorClient) UpdateOne

func (c *ArmorClient) UpdateOne(a *Armor) *ArmorUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ArmorClient) UpdateOneID

func (c *ArmorClient) UpdateOneID(id int) *ArmorUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ArmorClient) Use

func (c *ArmorClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `armor.Hooks(f(g(h())))`.

type ArmorConnection

type ArmorConnection struct {
	Edges      []*ArmorEdge `json:"edges"`
	PageInfo   PageInfo     `json:"pageInfo"`
	TotalCount int          `json:"totalCount"`
}

ArmorConnection is the connection containing edges to Armor.

type ArmorCreate

type ArmorCreate struct {
	// contains filtered or unexported fields
}

ArmorCreate is the builder for creating a Armor entity.

func (*ArmorCreate) AddArmorClasIDs

func (ac *ArmorCreate) AddArmorClasIDs(ids ...int) *ArmorCreate

AddArmorClasIDs adds the "armor_class" edge to the ArmorClass entity by IDs.

func (*ArmorCreate) AddArmorClass

func (ac *ArmorCreate) AddArmorClass(a ...*ArmorClass) *ArmorCreate

AddArmorClass adds the "armor_class" edges to the ArmorClass entity.

func (*ArmorCreate) Exec

func (ac *ArmorCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ArmorCreate) ExecX

func (ac *ArmorCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ArmorCreate) Mutation

func (ac *ArmorCreate) Mutation() *ArmorMutation

Mutation returns the ArmorMutation object of the builder.

func (*ArmorCreate) Save

func (ac *ArmorCreate) Save(ctx context.Context) (*Armor, error)

Save creates the Armor in the database.

func (*ArmorCreate) SaveX

func (ac *ArmorCreate) SaveX(ctx context.Context) *Armor

SaveX calls Save and panics if Save returns an error.

func (*ArmorCreate) SetArmor

func (ac *ArmorCreate) SetArmor(input *Armor) *ArmorCreate

func (*ArmorCreate) SetArmorCategory

func (ac *ArmorCreate) SetArmorCategory(s string) *ArmorCreate

SetArmorCategory sets the "armor_category" field.

func (*ArmorCreate) SetEquipment

func (ac *ArmorCreate) SetEquipment(e *Equipment) *ArmorCreate

SetEquipment sets the "equipment" edge to the Equipment entity.

func (*ArmorCreate) SetEquipmentID

func (ac *ArmorCreate) SetEquipmentID(i int) *ArmorCreate

SetEquipmentID sets the "equipment_id" field.

func (*ArmorCreate) SetIndx

func (ac *ArmorCreate) SetIndx(s string) *ArmorCreate

SetIndx sets the "indx" field.

func (*ArmorCreate) SetMinStrength

func (ac *ArmorCreate) SetMinStrength(i int) *ArmorCreate

SetMinStrength sets the "min_strength" field.

func (*ArmorCreate) SetName

func (ac *ArmorCreate) SetName(s string) *ArmorCreate

SetName sets the "name" field.

func (*ArmorCreate) SetStealthDisadvantage

func (ac *ArmorCreate) SetStealthDisadvantage(b bool) *ArmorCreate

SetStealthDisadvantage sets the "stealth_disadvantage" field.

type ArmorCreateBulk

type ArmorCreateBulk struct {
	// contains filtered or unexported fields
}

ArmorCreateBulk is the builder for creating many Armor entities in bulk.

func (*ArmorCreateBulk) Exec

func (acb *ArmorCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ArmorCreateBulk) ExecX

func (acb *ArmorCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ArmorCreateBulk) Save

func (acb *ArmorCreateBulk) Save(ctx context.Context) ([]*Armor, error)

Save creates the Armor entities in the database.

func (*ArmorCreateBulk) SaveX

func (acb *ArmorCreateBulk) SaveX(ctx context.Context) []*Armor

SaveX is like Save, but panics if an error occurs.

type ArmorDelete

type ArmorDelete struct {
	// contains filtered or unexported fields
}

ArmorDelete is the builder for deleting a Armor entity.

func (*ArmorDelete) Exec

func (ad *ArmorDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ArmorDelete) ExecX

func (ad *ArmorDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ArmorDelete) Where

func (ad *ArmorDelete) Where(ps ...predicate.Armor) *ArmorDelete

Where appends a list predicates to the ArmorDelete builder.

type ArmorDeleteOne

type ArmorDeleteOne struct {
	// contains filtered or unexported fields
}

ArmorDeleteOne is the builder for deleting a single Armor entity.

func (*ArmorDeleteOne) Exec

func (ado *ArmorDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ArmorDeleteOne) ExecX

func (ado *ArmorDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ArmorDeleteOne) Where

func (ado *ArmorDeleteOne) Where(ps ...predicate.Armor) *ArmorDeleteOne

Where appends a list predicates to the ArmorDelete builder.

type ArmorEdge

type ArmorEdge struct {
	Node   *Armor `json:"node"`
	Cursor Cursor `json:"cursor"`
}

ArmorEdge is the edge representation of Armor.

type ArmorEdges

type ArmorEdges struct {
	// Equipment holds the value of the equipment edge.
	Equipment *Equipment `json:"equipment,omitempty"`
	// ArmorClass holds the value of the armor_class edge.
	ArmorClass []*ArmorClass `json:"armor_class,omitempty"`
	// contains filtered or unexported fields
}

ArmorEdges holds the relations/edges for other nodes in the graph.

func (ArmorEdges) ArmorClassOrErr

func (e ArmorEdges) ArmorClassOrErr() ([]*ArmorClass, error)

ArmorClassOrErr returns the ArmorClass value or an error if the edge was not loaded in eager-loading.

func (ArmorEdges) EquipmentOrErr

func (e ArmorEdges) EquipmentOrErr() (*Equipment, error)

EquipmentOrErr returns the Equipment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ArmorGroupBy

type ArmorGroupBy struct {
	// contains filtered or unexported fields
}

ArmorGroupBy is the group-by builder for Armor entities.

func (*ArmorGroupBy) Aggregate

func (agb *ArmorGroupBy) Aggregate(fns ...AggregateFunc) *ArmorGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ArmorGroupBy) Bool

func (s *ArmorGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ArmorGroupBy) BoolX

func (s *ArmorGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ArmorGroupBy) Bools

func (s *ArmorGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ArmorGroupBy) BoolsX

func (s *ArmorGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ArmorGroupBy) Float64

func (s *ArmorGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ArmorGroupBy) Float64X

func (s *ArmorGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ArmorGroupBy) Float64s

func (s *ArmorGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ArmorGroupBy) Float64sX

func (s *ArmorGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ArmorGroupBy) Int

func (s *ArmorGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ArmorGroupBy) IntX

func (s *ArmorGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ArmorGroupBy) Ints

func (s *ArmorGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ArmorGroupBy) IntsX

func (s *ArmorGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ArmorGroupBy) Scan

func (agb *ArmorGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ArmorGroupBy) ScanX

func (s *ArmorGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ArmorGroupBy) String

func (s *ArmorGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ArmorGroupBy) StringX

func (s *ArmorGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ArmorGroupBy) Strings

func (s *ArmorGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ArmorGroupBy) StringsX

func (s *ArmorGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ArmorMutation

type ArmorMutation struct {
	// contains filtered or unexported fields
}

ArmorMutation represents an operation that mutates the Armor nodes in the graph.

func (*ArmorMutation) AddArmorClasIDs

func (m *ArmorMutation) AddArmorClasIDs(ids ...int)

AddArmorClasIDs adds the "armor_class" edge to the ArmorClass entity by ids.

func (*ArmorMutation) AddField

func (m *ArmorMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ArmorMutation) AddMinStrength

func (m *ArmorMutation) AddMinStrength(i int)

AddMinStrength adds i to the "min_strength" field.

func (*ArmorMutation) AddedEdges

func (m *ArmorMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ArmorMutation) AddedField

func (m *ArmorMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ArmorMutation) AddedFields

func (m *ArmorMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ArmorMutation) AddedIDs

func (m *ArmorMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ArmorMutation) AddedMinStrength

func (m *ArmorMutation) AddedMinStrength() (r int, exists bool)

AddedMinStrength returns the value that was added to the "min_strength" field in this mutation.

func (*ArmorMutation) ArmorCategory

func (m *ArmorMutation) ArmorCategory() (r string, exists bool)

ArmorCategory returns the value of the "armor_category" field in the mutation.

func (*ArmorMutation) ArmorClassCleared

func (m *ArmorMutation) ArmorClassCleared() bool

ArmorClassCleared reports if the "armor_class" edge to the ArmorClass entity was cleared.

func (*ArmorMutation) ArmorClassIDs

func (m *ArmorMutation) ArmorClassIDs() (ids []int)

ArmorClassIDs returns the "armor_class" edge IDs in the mutation.

func (*ArmorMutation) ClearArmorClass

func (m *ArmorMutation) ClearArmorClass()

ClearArmorClass clears the "armor_class" edge to the ArmorClass entity.

func (*ArmorMutation) ClearEdge

func (m *ArmorMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*ArmorMutation) ClearEquipment

func (m *ArmorMutation) ClearEquipment()

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*ArmorMutation) ClearField

func (m *ArmorMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*ArmorMutation) ClearedEdges

func (m *ArmorMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ArmorMutation) ClearedFields

func (m *ArmorMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ArmorMutation) Client

func (m ArmorMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*ArmorMutation) EdgeCleared

func (m *ArmorMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ArmorMutation) EquipmentCleared

func (m *ArmorMutation) EquipmentCleared() bool

EquipmentCleared reports if the "equipment" edge to the Equipment entity was cleared.

func (*ArmorMutation) EquipmentID

func (m *ArmorMutation) EquipmentID() (r int, exists bool)

EquipmentID returns the value of the "equipment_id" field in the mutation.

func (*ArmorMutation) EquipmentIDs

func (m *ArmorMutation) EquipmentIDs() (ids []int)

EquipmentIDs returns the "equipment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EquipmentID instead. It exists only for internal usage by the builders.

func (*ArmorMutation) Field

func (m *ArmorMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ArmorMutation) FieldCleared

func (m *ArmorMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ArmorMutation) Fields

func (m *ArmorMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*ArmorMutation) ID

func (m *ArmorMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*ArmorMutation) IDs

func (m *ArmorMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*ArmorMutation) Indx

func (m *ArmorMutation) Indx() (r string, exists bool)

Indx returns the value of the "indx" field in the mutation.

func (*ArmorMutation) MinStrength

func (m *ArmorMutation) MinStrength() (r int, exists bool)

MinStrength returns the value of the "min_strength" field in the mutation.

func (*ArmorMutation) Name

func (m *ArmorMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ArmorMutation) OldArmorCategory

func (m *ArmorMutation) OldArmorCategory(ctx context.Context) (v string, err error)

OldArmorCategory returns the old "armor_category" field's value of the Armor entity. If the Armor object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ArmorMutation) OldEquipmentID

func (m *ArmorMutation) OldEquipmentID(ctx context.Context) (v int, err error)

OldEquipmentID returns the old "equipment_id" field's value of the Armor entity. If the Armor object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ArmorMutation) OldField

func (m *ArmorMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*ArmorMutation) OldIndx

func (m *ArmorMutation) OldIndx(ctx context.Context) (v string, err error)

OldIndx returns the old "indx" field's value of the Armor entity. If the Armor object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ArmorMutation) OldMinStrength

func (m *ArmorMutation) OldMinStrength(ctx context.Context) (v int, err error)

OldMinStrength returns the old "min_strength" field's value of the Armor entity. If the Armor object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ArmorMutation) OldName

func (m *ArmorMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Armor entity. If the Armor object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ArmorMutation) OldStealthDisadvantage

func (m *ArmorMutation) OldStealthDisadvantage(ctx context.Context) (v bool, err error)

OldStealthDisadvantage returns the old "stealth_disadvantage" field's value of the Armor entity. If the Armor object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ArmorMutation) Op

func (m *ArmorMutation) Op() Op

Op returns the operation name.

func (*ArmorMutation) RemoveArmorClasIDs

func (m *ArmorMutation) RemoveArmorClasIDs(ids ...int)

RemoveArmorClasIDs removes the "armor_class" edge to the ArmorClass entity by IDs.

func (*ArmorMutation) RemovedArmorClassIDs

func (m *ArmorMutation) RemovedArmorClassIDs() (ids []int)

RemovedArmorClass returns the removed IDs of the "armor_class" edge to the ArmorClass entity.

func (*ArmorMutation) RemovedEdges

func (m *ArmorMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ArmorMutation) RemovedIDs

func (m *ArmorMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*ArmorMutation) ResetArmorCategory

func (m *ArmorMutation) ResetArmorCategory()

ResetArmorCategory resets all changes to the "armor_category" field.

func (*ArmorMutation) ResetArmorClass

func (m *ArmorMutation) ResetArmorClass()

ResetArmorClass resets all changes to the "armor_class" edge.

func (*ArmorMutation) ResetEdge

func (m *ArmorMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*ArmorMutation) ResetEquipment

func (m *ArmorMutation) ResetEquipment()

ResetEquipment resets all changes to the "equipment" edge.

func (*ArmorMutation) ResetEquipmentID

func (m *ArmorMutation) ResetEquipmentID()

ResetEquipmentID resets all changes to the "equipment_id" field.

func (*ArmorMutation) ResetField

func (m *ArmorMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*ArmorMutation) ResetIndx

func (m *ArmorMutation) ResetIndx()

ResetIndx resets all changes to the "indx" field.

func (*ArmorMutation) ResetMinStrength

func (m *ArmorMutation) ResetMinStrength()

ResetMinStrength resets all changes to the "min_strength" field.

func (*ArmorMutation) ResetName

func (m *ArmorMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ArmorMutation) ResetStealthDisadvantage

func (m *ArmorMutation) ResetStealthDisadvantage()

ResetStealthDisadvantage resets all changes to the "stealth_disadvantage" field.

func (*ArmorMutation) SetArmorCategory

func (m *ArmorMutation) SetArmorCategory(s string)

SetArmorCategory sets the "armor_category" field.

func (*ArmorMutation) SetEquipmentID

func (m *ArmorMutation) SetEquipmentID(i int)

SetEquipmentID sets the "equipment_id" field.

func (*ArmorMutation) SetField

func (m *ArmorMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ArmorMutation) SetIndx

func (m *ArmorMutation) SetIndx(s string)

SetIndx sets the "indx" field.

func (*ArmorMutation) SetMinStrength

func (m *ArmorMutation) SetMinStrength(i int)

SetMinStrength sets the "min_strength" field.

func (*ArmorMutation) SetName

func (m *ArmorMutation) SetName(s string)

SetName sets the "name" field.

func (*ArmorMutation) SetOp

func (m *ArmorMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ArmorMutation) SetStealthDisadvantage

func (m *ArmorMutation) SetStealthDisadvantage(b bool)

SetStealthDisadvantage sets the "stealth_disadvantage" field.

func (*ArmorMutation) StealthDisadvantage

func (m *ArmorMutation) StealthDisadvantage() (r bool, exists bool)

StealthDisadvantage returns the value of the "stealth_disadvantage" field in the mutation.

func (ArmorMutation) Tx

func (m ArmorMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ArmorMutation) Type

func (m *ArmorMutation) Type() string

Type returns the node type of this mutation (Armor).

func (*ArmorMutation) Where

func (m *ArmorMutation) Where(ps ...predicate.Armor)

Where appends a list predicates to the ArmorMutation builder.

func (*ArmorMutation) WhereP

func (m *ArmorMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ArmorMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ArmorOrder

type ArmorOrder struct {
	Direction OrderDirection   `json:"direction"`
	Field     *ArmorOrderField `json:"field"`
}

ArmorOrder defines the ordering of Armor.

type ArmorOrderField

type ArmorOrderField struct {
	// Value extracts the ordering value from the given Armor.
	Value func(*Armor) (ent.Value, error)
	// contains filtered or unexported fields
}

ArmorOrderField defines the ordering field of Armor.

func (ArmorOrderField) MarshalGQL

func (f ArmorOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (ArmorOrderField) String

func (f ArmorOrderField) String() string

String implement fmt.Stringer interface.

func (*ArmorOrderField) UnmarshalGQL

func (f *ArmorOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type ArmorPaginateOption

type ArmorPaginateOption func(*armorPager) error

ArmorPaginateOption enables pagination customization.

func WithArmorFilter

func WithArmorFilter(filter func(*ArmorQuery) (*ArmorQuery, error)) ArmorPaginateOption

WithArmorFilter configures pagination filter.

func WithArmorOrder

func WithArmorOrder(order *ArmorOrder) ArmorPaginateOption

WithArmorOrder configures pagination ordering.

type ArmorQuery

type ArmorQuery struct {
	// contains filtered or unexported fields
}

ArmorQuery is the builder for querying Armor entities.

func (*ArmorQuery) Aggregate

func (aq *ArmorQuery) Aggregate(fns ...AggregateFunc) *ArmorSelect

Aggregate returns a ArmorSelect configured with the given aggregations.

func (*ArmorQuery) All

func (aq *ArmorQuery) All(ctx context.Context) ([]*Armor, error)

All executes the query and returns a list of Armors.

func (*ArmorQuery) AllX

func (aq *ArmorQuery) AllX(ctx context.Context) []*Armor

AllX is like All, but panics if an error occurs.

func (*ArmorQuery) Clone

func (aq *ArmorQuery) Clone() *ArmorQuery

Clone returns a duplicate of the ArmorQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ArmorQuery) CollectFields

func (a *ArmorQuery) CollectFields(ctx context.Context, satisfies ...string) (*ArmorQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*ArmorQuery) Count

func (aq *ArmorQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ArmorQuery) CountX

func (aq *ArmorQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ArmorQuery) Exist

func (aq *ArmorQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ArmorQuery) ExistX

func (aq *ArmorQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ArmorQuery) First

func (aq *ArmorQuery) First(ctx context.Context) (*Armor, error)

First returns the first Armor entity from the query. Returns a *NotFoundError when no Armor was found.

func (*ArmorQuery) FirstID

func (aq *ArmorQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Armor ID from the query. Returns a *NotFoundError when no Armor ID was found.

func (*ArmorQuery) FirstIDX

func (aq *ArmorQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*ArmorQuery) FirstX

func (aq *ArmorQuery) FirstX(ctx context.Context) *Armor

FirstX is like First, but panics if an error occurs.

func (*ArmorQuery) GroupBy

func (aq *ArmorQuery) GroupBy(field string, fields ...string) *ArmorGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Indx string `json:"index"`
	Count int `json:"count,omitempty"`
}

client.Armor.Query().
	GroupBy(armor.FieldIndx).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ArmorQuery) IDs

func (aq *ArmorQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Armor IDs.

func (*ArmorQuery) IDsX

func (aq *ArmorQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*ArmorQuery) Limit

func (aq *ArmorQuery) Limit(limit int) *ArmorQuery

Limit the number of records to be returned by this query.

func (*ArmorQuery) Offset

func (aq *ArmorQuery) Offset(offset int) *ArmorQuery

Offset to start from.

func (*ArmorQuery) Only

func (aq *ArmorQuery) Only(ctx context.Context) (*Armor, error)

Only returns a single Armor entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Armor entity is found. Returns a *NotFoundError when no Armor entities are found.

func (*ArmorQuery) OnlyID

func (aq *ArmorQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Armor ID in the query. Returns a *NotSingularError when more than one Armor ID is found. Returns a *NotFoundError when no entities are found.

func (*ArmorQuery) OnlyIDX

func (aq *ArmorQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ArmorQuery) OnlyX

func (aq *ArmorQuery) OnlyX(ctx context.Context) *Armor

OnlyX is like Only, but panics if an error occurs.

func (*ArmorQuery) Order

func (aq *ArmorQuery) Order(o ...armor.OrderOption) *ArmorQuery

Order specifies how the records should be ordered.

func (*ArmorQuery) Paginate

func (a *ArmorQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...ArmorPaginateOption,
) (*ArmorConnection, error)

Paginate executes the query and returns a relay based cursor connection to Armor.

func (*ArmorQuery) QueryArmorClass

func (aq *ArmorQuery) QueryArmorClass() *ArmorClassQuery

QueryArmorClass chains the current query on the "armor_class" edge.

func (*ArmorQuery) QueryEquipment

func (aq *ArmorQuery) QueryEquipment() *EquipmentQuery

QueryEquipment chains the current query on the "equipment" edge.

func (*ArmorQuery) Select

func (aq *ArmorQuery) Select(fields ...string) *ArmorSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Indx string `json:"index"`
}

client.Armor.Query().
	Select(armor.FieldIndx).
	Scan(ctx, &v)

func (*ArmorQuery) Unique

func (aq *ArmorQuery) Unique(unique bool) *ArmorQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*ArmorQuery) Where

func (aq *ArmorQuery) Where(ps ...predicate.Armor) *ArmorQuery

Where adds a new predicate for the ArmorQuery builder.

func (*ArmorQuery) WithArmorClass

func (aq *ArmorQuery) WithArmorClass(opts ...func(*ArmorClassQuery)) *ArmorQuery

WithArmorClass tells the query-builder to eager-load the nodes that are connected to the "armor_class" edge. The optional arguments are used to configure the query builder of the edge.

func (*ArmorQuery) WithEquipment

func (aq *ArmorQuery) WithEquipment(opts ...func(*EquipmentQuery)) *ArmorQuery

WithEquipment tells the query-builder to eager-load the nodes that are connected to the "equipment" edge. The optional arguments are used to configure the query builder of the edge.

func (*ArmorQuery) WithNamedArmorClass

func (aq *ArmorQuery) WithNamedArmorClass(name string, opts ...func(*ArmorClassQuery)) *ArmorQuery

WithNamedArmorClass tells the query-builder to eager-load the nodes that are connected to the "armor_class" edge with the given name. The optional arguments are used to configure the query builder of the edge.

type ArmorSelect

type ArmorSelect struct {
	*ArmorQuery
	// contains filtered or unexported fields
}

ArmorSelect is the builder for selecting fields of Armor entities.

func (*ArmorSelect) Aggregate

func (as *ArmorSelect) Aggregate(fns ...AggregateFunc) *ArmorSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ArmorSelect) Bool

func (s *ArmorSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ArmorSelect) BoolX

func (s *ArmorSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ArmorSelect) Bools

func (s *ArmorSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ArmorSelect) BoolsX

func (s *ArmorSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ArmorSelect) Float64

func (s *ArmorSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ArmorSelect) Float64X

func (s *ArmorSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ArmorSelect) Float64s

func (s *ArmorSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ArmorSelect) Float64sX

func (s *ArmorSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ArmorSelect) Int

func (s *ArmorSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ArmorSelect) IntX

func (s *ArmorSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ArmorSelect) Ints

func (s *ArmorSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ArmorSelect) IntsX

func (s *ArmorSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ArmorSelect) Scan

func (as *ArmorSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ArmorSelect) ScanX

func (s *ArmorSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ArmorSelect) String

func (s *ArmorSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ArmorSelect) StringX

func (s *ArmorSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ArmorSelect) Strings

func (s *ArmorSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ArmorSelect) StringsX

func (s *ArmorSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ArmorUpdate

type ArmorUpdate struct {
	// contains filtered or unexported fields
}

ArmorUpdate is the builder for updating Armor entities.

func (*ArmorUpdate) AddArmorClasIDs

func (au *ArmorUpdate) AddArmorClasIDs(ids ...int) *ArmorUpdate

AddArmorClasIDs adds the "armor_class" edge to the ArmorClass entity by IDs.

func (*ArmorUpdate) AddArmorClass

func (au *ArmorUpdate) AddArmorClass(a ...*ArmorClass) *ArmorUpdate

AddArmorClass adds the "armor_class" edges to the ArmorClass entity.

func (*ArmorUpdate) AddMinStrength

func (au *ArmorUpdate) AddMinStrength(i int) *ArmorUpdate

AddMinStrength adds i to the "min_strength" field.

func (*ArmorUpdate) ClearArmorClass

func (au *ArmorUpdate) ClearArmorClass() *ArmorUpdate

ClearArmorClass clears all "armor_class" edges to the ArmorClass entity.

func (*ArmorUpdate) ClearEquipment

func (au *ArmorUpdate) ClearEquipment() *ArmorUpdate

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*ArmorUpdate) Exec

func (au *ArmorUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ArmorUpdate) ExecX

func (au *ArmorUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ArmorUpdate) Mutation

func (au *ArmorUpdate) Mutation() *ArmorMutation

Mutation returns the ArmorMutation object of the builder.

func (*ArmorUpdate) RemoveArmorClasIDs

func (au *ArmorUpdate) RemoveArmorClasIDs(ids ...int) *ArmorUpdate

RemoveArmorClasIDs removes the "armor_class" edge to ArmorClass entities by IDs.

func (*ArmorUpdate) RemoveArmorClass

func (au *ArmorUpdate) RemoveArmorClass(a ...*ArmorClass) *ArmorUpdate

RemoveArmorClass removes "armor_class" edges to ArmorClass entities.

func (*ArmorUpdate) Save

func (au *ArmorUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ArmorUpdate) SaveX

func (au *ArmorUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ArmorUpdate) SetArmorCategory

func (au *ArmorUpdate) SetArmorCategory(s string) *ArmorUpdate

SetArmorCategory sets the "armor_category" field.

func (*ArmorUpdate) SetEquipment

func (au *ArmorUpdate) SetEquipment(e *Equipment) *ArmorUpdate

SetEquipment sets the "equipment" edge to the Equipment entity.

func (*ArmorUpdate) SetEquipmentID

func (au *ArmorUpdate) SetEquipmentID(i int) *ArmorUpdate

SetEquipmentID sets the "equipment_id" field.

func (*ArmorUpdate) SetIndx

func (au *ArmorUpdate) SetIndx(s string) *ArmorUpdate

SetIndx sets the "indx" field.

func (*ArmorUpdate) SetMinStrength

func (au *ArmorUpdate) SetMinStrength(i int) *ArmorUpdate

SetMinStrength sets the "min_strength" field.

func (*ArmorUpdate) SetName

func (au *ArmorUpdate) SetName(s string) *ArmorUpdate

SetName sets the "name" field.

func (*ArmorUpdate) SetStealthDisadvantage

func (au *ArmorUpdate) SetStealthDisadvantage(b bool) *ArmorUpdate

SetStealthDisadvantage sets the "stealth_disadvantage" field.

func (*ArmorUpdate) Where

func (au *ArmorUpdate) Where(ps ...predicate.Armor) *ArmorUpdate

Where appends a list predicates to the ArmorUpdate builder.

type ArmorUpdateOne

type ArmorUpdateOne struct {
	// contains filtered or unexported fields
}

ArmorUpdateOne is the builder for updating a single Armor entity.

func (*ArmorUpdateOne) AddArmorClasIDs

func (auo *ArmorUpdateOne) AddArmorClasIDs(ids ...int) *ArmorUpdateOne

AddArmorClasIDs adds the "armor_class" edge to the ArmorClass entity by IDs.

func (*ArmorUpdateOne) AddArmorClass

func (auo *ArmorUpdateOne) AddArmorClass(a ...*ArmorClass) *ArmorUpdateOne

AddArmorClass adds the "armor_class" edges to the ArmorClass entity.

func (*ArmorUpdateOne) AddMinStrength

func (auo *ArmorUpdateOne) AddMinStrength(i int) *ArmorUpdateOne

AddMinStrength adds i to the "min_strength" field.

func (*ArmorUpdateOne) ClearArmorClass

func (auo *ArmorUpdateOne) ClearArmorClass() *ArmorUpdateOne

ClearArmorClass clears all "armor_class" edges to the ArmorClass entity.

func (*ArmorUpdateOne) ClearEquipment

func (auo *ArmorUpdateOne) ClearEquipment() *ArmorUpdateOne

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*ArmorUpdateOne) Exec

func (auo *ArmorUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ArmorUpdateOne) ExecX

func (auo *ArmorUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ArmorUpdateOne) Mutation

func (auo *ArmorUpdateOne) Mutation() *ArmorMutation

Mutation returns the ArmorMutation object of the builder.

func (*ArmorUpdateOne) RemoveArmorClasIDs

func (auo *ArmorUpdateOne) RemoveArmorClasIDs(ids ...int) *ArmorUpdateOne

RemoveArmorClasIDs removes the "armor_class" edge to ArmorClass entities by IDs.

func (*ArmorUpdateOne) RemoveArmorClass

func (auo *ArmorUpdateOne) RemoveArmorClass(a ...*ArmorClass) *ArmorUpdateOne

RemoveArmorClass removes "armor_class" edges to ArmorClass entities.

func (*ArmorUpdateOne) Save

func (auo *ArmorUpdateOne) Save(ctx context.Context) (*Armor, error)

Save executes the query and returns the updated Armor entity.

func (*ArmorUpdateOne) SaveX

func (auo *ArmorUpdateOne) SaveX(ctx context.Context) *Armor

SaveX is like Save, but panics if an error occurs.

func (*ArmorUpdateOne) Select

func (auo *ArmorUpdateOne) Select(field string, fields ...string) *ArmorUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ArmorUpdateOne) SetArmorCategory

func (auo *ArmorUpdateOne) SetArmorCategory(s string) *ArmorUpdateOne

SetArmorCategory sets the "armor_category" field.

func (*ArmorUpdateOne) SetEquipment

func (auo *ArmorUpdateOne) SetEquipment(e *Equipment) *ArmorUpdateOne

SetEquipment sets the "equipment" edge to the Equipment entity.

func (*ArmorUpdateOne) SetEquipmentID

func (auo *ArmorUpdateOne) SetEquipmentID(i int) *ArmorUpdateOne

SetEquipmentID sets the "equipment_id" field.

func (*ArmorUpdateOne) SetIndx

func (auo *ArmorUpdateOne) SetIndx(s string) *ArmorUpdateOne

SetIndx sets the "indx" field.

func (*ArmorUpdateOne) SetMinStrength

func (auo *ArmorUpdateOne) SetMinStrength(i int) *ArmorUpdateOne

SetMinStrength sets the "min_strength" field.

func (*ArmorUpdateOne) SetName

func (auo *ArmorUpdateOne) SetName(s string) *ArmorUpdateOne

SetName sets the "name" field.

func (*ArmorUpdateOne) SetStealthDisadvantage

func (auo *ArmorUpdateOne) SetStealthDisadvantage(b bool) *ArmorUpdateOne

SetStealthDisadvantage sets the "stealth_disadvantage" field.

func (*ArmorUpdateOne) Where

func (auo *ArmorUpdateOne) Where(ps ...predicate.Armor) *ArmorUpdateOne

Where appends a list predicates to the ArmorUpdate builder.

type ArmorWhereInput

type ArmorWhereInput struct {
	Predicates []predicate.Armor  `json:"-"`
	Not        *ArmorWhereInput   `json:"not,omitempty"`
	Or         []*ArmorWhereInput `json:"or,omitempty"`
	And        []*ArmorWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "indx" field predicates.
	Indx             *string  `json:"indx,omitempty"`
	IndxNEQ          *string  `json:"indxNEQ,omitempty"`
	IndxIn           []string `json:"indxIn,omitempty"`
	IndxNotIn        []string `json:"indxNotIn,omitempty"`
	IndxGT           *string  `json:"indxGT,omitempty"`
	IndxGTE          *string  `json:"indxGTE,omitempty"`
	IndxLT           *string  `json:"indxLT,omitempty"`
	IndxLTE          *string  `json:"indxLTE,omitempty"`
	IndxContains     *string  `json:"indxContains,omitempty"`
	IndxHasPrefix    *string  `json:"indxHasPrefix,omitempty"`
	IndxHasSuffix    *string  `json:"indxHasSuffix,omitempty"`
	IndxEqualFold    *string  `json:"indxEqualFold,omitempty"`
	IndxContainsFold *string  `json:"indxContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "armor_category" field predicates.
	ArmorCategory             *string  `json:"armorCategory,omitempty"`
	ArmorCategoryNEQ          *string  `json:"armorCategoryNEQ,omitempty"`
	ArmorCategoryIn           []string `json:"armorCategoryIn,omitempty"`
	ArmorCategoryNotIn        []string `json:"armorCategoryNotIn,omitempty"`
	ArmorCategoryGT           *string  `json:"armorCategoryGT,omitempty"`
	ArmorCategoryGTE          *string  `json:"armorCategoryGTE,omitempty"`
	ArmorCategoryLT           *string  `json:"armorCategoryLT,omitempty"`
	ArmorCategoryLTE          *string  `json:"armorCategoryLTE,omitempty"`
	ArmorCategoryContains     *string  `json:"armorCategoryContains,omitempty"`
	ArmorCategoryHasPrefix    *string  `json:"armorCategoryHasPrefix,omitempty"`
	ArmorCategoryHasSuffix    *string  `json:"armorCategoryHasSuffix,omitempty"`
	ArmorCategoryEqualFold    *string  `json:"armorCategoryEqualFold,omitempty"`
	ArmorCategoryContainsFold *string  `json:"armorCategoryContainsFold,omitempty"`

	// "stealth_disadvantage" field predicates.
	StealthDisadvantage    *bool `json:"stealthDisadvantage,omitempty"`
	StealthDisadvantageNEQ *bool `json:"stealthDisadvantageNEQ,omitempty"`

	// "min_strength" field predicates.
	MinStrength      *int  `json:"minStrength,omitempty"`
	MinStrengthNEQ   *int  `json:"minStrengthNEQ,omitempty"`
	MinStrengthIn    []int `json:"minStrengthIn,omitempty"`
	MinStrengthNotIn []int `json:"minStrengthNotIn,omitempty"`
	MinStrengthGT    *int  `json:"minStrengthGT,omitempty"`
	MinStrengthGTE   *int  `json:"minStrengthGTE,omitempty"`
	MinStrengthLT    *int  `json:"minStrengthLT,omitempty"`
	MinStrengthLTE   *int  `json:"minStrengthLTE,omitempty"`

	// "equipment_id" field predicates.
	EquipmentID      *int  `json:"equipmentID,omitempty"`
	EquipmentIDNEQ   *int  `json:"equipmentIDNEQ,omitempty"`
	EquipmentIDIn    []int `json:"equipmentIDIn,omitempty"`
	EquipmentIDNotIn []int `json:"equipmentIDNotIn,omitempty"`

	// "equipment" edge predicates.
	HasEquipment     *bool                  `json:"hasEquipment,omitempty"`
	HasEquipmentWith []*EquipmentWhereInput `json:"hasEquipmentWith,omitempty"`

	// "armor_class" edge predicates.
	HasArmorClass     *bool                   `json:"hasArmorClass,omitempty"`
	HasArmorClassWith []*ArmorClassWhereInput `json:"hasArmorClassWith,omitempty"`
}

ArmorWhereInput represents a where input for filtering Armor queries.

func (*ArmorWhereInput) AddPredicates

func (i *ArmorWhereInput) AddPredicates(predicates ...predicate.Armor)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*ArmorWhereInput) Filter

func (i *ArmorWhereInput) Filter(q *ArmorQuery) (*ArmorQuery, error)

Filter applies the ArmorWhereInput filter on the ArmorQuery builder.

func (*ArmorWhereInput) P

P returns a predicate for filtering armors. An error is returned if the input is empty or invalid.

type Armors

type Armors []*Armor

Armors is a parsable slice of Armor.

type Class

type Class struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Indx holds the value of the "indx" field.
	Indx string `json:"index"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// HitDie holds the value of the "hit_die" field.
	HitDie int `json:"hit_die,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ClassQuery when eager-loading is set.
	Edges ClassEdges `json:"-"`
	// contains filtered or unexported fields
}

Class is the model entity for the Class schema.

func (*Class) Equipment

func (c *Class) Equipment(ctx context.Context) (result []*Equipment, err error)

func (*Class) EquipmentChoices

func (c *Class) EquipmentChoices(ctx context.Context) (result []*EquipmentChoice, err error)

func (*Class) IsNode

func (n *Class) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Class) MarshalJSON

func (c *Class) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Class) NamedClassEquipment

func (c *Class) NamedClassEquipment(name string) ([]*ClassEquipment, error)

NamedClassEquipment returns the ClassEquipment named value or an error if the edge was not loaded in eager-loading with this name.

func (*Class) NamedEquipment

func (c *Class) NamedEquipment(name string) ([]*Equipment, error)

NamedEquipment returns the Equipment named value or an error if the edge was not loaded in eager-loading with this name.

func (*Class) NamedEquipmentChoices

func (c *Class) NamedEquipmentChoices(name string) ([]*EquipmentChoice, error)

NamedEquipmentChoices returns the EquipmentChoices named value or an error if the edge was not loaded in eager-loading with this name.

func (*Class) NamedProficiencies

func (c *Class) NamedProficiencies(name string) ([]*Proficiency, error)

NamedProficiencies returns the Proficiencies named value or an error if the edge was not loaded in eager-loading with this name.

func (*Class) NamedProficiencyChoices

func (c *Class) NamedProficiencyChoices(name string) ([]*ProficiencyChoice, error)

NamedProficiencyChoices returns the ProficiencyChoices named value or an error if the edge was not loaded in eager-loading with this name.

func (*Class) Node

func (c *Class) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*Class) Proficiencies

func (c *Class) Proficiencies(ctx context.Context) (result []*Proficiency, err error)

func (*Class) ProficiencyChoices

func (c *Class) ProficiencyChoices(ctx context.Context) (result []*ProficiencyChoice, err error)

func (*Class) QueryClassEquipment

func (c *Class) QueryClassEquipment() *ClassEquipmentQuery

QueryClassEquipment queries the "class_equipment" edge of the Class entity.

func (*Class) QueryEquipment

func (c *Class) QueryEquipment() *EquipmentQuery

QueryEquipment queries the "equipment" edge of the Class entity.

func (*Class) QueryEquipmentChoices

func (c *Class) QueryEquipmentChoices() *EquipmentChoiceQuery

QueryEquipmentChoices queries the "equipment_choices" edge of the Class entity.

func (*Class) QueryProficiencies

func (c *Class) QueryProficiencies() *ProficiencyQuery

QueryProficiencies queries the "proficiencies" edge of the Class entity.

func (*Class) QueryProficiencyChoices

func (c *Class) QueryProficiencyChoices() *ProficiencyChoiceQuery

QueryProficiencyChoices queries the "proficiency_choices" edge of the Class entity.

func (*Class) String

func (c *Class) String() string

String implements the fmt.Stringer.

func (*Class) ToEdge

func (c *Class) ToEdge(order *ClassOrder) *ClassEdge

ToEdge converts Class into ClassEdge.

func (*Class) UnmarshalJSON

func (c *Class) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*Class) Unwrap

func (c *Class) Unwrap() *Class

Unwrap unwraps the Class entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Class) Update

func (c *Class) Update() *ClassUpdateOne

Update returns a builder for updating this Class. Note that you need to call Class.Unwrap() before calling this method if this Class was returned from a transaction, and the transaction was committed or rolled back.

func (*Class) Value

func (c *Class) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Class. This includes values selected through modifiers, order, etc.

type ClassClient

type ClassClient struct {
	// contains filtered or unexported fields
}

ClassClient is a client for the Class schema.

func NewClassClient

func NewClassClient(c config) *ClassClient

NewClassClient returns a client for the Class from the given config.

func (*ClassClient) Create

func (c *ClassClient) Create() *ClassCreate

Create returns a builder for creating a Class entity.

func (*ClassClient) CreateBulk

func (c *ClassClient) CreateBulk(builders ...*ClassCreate) *ClassCreateBulk

CreateBulk returns a builder for creating a bulk of Class entities.

func (*ClassClient) Delete

func (c *ClassClient) Delete() *ClassDelete

Delete returns a delete builder for Class.

func (*ClassClient) DeleteOne

func (c *ClassClient) DeleteOne(cl *Class) *ClassDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ClassClient) DeleteOneID

func (c *ClassClient) DeleteOneID(id int) *ClassDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ClassClient) Get

func (c *ClassClient) Get(ctx context.Context, id int) (*Class, error)

Get returns a Class entity by its id.

func (*ClassClient) GetX

func (c *ClassClient) GetX(ctx context.Context, id int) *Class

GetX is like Get, but panics if an error occurs.

func (*ClassClient) Hooks

func (c *ClassClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ClassClient) Intercept

func (c *ClassClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `class.Intercept(f(g(h())))`.

func (*ClassClient) Interceptors

func (c *ClassClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ClassClient) Query

func (c *ClassClient) Query() *ClassQuery

Query returns a query builder for Class.

func (*ClassClient) QueryClassEquipment

func (c *ClassClient) QueryClassEquipment(cl *Class) *ClassEquipmentQuery

QueryClassEquipment queries the class_equipment edge of a Class.

func (*ClassClient) QueryEquipment

func (c *ClassClient) QueryEquipment(cl *Class) *EquipmentQuery

QueryEquipment queries the equipment edge of a Class.

func (*ClassClient) QueryEquipmentChoices

func (c *ClassClient) QueryEquipmentChoices(cl *Class) *EquipmentChoiceQuery

QueryEquipmentChoices queries the equipment_choices edge of a Class.

func (*ClassClient) QueryProficiencies

func (c *ClassClient) QueryProficiencies(cl *Class) *ProficiencyQuery

QueryProficiencies queries the proficiencies edge of a Class.

func (*ClassClient) QueryProficiencyChoices

func (c *ClassClient) QueryProficiencyChoices(cl *Class) *ProficiencyChoiceQuery

QueryProficiencyChoices queries the proficiency_choices edge of a Class.

func (*ClassClient) Update

func (c *ClassClient) Update() *ClassUpdate

Update returns an update builder for Class.

func (*ClassClient) UpdateOne

func (c *ClassClient) UpdateOne(cl *Class) *ClassUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ClassClient) UpdateOneID

func (c *ClassClient) UpdateOneID(id int) *ClassUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ClassClient) Use

func (c *ClassClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `class.Hooks(f(g(h())))`.

type ClassConnection

type ClassConnection struct {
	Edges      []*ClassEdge `json:"edges"`
	PageInfo   PageInfo     `json:"pageInfo"`
	TotalCount int          `json:"totalCount"`
}

ClassConnection is the connection containing edges to Class.

type ClassCreate

type ClassCreate struct {
	// contains filtered or unexported fields
}

ClassCreate is the builder for creating a Class entity.

func (*ClassCreate) AddEquipment

func (cc *ClassCreate) AddEquipment(e ...*Equipment) *ClassCreate

AddEquipment adds the "equipment" edges to the Equipment entity.

func (*ClassCreate) AddEquipmentChoiceIDs

func (cc *ClassCreate) AddEquipmentChoiceIDs(ids ...int) *ClassCreate

AddEquipmentChoiceIDs adds the "equipment_choices" edge to the EquipmentChoice entity by IDs.

func (*ClassCreate) AddEquipmentChoices

func (cc *ClassCreate) AddEquipmentChoices(e ...*EquipmentChoice) *ClassCreate

AddEquipmentChoices adds the "equipment_choices" edges to the EquipmentChoice entity.

func (*ClassCreate) AddEquipmentIDs

func (cc *ClassCreate) AddEquipmentIDs(ids ...int) *ClassCreate

AddEquipmentIDs adds the "equipment" edge to the Equipment entity by IDs.

func (*ClassCreate) AddProficiencies

func (cc *ClassCreate) AddProficiencies(p ...*Proficiency) *ClassCreate

AddProficiencies adds the "proficiencies" edges to the Proficiency entity.

func (*ClassCreate) AddProficiencyChoiceIDs

func (cc *ClassCreate) AddProficiencyChoiceIDs(ids ...int) *ClassCreate

AddProficiencyChoiceIDs adds the "proficiency_choices" edge to the ProficiencyChoice entity by IDs.

func (*ClassCreate) AddProficiencyChoices

func (cc *ClassCreate) AddProficiencyChoices(p ...*ProficiencyChoice) *ClassCreate

AddProficiencyChoices adds the "proficiency_choices" edges to the ProficiencyChoice entity.

func (*ClassCreate) AddProficiencyIDs

func (cc *ClassCreate) AddProficiencyIDs(ids ...int) *ClassCreate

AddProficiencyIDs adds the "proficiencies" edge to the Proficiency entity by IDs.

func (*ClassCreate) Exec

func (cc *ClassCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ClassCreate) ExecX

func (cc *ClassCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ClassCreate) Mutation

func (cc *ClassCreate) Mutation() *ClassMutation

Mutation returns the ClassMutation object of the builder.

func (*ClassCreate) Save

func (cc *ClassCreate) Save(ctx context.Context) (*Class, error)

Save creates the Class in the database.

func (*ClassCreate) SaveX

func (cc *ClassCreate) SaveX(ctx context.Context) *Class

SaveX calls Save and panics if Save returns an error.

func (*ClassCreate) SetClass

func (cc *ClassCreate) SetClass(input *Class) *ClassCreate

func (*ClassCreate) SetHitDie

func (cc *ClassCreate) SetHitDie(i int) *ClassCreate

SetHitDie sets the "hit_die" field.

func (*ClassCreate) SetIndx

func (cc *ClassCreate) SetIndx(s string) *ClassCreate

SetIndx sets the "indx" field.

func (*ClassCreate) SetName

func (cc *ClassCreate) SetName(s string) *ClassCreate

SetName sets the "name" field.

type ClassCreateBulk

type ClassCreateBulk struct {
	// contains filtered or unexported fields
}

ClassCreateBulk is the builder for creating many Class entities in bulk.

func (*ClassCreateBulk) Exec

func (ccb *ClassCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ClassCreateBulk) ExecX

func (ccb *ClassCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ClassCreateBulk) Save

func (ccb *ClassCreateBulk) Save(ctx context.Context) ([]*Class, error)

Save creates the Class entities in the database.

func (*ClassCreateBulk) SaveX

func (ccb *ClassCreateBulk) SaveX(ctx context.Context) []*Class

SaveX is like Save, but panics if an error occurs.

type ClassDelete

type ClassDelete struct {
	// contains filtered or unexported fields
}

ClassDelete is the builder for deleting a Class entity.

func (*ClassDelete) Exec

func (cd *ClassDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ClassDelete) ExecX

func (cd *ClassDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ClassDelete) Where

func (cd *ClassDelete) Where(ps ...predicate.Class) *ClassDelete

Where appends a list predicates to the ClassDelete builder.

type ClassDeleteOne

type ClassDeleteOne struct {
	// contains filtered or unexported fields
}

ClassDeleteOne is the builder for deleting a single Class entity.

func (*ClassDeleteOne) Exec

func (cdo *ClassDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ClassDeleteOne) ExecX

func (cdo *ClassDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ClassDeleteOne) Where

func (cdo *ClassDeleteOne) Where(ps ...predicate.Class) *ClassDeleteOne

Where appends a list predicates to the ClassDelete builder.

type ClassEdge

type ClassEdge struct {
	Node   *Class `json:"node"`
	Cursor Cursor `json:"cursor"`
}

ClassEdge is the edge representation of Class.

type ClassEdges

type ClassEdges struct {
	// Proficiencies holds the value of the proficiencies edge.
	Proficiencies []*Proficiency `json:"proficiencies,omitempty"`
	// ProficiencyChoices holds the value of the proficiency_choices edge.
	ProficiencyChoices []*ProficiencyChoice `json:"proficiency_choices,omitempty"`
	// Equipment holds the value of the equipment edge.
	Equipment []*Equipment `json:"equipment,omitempty"`
	// EquipmentChoices holds the value of the equipment_choices edge.
	EquipmentChoices []*EquipmentChoice `json:"equipment_choices,omitempty"`
	// ClassEquipment holds the value of the class_equipment edge.
	ClassEquipment []*ClassEquipment `json:"class_equipment,omitempty"`
	// contains filtered or unexported fields
}

ClassEdges holds the relations/edges for other nodes in the graph.

func (ClassEdges) ClassEquipmentOrErr

func (e ClassEdges) ClassEquipmentOrErr() ([]*ClassEquipment, error)

ClassEquipmentOrErr returns the ClassEquipment value or an error if the edge was not loaded in eager-loading.

func (ClassEdges) EquipmentChoicesOrErr

func (e ClassEdges) EquipmentChoicesOrErr() ([]*EquipmentChoice, error)

EquipmentChoicesOrErr returns the EquipmentChoices value or an error if the edge was not loaded in eager-loading.

func (ClassEdges) EquipmentOrErr

func (e ClassEdges) EquipmentOrErr() ([]*Equipment, error)

EquipmentOrErr returns the Equipment value or an error if the edge was not loaded in eager-loading.

func (ClassEdges) ProficienciesOrErr

func (e ClassEdges) ProficienciesOrErr() ([]*Proficiency, error)

ProficienciesOrErr returns the Proficiencies value or an error if the edge was not loaded in eager-loading.

func (ClassEdges) ProficiencyChoicesOrErr

func (e ClassEdges) ProficiencyChoicesOrErr() ([]*ProficiencyChoice, error)

ProficiencyChoicesOrErr returns the ProficiencyChoices value or an error if the edge was not loaded in eager-loading.

type ClassEquipment

type ClassEquipment struct {

	// ClassID holds the value of the "class_id" field.
	ClassID int `json:"class_id,omitempty"`
	// EquipmentID holds the value of the "equipment_id" field.
	EquipmentID int `json:"equipment_id,omitempty"`
	// Quantity holds the value of the "quantity" field.
	Quantity int `json:"quantity,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ClassEquipmentQuery when eager-loading is set.
	Edges ClassEquipmentEdges `json:"-"`
	// contains filtered or unexported fields
}

ClassEquipment is the model entity for the ClassEquipment schema.

func (*ClassEquipment) MarshalJSON

func (ce *ClassEquipment) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*ClassEquipment) QueryClass

func (ce *ClassEquipment) QueryClass() *ClassQuery

QueryClass queries the "class" edge of the ClassEquipment entity.

func (*ClassEquipment) QueryEquipment

func (ce *ClassEquipment) QueryEquipment() *EquipmentQuery

QueryEquipment queries the "equipment" edge of the ClassEquipment entity.

func (*ClassEquipment) String

func (ce *ClassEquipment) String() string

String implements the fmt.Stringer.

func (*ClassEquipment) UnmarshalJSON

func (ce *ClassEquipment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*ClassEquipment) Unwrap

func (ce *ClassEquipment) Unwrap() *ClassEquipment

Unwrap unwraps the ClassEquipment entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*ClassEquipment) Update

Update returns a builder for updating this ClassEquipment. Note that you need to call ClassEquipment.Unwrap() before calling this method if this ClassEquipment was returned from a transaction, and the transaction was committed or rolled back.

func (*ClassEquipment) Value

func (ce *ClassEquipment) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ClassEquipment. This includes values selected through modifiers, order, etc.

type ClassEquipmentClient

type ClassEquipmentClient struct {
	// contains filtered or unexported fields
}

ClassEquipmentClient is a client for the ClassEquipment schema.

func NewClassEquipmentClient

func NewClassEquipmentClient(c config) *ClassEquipmentClient

NewClassEquipmentClient returns a client for the ClassEquipment from the given config.

func (*ClassEquipmentClient) Create

Create returns a builder for creating a ClassEquipment entity.

func (*ClassEquipmentClient) CreateBulk

CreateBulk returns a builder for creating a bulk of ClassEquipment entities.

func (*ClassEquipmentClient) Delete

Delete returns a delete builder for ClassEquipment.

func (*ClassEquipmentClient) Hooks

func (c *ClassEquipmentClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ClassEquipmentClient) Intercept

func (c *ClassEquipmentClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `classequipment.Intercept(f(g(h())))`.

func (*ClassEquipmentClient) Interceptors

func (c *ClassEquipmentClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ClassEquipmentClient) Query

Query returns a query builder for ClassEquipment.

func (*ClassEquipmentClient) QueryClass

func (c *ClassEquipmentClient) QueryClass(ce *ClassEquipment) *ClassQuery

QueryClass queries the class edge of a ClassEquipment.

func (*ClassEquipmentClient) QueryEquipment

func (c *ClassEquipmentClient) QueryEquipment(ce *ClassEquipment) *EquipmentQuery

QueryEquipment queries the equipment edge of a ClassEquipment.

func (*ClassEquipmentClient) Update

Update returns an update builder for ClassEquipment.

func (*ClassEquipmentClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ClassEquipmentClient) Use

func (c *ClassEquipmentClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `classequipment.Hooks(f(g(h())))`.

type ClassEquipmentCreate

type ClassEquipmentCreate struct {
	// contains filtered or unexported fields
}

ClassEquipmentCreate is the builder for creating a ClassEquipment entity.

func (*ClassEquipmentCreate) Exec

func (cec *ClassEquipmentCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ClassEquipmentCreate) ExecX

func (cec *ClassEquipmentCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ClassEquipmentCreate) Mutation

Mutation returns the ClassEquipmentMutation object of the builder.

func (*ClassEquipmentCreate) Save

Save creates the ClassEquipment in the database.

func (*ClassEquipmentCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ClassEquipmentCreate) SetClass

func (cec *ClassEquipmentCreate) SetClass(c *Class) *ClassEquipmentCreate

SetClass sets the "class" edge to the Class entity.

func (*ClassEquipmentCreate) SetClassEquipment

func (cec *ClassEquipmentCreate) SetClassEquipment(input *ClassEquipment) *ClassEquipmentCreate

func (*ClassEquipmentCreate) SetClassID

func (cec *ClassEquipmentCreate) SetClassID(i int) *ClassEquipmentCreate

SetClassID sets the "class_id" field.

func (*ClassEquipmentCreate) SetEquipment

func (cec *ClassEquipmentCreate) SetEquipment(e *Equipment) *ClassEquipmentCreate

SetEquipment sets the "equipment" edge to the Equipment entity.

func (*ClassEquipmentCreate) SetEquipmentID

func (cec *ClassEquipmentCreate) SetEquipmentID(i int) *ClassEquipmentCreate

SetEquipmentID sets the "equipment_id" field.

func (*ClassEquipmentCreate) SetQuantity

func (cec *ClassEquipmentCreate) SetQuantity(i int) *ClassEquipmentCreate

SetQuantity sets the "quantity" field.

type ClassEquipmentCreateBulk

type ClassEquipmentCreateBulk struct {
	// contains filtered or unexported fields
}

ClassEquipmentCreateBulk is the builder for creating many ClassEquipment entities in bulk.

func (*ClassEquipmentCreateBulk) Exec

Exec executes the query.

func (*ClassEquipmentCreateBulk) ExecX

func (cecb *ClassEquipmentCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ClassEquipmentCreateBulk) Save

Save creates the ClassEquipment entities in the database.

func (*ClassEquipmentCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type ClassEquipmentDelete

type ClassEquipmentDelete struct {
	// contains filtered or unexported fields
}

ClassEquipmentDelete is the builder for deleting a ClassEquipment entity.

func (*ClassEquipmentDelete) Exec

func (ced *ClassEquipmentDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ClassEquipmentDelete) ExecX

func (ced *ClassEquipmentDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ClassEquipmentDelete) Where

Where appends a list predicates to the ClassEquipmentDelete builder.

type ClassEquipmentDeleteOne

type ClassEquipmentDeleteOne struct {
	// contains filtered or unexported fields
}

ClassEquipmentDeleteOne is the builder for deleting a single ClassEquipment entity.

func (*ClassEquipmentDeleteOne) Exec

func (cedo *ClassEquipmentDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ClassEquipmentDeleteOne) ExecX

func (cedo *ClassEquipmentDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ClassEquipmentDeleteOne) Where

Where appends a list predicates to the ClassEquipmentDelete builder.

type ClassEquipmentEdges

type ClassEquipmentEdges struct {
	// Class holds the value of the class edge.
	Class *Class `json:"class,omitempty"`
	// Equipment holds the value of the equipment edge.
	Equipment *Equipment `json:"equipment,omitempty"`
	// contains filtered or unexported fields
}

ClassEquipmentEdges holds the relations/edges for other nodes in the graph.

func (ClassEquipmentEdges) ClassOrErr

func (e ClassEquipmentEdges) ClassOrErr() (*Class, error)

ClassOrErr returns the Class value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ClassEquipmentEdges) EquipmentOrErr

func (e ClassEquipmentEdges) EquipmentOrErr() (*Equipment, error)

EquipmentOrErr returns the Equipment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ClassEquipmentGroupBy

type ClassEquipmentGroupBy struct {
	// contains filtered or unexported fields
}

ClassEquipmentGroupBy is the group-by builder for ClassEquipment entities.

func (*ClassEquipmentGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*ClassEquipmentGroupBy) Bool

func (s *ClassEquipmentGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ClassEquipmentGroupBy) BoolX

func (s *ClassEquipmentGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ClassEquipmentGroupBy) Bools

func (s *ClassEquipmentGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ClassEquipmentGroupBy) BoolsX

func (s *ClassEquipmentGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ClassEquipmentGroupBy) Float64

func (s *ClassEquipmentGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ClassEquipmentGroupBy) Float64X

func (s *ClassEquipmentGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ClassEquipmentGroupBy) Float64s

func (s *ClassEquipmentGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ClassEquipmentGroupBy) Float64sX

func (s *ClassEquipmentGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ClassEquipmentGroupBy) Int

func (s *ClassEquipmentGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ClassEquipmentGroupBy) IntX

func (s *ClassEquipmentGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ClassEquipmentGroupBy) Ints

func (s *ClassEquipmentGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ClassEquipmentGroupBy) IntsX

func (s *ClassEquipmentGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ClassEquipmentGroupBy) Scan

func (cegb *ClassEquipmentGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ClassEquipmentGroupBy) ScanX

func (s *ClassEquipmentGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ClassEquipmentGroupBy) String

func (s *ClassEquipmentGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ClassEquipmentGroupBy) StringX

func (s *ClassEquipmentGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ClassEquipmentGroupBy) Strings

func (s *ClassEquipmentGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ClassEquipmentGroupBy) StringsX

func (s *ClassEquipmentGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ClassEquipmentMutation

type ClassEquipmentMutation struct {
	// contains filtered or unexported fields
}

ClassEquipmentMutation represents an operation that mutates the ClassEquipment nodes in the graph.

func (*ClassEquipmentMutation) AddField

func (m *ClassEquipmentMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ClassEquipmentMutation) AddQuantity

func (m *ClassEquipmentMutation) AddQuantity(i int)

AddQuantity adds i to the "quantity" field.

func (*ClassEquipmentMutation) AddedEdges

func (m *ClassEquipmentMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ClassEquipmentMutation) AddedField

func (m *ClassEquipmentMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ClassEquipmentMutation) AddedFields

func (m *ClassEquipmentMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ClassEquipmentMutation) AddedIDs

func (m *ClassEquipmentMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ClassEquipmentMutation) AddedQuantity

func (m *ClassEquipmentMutation) AddedQuantity() (r int, exists bool)

AddedQuantity returns the value that was added to the "quantity" field in this mutation.

func (*ClassEquipmentMutation) ClassCleared

func (m *ClassEquipmentMutation) ClassCleared() bool

ClassCleared reports if the "class" edge to the Class entity was cleared.

func (*ClassEquipmentMutation) ClassID

func (m *ClassEquipmentMutation) ClassID() (r int, exists bool)

ClassID returns the value of the "class_id" field in the mutation.

func (*ClassEquipmentMutation) ClassIDs

func (m *ClassEquipmentMutation) ClassIDs() (ids []int)

ClassIDs returns the "class" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ClassID instead. It exists only for internal usage by the builders.

func (*ClassEquipmentMutation) ClearClass

func (m *ClassEquipmentMutation) ClearClass()

ClearClass clears the "class" edge to the Class entity.

func (*ClassEquipmentMutation) ClearEdge

func (m *ClassEquipmentMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*ClassEquipmentMutation) ClearEquipment

func (m *ClassEquipmentMutation) ClearEquipment()

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*ClassEquipmentMutation) ClearField

func (m *ClassEquipmentMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*ClassEquipmentMutation) ClearedEdges

func (m *ClassEquipmentMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ClassEquipmentMutation) ClearedFields

func (m *ClassEquipmentMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ClassEquipmentMutation) Client

func (m ClassEquipmentMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*ClassEquipmentMutation) EdgeCleared

func (m *ClassEquipmentMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ClassEquipmentMutation) EquipmentCleared

func (m *ClassEquipmentMutation) EquipmentCleared() bool

EquipmentCleared reports if the "equipment" edge to the Equipment entity was cleared.

func (*ClassEquipmentMutation) EquipmentID

func (m *ClassEquipmentMutation) EquipmentID() (r int, exists bool)

EquipmentID returns the value of the "equipment_id" field in the mutation.

func (*ClassEquipmentMutation) EquipmentIDs

func (m *ClassEquipmentMutation) EquipmentIDs() (ids []int)

EquipmentIDs returns the "equipment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EquipmentID instead. It exists only for internal usage by the builders.

func (*ClassEquipmentMutation) Field

func (m *ClassEquipmentMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ClassEquipmentMutation) FieldCleared

func (m *ClassEquipmentMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ClassEquipmentMutation) Fields

func (m *ClassEquipmentMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*ClassEquipmentMutation) OldField

func (m *ClassEquipmentMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*ClassEquipmentMutation) Op

func (m *ClassEquipmentMutation) Op() Op

Op returns the operation name.

func (*ClassEquipmentMutation) Quantity

func (m *ClassEquipmentMutation) Quantity() (r int, exists bool)

Quantity returns the value of the "quantity" field in the mutation.

func (*ClassEquipmentMutation) RemovedEdges

func (m *ClassEquipmentMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ClassEquipmentMutation) RemovedIDs

func (m *ClassEquipmentMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*ClassEquipmentMutation) ResetClass

func (m *ClassEquipmentMutation) ResetClass()

ResetClass resets all changes to the "class" edge.

func (*ClassEquipmentMutation) ResetClassID

func (m *ClassEquipmentMutation) ResetClassID()

ResetClassID resets all changes to the "class_id" field.

func (*ClassEquipmentMutation) ResetEdge

func (m *ClassEquipmentMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*ClassEquipmentMutation) ResetEquipment

func (m *ClassEquipmentMutation) ResetEquipment()

ResetEquipment resets all changes to the "equipment" edge.

func (*ClassEquipmentMutation) ResetEquipmentID

func (m *ClassEquipmentMutation) ResetEquipmentID()

ResetEquipmentID resets all changes to the "equipment_id" field.

func (*ClassEquipmentMutation) ResetField

func (m *ClassEquipmentMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*ClassEquipmentMutation) ResetQuantity

func (m *ClassEquipmentMutation) ResetQuantity()

ResetQuantity resets all changes to the "quantity" field.

func (*ClassEquipmentMutation) SetClassID

func (m *ClassEquipmentMutation) SetClassID(i int)

SetClassID sets the "class_id" field.

func (*ClassEquipmentMutation) SetEquipmentID

func (m *ClassEquipmentMutation) SetEquipmentID(i int)

SetEquipmentID sets the "equipment_id" field.

func (*ClassEquipmentMutation) SetField

func (m *ClassEquipmentMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ClassEquipmentMutation) SetOp

func (m *ClassEquipmentMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ClassEquipmentMutation) SetQuantity

func (m *ClassEquipmentMutation) SetQuantity(i int)

SetQuantity sets the "quantity" field.

func (ClassEquipmentMutation) Tx

func (m ClassEquipmentMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ClassEquipmentMutation) Type

func (m *ClassEquipmentMutation) Type() string

Type returns the node type of this mutation (ClassEquipment).

func (*ClassEquipmentMutation) Where

Where appends a list predicates to the ClassEquipmentMutation builder.

func (*ClassEquipmentMutation) WhereP

func (m *ClassEquipmentMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ClassEquipmentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ClassEquipmentQuery

type ClassEquipmentQuery struct {
	// contains filtered or unexported fields
}

ClassEquipmentQuery is the builder for querying ClassEquipment entities.

func (*ClassEquipmentQuery) Aggregate

func (ceq *ClassEquipmentQuery) Aggregate(fns ...AggregateFunc) *ClassEquipmentSelect

Aggregate returns a ClassEquipmentSelect configured with the given aggregations.

func (*ClassEquipmentQuery) All

All executes the query and returns a list of ClassEquipments.

func (*ClassEquipmentQuery) AllX

AllX is like All, but panics if an error occurs.

func (*ClassEquipmentQuery) Clone

Clone returns a duplicate of the ClassEquipmentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ClassEquipmentQuery) Count

func (ceq *ClassEquipmentQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ClassEquipmentQuery) CountX

func (ceq *ClassEquipmentQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ClassEquipmentQuery) Exist

func (ceq *ClassEquipmentQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ClassEquipmentQuery) ExistX

func (ceq *ClassEquipmentQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ClassEquipmentQuery) First

First returns the first ClassEquipment entity from the query. Returns a *NotFoundError when no ClassEquipment was found.

func (*ClassEquipmentQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*ClassEquipmentQuery) GroupBy

func (ceq *ClassEquipmentQuery) GroupBy(field string, fields ...string) *ClassEquipmentGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	ClassID int `json:"class_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ClassEquipment.Query().
	GroupBy(classequipment.FieldClassID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ClassEquipmentQuery) Limit

func (ceq *ClassEquipmentQuery) Limit(limit int) *ClassEquipmentQuery

Limit the number of records to be returned by this query.

func (*ClassEquipmentQuery) Offset

func (ceq *ClassEquipmentQuery) Offset(offset int) *ClassEquipmentQuery

Offset to start from.

func (*ClassEquipmentQuery) Only

Only returns a single ClassEquipment entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ClassEquipment entity is found. Returns a *NotFoundError when no ClassEquipment entities are found.

func (*ClassEquipmentQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*ClassEquipmentQuery) Order

Order specifies how the records should be ordered.

func (*ClassEquipmentQuery) QueryClass

func (ceq *ClassEquipmentQuery) QueryClass() *ClassQuery

QueryClass chains the current query on the "class" edge.

func (*ClassEquipmentQuery) QueryEquipment

func (ceq *ClassEquipmentQuery) QueryEquipment() *EquipmentQuery

QueryEquipment chains the current query on the "equipment" edge.

func (*ClassEquipmentQuery) Select

func (ceq *ClassEquipmentQuery) Select(fields ...string) *ClassEquipmentSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	ClassID int `json:"class_id,omitempty"`
}

client.ClassEquipment.Query().
	Select(classequipment.FieldClassID).
	Scan(ctx, &v)

func (*ClassEquipmentQuery) Unique

func (ceq *ClassEquipmentQuery) Unique(unique bool) *ClassEquipmentQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*ClassEquipmentQuery) Where

Where adds a new predicate for the ClassEquipmentQuery builder.

func (*ClassEquipmentQuery) WithClass

func (ceq *ClassEquipmentQuery) WithClass(opts ...func(*ClassQuery)) *ClassEquipmentQuery

WithClass tells the query-builder to eager-load the nodes that are connected to the "class" edge. The optional arguments are used to configure the query builder of the edge.

func (*ClassEquipmentQuery) WithEquipment

func (ceq *ClassEquipmentQuery) WithEquipment(opts ...func(*EquipmentQuery)) *ClassEquipmentQuery

WithEquipment tells the query-builder to eager-load the nodes that are connected to the "equipment" edge. The optional arguments are used to configure the query builder of the edge.

type ClassEquipmentSelect

type ClassEquipmentSelect struct {
	*ClassEquipmentQuery
	// contains filtered or unexported fields
}

ClassEquipmentSelect is the builder for selecting fields of ClassEquipment entities.

func (*ClassEquipmentSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*ClassEquipmentSelect) Bool

func (s *ClassEquipmentSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ClassEquipmentSelect) BoolX

func (s *ClassEquipmentSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ClassEquipmentSelect) Bools

func (s *ClassEquipmentSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ClassEquipmentSelect) BoolsX

func (s *ClassEquipmentSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ClassEquipmentSelect) Float64

func (s *ClassEquipmentSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ClassEquipmentSelect) Float64X

func (s *ClassEquipmentSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ClassEquipmentSelect) Float64s

func (s *ClassEquipmentSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ClassEquipmentSelect) Float64sX

func (s *ClassEquipmentSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ClassEquipmentSelect) Int

func (s *ClassEquipmentSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ClassEquipmentSelect) IntX

func (s *ClassEquipmentSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ClassEquipmentSelect) Ints

func (s *ClassEquipmentSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ClassEquipmentSelect) IntsX

func (s *ClassEquipmentSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ClassEquipmentSelect) Scan

func (ces *ClassEquipmentSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ClassEquipmentSelect) ScanX

func (s *ClassEquipmentSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ClassEquipmentSelect) String

func (s *ClassEquipmentSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ClassEquipmentSelect) StringX

func (s *ClassEquipmentSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ClassEquipmentSelect) Strings

func (s *ClassEquipmentSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ClassEquipmentSelect) StringsX

func (s *ClassEquipmentSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ClassEquipmentUpdate

type ClassEquipmentUpdate struct {
	// contains filtered or unexported fields
}

ClassEquipmentUpdate is the builder for updating ClassEquipment entities.

func (*ClassEquipmentUpdate) AddQuantity

func (ceu *ClassEquipmentUpdate) AddQuantity(i int) *ClassEquipmentUpdate

AddQuantity adds i to the "quantity" field.

func (*ClassEquipmentUpdate) ClearClass

func (ceu *ClassEquipmentUpdate) ClearClass() *ClassEquipmentUpdate

ClearClass clears the "class" edge to the Class entity.

func (*ClassEquipmentUpdate) ClearEquipment

func (ceu *ClassEquipmentUpdate) ClearEquipment() *ClassEquipmentUpdate

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*ClassEquipmentUpdate) Exec

func (ceu *ClassEquipmentUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ClassEquipmentUpdate) ExecX

func (ceu *ClassEquipmentUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ClassEquipmentUpdate) Mutation

Mutation returns the ClassEquipmentMutation object of the builder.

func (*ClassEquipmentUpdate) Save

func (ceu *ClassEquipmentUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ClassEquipmentUpdate) SaveX

func (ceu *ClassEquipmentUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ClassEquipmentUpdate) SetClass

func (ceu *ClassEquipmentUpdate) SetClass(c *Class) *ClassEquipmentUpdate

SetClass sets the "class" edge to the Class entity.

func (*ClassEquipmentUpdate) SetClassID

func (ceu *ClassEquipmentUpdate) SetClassID(i int) *ClassEquipmentUpdate

SetClassID sets the "class_id" field.

func (*ClassEquipmentUpdate) SetEquipment

func (ceu *ClassEquipmentUpdate) SetEquipment(e *Equipment) *ClassEquipmentUpdate

SetEquipment sets the "equipment" edge to the Equipment entity.

func (*ClassEquipmentUpdate) SetEquipmentID

func (ceu *ClassEquipmentUpdate) SetEquipmentID(i int) *ClassEquipmentUpdate

SetEquipmentID sets the "equipment_id" field.

func (*ClassEquipmentUpdate) SetQuantity

func (ceu *ClassEquipmentUpdate) SetQuantity(i int) *ClassEquipmentUpdate

SetQuantity sets the "quantity" field.

func (*ClassEquipmentUpdate) Where

Where appends a list predicates to the ClassEquipmentUpdate builder.

type ClassEquipmentUpdateOne

type ClassEquipmentUpdateOne struct {
	// contains filtered or unexported fields
}

ClassEquipmentUpdateOne is the builder for updating a single ClassEquipment entity.

func (*ClassEquipmentUpdateOne) AddQuantity

func (ceuo *ClassEquipmentUpdateOne) AddQuantity(i int) *ClassEquipmentUpdateOne

AddQuantity adds i to the "quantity" field.

func (*ClassEquipmentUpdateOne) ClearClass

ClearClass clears the "class" edge to the Class entity.

func (*ClassEquipmentUpdateOne) ClearEquipment

func (ceuo *ClassEquipmentUpdateOne) ClearEquipment() *ClassEquipmentUpdateOne

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*ClassEquipmentUpdateOne) Exec

func (ceuo *ClassEquipmentUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ClassEquipmentUpdateOne) ExecX

func (ceuo *ClassEquipmentUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ClassEquipmentUpdateOne) Mutation

Mutation returns the ClassEquipmentMutation object of the builder.

func (*ClassEquipmentUpdateOne) Save

Save executes the query and returns the updated ClassEquipment entity.

func (*ClassEquipmentUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*ClassEquipmentUpdateOne) Select

func (ceuo *ClassEquipmentUpdateOne) Select(field string, fields ...string) *ClassEquipmentUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ClassEquipmentUpdateOne) SetClass

SetClass sets the "class" edge to the Class entity.

func (*ClassEquipmentUpdateOne) SetClassID

SetClassID sets the "class_id" field.

func (*ClassEquipmentUpdateOne) SetEquipment

SetEquipment sets the "equipment" edge to the Equipment entity.

func (*ClassEquipmentUpdateOne) SetEquipmentID

func (ceuo *ClassEquipmentUpdateOne) SetEquipmentID(i int) *ClassEquipmentUpdateOne

SetEquipmentID sets the "equipment_id" field.

func (*ClassEquipmentUpdateOne) SetQuantity

func (ceuo *ClassEquipmentUpdateOne) SetQuantity(i int) *ClassEquipmentUpdateOne

SetQuantity sets the "quantity" field.

func (*ClassEquipmentUpdateOne) Where

Where appends a list predicates to the ClassEquipmentUpdate builder.

type ClassEquipments

type ClassEquipments []*ClassEquipment

ClassEquipments is a parsable slice of ClassEquipment.

type ClassGroupBy

type ClassGroupBy struct {
	// contains filtered or unexported fields
}

ClassGroupBy is the group-by builder for Class entities.

func (*ClassGroupBy) Aggregate

func (cgb *ClassGroupBy) Aggregate(fns ...AggregateFunc) *ClassGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ClassGroupBy) Bool

func (s *ClassGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ClassGroupBy) BoolX

func (s *ClassGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ClassGroupBy) Bools

func (s *ClassGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ClassGroupBy) BoolsX

func (s *ClassGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ClassGroupBy) Float64

func (s *ClassGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ClassGroupBy) Float64X

func (s *ClassGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ClassGroupBy) Float64s

func (s *ClassGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ClassGroupBy) Float64sX

func (s *ClassGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ClassGroupBy) Int

func (s *ClassGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ClassGroupBy) IntX

func (s *ClassGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ClassGroupBy) Ints

func (s *ClassGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ClassGroupBy) IntsX

func (s *ClassGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ClassGroupBy) Scan

func (cgb *ClassGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ClassGroupBy) ScanX

func (s *ClassGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ClassGroupBy) String

func (s *ClassGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ClassGroupBy) StringX

func (s *ClassGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ClassGroupBy) Strings

func (s *ClassGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ClassGroupBy) StringsX

func (s *ClassGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ClassMutation

type ClassMutation struct {
	// contains filtered or unexported fields
}

ClassMutation represents an operation that mutates the Class nodes in the graph.

func (*ClassMutation) AddEquipmentChoiceIDs

func (m *ClassMutation) AddEquipmentChoiceIDs(ids ...int)

AddEquipmentChoiceIDs adds the "equipment_choices" edge to the EquipmentChoice entity by ids.

func (*ClassMutation) AddEquipmentIDs

func (m *ClassMutation) AddEquipmentIDs(ids ...int)

AddEquipmentIDs adds the "equipment" edge to the Equipment entity by ids.

func (*ClassMutation) AddField

func (m *ClassMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ClassMutation) AddHitDie

func (m *ClassMutation) AddHitDie(i int)

AddHitDie adds i to the "hit_die" field.

func (*ClassMutation) AddProficiencyChoiceIDs

func (m *ClassMutation) AddProficiencyChoiceIDs(ids ...int)

AddProficiencyChoiceIDs adds the "proficiency_choices" edge to the ProficiencyChoice entity by ids.

func (*ClassMutation) AddProficiencyIDs

func (m *ClassMutation) AddProficiencyIDs(ids ...int)

AddProficiencyIDs adds the "proficiencies" edge to the Proficiency entity by ids.

func (*ClassMutation) AddedEdges

func (m *ClassMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ClassMutation) AddedField

func (m *ClassMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ClassMutation) AddedFields

func (m *ClassMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ClassMutation) AddedHitDie

func (m *ClassMutation) AddedHitDie() (r int, exists bool)

AddedHitDie returns the value that was added to the "hit_die" field in this mutation.

func (*ClassMutation) AddedIDs

func (m *ClassMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ClassMutation) ClearEdge

func (m *ClassMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*ClassMutation) ClearEquipment

func (m *ClassMutation) ClearEquipment()

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*ClassMutation) ClearEquipmentChoices

func (m *ClassMutation) ClearEquipmentChoices()

ClearEquipmentChoices clears the "equipment_choices" edge to the EquipmentChoice entity.

func (*ClassMutation) ClearField

func (m *ClassMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*ClassMutation) ClearProficiencies

func (m *ClassMutation) ClearProficiencies()

ClearProficiencies clears the "proficiencies" edge to the Proficiency entity.

func (*ClassMutation) ClearProficiencyChoices

func (m *ClassMutation) ClearProficiencyChoices()

ClearProficiencyChoices clears the "proficiency_choices" edge to the ProficiencyChoice entity.

func (*ClassMutation) ClearedEdges

func (m *ClassMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ClassMutation) ClearedFields

func (m *ClassMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ClassMutation) Client

func (m ClassMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*ClassMutation) EdgeCleared

func (m *ClassMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ClassMutation) EquipmentChoicesCleared

func (m *ClassMutation) EquipmentChoicesCleared() bool

EquipmentChoicesCleared reports if the "equipment_choices" edge to the EquipmentChoice entity was cleared.

func (*ClassMutation) EquipmentChoicesIDs

func (m *ClassMutation) EquipmentChoicesIDs() (ids []int)

EquipmentChoicesIDs returns the "equipment_choices" edge IDs in the mutation.

func (*ClassMutation) EquipmentCleared

func (m *ClassMutation) EquipmentCleared() bool

EquipmentCleared reports if the "equipment" edge to the Equipment entity was cleared.

func (*ClassMutation) EquipmentIDs

func (m *ClassMutation) EquipmentIDs() (ids []int)

EquipmentIDs returns the "equipment" edge IDs in the mutation.

func (*ClassMutation) Field

func (m *ClassMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ClassMutation) FieldCleared

func (m *ClassMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ClassMutation) Fields

func (m *ClassMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*ClassMutation) HitDie

func (m *ClassMutation) HitDie() (r int, exists bool)

HitDie returns the value of the "hit_die" field in the mutation.

func (*ClassMutation) ID

func (m *ClassMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*ClassMutation) IDs

func (m *ClassMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*ClassMutation) Indx

func (m *ClassMutation) Indx() (r string, exists bool)

Indx returns the value of the "indx" field in the mutation.

func (*ClassMutation) Name

func (m *ClassMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ClassMutation) OldField

func (m *ClassMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*ClassMutation) OldHitDie

func (m *ClassMutation) OldHitDie(ctx context.Context) (v int, err error)

OldHitDie returns the old "hit_die" field's value of the Class entity. If the Class object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ClassMutation) OldIndx

func (m *ClassMutation) OldIndx(ctx context.Context) (v string, err error)

OldIndx returns the old "indx" field's value of the Class entity. If the Class object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ClassMutation) OldName

func (m *ClassMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Class entity. If the Class object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ClassMutation) Op

func (m *ClassMutation) Op() Op

Op returns the operation name.

func (*ClassMutation) ProficienciesCleared

func (m *ClassMutation) ProficienciesCleared() bool

ProficienciesCleared reports if the "proficiencies" edge to the Proficiency entity was cleared.

func (*ClassMutation) ProficienciesIDs

func (m *ClassMutation) ProficienciesIDs() (ids []int)

ProficienciesIDs returns the "proficiencies" edge IDs in the mutation.

func (*ClassMutation) ProficiencyChoicesCleared

func (m *ClassMutation) ProficiencyChoicesCleared() bool

ProficiencyChoicesCleared reports if the "proficiency_choices" edge to the ProficiencyChoice entity was cleared.

func (*ClassMutation) ProficiencyChoicesIDs

func (m *ClassMutation) ProficiencyChoicesIDs() (ids []int)

ProficiencyChoicesIDs returns the "proficiency_choices" edge IDs in the mutation.

func (*ClassMutation) RemoveEquipmentChoiceIDs

func (m *ClassMutation) RemoveEquipmentChoiceIDs(ids ...int)

RemoveEquipmentChoiceIDs removes the "equipment_choices" edge to the EquipmentChoice entity by IDs.

func (*ClassMutation) RemoveEquipmentIDs

func (m *ClassMutation) RemoveEquipmentIDs(ids ...int)

RemoveEquipmentIDs removes the "equipment" edge to the Equipment entity by IDs.

func (*ClassMutation) RemoveProficiencyChoiceIDs

func (m *ClassMutation) RemoveProficiencyChoiceIDs(ids ...int)

RemoveProficiencyChoiceIDs removes the "proficiency_choices" edge to the ProficiencyChoice entity by IDs.

func (*ClassMutation) RemoveProficiencyIDs

func (m *ClassMutation) RemoveProficiencyIDs(ids ...int)

RemoveProficiencyIDs removes the "proficiencies" edge to the Proficiency entity by IDs.

func (*ClassMutation) RemovedEdges

func (m *ClassMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ClassMutation) RemovedEquipmentChoicesIDs

func (m *ClassMutation) RemovedEquipmentChoicesIDs() (ids []int)

RemovedEquipmentChoices returns the removed IDs of the "equipment_choices" edge to the EquipmentChoice entity.

func (*ClassMutation) RemovedEquipmentIDs

func (m *ClassMutation) RemovedEquipmentIDs() (ids []int)

RemovedEquipment returns the removed IDs of the "equipment" edge to the Equipment entity.

func (*ClassMutation) RemovedIDs

func (m *ClassMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*ClassMutation) RemovedProficienciesIDs

func (m *ClassMutation) RemovedProficienciesIDs() (ids []int)

RemovedProficiencies returns the removed IDs of the "proficiencies" edge to the Proficiency entity.

func (*ClassMutation) RemovedProficiencyChoicesIDs

func (m *ClassMutation) RemovedProficiencyChoicesIDs() (ids []int)

RemovedProficiencyChoices returns the removed IDs of the "proficiency_choices" edge to the ProficiencyChoice entity.

func (*ClassMutation) ResetEdge

func (m *ClassMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*ClassMutation) ResetEquipment

func (m *ClassMutation) ResetEquipment()

ResetEquipment resets all changes to the "equipment" edge.

func (*ClassMutation) ResetEquipmentChoices

func (m *ClassMutation) ResetEquipmentChoices()

ResetEquipmentChoices resets all changes to the "equipment_choices" edge.

func (*ClassMutation) ResetField

func (m *ClassMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*ClassMutation) ResetHitDie

func (m *ClassMutation) ResetHitDie()

ResetHitDie resets all changes to the "hit_die" field.

func (*ClassMutation) ResetIndx

func (m *ClassMutation) ResetIndx()

ResetIndx resets all changes to the "indx" field.

func (*ClassMutation) ResetName

func (m *ClassMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ClassMutation) ResetProficiencies

func (m *ClassMutation) ResetProficiencies()

ResetProficiencies resets all changes to the "proficiencies" edge.

func (*ClassMutation) ResetProficiencyChoices

func (m *ClassMutation) ResetProficiencyChoices()

ResetProficiencyChoices resets all changes to the "proficiency_choices" edge.

func (*ClassMutation) SetField

func (m *ClassMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ClassMutation) SetHitDie

func (m *ClassMutation) SetHitDie(i int)

SetHitDie sets the "hit_die" field.

func (*ClassMutation) SetIndx

func (m *ClassMutation) SetIndx(s string)

SetIndx sets the "indx" field.

func (*ClassMutation) SetName

func (m *ClassMutation) SetName(s string)

SetName sets the "name" field.

func (*ClassMutation) SetOp

func (m *ClassMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (ClassMutation) Tx

func (m ClassMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ClassMutation) Type

func (m *ClassMutation) Type() string

Type returns the node type of this mutation (Class).

func (*ClassMutation) Where

func (m *ClassMutation) Where(ps ...predicate.Class)

Where appends a list predicates to the ClassMutation builder.

func (*ClassMutation) WhereP

func (m *ClassMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ClassMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ClassOrder

type ClassOrder struct {
	Direction OrderDirection   `json:"direction"`
	Field     *ClassOrderField `json:"field"`
}

ClassOrder defines the ordering of Class.

type ClassOrderField

type ClassOrderField struct {
	// Value extracts the ordering value from the given Class.
	Value func(*Class) (ent.Value, error)
	// contains filtered or unexported fields
}

ClassOrderField defines the ordering field of Class.

func (ClassOrderField) MarshalGQL

func (f ClassOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (ClassOrderField) String

func (f ClassOrderField) String() string

String implement fmt.Stringer interface.

func (*ClassOrderField) UnmarshalGQL

func (f *ClassOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type ClassPaginateOption

type ClassPaginateOption func(*classPager) error

ClassPaginateOption enables pagination customization.

func WithClassFilter

func WithClassFilter(filter func(*ClassQuery) (*ClassQuery, error)) ClassPaginateOption

WithClassFilter configures pagination filter.

func WithClassOrder

func WithClassOrder(order *ClassOrder) ClassPaginateOption

WithClassOrder configures pagination ordering.

type ClassQuery

type ClassQuery struct {
	// contains filtered or unexported fields
}

ClassQuery is the builder for querying Class entities.

func (*ClassQuery) Aggregate

func (cq *ClassQuery) Aggregate(fns ...AggregateFunc) *ClassSelect

Aggregate returns a ClassSelect configured with the given aggregations.

func (*ClassQuery) All

func (cq *ClassQuery) All(ctx context.Context) ([]*Class, error)

All executes the query and returns a list of Classes.

func (*ClassQuery) AllX

func (cq *ClassQuery) AllX(ctx context.Context) []*Class

AllX is like All, but panics if an error occurs.

func (*ClassQuery) Clone

func (cq *ClassQuery) Clone() *ClassQuery

Clone returns a duplicate of the ClassQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ClassQuery) CollectFields

func (c *ClassQuery) CollectFields(ctx context.Context, satisfies ...string) (*ClassQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*ClassQuery) Count

func (cq *ClassQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ClassQuery) CountX

func (cq *ClassQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ClassQuery) Exist

func (cq *ClassQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ClassQuery) ExistX

func (cq *ClassQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ClassQuery) First

func (cq *ClassQuery) First(ctx context.Context) (*Class, error)

First returns the first Class entity from the query. Returns a *NotFoundError when no Class was found.

func (*ClassQuery) FirstID

func (cq *ClassQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Class ID from the query. Returns a *NotFoundError when no Class ID was found.

func (*ClassQuery) FirstIDX

func (cq *ClassQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*ClassQuery) FirstX

func (cq *ClassQuery) FirstX(ctx context.Context) *Class

FirstX is like First, but panics if an error occurs.

func (*ClassQuery) GroupBy

func (cq *ClassQuery) GroupBy(field string, fields ...string) *ClassGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Indx string `json:"index"`
	Count int `json:"count,omitempty"`
}

client.Class.Query().
	GroupBy(class.FieldIndx).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ClassQuery) IDs

func (cq *ClassQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Class IDs.

func (*ClassQuery) IDsX

func (cq *ClassQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*ClassQuery) Limit

func (cq *ClassQuery) Limit(limit int) *ClassQuery

Limit the number of records to be returned by this query.

func (*ClassQuery) Offset

func (cq *ClassQuery) Offset(offset int) *ClassQuery

Offset to start from.

func (*ClassQuery) Only

func (cq *ClassQuery) Only(ctx context.Context) (*Class, error)

Only returns a single Class entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Class entity is found. Returns a *NotFoundError when no Class entities are found.

func (*ClassQuery) OnlyID

func (cq *ClassQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Class ID in the query. Returns a *NotSingularError when more than one Class ID is found. Returns a *NotFoundError when no entities are found.

func (*ClassQuery) OnlyIDX

func (cq *ClassQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ClassQuery) OnlyX

func (cq *ClassQuery) OnlyX(ctx context.Context) *Class

OnlyX is like Only, but panics if an error occurs.

func (*ClassQuery) Order

func (cq *ClassQuery) Order(o ...class.OrderOption) *ClassQuery

Order specifies how the records should be ordered.

func (*ClassQuery) Paginate

func (c *ClassQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...ClassPaginateOption,
) (*ClassConnection, error)

Paginate executes the query and returns a relay based cursor connection to Class.

func (*ClassQuery) QueryClassEquipment

func (cq *ClassQuery) QueryClassEquipment() *ClassEquipmentQuery

QueryClassEquipment chains the current query on the "class_equipment" edge.

func (*ClassQuery) QueryEquipment

func (cq *ClassQuery) QueryEquipment() *EquipmentQuery

QueryEquipment chains the current query on the "equipment" edge.

func (*ClassQuery) QueryEquipmentChoices

func (cq *ClassQuery) QueryEquipmentChoices() *EquipmentChoiceQuery

QueryEquipmentChoices chains the current query on the "equipment_choices" edge.

func (*ClassQuery) QueryProficiencies

func (cq *ClassQuery) QueryProficiencies() *ProficiencyQuery

QueryProficiencies chains the current query on the "proficiencies" edge.

func (*ClassQuery) QueryProficiencyChoices

func (cq *ClassQuery) QueryProficiencyChoices() *ProficiencyChoiceQuery

QueryProficiencyChoices chains the current query on the "proficiency_choices" edge.

func (*ClassQuery) Select

func (cq *ClassQuery) Select(fields ...string) *ClassSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Indx string `json:"index"`
}

client.Class.Query().
	Select(class.FieldIndx).
	Scan(ctx, &v)

func (*ClassQuery) Unique

func (cq *ClassQuery) Unique(unique bool) *ClassQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*ClassQuery) Where

func (cq *ClassQuery) Where(ps ...predicate.Class) *ClassQuery

Where adds a new predicate for the ClassQuery builder.

func (*ClassQuery) WithClassEquipment

func (cq *ClassQuery) WithClassEquipment(opts ...func(*ClassEquipmentQuery)) *ClassQuery

WithClassEquipment tells the query-builder to eager-load the nodes that are connected to the "class_equipment" edge. The optional arguments are used to configure the query builder of the edge.

func (*ClassQuery) WithEquipment

func (cq *ClassQuery) WithEquipment(opts ...func(*EquipmentQuery)) *ClassQuery

WithEquipment tells the query-builder to eager-load the nodes that are connected to the "equipment" edge. The optional arguments are used to configure the query builder of the edge.

func (*ClassQuery) WithEquipmentChoices

func (cq *ClassQuery) WithEquipmentChoices(opts ...func(*EquipmentChoiceQuery)) *ClassQuery

WithEquipmentChoices tells the query-builder to eager-load the nodes that are connected to the "equipment_choices" edge. The optional arguments are used to configure the query builder of the edge.

func (*ClassQuery) WithNamedClassEquipment

func (cq *ClassQuery) WithNamedClassEquipment(name string, opts ...func(*ClassEquipmentQuery)) *ClassQuery

WithNamedClassEquipment tells the query-builder to eager-load the nodes that are connected to the "class_equipment" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ClassQuery) WithNamedEquipment

func (cq *ClassQuery) WithNamedEquipment(name string, opts ...func(*EquipmentQuery)) *ClassQuery

WithNamedEquipment tells the query-builder to eager-load the nodes that are connected to the "equipment" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ClassQuery) WithNamedEquipmentChoices

func (cq *ClassQuery) WithNamedEquipmentChoices(name string, opts ...func(*EquipmentChoiceQuery)) *ClassQuery

WithNamedEquipmentChoices tells the query-builder to eager-load the nodes that are connected to the "equipment_choices" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ClassQuery) WithNamedProficiencies

func (cq *ClassQuery) WithNamedProficiencies(name string, opts ...func(*ProficiencyQuery)) *ClassQuery

WithNamedProficiencies tells the query-builder to eager-load the nodes that are connected to the "proficiencies" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ClassQuery) WithNamedProficiencyChoices

func (cq *ClassQuery) WithNamedProficiencyChoices(name string, opts ...func(*ProficiencyChoiceQuery)) *ClassQuery

WithNamedProficiencyChoices tells the query-builder to eager-load the nodes that are connected to the "proficiency_choices" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ClassQuery) WithProficiencies

func (cq *ClassQuery) WithProficiencies(opts ...func(*ProficiencyQuery)) *ClassQuery

WithProficiencies tells the query-builder to eager-load the nodes that are connected to the "proficiencies" edge. The optional arguments are used to configure the query builder of the edge.

func (*ClassQuery) WithProficiencyChoices

func (cq *ClassQuery) WithProficiencyChoices(opts ...func(*ProficiencyChoiceQuery)) *ClassQuery

WithProficiencyChoices tells the query-builder to eager-load the nodes that are connected to the "proficiency_choices" edge. The optional arguments are used to configure the query builder of the edge.

type ClassSelect

type ClassSelect struct {
	*ClassQuery
	// contains filtered or unexported fields
}

ClassSelect is the builder for selecting fields of Class entities.

func (*ClassSelect) Aggregate

func (cs *ClassSelect) Aggregate(fns ...AggregateFunc) *ClassSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ClassSelect) Bool

func (s *ClassSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ClassSelect) BoolX

func (s *ClassSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ClassSelect) Bools

func (s *ClassSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ClassSelect) BoolsX

func (s *ClassSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ClassSelect) Float64

func (s *ClassSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ClassSelect) Float64X

func (s *ClassSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ClassSelect) Float64s

func (s *ClassSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ClassSelect) Float64sX

func (s *ClassSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ClassSelect) Int

func (s *ClassSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ClassSelect) IntX

func (s *ClassSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ClassSelect) Ints

func (s *ClassSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ClassSelect) IntsX

func (s *ClassSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ClassSelect) Scan

func (cs *ClassSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ClassSelect) ScanX

func (s *ClassSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ClassSelect) String

func (s *ClassSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ClassSelect) StringX

func (s *ClassSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ClassSelect) Strings

func (s *ClassSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ClassSelect) StringsX

func (s *ClassSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ClassUpdate

type ClassUpdate struct {
	// contains filtered or unexported fields
}

ClassUpdate is the builder for updating Class entities.

func (*ClassUpdate) AddEquipment

func (cu *ClassUpdate) AddEquipment(e ...*Equipment) *ClassUpdate

AddEquipment adds the "equipment" edges to the Equipment entity.

func (*ClassUpdate) AddEquipmentChoiceIDs

func (cu *ClassUpdate) AddEquipmentChoiceIDs(ids ...int) *ClassUpdate

AddEquipmentChoiceIDs adds the "equipment_choices" edge to the EquipmentChoice entity by IDs.

func (*ClassUpdate) AddEquipmentChoices

func (cu *ClassUpdate) AddEquipmentChoices(e ...*EquipmentChoice) *ClassUpdate

AddEquipmentChoices adds the "equipment_choices" edges to the EquipmentChoice entity.

func (*ClassUpdate) AddEquipmentIDs

func (cu *ClassUpdate) AddEquipmentIDs(ids ...int) *ClassUpdate

AddEquipmentIDs adds the "equipment" edge to the Equipment entity by IDs.

func (*ClassUpdate) AddHitDie

func (cu *ClassUpdate) AddHitDie(i int) *ClassUpdate

AddHitDie adds i to the "hit_die" field.

func (*ClassUpdate) AddProficiencies

func (cu *ClassUpdate) AddProficiencies(p ...*Proficiency) *ClassUpdate

AddProficiencies adds the "proficiencies" edges to the Proficiency entity.

func (*ClassUpdate) AddProficiencyChoiceIDs

func (cu *ClassUpdate) AddProficiencyChoiceIDs(ids ...int) *ClassUpdate

AddProficiencyChoiceIDs adds the "proficiency_choices" edge to the ProficiencyChoice entity by IDs.

func (*ClassUpdate) AddProficiencyChoices

func (cu *ClassUpdate) AddProficiencyChoices(p ...*ProficiencyChoice) *ClassUpdate

AddProficiencyChoices adds the "proficiency_choices" edges to the ProficiencyChoice entity.

func (*ClassUpdate) AddProficiencyIDs

func (cu *ClassUpdate) AddProficiencyIDs(ids ...int) *ClassUpdate

AddProficiencyIDs adds the "proficiencies" edge to the Proficiency entity by IDs.

func (*ClassUpdate) ClearEquipment

func (cu *ClassUpdate) ClearEquipment() *ClassUpdate

ClearEquipment clears all "equipment" edges to the Equipment entity.

func (*ClassUpdate) ClearEquipmentChoices

func (cu *ClassUpdate) ClearEquipmentChoices() *ClassUpdate

ClearEquipmentChoices clears all "equipment_choices" edges to the EquipmentChoice entity.

func (*ClassUpdate) ClearProficiencies

func (cu *ClassUpdate) ClearProficiencies() *ClassUpdate

ClearProficiencies clears all "proficiencies" edges to the Proficiency entity.

func (*ClassUpdate) ClearProficiencyChoices

func (cu *ClassUpdate) ClearProficiencyChoices() *ClassUpdate

ClearProficiencyChoices clears all "proficiency_choices" edges to the ProficiencyChoice entity.

func (*ClassUpdate) Exec

func (cu *ClassUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ClassUpdate) ExecX

func (cu *ClassUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ClassUpdate) Mutation

func (cu *ClassUpdate) Mutation() *ClassMutation

Mutation returns the ClassMutation object of the builder.

func (*ClassUpdate) RemoveEquipment

func (cu *ClassUpdate) RemoveEquipment(e ...*Equipment) *ClassUpdate

RemoveEquipment removes "equipment" edges to Equipment entities.

func (*ClassUpdate) RemoveEquipmentChoiceIDs

func (cu *ClassUpdate) RemoveEquipmentChoiceIDs(ids ...int) *ClassUpdate

RemoveEquipmentChoiceIDs removes the "equipment_choices" edge to EquipmentChoice entities by IDs.

func (*ClassUpdate) RemoveEquipmentChoices

func (cu *ClassUpdate) RemoveEquipmentChoices(e ...*EquipmentChoice) *ClassUpdate

RemoveEquipmentChoices removes "equipment_choices" edges to EquipmentChoice entities.

func (*ClassUpdate) RemoveEquipmentIDs

func (cu *ClassUpdate) RemoveEquipmentIDs(ids ...int) *ClassUpdate

RemoveEquipmentIDs removes the "equipment" edge to Equipment entities by IDs.

func (*ClassUpdate) RemoveProficiencies

func (cu *ClassUpdate) RemoveProficiencies(p ...*Proficiency) *ClassUpdate

RemoveProficiencies removes "proficiencies" edges to Proficiency entities.

func (*ClassUpdate) RemoveProficiencyChoiceIDs

func (cu *ClassUpdate) RemoveProficiencyChoiceIDs(ids ...int) *ClassUpdate

RemoveProficiencyChoiceIDs removes the "proficiency_choices" edge to ProficiencyChoice entities by IDs.

func (*ClassUpdate) RemoveProficiencyChoices

func (cu *ClassUpdate) RemoveProficiencyChoices(p ...*ProficiencyChoice) *ClassUpdate

RemoveProficiencyChoices removes "proficiency_choices" edges to ProficiencyChoice entities.

func (*ClassUpdate) RemoveProficiencyIDs

func (cu *ClassUpdate) RemoveProficiencyIDs(ids ...int) *ClassUpdate

RemoveProficiencyIDs removes the "proficiencies" edge to Proficiency entities by IDs.

func (*ClassUpdate) Save

func (cu *ClassUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ClassUpdate) SaveX

func (cu *ClassUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ClassUpdate) SetHitDie

func (cu *ClassUpdate) SetHitDie(i int) *ClassUpdate

SetHitDie sets the "hit_die" field.

func (*ClassUpdate) SetIndx

func (cu *ClassUpdate) SetIndx(s string) *ClassUpdate

SetIndx sets the "indx" field.

func (*ClassUpdate) SetName

func (cu *ClassUpdate) SetName(s string) *ClassUpdate

SetName sets the "name" field.

func (*ClassUpdate) Where

func (cu *ClassUpdate) Where(ps ...predicate.Class) *ClassUpdate

Where appends a list predicates to the ClassUpdate builder.

type ClassUpdateOne

type ClassUpdateOne struct {
	// contains filtered or unexported fields
}

ClassUpdateOne is the builder for updating a single Class entity.

func (*ClassUpdateOne) AddEquipment

func (cuo *ClassUpdateOne) AddEquipment(e ...*Equipment) *ClassUpdateOne

AddEquipment adds the "equipment" edges to the Equipment entity.

func (*ClassUpdateOne) AddEquipmentChoiceIDs

func (cuo *ClassUpdateOne) AddEquipmentChoiceIDs(ids ...int) *ClassUpdateOne

AddEquipmentChoiceIDs adds the "equipment_choices" edge to the EquipmentChoice entity by IDs.

func (*ClassUpdateOne) AddEquipmentChoices

func (cuo *ClassUpdateOne) AddEquipmentChoices(e ...*EquipmentChoice) *ClassUpdateOne

AddEquipmentChoices adds the "equipment_choices" edges to the EquipmentChoice entity.

func (*ClassUpdateOne) AddEquipmentIDs

func (cuo *ClassUpdateOne) AddEquipmentIDs(ids ...int) *ClassUpdateOne

AddEquipmentIDs adds the "equipment" edge to the Equipment entity by IDs.

func (*ClassUpdateOne) AddHitDie

func (cuo *ClassUpdateOne) AddHitDie(i int) *ClassUpdateOne

AddHitDie adds i to the "hit_die" field.

func (*ClassUpdateOne) AddProficiencies

func (cuo *ClassUpdateOne) AddProficiencies(p ...*Proficiency) *ClassUpdateOne

AddProficiencies adds the "proficiencies" edges to the Proficiency entity.

func (*ClassUpdateOne) AddProficiencyChoiceIDs

func (cuo *ClassUpdateOne) AddProficiencyChoiceIDs(ids ...int) *ClassUpdateOne

AddProficiencyChoiceIDs adds the "proficiency_choices" edge to the ProficiencyChoice entity by IDs.

func (*ClassUpdateOne) AddProficiencyChoices

func (cuo *ClassUpdateOne) AddProficiencyChoices(p ...*ProficiencyChoice) *ClassUpdateOne

AddProficiencyChoices adds the "proficiency_choices" edges to the ProficiencyChoice entity.

func (*ClassUpdateOne) AddProficiencyIDs

func (cuo *ClassUpdateOne) AddProficiencyIDs(ids ...int) *ClassUpdateOne

AddProficiencyIDs adds the "proficiencies" edge to the Proficiency entity by IDs.

func (*ClassUpdateOne) ClearEquipment

func (cuo *ClassUpdateOne) ClearEquipment() *ClassUpdateOne

ClearEquipment clears all "equipment" edges to the Equipment entity.

func (*ClassUpdateOne) ClearEquipmentChoices

func (cuo *ClassUpdateOne) ClearEquipmentChoices() *ClassUpdateOne

ClearEquipmentChoices clears all "equipment_choices" edges to the EquipmentChoice entity.

func (*ClassUpdateOne) ClearProficiencies

func (cuo *ClassUpdateOne) ClearProficiencies() *ClassUpdateOne

ClearProficiencies clears all "proficiencies" edges to the Proficiency entity.

func (*ClassUpdateOne) ClearProficiencyChoices

func (cuo *ClassUpdateOne) ClearProficiencyChoices() *ClassUpdateOne

ClearProficiencyChoices clears all "proficiency_choices" edges to the ProficiencyChoice entity.

func (*ClassUpdateOne) Exec

func (cuo *ClassUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ClassUpdateOne) ExecX

func (cuo *ClassUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ClassUpdateOne) Mutation

func (cuo *ClassUpdateOne) Mutation() *ClassMutation

Mutation returns the ClassMutation object of the builder.

func (*ClassUpdateOne) RemoveEquipment

func (cuo *ClassUpdateOne) RemoveEquipment(e ...*Equipment) *ClassUpdateOne

RemoveEquipment removes "equipment" edges to Equipment entities.

func (*ClassUpdateOne) RemoveEquipmentChoiceIDs

func (cuo *ClassUpdateOne) RemoveEquipmentChoiceIDs(ids ...int) *ClassUpdateOne

RemoveEquipmentChoiceIDs removes the "equipment_choices" edge to EquipmentChoice entities by IDs.

func (*ClassUpdateOne) RemoveEquipmentChoices

func (cuo *ClassUpdateOne) RemoveEquipmentChoices(e ...*EquipmentChoice) *ClassUpdateOne

RemoveEquipmentChoices removes "equipment_choices" edges to EquipmentChoice entities.

func (*ClassUpdateOne) RemoveEquipmentIDs

func (cuo *ClassUpdateOne) RemoveEquipmentIDs(ids ...int) *ClassUpdateOne

RemoveEquipmentIDs removes the "equipment" edge to Equipment entities by IDs.

func (*ClassUpdateOne) RemoveProficiencies

func (cuo *ClassUpdateOne) RemoveProficiencies(p ...*Proficiency) *ClassUpdateOne

RemoveProficiencies removes "proficiencies" edges to Proficiency entities.

func (*ClassUpdateOne) RemoveProficiencyChoiceIDs

func (cuo *ClassUpdateOne) RemoveProficiencyChoiceIDs(ids ...int) *ClassUpdateOne

RemoveProficiencyChoiceIDs removes the "proficiency_choices" edge to ProficiencyChoice entities by IDs.

func (*ClassUpdateOne) RemoveProficiencyChoices

func (cuo *ClassUpdateOne) RemoveProficiencyChoices(p ...*ProficiencyChoice) *ClassUpdateOne

RemoveProficiencyChoices removes "proficiency_choices" edges to ProficiencyChoice entities.

func (*ClassUpdateOne) RemoveProficiencyIDs

func (cuo *ClassUpdateOne) RemoveProficiencyIDs(ids ...int) *ClassUpdateOne

RemoveProficiencyIDs removes the "proficiencies" edge to Proficiency entities by IDs.

func (*ClassUpdateOne) Save

func (cuo *ClassUpdateOne) Save(ctx context.Context) (*Class, error)

Save executes the query and returns the updated Class entity.

func (*ClassUpdateOne) SaveX

func (cuo *ClassUpdateOne) SaveX(ctx context.Context) *Class

SaveX is like Save, but panics if an error occurs.

func (*ClassUpdateOne) Select

func (cuo *ClassUpdateOne) Select(field string, fields ...string) *ClassUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ClassUpdateOne) SetHitDie

func (cuo *ClassUpdateOne) SetHitDie(i int) *ClassUpdateOne

SetHitDie sets the "hit_die" field.

func (*ClassUpdateOne) SetIndx

func (cuo *ClassUpdateOne) SetIndx(s string) *ClassUpdateOne

SetIndx sets the "indx" field.

func (*ClassUpdateOne) SetName

func (cuo *ClassUpdateOne) SetName(s string) *ClassUpdateOne

SetName sets the "name" field.

func (*ClassUpdateOne) Where

func (cuo *ClassUpdateOne) Where(ps ...predicate.Class) *ClassUpdateOne

Where appends a list predicates to the ClassUpdate builder.

type ClassWhereInput

type ClassWhereInput struct {
	Predicates []predicate.Class  `json:"-"`
	Not        *ClassWhereInput   `json:"not,omitempty"`
	Or         []*ClassWhereInput `json:"or,omitempty"`
	And        []*ClassWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "indx" field predicates.
	Indx             *string  `json:"indx,omitempty"`
	IndxNEQ          *string  `json:"indxNEQ,omitempty"`
	IndxIn           []string `json:"indxIn,omitempty"`
	IndxNotIn        []string `json:"indxNotIn,omitempty"`
	IndxGT           *string  `json:"indxGT,omitempty"`
	IndxGTE          *string  `json:"indxGTE,omitempty"`
	IndxLT           *string  `json:"indxLT,omitempty"`
	IndxLTE          *string  `json:"indxLTE,omitempty"`
	IndxContains     *string  `json:"indxContains,omitempty"`
	IndxHasPrefix    *string  `json:"indxHasPrefix,omitempty"`
	IndxHasSuffix    *string  `json:"indxHasSuffix,omitempty"`
	IndxEqualFold    *string  `json:"indxEqualFold,omitempty"`
	IndxContainsFold *string  `json:"indxContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "hit_die" field predicates.
	HitDie      *int  `json:"hitDie,omitempty"`
	HitDieNEQ   *int  `json:"hitDieNEQ,omitempty"`
	HitDieIn    []int `json:"hitDieIn,omitempty"`
	HitDieNotIn []int `json:"hitDieNotIn,omitempty"`
	HitDieGT    *int  `json:"hitDieGT,omitempty"`
	HitDieGTE   *int  `json:"hitDieGTE,omitempty"`
	HitDieLT    *int  `json:"hitDieLT,omitempty"`
	HitDieLTE   *int  `json:"hitDieLTE,omitempty"`

	// "proficiencies" edge predicates.
	HasProficiencies     *bool                    `json:"hasProficiencies,omitempty"`
	HasProficienciesWith []*ProficiencyWhereInput `json:"hasProficienciesWith,omitempty"`

	// "proficiency_choices" edge predicates.
	HasProficiencyChoices     *bool                          `json:"hasProficiencyChoices,omitempty"`
	HasProficiencyChoicesWith []*ProficiencyChoiceWhereInput `json:"hasProficiencyChoicesWith,omitempty"`

	// "equipment" edge predicates.
	HasEquipment     *bool                  `json:"hasEquipment,omitempty"`
	HasEquipmentWith []*EquipmentWhereInput `json:"hasEquipmentWith,omitempty"`

	// "equipment_choices" edge predicates.
	HasEquipmentChoices     *bool                        `json:"hasEquipmentChoices,omitempty"`
	HasEquipmentChoicesWith []*EquipmentChoiceWhereInput `json:"hasEquipmentChoicesWith,omitempty"`
}

ClassWhereInput represents a where input for filtering Class queries.

func (*ClassWhereInput) AddPredicates

func (i *ClassWhereInput) AddPredicates(predicates ...predicate.Class)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*ClassWhereInput) Filter

func (i *ClassWhereInput) Filter(q *ClassQuery) (*ClassQuery, error)

Filter applies the ClassWhereInput filter on the ClassQuery builder.

func (*ClassWhereInput) P

P returns a predicate for filtering classes. An error is returned if the input is empty or invalid.

type Classes

type Classes []*Class

Classes is a parsable slice of Class.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// AbilityBonus is the client for interacting with the AbilityBonus builders.
	AbilityBonus *AbilityBonusClient
	// AbilityScore is the client for interacting with the AbilityScore builders.
	AbilityScore *AbilityScoreClient
	// Armor is the client for interacting with the Armor builders.
	Armor *ArmorClient
	// ArmorClass is the client for interacting with the ArmorClass builders.
	ArmorClass *ArmorClassClient
	// Class is the client for interacting with the Class builders.
	Class *ClassClient
	// ClassEquipment is the client for interacting with the ClassEquipment builders.
	ClassEquipment *ClassEquipmentClient
	// Coin is the client for interacting with the Coin builders.
	Coin *CoinClient
	// DamageType is the client for interacting with the DamageType builders.
	DamageType *DamageTypeClient
	// Equipment is the client for interacting with the Equipment builders.
	Equipment *EquipmentClient
	// EquipmentCategory is the client for interacting with the EquipmentCategory builders.
	EquipmentCategory *EquipmentCategoryClient
	// EquipmentChoice is the client for interacting with the EquipmentChoice builders.
	EquipmentChoice *EquipmentChoiceClient
	// EquipmentCost is the client for interacting with the EquipmentCost builders.
	EquipmentCost *EquipmentCostClient
	// Gear is the client for interacting with the Gear builders.
	Gear *GearClient
	// Language is the client for interacting with the Language builders.
	Language *LanguageClient
	// MagicSchool is the client for interacting with the MagicSchool builders.
	MagicSchool *MagicSchoolClient
	// Proficiency is the client for interacting with the Proficiency builders.
	Proficiency *ProficiencyClient
	// ProficiencyChoice is the client for interacting with the ProficiencyChoice builders.
	ProficiencyChoice *ProficiencyChoiceClient
	// Race is the client for interacting with the Race builders.
	Race *RaceClient
	// Rule is the client for interacting with the Rule builders.
	Rule *RuleClient
	// RuleSection is the client for interacting with the RuleSection builders.
	RuleSection *RuleSectionClient
	// Skill is the client for interacting with the Skill builders.
	Skill *SkillClient
	// Subrace is the client for interacting with the Subrace builders.
	Subrace *SubraceClient
	// Tool is the client for interacting with the Tool builders.
	Tool *ToolClient
	// Trait is the client for interacting with the Trait builders.
	Trait *TraitClient
	// Vehicle is the client for interacting with the Vehicle builders.
	Vehicle *VehicleClient
	// Weapon is the client for interacting with the Weapon builders.
	Weapon *WeaponClient
	// WeaponDamage is the client for interacting with the WeaponDamage builders.
	WeaponDamage *WeaponDamageClient
	// WeaponProperty is the client for interacting with the WeaponProperty builders.
	WeaponProperty *WeaponPropertyClient
	// contains filtered or unexported fields
}

Client is the client that holds all ent builders.

func FromContext

func FromContext(ctx context.Context) *Client

FromContext returns a Client stored inside a context, or nil if there isn't one.

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.

func (*Client) BeginTx

func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug

func (c *Client) Debug() *Client

Debug returns a new debug-client. It's used to get verbose logging on specific operations.

client.Debug().
	AbilityBonus.
	Query().
	Count(ctx)

func (*Client) Intercept

func (c *Client) Intercept(interceptors ...Interceptor)

Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

func (*Client) Node

func (c *Client) Node(ctx context.Context, id int) (*Node, error)

Node returns the node with given global ID.

This API helpful in case you want to build an administrator tool to browser all types in system.

func (*Client) Noder

func (c *Client) Noder(ctx context.Context, id int, opts ...NodeOption) (_ Noder, err error)

Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.

c.Noder(ctx, id)
c.Noder(ctx, id, ent.WithNodeType(typeResolver))

func (*Client) Noders

func (c *Client) Noders(ctx context.Context, ids []int, opts ...NodeOption) ([]Noder, error)

func (*Client) OpenTx

func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)

OpenTx opens a transaction and returns a transactional context along with the created transaction.

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

func (c *Client) Use(hooks ...Hook)

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type Coin

type Coin struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Indx holds the value of the "indx" field.
	Indx string `json:"indx,omitempty"`
	// Desc holds the value of the "desc" field.
	Desc string `json:"desc,omitempty"`
	// GoldConversionRate holds the value of the "gold_conversion_rate" field.
	GoldConversionRate float64 `json:"gold_conversion_rate,omitempty"`
	// contains filtered or unexported fields
}

Coin is the model entity for the Coin schema.

func (*Coin) IsNode

func (n *Coin) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Coin) Node

func (c *Coin) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*Coin) String

func (c *Coin) String() string

String implements the fmt.Stringer.

func (*Coin) ToEdge

func (c *Coin) ToEdge(order *CoinOrder) *CoinEdge

ToEdge converts Coin into CoinEdge.

func (*Coin) Unwrap

func (c *Coin) Unwrap() *Coin

Unwrap unwraps the Coin entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Coin) Update

func (c *Coin) Update() *CoinUpdateOne

Update returns a builder for updating this Coin. Note that you need to call Coin.Unwrap() before calling this method if this Coin was returned from a transaction, and the transaction was committed or rolled back.

func (*Coin) Value

func (c *Coin) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Coin. This includes values selected through modifiers, order, etc.

type CoinClient

type CoinClient struct {
	// contains filtered or unexported fields
}

CoinClient is a client for the Coin schema.

func NewCoinClient

func NewCoinClient(c config) *CoinClient

NewCoinClient returns a client for the Coin from the given config.

func (*CoinClient) Create

func (c *CoinClient) Create() *CoinCreate

Create returns a builder for creating a Coin entity.

func (*CoinClient) CreateBulk

func (c *CoinClient) CreateBulk(builders ...*CoinCreate) *CoinCreateBulk

CreateBulk returns a builder for creating a bulk of Coin entities.

func (*CoinClient) Delete

func (c *CoinClient) Delete() *CoinDelete

Delete returns a delete builder for Coin.

func (*CoinClient) DeleteOne

func (c *CoinClient) DeleteOne(co *Coin) *CoinDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CoinClient) DeleteOneID

func (c *CoinClient) DeleteOneID(id int) *CoinDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*CoinClient) Get

func (c *CoinClient) Get(ctx context.Context, id int) (*Coin, error)

Get returns a Coin entity by its id.

func (*CoinClient) GetX

func (c *CoinClient) GetX(ctx context.Context, id int) *Coin

GetX is like Get, but panics if an error occurs.

func (*CoinClient) Hooks

func (c *CoinClient) Hooks() []Hook

Hooks returns the client hooks.

func (*CoinClient) Intercept

func (c *CoinClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `coin.Intercept(f(g(h())))`.

func (*CoinClient) Interceptors

func (c *CoinClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*CoinClient) Query

func (c *CoinClient) Query() *CoinQuery

Query returns a query builder for Coin.

func (*CoinClient) Update

func (c *CoinClient) Update() *CoinUpdate

Update returns an update builder for Coin.

func (*CoinClient) UpdateOne

func (c *CoinClient) UpdateOne(co *Coin) *CoinUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CoinClient) UpdateOneID

func (c *CoinClient) UpdateOneID(id int) *CoinUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CoinClient) Use

func (c *CoinClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `coin.Hooks(f(g(h())))`.

type CoinConnection

type CoinConnection struct {
	Edges      []*CoinEdge `json:"edges"`
	PageInfo   PageInfo    `json:"pageInfo"`
	TotalCount int         `json:"totalCount"`
}

CoinConnection is the connection containing edges to Coin.

type CoinCreate

type CoinCreate struct {
	// contains filtered or unexported fields
}

CoinCreate is the builder for creating a Coin entity.

func (*CoinCreate) Exec

func (cc *CoinCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CoinCreate) ExecX

func (cc *CoinCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CoinCreate) Mutation

func (cc *CoinCreate) Mutation() *CoinMutation

Mutation returns the CoinMutation object of the builder.

func (*CoinCreate) Save

func (cc *CoinCreate) Save(ctx context.Context) (*Coin, error)

Save creates the Coin in the database.

func (*CoinCreate) SaveX

func (cc *CoinCreate) SaveX(ctx context.Context) *Coin

SaveX calls Save and panics if Save returns an error.

func (*CoinCreate) SetCoin

func (cc *CoinCreate) SetCoin(input *Coin) *CoinCreate

func (*CoinCreate) SetDesc

func (cc *CoinCreate) SetDesc(s string) *CoinCreate

SetDesc sets the "desc" field.

func (*CoinCreate) SetGoldConversionRate

func (cc *CoinCreate) SetGoldConversionRate(f float64) *CoinCreate

SetGoldConversionRate sets the "gold_conversion_rate" field.

func (*CoinCreate) SetIndx

func (cc *CoinCreate) SetIndx(s string) *CoinCreate

SetIndx sets the "indx" field.

type CoinCreateBulk

type CoinCreateBulk struct {
	// contains filtered or unexported fields
}

CoinCreateBulk is the builder for creating many Coin entities in bulk.

func (*CoinCreateBulk) Exec

func (ccb *CoinCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CoinCreateBulk) ExecX

func (ccb *CoinCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CoinCreateBulk) Save

func (ccb *CoinCreateBulk) Save(ctx context.Context) ([]*Coin, error)

Save creates the Coin entities in the database.

func (*CoinCreateBulk) SaveX

func (ccb *CoinCreateBulk) SaveX(ctx context.Context) []*Coin

SaveX is like Save, but panics if an error occurs.

type CoinDelete

type CoinDelete struct {
	// contains filtered or unexported fields
}

CoinDelete is the builder for deleting a Coin entity.

func (*CoinDelete) Exec

func (cd *CoinDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*CoinDelete) ExecX

func (cd *CoinDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*CoinDelete) Where

func (cd *CoinDelete) Where(ps ...predicate.Coin) *CoinDelete

Where appends a list predicates to the CoinDelete builder.

type CoinDeleteOne

type CoinDeleteOne struct {
	// contains filtered or unexported fields
}

CoinDeleteOne is the builder for deleting a single Coin entity.

func (*CoinDeleteOne) Exec

func (cdo *CoinDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CoinDeleteOne) ExecX

func (cdo *CoinDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CoinDeleteOne) Where

func (cdo *CoinDeleteOne) Where(ps ...predicate.Coin) *CoinDeleteOne

Where appends a list predicates to the CoinDelete builder.

type CoinEdge

type CoinEdge struct {
	Node   *Coin  `json:"node"`
	Cursor Cursor `json:"cursor"`
}

CoinEdge is the edge representation of Coin.

type CoinGroupBy

type CoinGroupBy struct {
	// contains filtered or unexported fields
}

CoinGroupBy is the group-by builder for Coin entities.

func (*CoinGroupBy) Aggregate

func (cgb *CoinGroupBy) Aggregate(fns ...AggregateFunc) *CoinGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*CoinGroupBy) Bool

func (s *CoinGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CoinGroupBy) BoolX

func (s *CoinGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CoinGroupBy) Bools

func (s *CoinGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CoinGroupBy) BoolsX

func (s *CoinGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CoinGroupBy) Float64

func (s *CoinGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CoinGroupBy) Float64X

func (s *CoinGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CoinGroupBy) Float64s

func (s *CoinGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CoinGroupBy) Float64sX

func (s *CoinGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CoinGroupBy) Int

func (s *CoinGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CoinGroupBy) IntX

func (s *CoinGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CoinGroupBy) Ints

func (s *CoinGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CoinGroupBy) IntsX

func (s *CoinGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CoinGroupBy) Scan

func (cgb *CoinGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CoinGroupBy) ScanX

func (s *CoinGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CoinGroupBy) String

func (s *CoinGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CoinGroupBy) StringX

func (s *CoinGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CoinGroupBy) Strings

func (s *CoinGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CoinGroupBy) StringsX

func (s *CoinGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CoinMutation

type CoinMutation struct {
	// contains filtered or unexported fields
}

CoinMutation represents an operation that mutates the Coin nodes in the graph.

func (*CoinMutation) AddField

func (m *CoinMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*CoinMutation) AddGoldConversionRate

func (m *CoinMutation) AddGoldConversionRate(f float64)

AddGoldConversionRate adds f to the "gold_conversion_rate" field.

func (*CoinMutation) AddedEdges

func (m *CoinMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*CoinMutation) AddedField

func (m *CoinMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*CoinMutation) AddedFields

func (m *CoinMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*CoinMutation) AddedGoldConversionRate

func (m *CoinMutation) AddedGoldConversionRate() (r float64, exists bool)

AddedGoldConversionRate returns the value that was added to the "gold_conversion_rate" field in this mutation.

func (*CoinMutation) AddedIDs

func (m *CoinMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*CoinMutation) ClearEdge

func (m *CoinMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*CoinMutation) ClearField

func (m *CoinMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*CoinMutation) ClearedEdges

func (m *CoinMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*CoinMutation) ClearedFields

func (m *CoinMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (CoinMutation) Client

func (m CoinMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*CoinMutation) Desc

func (m *CoinMutation) Desc() (r string, exists bool)

Desc returns the value of the "desc" field in the mutation.

func (*CoinMutation) EdgeCleared

func (m *CoinMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*CoinMutation) Field

func (m *CoinMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*CoinMutation) FieldCleared

func (m *CoinMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*CoinMutation) Fields

func (m *CoinMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*CoinMutation) GoldConversionRate

func (m *CoinMutation) GoldConversionRate() (r float64, exists bool)

GoldConversionRate returns the value of the "gold_conversion_rate" field in the mutation.

func (*CoinMutation) ID

func (m *CoinMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*CoinMutation) IDs

func (m *CoinMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*CoinMutation) Indx

func (m *CoinMutation) Indx() (r string, exists bool)

Indx returns the value of the "indx" field in the mutation.

func (*CoinMutation) OldDesc

func (m *CoinMutation) OldDesc(ctx context.Context) (v string, err error)

OldDesc returns the old "desc" field's value of the Coin entity. If the Coin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CoinMutation) OldField

func (m *CoinMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*CoinMutation) OldGoldConversionRate

func (m *CoinMutation) OldGoldConversionRate(ctx context.Context) (v float64, err error)

OldGoldConversionRate returns the old "gold_conversion_rate" field's value of the Coin entity. If the Coin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CoinMutation) OldIndx

func (m *CoinMutation) OldIndx(ctx context.Context) (v string, err error)

OldIndx returns the old "indx" field's value of the Coin entity. If the Coin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*CoinMutation) Op

func (m *CoinMutation) Op() Op

Op returns the operation name.

func (*CoinMutation) RemovedEdges

func (m *CoinMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*CoinMutation) RemovedIDs

func (m *CoinMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*CoinMutation) ResetDesc

func (m *CoinMutation) ResetDesc()

ResetDesc resets all changes to the "desc" field.

func (*CoinMutation) ResetEdge

func (m *CoinMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*CoinMutation) ResetField

func (m *CoinMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*CoinMutation) ResetGoldConversionRate

func (m *CoinMutation) ResetGoldConversionRate()

ResetGoldConversionRate resets all changes to the "gold_conversion_rate" field.

func (*CoinMutation) ResetIndx

func (m *CoinMutation) ResetIndx()

ResetIndx resets all changes to the "indx" field.

func (*CoinMutation) SetDesc

func (m *CoinMutation) SetDesc(s string)

SetDesc sets the "desc" field.

func (*CoinMutation) SetField

func (m *CoinMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*CoinMutation) SetGoldConversionRate

func (m *CoinMutation) SetGoldConversionRate(f float64)

SetGoldConversionRate sets the "gold_conversion_rate" field.

func (*CoinMutation) SetIndx

func (m *CoinMutation) SetIndx(s string)

SetIndx sets the "indx" field.

func (*CoinMutation) SetOp

func (m *CoinMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (CoinMutation) Tx

func (m CoinMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*CoinMutation) Type

func (m *CoinMutation) Type() string

Type returns the node type of this mutation (Coin).

func (*CoinMutation) Where

func (m *CoinMutation) Where(ps ...predicate.Coin)

Where appends a list predicates to the CoinMutation builder.

func (*CoinMutation) WhereP

func (m *CoinMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the CoinMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type CoinOrder

type CoinOrder struct {
	Direction OrderDirection  `json:"direction"`
	Field     *CoinOrderField `json:"field"`
}

CoinOrder defines the ordering of Coin.

type CoinOrderField

type CoinOrderField struct {
	// Value extracts the ordering value from the given Coin.
	Value func(*Coin) (ent.Value, error)
	// contains filtered or unexported fields
}

CoinOrderField defines the ordering field of Coin.

type CoinPaginateOption

type CoinPaginateOption func(*coinPager) error

CoinPaginateOption enables pagination customization.

func WithCoinFilter

func WithCoinFilter(filter func(*CoinQuery) (*CoinQuery, error)) CoinPaginateOption

WithCoinFilter configures pagination filter.

func WithCoinOrder

func WithCoinOrder(order *CoinOrder) CoinPaginateOption

WithCoinOrder configures pagination ordering.

type CoinQuery

type CoinQuery struct {
	// contains filtered or unexported fields
}

CoinQuery is the builder for querying Coin entities.

func (*CoinQuery) Aggregate

func (cq *CoinQuery) Aggregate(fns ...AggregateFunc) *CoinSelect

Aggregate returns a CoinSelect configured with the given aggregations.

func (*CoinQuery) All

func (cq *CoinQuery) All(ctx context.Context) ([]*Coin, error)

All executes the query and returns a list of Coins.

func (*CoinQuery) AllX

func (cq *CoinQuery) AllX(ctx context.Context) []*Coin

AllX is like All, but panics if an error occurs.

func (*CoinQuery) Clone

func (cq *CoinQuery) Clone() *CoinQuery

Clone returns a duplicate of the CoinQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*CoinQuery) CollectFields

func (c *CoinQuery) CollectFields(ctx context.Context, satisfies ...string) (*CoinQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*CoinQuery) Count

func (cq *CoinQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CoinQuery) CountX

func (cq *CoinQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*CoinQuery) Exist

func (cq *CoinQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*CoinQuery) ExistX

func (cq *CoinQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*CoinQuery) First

func (cq *CoinQuery) First(ctx context.Context) (*Coin, error)

First returns the first Coin entity from the query. Returns a *NotFoundError when no Coin was found.

func (*CoinQuery) FirstID

func (cq *CoinQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Coin ID from the query. Returns a *NotFoundError when no Coin ID was found.

func (*CoinQuery) FirstIDX

func (cq *CoinQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*CoinQuery) FirstX

func (cq *CoinQuery) FirstX(ctx context.Context) *Coin

FirstX is like First, but panics if an error occurs.

func (*CoinQuery) GroupBy

func (cq *CoinQuery) GroupBy(field string, fields ...string) *CoinGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Indx string `json:"indx,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Coin.Query().
	GroupBy(coin.FieldIndx).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CoinQuery) IDs

func (cq *CoinQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Coin IDs.

func (*CoinQuery) IDsX

func (cq *CoinQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*CoinQuery) Limit

func (cq *CoinQuery) Limit(limit int) *CoinQuery

Limit the number of records to be returned by this query.

func (*CoinQuery) Offset

func (cq *CoinQuery) Offset(offset int) *CoinQuery

Offset to start from.

func (*CoinQuery) Only

func (cq *CoinQuery) Only(ctx context.Context) (*Coin, error)

Only returns a single Coin entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Coin entity is found. Returns a *NotFoundError when no Coin entities are found.

func (*CoinQuery) OnlyID

func (cq *CoinQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Coin ID in the query. Returns a *NotSingularError when more than one Coin ID is found. Returns a *NotFoundError when no entities are found.

func (*CoinQuery) OnlyIDX

func (cq *CoinQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*CoinQuery) OnlyX

func (cq *CoinQuery) OnlyX(ctx context.Context) *Coin

OnlyX is like Only, but panics if an error occurs.

func (*CoinQuery) Order

func (cq *CoinQuery) Order(o ...coin.OrderOption) *CoinQuery

Order specifies how the records should be ordered.

func (*CoinQuery) Paginate

func (c *CoinQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...CoinPaginateOption,
) (*CoinConnection, error)

Paginate executes the query and returns a relay based cursor connection to Coin.

func (*CoinQuery) Select

func (cq *CoinQuery) Select(fields ...string) *CoinSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Indx string `json:"indx,omitempty"`
}

client.Coin.Query().
	Select(coin.FieldIndx).
	Scan(ctx, &v)

func (*CoinQuery) Unique

func (cq *CoinQuery) Unique(unique bool) *CoinQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*CoinQuery) Where

func (cq *CoinQuery) Where(ps ...predicate.Coin) *CoinQuery

Where adds a new predicate for the CoinQuery builder.

type CoinSelect

type CoinSelect struct {
	*CoinQuery
	// contains filtered or unexported fields
}

CoinSelect is the builder for selecting fields of Coin entities.

func (*CoinSelect) Aggregate

func (cs *CoinSelect) Aggregate(fns ...AggregateFunc) *CoinSelect

Aggregate adds the given aggregation functions to the selector query.

func (*CoinSelect) Bool

func (s *CoinSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CoinSelect) BoolX

func (s *CoinSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CoinSelect) Bools

func (s *CoinSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CoinSelect) BoolsX

func (s *CoinSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CoinSelect) Float64

func (s *CoinSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CoinSelect) Float64X

func (s *CoinSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CoinSelect) Float64s

func (s *CoinSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CoinSelect) Float64sX

func (s *CoinSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CoinSelect) Int

func (s *CoinSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CoinSelect) IntX

func (s *CoinSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CoinSelect) Ints

func (s *CoinSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CoinSelect) IntsX

func (s *CoinSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CoinSelect) Scan

func (cs *CoinSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CoinSelect) ScanX

func (s *CoinSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CoinSelect) String

func (s *CoinSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CoinSelect) StringX

func (s *CoinSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CoinSelect) Strings

func (s *CoinSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CoinSelect) StringsX

func (s *CoinSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CoinUpdate

type CoinUpdate struct {
	// contains filtered or unexported fields
}

CoinUpdate is the builder for updating Coin entities.

func (*CoinUpdate) AddGoldConversionRate

func (cu *CoinUpdate) AddGoldConversionRate(f float64) *CoinUpdate

AddGoldConversionRate adds f to the "gold_conversion_rate" field.

func (*CoinUpdate) Exec

func (cu *CoinUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CoinUpdate) ExecX

func (cu *CoinUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CoinUpdate) Mutation

func (cu *CoinUpdate) Mutation() *CoinMutation

Mutation returns the CoinMutation object of the builder.

func (*CoinUpdate) Save

func (cu *CoinUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*CoinUpdate) SaveX

func (cu *CoinUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*CoinUpdate) SetDesc

func (cu *CoinUpdate) SetDesc(s string) *CoinUpdate

SetDesc sets the "desc" field.

func (*CoinUpdate) SetGoldConversionRate

func (cu *CoinUpdate) SetGoldConversionRate(f float64) *CoinUpdate

SetGoldConversionRate sets the "gold_conversion_rate" field.

func (*CoinUpdate) SetIndx

func (cu *CoinUpdate) SetIndx(s string) *CoinUpdate

SetIndx sets the "indx" field.

func (*CoinUpdate) Where

func (cu *CoinUpdate) Where(ps ...predicate.Coin) *CoinUpdate

Where appends a list predicates to the CoinUpdate builder.

type CoinUpdateOne

type CoinUpdateOne struct {
	// contains filtered or unexported fields
}

CoinUpdateOne is the builder for updating a single Coin entity.

func (*CoinUpdateOne) AddGoldConversionRate

func (cuo *CoinUpdateOne) AddGoldConversionRate(f float64) *CoinUpdateOne

AddGoldConversionRate adds f to the "gold_conversion_rate" field.

func (*CoinUpdateOne) Exec

func (cuo *CoinUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CoinUpdateOne) ExecX

func (cuo *CoinUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CoinUpdateOne) Mutation

func (cuo *CoinUpdateOne) Mutation() *CoinMutation

Mutation returns the CoinMutation object of the builder.

func (*CoinUpdateOne) Save

func (cuo *CoinUpdateOne) Save(ctx context.Context) (*Coin, error)

Save executes the query and returns the updated Coin entity.

func (*CoinUpdateOne) SaveX

func (cuo *CoinUpdateOne) SaveX(ctx context.Context) *Coin

SaveX is like Save, but panics if an error occurs.

func (*CoinUpdateOne) Select

func (cuo *CoinUpdateOne) Select(field string, fields ...string) *CoinUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*CoinUpdateOne) SetDesc

func (cuo *CoinUpdateOne) SetDesc(s string) *CoinUpdateOne

SetDesc sets the "desc" field.

func (*CoinUpdateOne) SetGoldConversionRate

func (cuo *CoinUpdateOne) SetGoldConversionRate(f float64) *CoinUpdateOne

SetGoldConversionRate sets the "gold_conversion_rate" field.

func (*CoinUpdateOne) SetIndx

func (cuo *CoinUpdateOne) SetIndx(s string) *CoinUpdateOne

SetIndx sets the "indx" field.

func (*CoinUpdateOne) Where

func (cuo *CoinUpdateOne) Where(ps ...predicate.Coin) *CoinUpdateOne

Where appends a list predicates to the CoinUpdate builder.

type CoinWhereInput

type CoinWhereInput struct {
	Predicates []predicate.Coin  `json:"-"`
	Not        *CoinWhereInput   `json:"not,omitempty"`
	Or         []*CoinWhereInput `json:"or,omitempty"`
	And        []*CoinWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "indx" field predicates.
	Indx             *string  `json:"indx,omitempty"`
	IndxNEQ          *string  `json:"indxNEQ,omitempty"`
	IndxIn           []string `json:"indxIn,omitempty"`
	IndxNotIn        []string `json:"indxNotIn,omitempty"`
	IndxGT           *string  `json:"indxGT,omitempty"`
	IndxGTE          *string  `json:"indxGTE,omitempty"`
	IndxLT           *string  `json:"indxLT,omitempty"`
	IndxLTE          *string  `json:"indxLTE,omitempty"`
	IndxContains     *string  `json:"indxContains,omitempty"`
	IndxHasPrefix    *string  `json:"indxHasPrefix,omitempty"`
	IndxHasSuffix    *string  `json:"indxHasSuffix,omitempty"`
	IndxEqualFold    *string  `json:"indxEqualFold,omitempty"`
	IndxContainsFold *string  `json:"indxContainsFold,omitempty"`

	// "desc" field predicates.
	Desc             *string  `json:"desc,omitempty"`
	DescNEQ          *string  `json:"descNEQ,omitempty"`
	DescIn           []string `json:"descIn,omitempty"`
	DescNotIn        []string `json:"descNotIn,omitempty"`
	DescGT           *string  `json:"descGT,omitempty"`
	DescGTE          *string  `json:"descGTE,omitempty"`
	DescLT           *string  `json:"descLT,omitempty"`
	DescLTE          *string  `json:"descLTE,omitempty"`
	DescContains     *string  `json:"descContains,omitempty"`
	DescHasPrefix    *string  `json:"descHasPrefix,omitempty"`
	DescHasSuffix    *string  `json:"descHasSuffix,omitempty"`
	DescEqualFold    *string  `json:"descEqualFold,omitempty"`
	DescContainsFold *string  `json:"descContainsFold,omitempty"`

	// "gold_conversion_rate" field predicates.
	GoldConversionRate      *float64  `json:"goldConversionRate,omitempty"`
	GoldConversionRateNEQ   *float64  `json:"goldConversionRateNEQ,omitempty"`
	GoldConversionRateIn    []float64 `json:"goldConversionRateIn,omitempty"`
	GoldConversionRateNotIn []float64 `json:"goldConversionRateNotIn,omitempty"`
	GoldConversionRateGT    *float64  `json:"goldConversionRateGT,omitempty"`
	GoldConversionRateGTE   *float64  `json:"goldConversionRateGTE,omitempty"`
	GoldConversionRateLT    *float64  `json:"goldConversionRateLT,omitempty"`
	GoldConversionRateLTE   *float64  `json:"goldConversionRateLTE,omitempty"`
}

CoinWhereInput represents a where input for filtering Coin queries.

func (*CoinWhereInput) AddPredicates

func (i *CoinWhereInput) AddPredicates(predicates ...predicate.Coin)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*CoinWhereInput) Filter

func (i *CoinWhereInput) Filter(q *CoinQuery) (*CoinQuery, error)

Filter applies the CoinWhereInput filter on the CoinQuery builder.

func (*CoinWhereInput) P

func (i *CoinWhereInput) P() (predicate.Coin, error)

P returns a predicate for filtering coins. An error is returned if the input is empty or invalid.

type Coins

type Coins []*Coin

Coins is a parsable slice of Coin.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:

hook := func(next ent.Committer) ent.Committer {
	return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Commit(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

type ConstraintError

type ConstraintError struct {
	// contains filtered or unexported fields
}

ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Cursor

type Cursor = entgql.Cursor[int]

Common entgql types.

type DamageType

type DamageType struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Indx holds the value of the "indx" field.
	Indx string `json:"index"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Desc holds the value of the "desc" field.
	Desc []string `json:"desc,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the DamageTypeQuery when eager-loading is set.
	Edges DamageTypeEdges `json:"-"`
	// contains filtered or unexported fields
}

DamageType is the model entity for the DamageType schema.

func (*DamageType) IsNode

func (n *DamageType) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*DamageType) MarshalJSON

func (dt *DamageType) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*DamageType) NamedWeaponDamage

func (dt *DamageType) NamedWeaponDamage(name string) ([]*WeaponDamage, error)

NamedWeaponDamage returns the WeaponDamage named value or an error if the edge was not loaded in eager-loading with this name.

func (*DamageType) Node

func (dt *DamageType) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*DamageType) QueryWeaponDamage

func (dt *DamageType) QueryWeaponDamage() *WeaponDamageQuery

QueryWeaponDamage queries the "weapon_damage" edge of the DamageType entity.

func (*DamageType) String

func (dt *DamageType) String() string

String implements the fmt.Stringer.

func (*DamageType) ToEdge

func (dt *DamageType) ToEdge(order *DamageTypeOrder) *DamageTypeEdge

ToEdge converts DamageType into DamageTypeEdge.

func (*DamageType) UnmarshalJSON

func (dt *DamageType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*DamageType) Unwrap

func (dt *DamageType) Unwrap() *DamageType

Unwrap unwraps the DamageType entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*DamageType) Update

func (dt *DamageType) Update() *DamageTypeUpdateOne

Update returns a builder for updating this DamageType. Note that you need to call DamageType.Unwrap() before calling this method if this DamageType was returned from a transaction, and the transaction was committed or rolled back.

func (*DamageType) Value

func (dt *DamageType) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the DamageType. This includes values selected through modifiers, order, etc.

func (*DamageType) WeaponDamage

func (dt *DamageType) WeaponDamage(ctx context.Context) (result []*WeaponDamage, err error)

type DamageTypeClient

type DamageTypeClient struct {
	// contains filtered or unexported fields
}

DamageTypeClient is a client for the DamageType schema.

func NewDamageTypeClient

func NewDamageTypeClient(c config) *DamageTypeClient

NewDamageTypeClient returns a client for the DamageType from the given config.

func (*DamageTypeClient) Create

func (c *DamageTypeClient) Create() *DamageTypeCreate

Create returns a builder for creating a DamageType entity.

func (*DamageTypeClient) CreateBulk

func (c *DamageTypeClient) CreateBulk(builders ...*DamageTypeCreate) *DamageTypeCreateBulk

CreateBulk returns a builder for creating a bulk of DamageType entities.

func (*DamageTypeClient) Delete

func (c *DamageTypeClient) Delete() *DamageTypeDelete

Delete returns a delete builder for DamageType.

func (*DamageTypeClient) DeleteOne

func (c *DamageTypeClient) DeleteOne(dt *DamageType) *DamageTypeDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DamageTypeClient) DeleteOneID

func (c *DamageTypeClient) DeleteOneID(id int) *DamageTypeDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*DamageTypeClient) Get

func (c *DamageTypeClient) Get(ctx context.Context, id int) (*DamageType, error)

Get returns a DamageType entity by its id.

func (*DamageTypeClient) GetX

func (c *DamageTypeClient) GetX(ctx context.Context, id int) *DamageType

GetX is like Get, but panics if an error occurs.

func (*DamageTypeClient) Hooks

func (c *DamageTypeClient) Hooks() []Hook

Hooks returns the client hooks.

func (*DamageTypeClient) Intercept

func (c *DamageTypeClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `damagetype.Intercept(f(g(h())))`.

func (*DamageTypeClient) Interceptors

func (c *DamageTypeClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*DamageTypeClient) Query

func (c *DamageTypeClient) Query() *DamageTypeQuery

Query returns a query builder for DamageType.

func (*DamageTypeClient) QueryWeaponDamage

func (c *DamageTypeClient) QueryWeaponDamage(dt *DamageType) *WeaponDamageQuery

QueryWeaponDamage queries the weapon_damage edge of a DamageType.

func (*DamageTypeClient) Update

func (c *DamageTypeClient) Update() *DamageTypeUpdate

Update returns an update builder for DamageType.

func (*DamageTypeClient) UpdateOne

func (c *DamageTypeClient) UpdateOne(dt *DamageType) *DamageTypeUpdateOne

UpdateOne returns an update builder for the given entity.

func (*DamageTypeClient) UpdateOneID

func (c *DamageTypeClient) UpdateOneID(id int) *DamageTypeUpdateOne

UpdateOneID returns an update builder for the given id.

func (*DamageTypeClient) Use

func (c *DamageTypeClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `damagetype.Hooks(f(g(h())))`.

type DamageTypeConnection

type DamageTypeConnection struct {
	Edges      []*DamageTypeEdge `json:"edges"`
	PageInfo   PageInfo          `json:"pageInfo"`
	TotalCount int               `json:"totalCount"`
}

DamageTypeConnection is the connection containing edges to DamageType.

type DamageTypeCreate

type DamageTypeCreate struct {
	// contains filtered or unexported fields
}

DamageTypeCreate is the builder for creating a DamageType entity.

func (*DamageTypeCreate) AddWeaponDamage

func (dtc *DamageTypeCreate) AddWeaponDamage(w ...*WeaponDamage) *DamageTypeCreate

AddWeaponDamage adds the "weapon_damage" edges to the WeaponDamage entity.

func (*DamageTypeCreate) AddWeaponDamageIDs

func (dtc *DamageTypeCreate) AddWeaponDamageIDs(ids ...int) *DamageTypeCreate

AddWeaponDamageIDs adds the "weapon_damage" edge to the WeaponDamage entity by IDs.

func (*DamageTypeCreate) Exec

func (dtc *DamageTypeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DamageTypeCreate) ExecX

func (dtc *DamageTypeCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DamageTypeCreate) Mutation

func (dtc *DamageTypeCreate) Mutation() *DamageTypeMutation

Mutation returns the DamageTypeMutation object of the builder.

func (*DamageTypeCreate) Save

func (dtc *DamageTypeCreate) Save(ctx context.Context) (*DamageType, error)

Save creates the DamageType in the database.

func (*DamageTypeCreate) SaveX

func (dtc *DamageTypeCreate) SaveX(ctx context.Context) *DamageType

SaveX calls Save and panics if Save returns an error.

func (*DamageTypeCreate) SetDamageType

func (dtc *DamageTypeCreate) SetDamageType(input *DamageType) *DamageTypeCreate

func (*DamageTypeCreate) SetDesc

func (dtc *DamageTypeCreate) SetDesc(s []string) *DamageTypeCreate

SetDesc sets the "desc" field.

func (*DamageTypeCreate) SetIndx

func (dtc *DamageTypeCreate) SetIndx(s string) *DamageTypeCreate

SetIndx sets the "indx" field.

func (*DamageTypeCreate) SetName

func (dtc *DamageTypeCreate) SetName(s string) *DamageTypeCreate

SetName sets the "name" field.

type DamageTypeCreateBulk

type DamageTypeCreateBulk struct {
	// contains filtered or unexported fields
}

DamageTypeCreateBulk is the builder for creating many DamageType entities in bulk.

func (*DamageTypeCreateBulk) Exec

func (dtcb *DamageTypeCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*DamageTypeCreateBulk) ExecX

func (dtcb *DamageTypeCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DamageTypeCreateBulk) Save

func (dtcb *DamageTypeCreateBulk) Save(ctx context.Context) ([]*DamageType, error)

Save creates the DamageType entities in the database.

func (*DamageTypeCreateBulk) SaveX

func (dtcb *DamageTypeCreateBulk) SaveX(ctx context.Context) []*DamageType

SaveX is like Save, but panics if an error occurs.

type DamageTypeDelete

type DamageTypeDelete struct {
	// contains filtered or unexported fields
}

DamageTypeDelete is the builder for deleting a DamageType entity.

func (*DamageTypeDelete) Exec

func (dtd *DamageTypeDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*DamageTypeDelete) ExecX

func (dtd *DamageTypeDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*DamageTypeDelete) Where

Where appends a list predicates to the DamageTypeDelete builder.

type DamageTypeDeleteOne

type DamageTypeDeleteOne struct {
	// contains filtered or unexported fields
}

DamageTypeDeleteOne is the builder for deleting a single DamageType entity.

func (*DamageTypeDeleteOne) Exec

func (dtdo *DamageTypeDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DamageTypeDeleteOne) ExecX

func (dtdo *DamageTypeDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DamageTypeDeleteOne) Where

Where appends a list predicates to the DamageTypeDelete builder.

type DamageTypeEdge

type DamageTypeEdge struct {
	Node   *DamageType `json:"node"`
	Cursor Cursor      `json:"cursor"`
}

DamageTypeEdge is the edge representation of DamageType.

type DamageTypeEdges

type DamageTypeEdges struct {
	// WeaponDamage holds the value of the weapon_damage edge.
	WeaponDamage []*WeaponDamage `json:"weapon_damage,omitempty"`
	// contains filtered or unexported fields
}

DamageTypeEdges holds the relations/edges for other nodes in the graph.

func (DamageTypeEdges) WeaponDamageOrErr

func (e DamageTypeEdges) WeaponDamageOrErr() ([]*WeaponDamage, error)

WeaponDamageOrErr returns the WeaponDamage value or an error if the edge was not loaded in eager-loading.

type DamageTypeGroupBy

type DamageTypeGroupBy struct {
	// contains filtered or unexported fields
}

DamageTypeGroupBy is the group-by builder for DamageType entities.

func (*DamageTypeGroupBy) Aggregate

func (dtgb *DamageTypeGroupBy) Aggregate(fns ...AggregateFunc) *DamageTypeGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*DamageTypeGroupBy) Bool

func (s *DamageTypeGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DamageTypeGroupBy) BoolX

func (s *DamageTypeGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DamageTypeGroupBy) Bools

func (s *DamageTypeGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DamageTypeGroupBy) BoolsX

func (s *DamageTypeGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DamageTypeGroupBy) Float64

func (s *DamageTypeGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DamageTypeGroupBy) Float64X

func (s *DamageTypeGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DamageTypeGroupBy) Float64s

func (s *DamageTypeGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DamageTypeGroupBy) Float64sX

func (s *DamageTypeGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DamageTypeGroupBy) Int

func (s *DamageTypeGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DamageTypeGroupBy) IntX

func (s *DamageTypeGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DamageTypeGroupBy) Ints

func (s *DamageTypeGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DamageTypeGroupBy) IntsX

func (s *DamageTypeGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DamageTypeGroupBy) Scan

func (dtgb *DamageTypeGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DamageTypeGroupBy) ScanX

func (s *DamageTypeGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DamageTypeGroupBy) String

func (s *DamageTypeGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DamageTypeGroupBy) StringX

func (s *DamageTypeGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DamageTypeGroupBy) Strings

func (s *DamageTypeGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DamageTypeGroupBy) StringsX

func (s *DamageTypeGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DamageTypeMutation

type DamageTypeMutation struct {
	// contains filtered or unexported fields
}

DamageTypeMutation represents an operation that mutates the DamageType nodes in the graph.

func (*DamageTypeMutation) AddField

func (m *DamageTypeMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DamageTypeMutation) AddWeaponDamageIDs

func (m *DamageTypeMutation) AddWeaponDamageIDs(ids ...int)

AddWeaponDamageIDs adds the "weapon_damage" edge to the WeaponDamage entity by ids.

func (*DamageTypeMutation) AddedEdges

func (m *DamageTypeMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*DamageTypeMutation) AddedField

func (m *DamageTypeMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DamageTypeMutation) AddedFields

func (m *DamageTypeMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*DamageTypeMutation) AddedIDs

func (m *DamageTypeMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*DamageTypeMutation) AppendDesc

func (m *DamageTypeMutation) AppendDesc(s []string)

AppendDesc adds s to the "desc" field.

func (*DamageTypeMutation) AppendedDesc

func (m *DamageTypeMutation) AppendedDesc() ([]string, bool)

AppendedDesc returns the list of values that were appended to the "desc" field in this mutation.

func (*DamageTypeMutation) ClearEdge

func (m *DamageTypeMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*DamageTypeMutation) ClearField

func (m *DamageTypeMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*DamageTypeMutation) ClearWeaponDamage

func (m *DamageTypeMutation) ClearWeaponDamage()

ClearWeaponDamage clears the "weapon_damage" edge to the WeaponDamage entity.

func (*DamageTypeMutation) ClearedEdges

func (m *DamageTypeMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*DamageTypeMutation) ClearedFields

func (m *DamageTypeMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (DamageTypeMutation) Client

func (m DamageTypeMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*DamageTypeMutation) Desc

func (m *DamageTypeMutation) Desc() (r []string, exists bool)

Desc returns the value of the "desc" field in the mutation.

func (*DamageTypeMutation) EdgeCleared

func (m *DamageTypeMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*DamageTypeMutation) Field

func (m *DamageTypeMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DamageTypeMutation) FieldCleared

func (m *DamageTypeMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*DamageTypeMutation) Fields

func (m *DamageTypeMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*DamageTypeMutation) ID

func (m *DamageTypeMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*DamageTypeMutation) IDs

func (m *DamageTypeMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*DamageTypeMutation) Indx

func (m *DamageTypeMutation) Indx() (r string, exists bool)

Indx returns the value of the "indx" field in the mutation.

func (*DamageTypeMutation) Name

func (m *DamageTypeMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*DamageTypeMutation) OldDesc

func (m *DamageTypeMutation) OldDesc(ctx context.Context) (v []string, err error)

OldDesc returns the old "desc" field's value of the DamageType entity. If the DamageType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DamageTypeMutation) OldField

func (m *DamageTypeMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*DamageTypeMutation) OldIndx

func (m *DamageTypeMutation) OldIndx(ctx context.Context) (v string, err error)

OldIndx returns the old "indx" field's value of the DamageType entity. If the DamageType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DamageTypeMutation) OldName

func (m *DamageTypeMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the DamageType entity. If the DamageType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DamageTypeMutation) Op

func (m *DamageTypeMutation) Op() Op

Op returns the operation name.

func (*DamageTypeMutation) RemoveWeaponDamageIDs

func (m *DamageTypeMutation) RemoveWeaponDamageIDs(ids ...int)

RemoveWeaponDamageIDs removes the "weapon_damage" edge to the WeaponDamage entity by IDs.

func (*DamageTypeMutation) RemovedEdges

func (m *DamageTypeMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*DamageTypeMutation) RemovedIDs

func (m *DamageTypeMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*DamageTypeMutation) RemovedWeaponDamageIDs

func (m *DamageTypeMutation) RemovedWeaponDamageIDs() (ids []int)

RemovedWeaponDamage returns the removed IDs of the "weapon_damage" edge to the WeaponDamage entity.

func (*DamageTypeMutation) ResetDesc

func (m *DamageTypeMutation) ResetDesc()

ResetDesc resets all changes to the "desc" field.

func (*DamageTypeMutation) ResetEdge

func (m *DamageTypeMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*DamageTypeMutation) ResetField

func (m *DamageTypeMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*DamageTypeMutation) ResetIndx

func (m *DamageTypeMutation) ResetIndx()

ResetIndx resets all changes to the "indx" field.

func (*DamageTypeMutation) ResetName

func (m *DamageTypeMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*DamageTypeMutation) ResetWeaponDamage

func (m *DamageTypeMutation) ResetWeaponDamage()

ResetWeaponDamage resets all changes to the "weapon_damage" edge.

func (*DamageTypeMutation) SetDesc

func (m *DamageTypeMutation) SetDesc(s []string)

SetDesc sets the "desc" field.

func (*DamageTypeMutation) SetField

func (m *DamageTypeMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DamageTypeMutation) SetIndx

func (m *DamageTypeMutation) SetIndx(s string)

SetIndx sets the "indx" field.

func (*DamageTypeMutation) SetName

func (m *DamageTypeMutation) SetName(s string)

SetName sets the "name" field.

func (*DamageTypeMutation) SetOp

func (m *DamageTypeMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (DamageTypeMutation) Tx

func (m DamageTypeMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*DamageTypeMutation) Type

func (m *DamageTypeMutation) Type() string

Type returns the node type of this mutation (DamageType).

func (*DamageTypeMutation) WeaponDamageCleared

func (m *DamageTypeMutation) WeaponDamageCleared() bool

WeaponDamageCleared reports if the "weapon_damage" edge to the WeaponDamage entity was cleared.

func (*DamageTypeMutation) WeaponDamageIDs

func (m *DamageTypeMutation) WeaponDamageIDs() (ids []int)

WeaponDamageIDs returns the "weapon_damage" edge IDs in the mutation.

func (*DamageTypeMutation) Where

func (m *DamageTypeMutation) Where(ps ...predicate.DamageType)

Where appends a list predicates to the DamageTypeMutation builder.

func (*DamageTypeMutation) WhereP

func (m *DamageTypeMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the DamageTypeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type DamageTypeOrder

type DamageTypeOrder struct {
	Direction OrderDirection        `json:"direction"`
	Field     *DamageTypeOrderField `json:"field"`
}

DamageTypeOrder defines the ordering of DamageType.

type DamageTypeOrderField

type DamageTypeOrderField struct {
	// Value extracts the ordering value from the given DamageType.
	Value func(*DamageType) (ent.Value, error)
	// contains filtered or unexported fields
}

DamageTypeOrderField defines the ordering field of DamageType.

func (DamageTypeOrderField) MarshalGQL

func (f DamageTypeOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (DamageTypeOrderField) String

func (f DamageTypeOrderField) String() string

String implement fmt.Stringer interface.

func (*DamageTypeOrderField) UnmarshalGQL

func (f *DamageTypeOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type DamageTypePaginateOption

type DamageTypePaginateOption func(*damagetypePager) error

DamageTypePaginateOption enables pagination customization.

func WithDamageTypeFilter

func WithDamageTypeFilter(filter func(*DamageTypeQuery) (*DamageTypeQuery, error)) DamageTypePaginateOption

WithDamageTypeFilter configures pagination filter.

func WithDamageTypeOrder

func WithDamageTypeOrder(order *DamageTypeOrder) DamageTypePaginateOption

WithDamageTypeOrder configures pagination ordering.

type DamageTypeQuery

type DamageTypeQuery struct {
	// contains filtered or unexported fields
}

DamageTypeQuery is the builder for querying DamageType entities.

func (*DamageTypeQuery) Aggregate

func (dtq *DamageTypeQuery) Aggregate(fns ...AggregateFunc) *DamageTypeSelect

Aggregate returns a DamageTypeSelect configured with the given aggregations.

func (*DamageTypeQuery) All

func (dtq *DamageTypeQuery) All(ctx context.Context) ([]*DamageType, error)

All executes the query and returns a list of DamageTypes.

func (*DamageTypeQuery) AllX

func (dtq *DamageTypeQuery) AllX(ctx context.Context) []*DamageType

AllX is like All, but panics if an error occurs.

func (*DamageTypeQuery) Clone

func (dtq *DamageTypeQuery) Clone() *DamageTypeQuery

Clone returns a duplicate of the DamageTypeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DamageTypeQuery) CollectFields

func (dt *DamageTypeQuery) CollectFields(ctx context.Context, satisfies ...string) (*DamageTypeQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*DamageTypeQuery) Count

func (dtq *DamageTypeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DamageTypeQuery) CountX

func (dtq *DamageTypeQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DamageTypeQuery) Exist

func (dtq *DamageTypeQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DamageTypeQuery) ExistX

func (dtq *DamageTypeQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DamageTypeQuery) First

func (dtq *DamageTypeQuery) First(ctx context.Context) (*DamageType, error)

First returns the first DamageType entity from the query. Returns a *NotFoundError when no DamageType was found.

func (*DamageTypeQuery) FirstID

func (dtq *DamageTypeQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first DamageType ID from the query. Returns a *NotFoundError when no DamageType ID was found.

func (*DamageTypeQuery) FirstIDX

func (dtq *DamageTypeQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*DamageTypeQuery) FirstX

func (dtq *DamageTypeQuery) FirstX(ctx context.Context) *DamageType

FirstX is like First, but panics if an error occurs.

func (*DamageTypeQuery) GroupBy

func (dtq *DamageTypeQuery) GroupBy(field string, fields ...string) *DamageTypeGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Indx string `json:"index"`
	Count int `json:"count,omitempty"`
}

client.DamageType.Query().
	GroupBy(damagetype.FieldIndx).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DamageTypeQuery) IDs

func (dtq *DamageTypeQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of DamageType IDs.

func (*DamageTypeQuery) IDsX

func (dtq *DamageTypeQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*DamageTypeQuery) Limit

func (dtq *DamageTypeQuery) Limit(limit int) *DamageTypeQuery

Limit the number of records to be returned by this query.

func (*DamageTypeQuery) Offset

func (dtq *DamageTypeQuery) Offset(offset int) *DamageTypeQuery

Offset to start from.

func (*DamageTypeQuery) Only

func (dtq *DamageTypeQuery) Only(ctx context.Context) (*DamageType, error)

Only returns a single DamageType entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DamageType entity is found. Returns a *NotFoundError when no DamageType entities are found.

func (*DamageTypeQuery) OnlyID

func (dtq *DamageTypeQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only DamageType ID in the query. Returns a *NotSingularError when more than one DamageType ID is found. Returns a *NotFoundError when no entities are found.

func (*DamageTypeQuery) OnlyIDX

func (dtq *DamageTypeQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DamageTypeQuery) OnlyX

func (dtq *DamageTypeQuery) OnlyX(ctx context.Context) *DamageType

OnlyX is like Only, but panics if an error occurs.

func (*DamageTypeQuery) Order

Order specifies how the records should be ordered.

func (*DamageTypeQuery) Paginate

func (dt *DamageTypeQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...DamageTypePaginateOption,
) (*DamageTypeConnection, error)

Paginate executes the query and returns a relay based cursor connection to DamageType.

func (*DamageTypeQuery) QueryWeaponDamage

func (dtq *DamageTypeQuery) QueryWeaponDamage() *WeaponDamageQuery

QueryWeaponDamage chains the current query on the "weapon_damage" edge.

func (*DamageTypeQuery) Select

func (dtq *DamageTypeQuery) Select(fields ...string) *DamageTypeSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Indx string `json:"index"`
}

client.DamageType.Query().
	Select(damagetype.FieldIndx).
	Scan(ctx, &v)

func (*DamageTypeQuery) Unique

func (dtq *DamageTypeQuery) Unique(unique bool) *DamageTypeQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*DamageTypeQuery) Where

Where adds a new predicate for the DamageTypeQuery builder.

func (*DamageTypeQuery) WithNamedWeaponDamage

func (dtq *DamageTypeQuery) WithNamedWeaponDamage(name string, opts ...func(*WeaponDamageQuery)) *DamageTypeQuery

WithNamedWeaponDamage tells the query-builder to eager-load the nodes that are connected to the "weapon_damage" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*DamageTypeQuery) WithWeaponDamage

func (dtq *DamageTypeQuery) WithWeaponDamage(opts ...func(*WeaponDamageQuery)) *DamageTypeQuery

WithWeaponDamage tells the query-builder to eager-load the nodes that are connected to the "weapon_damage" edge. The optional arguments are used to configure the query builder of the edge.

type DamageTypeSelect

type DamageTypeSelect struct {
	*DamageTypeQuery
	// contains filtered or unexported fields
}

DamageTypeSelect is the builder for selecting fields of DamageType entities.

func (*DamageTypeSelect) Aggregate

func (dts *DamageTypeSelect) Aggregate(fns ...AggregateFunc) *DamageTypeSelect

Aggregate adds the given aggregation functions to the selector query.

func (*DamageTypeSelect) Bool

func (s *DamageTypeSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DamageTypeSelect) BoolX

func (s *DamageTypeSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DamageTypeSelect) Bools

func (s *DamageTypeSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DamageTypeSelect) BoolsX

func (s *DamageTypeSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DamageTypeSelect) Float64

func (s *DamageTypeSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DamageTypeSelect) Float64X

func (s *DamageTypeSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DamageTypeSelect) Float64s

func (s *DamageTypeSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DamageTypeSelect) Float64sX

func (s *DamageTypeSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DamageTypeSelect) Int

func (s *DamageTypeSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DamageTypeSelect) IntX

func (s *DamageTypeSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DamageTypeSelect) Ints

func (s *DamageTypeSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DamageTypeSelect) IntsX

func (s *DamageTypeSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DamageTypeSelect) Scan

func (dts *DamageTypeSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DamageTypeSelect) ScanX

func (s *DamageTypeSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DamageTypeSelect) String

func (s *DamageTypeSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DamageTypeSelect) StringX

func (s *DamageTypeSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DamageTypeSelect) Strings

func (s *DamageTypeSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DamageTypeSelect) StringsX

func (s *DamageTypeSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DamageTypeUpdate

type DamageTypeUpdate struct {
	// contains filtered or unexported fields
}

DamageTypeUpdate is the builder for updating DamageType entities.

func (*DamageTypeUpdate) AddWeaponDamage

func (dtu *DamageTypeUpdate) AddWeaponDamage(w ...*WeaponDamage) *DamageTypeUpdate

AddWeaponDamage adds the "weapon_damage" edges to the WeaponDamage entity.

func (*DamageTypeUpdate) AddWeaponDamageIDs

func (dtu *DamageTypeUpdate) AddWeaponDamageIDs(ids ...int) *DamageTypeUpdate

AddWeaponDamageIDs adds the "weapon_damage" edge to the WeaponDamage entity by IDs.

func (*DamageTypeUpdate) AppendDesc

func (dtu *DamageTypeUpdate) AppendDesc(s []string) *DamageTypeUpdate

AppendDesc appends s to the "desc" field.

func (*DamageTypeUpdate) ClearWeaponDamage

func (dtu *DamageTypeUpdate) ClearWeaponDamage() *DamageTypeUpdate

ClearWeaponDamage clears all "weapon_damage" edges to the WeaponDamage entity.

func (*DamageTypeUpdate) Exec

func (dtu *DamageTypeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DamageTypeUpdate) ExecX

func (dtu *DamageTypeUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DamageTypeUpdate) Mutation

func (dtu *DamageTypeUpdate) Mutation() *DamageTypeMutation

Mutation returns the DamageTypeMutation object of the builder.

func (*DamageTypeUpdate) RemoveWeaponDamage

func (dtu *DamageTypeUpdate) RemoveWeaponDamage(w ...*WeaponDamage) *DamageTypeUpdate

RemoveWeaponDamage removes "weapon_damage" edges to WeaponDamage entities.

func (*DamageTypeUpdate) RemoveWeaponDamageIDs

func (dtu *DamageTypeUpdate) RemoveWeaponDamageIDs(ids ...int) *DamageTypeUpdate

RemoveWeaponDamageIDs removes the "weapon_damage" edge to WeaponDamage entities by IDs.

func (*DamageTypeUpdate) Save

func (dtu *DamageTypeUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*DamageTypeUpdate) SaveX

func (dtu *DamageTypeUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*DamageTypeUpdate) SetDesc

func (dtu *DamageTypeUpdate) SetDesc(s []string) *DamageTypeUpdate

SetDesc sets the "desc" field.

func (*DamageTypeUpdate) SetIndx

func (dtu *DamageTypeUpdate) SetIndx(s string) *DamageTypeUpdate

SetIndx sets the "indx" field.

func (*DamageTypeUpdate) SetName

func (dtu *DamageTypeUpdate) SetName(s string) *DamageTypeUpdate

SetName sets the "name" field.

func (*DamageTypeUpdate) Where

Where appends a list predicates to the DamageTypeUpdate builder.

type DamageTypeUpdateOne

type DamageTypeUpdateOne struct {
	// contains filtered or unexported fields
}

DamageTypeUpdateOne is the builder for updating a single DamageType entity.

func (*DamageTypeUpdateOne) AddWeaponDamage

func (dtuo *DamageTypeUpdateOne) AddWeaponDamage(w ...*WeaponDamage) *DamageTypeUpdateOne

AddWeaponDamage adds the "weapon_damage" edges to the WeaponDamage entity.

func (*DamageTypeUpdateOne) AddWeaponDamageIDs

func (dtuo *DamageTypeUpdateOne) AddWeaponDamageIDs(ids ...int) *DamageTypeUpdateOne

AddWeaponDamageIDs adds the "weapon_damage" edge to the WeaponDamage entity by IDs.

func (*DamageTypeUpdateOne) AppendDesc

func (dtuo *DamageTypeUpdateOne) AppendDesc(s []string) *DamageTypeUpdateOne

AppendDesc appends s to the "desc" field.

func (*DamageTypeUpdateOne) ClearWeaponDamage

func (dtuo *DamageTypeUpdateOne) ClearWeaponDamage() *DamageTypeUpdateOne

ClearWeaponDamage clears all "weapon_damage" edges to the WeaponDamage entity.

func (*DamageTypeUpdateOne) Exec

func (dtuo *DamageTypeUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DamageTypeUpdateOne) ExecX

func (dtuo *DamageTypeUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DamageTypeUpdateOne) Mutation

func (dtuo *DamageTypeUpdateOne) Mutation() *DamageTypeMutation

Mutation returns the DamageTypeMutation object of the builder.

func (*DamageTypeUpdateOne) RemoveWeaponDamage

func (dtuo *DamageTypeUpdateOne) RemoveWeaponDamage(w ...*WeaponDamage) *DamageTypeUpdateOne

RemoveWeaponDamage removes "weapon_damage" edges to WeaponDamage entities.

func (*DamageTypeUpdateOne) RemoveWeaponDamageIDs

func (dtuo *DamageTypeUpdateOne) RemoveWeaponDamageIDs(ids ...int) *DamageTypeUpdateOne

RemoveWeaponDamageIDs removes the "weapon_damage" edge to WeaponDamage entities by IDs.

func (*DamageTypeUpdateOne) Save

func (dtuo *DamageTypeUpdateOne) Save(ctx context.Context) (*DamageType, error)

Save executes the query and returns the updated DamageType entity.

func (*DamageTypeUpdateOne) SaveX

func (dtuo *DamageTypeUpdateOne) SaveX(ctx context.Context) *DamageType

SaveX is like Save, but panics if an error occurs.

func (*DamageTypeUpdateOne) Select

func (dtuo *DamageTypeUpdateOne) Select(field string, fields ...string) *DamageTypeUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DamageTypeUpdateOne) SetDesc

func (dtuo *DamageTypeUpdateOne) SetDesc(s []string) *DamageTypeUpdateOne

SetDesc sets the "desc" field.

func (*DamageTypeUpdateOne) SetIndx

SetIndx sets the "indx" field.

func (*DamageTypeUpdateOne) SetName

SetName sets the "name" field.

func (*DamageTypeUpdateOne) Where

Where appends a list predicates to the DamageTypeUpdate builder.

type DamageTypeWhereInput

type DamageTypeWhereInput struct {
	Predicates []predicate.DamageType  `json:"-"`
	Not        *DamageTypeWhereInput   `json:"not,omitempty"`
	Or         []*DamageTypeWhereInput `json:"or,omitempty"`
	And        []*DamageTypeWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "indx" field predicates.
	Indx             *string  `json:"indx,omitempty"`
	IndxNEQ          *string  `json:"indxNEQ,omitempty"`
	IndxIn           []string `json:"indxIn,omitempty"`
	IndxNotIn        []string `json:"indxNotIn,omitempty"`
	IndxGT           *string  `json:"indxGT,omitempty"`
	IndxGTE          *string  `json:"indxGTE,omitempty"`
	IndxLT           *string  `json:"indxLT,omitempty"`
	IndxLTE          *string  `json:"indxLTE,omitempty"`
	IndxContains     *string  `json:"indxContains,omitempty"`
	IndxHasPrefix    *string  `json:"indxHasPrefix,omitempty"`
	IndxHasSuffix    *string  `json:"indxHasSuffix,omitempty"`
	IndxEqualFold    *string  `json:"indxEqualFold,omitempty"`
	IndxContainsFold *string  `json:"indxContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "weapon_damage" edge predicates.
	HasWeaponDamage     *bool                     `json:"hasWeaponDamage,omitempty"`
	HasWeaponDamageWith []*WeaponDamageWhereInput `json:"hasWeaponDamageWith,omitempty"`
}

DamageTypeWhereInput represents a where input for filtering DamageType queries.

func (*DamageTypeWhereInput) AddPredicates

func (i *DamageTypeWhereInput) AddPredicates(predicates ...predicate.DamageType)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*DamageTypeWhereInput) Filter

Filter applies the DamageTypeWhereInput filter on the DamageTypeQuery builder.

func (*DamageTypeWhereInput) P

P returns a predicate for filtering damagetypes. An error is returned if the input is empty or invalid.

type DamageTypes

type DamageTypes []*DamageType

DamageTypes is a parsable slice of DamageType.

type Edge

type Edge struct {
	Type string `json:"type,omitempty"` // edge type.
	Name string `json:"name,omitempty"` // edge name.
	IDs  []int  `json:"ids,omitempty"`  // node ids (where this edge point to).
}

Edges between two nodes.

type Equipment

type Equipment struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Indx holds the value of the "indx" field.
	Indx string `json:"index"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Weight holds the value of the "weight" field.
	Weight int `json:"weight,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the EquipmentQuery when eager-loading is set.
	Edges EquipmentEdges `json:"-"`
	// contains filtered or unexported fields
}

Equipment is the model entity for the Equipment schema.

func (*Equipment) Armor

func (e *Equipment) Armor(ctx context.Context) (*Armor, error)

func (*Equipment) Choice

func (e *Equipment) Choice(ctx context.Context) (result []*EquipmentChoice, err error)

func (*Equipment) Class

func (e *Equipment) Class(ctx context.Context) (result []*Class, err error)

func (*Equipment) Cost

func (e *Equipment) Cost(ctx context.Context) (*EquipmentCost, error)

func (*Equipment) EquipmentCategory

func (e *Equipment) EquipmentCategory(ctx context.Context) (result []*EquipmentCategory, err error)

func (*Equipment) Gear

func (e *Equipment) Gear(ctx context.Context) (*Gear, error)

func (*Equipment) IsNode

func (n *Equipment) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Equipment) MarshalJSON

func (e *Equipment) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Equipment) NamedChoice

func (e *Equipment) NamedChoice(name string) ([]*EquipmentChoice, error)

NamedChoice returns the Choice named value or an error if the edge was not loaded in eager-loading with this name.

func (*Equipment) NamedClass

func (e *Equipment) NamedClass(name string) ([]*Class, error)

NamedClass returns the Class named value or an error if the edge was not loaded in eager-loading with this name.

func (*Equipment) NamedClassEquipment

func (e *Equipment) NamedClassEquipment(name string) ([]*ClassEquipment, error)

NamedClassEquipment returns the ClassEquipment named value or an error if the edge was not loaded in eager-loading with this name.

func (*Equipment) NamedEquipmentCategory

func (e *Equipment) NamedEquipmentCategory(name string) ([]*EquipmentCategory, error)

NamedEquipmentCategory returns the EquipmentCategory named value or an error if the edge was not loaded in eager-loading with this name.

func (*Equipment) Node

func (e *Equipment) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*Equipment) QueryArmor

func (e *Equipment) QueryArmor() *ArmorQuery

QueryArmor queries the "armor" edge of the Equipment entity.

func (*Equipment) QueryChoice

func (e *Equipment) QueryChoice() *EquipmentChoiceQuery

QueryChoice queries the "choice" edge of the Equipment entity.

func (*Equipment) QueryClass

func (e *Equipment) QueryClass() *ClassQuery

QueryClass queries the "class" edge of the Equipment entity.

func (*Equipment) QueryClassEquipment

func (e *Equipment) QueryClassEquipment() *ClassEquipmentQuery

QueryClassEquipment queries the "class_equipment" edge of the Equipment entity.

func (*Equipment) QueryCost

func (e *Equipment) QueryCost() *EquipmentCostQuery

QueryCost queries the "cost" edge of the Equipment entity.

func (*Equipment) QueryEquipmentCategory

func (e *Equipment) QueryEquipmentCategory() *EquipmentCategoryQuery

QueryEquipmentCategory queries the "equipment_category" edge of the Equipment entity.

func (*Equipment) QueryGear

func (e *Equipment) QueryGear() *GearQuery

QueryGear queries the "gear" edge of the Equipment entity.

func (*Equipment) QueryTool

func (e *Equipment) QueryTool() *ToolQuery

QueryTool queries the "tool" edge of the Equipment entity.

func (*Equipment) QueryVehicle

func (e *Equipment) QueryVehicle() *VehicleQuery

QueryVehicle queries the "vehicle" edge of the Equipment entity.

func (*Equipment) QueryWeapon

func (e *Equipment) QueryWeapon() *WeaponQuery

QueryWeapon queries the "weapon" edge of the Equipment entity.

func (*Equipment) String

func (e *Equipment) String() string

String implements the fmt.Stringer.

func (*Equipment) ToEdge

func (e *Equipment) ToEdge(order *EquipmentOrder) *EquipmentEdge

ToEdge converts Equipment into EquipmentEdge.

func (*Equipment) Tool

func (e *Equipment) Tool(ctx context.Context) (*Tool, error)

func (*Equipment) UnmarshalJSON

func (e *Equipment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*Equipment) Unwrap

func (e *Equipment) Unwrap() *Equipment

Unwrap unwraps the Equipment entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Equipment) Update

func (e *Equipment) Update() *EquipmentUpdateOne

Update returns a builder for updating this Equipment. Note that you need to call Equipment.Unwrap() before calling this method if this Equipment was returned from a transaction, and the transaction was committed or rolled back.

func (*Equipment) Value

func (e *Equipment) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Equipment. This includes values selected through modifiers, order, etc.

func (*Equipment) Vehicle

func (e *Equipment) Vehicle(ctx context.Context) (*Vehicle, error)

func (*Equipment) Weapon

func (e *Equipment) Weapon(ctx context.Context) (*Weapon, error)

type EquipmentCategories

type EquipmentCategories []*EquipmentCategory

EquipmentCategories is a parsable slice of EquipmentCategory.

type EquipmentCategory

type EquipmentCategory struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// ParentCategoryID holds the value of the "parent_category_id" field.
	ParentCategoryID int `json:"parent_category_id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the EquipmentCategoryQuery when eager-loading is set.
	Edges EquipmentCategoryEdges `json:"-"`
	// contains filtered or unexported fields
}

EquipmentCategory is the model entity for the EquipmentCategory schema.

func (*EquipmentCategory) Children

func (ec *EquipmentCategory) Children(ctx context.Context) (result []*EquipmentCategory, err error)

func (*EquipmentCategory) Equipment

func (ec *EquipmentCategory) Equipment(ctx context.Context) (result []*Equipment, err error)

func (*EquipmentCategory) IsNode

func (n *EquipmentCategory) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*EquipmentCategory) MarshalJSON

func (ec *EquipmentCategory) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*EquipmentCategory) NamedChildren

func (ec *EquipmentCategory) NamedChildren(name string) ([]*EquipmentCategory, error)

NamedChildren returns the Children named value or an error if the edge was not loaded in eager-loading with this name.

func (*EquipmentCategory) NamedEquipment

func (ec *EquipmentCategory) NamedEquipment(name string) ([]*Equipment, error)

NamedEquipment returns the Equipment named value or an error if the edge was not loaded in eager-loading with this name.

func (*EquipmentCategory) Node

func (ec *EquipmentCategory) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*EquipmentCategory) Parent

func (*EquipmentCategory) QueryChildren

func (ec *EquipmentCategory) QueryChildren() *EquipmentCategoryQuery

QueryChildren queries the "children" edge of the EquipmentCategory entity.

func (*EquipmentCategory) QueryEquipment

func (ec *EquipmentCategory) QueryEquipment() *EquipmentQuery

QueryEquipment queries the "equipment" edge of the EquipmentCategory entity.

func (*EquipmentCategory) QueryParent

func (ec *EquipmentCategory) QueryParent() *EquipmentCategoryQuery

QueryParent queries the "parent" edge of the EquipmentCategory entity.

func (*EquipmentCategory) String

func (ec *EquipmentCategory) String() string

String implements the fmt.Stringer.

func (*EquipmentCategory) ToEdge

ToEdge converts EquipmentCategory into EquipmentCategoryEdge.

func (*EquipmentCategory) UnmarshalJSON

func (ec *EquipmentCategory) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*EquipmentCategory) Unwrap

func (ec *EquipmentCategory) Unwrap() *EquipmentCategory

Unwrap unwraps the EquipmentCategory entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*EquipmentCategory) Update

Update returns a builder for updating this EquipmentCategory. Note that you need to call EquipmentCategory.Unwrap() before calling this method if this EquipmentCategory was returned from a transaction, and the transaction was committed or rolled back.

func (*EquipmentCategory) Value

func (ec *EquipmentCategory) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the EquipmentCategory. This includes values selected through modifiers, order, etc.

type EquipmentCategoryClient

type EquipmentCategoryClient struct {
	// contains filtered or unexported fields
}

EquipmentCategoryClient is a client for the EquipmentCategory schema.

func NewEquipmentCategoryClient

func NewEquipmentCategoryClient(c config) *EquipmentCategoryClient

NewEquipmentCategoryClient returns a client for the EquipmentCategory from the given config.

func (*EquipmentCategoryClient) Create

Create returns a builder for creating a EquipmentCategory entity.

func (*EquipmentCategoryClient) CreateBulk

CreateBulk returns a builder for creating a bulk of EquipmentCategory entities.

func (*EquipmentCategoryClient) Delete

Delete returns a delete builder for EquipmentCategory.

func (*EquipmentCategoryClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*EquipmentCategoryClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*EquipmentCategoryClient) Get

Get returns a EquipmentCategory entity by its id.

func (*EquipmentCategoryClient) GetX

GetX is like Get, but panics if an error occurs.

func (*EquipmentCategoryClient) Hooks

func (c *EquipmentCategoryClient) Hooks() []Hook

Hooks returns the client hooks.

func (*EquipmentCategoryClient) Intercept

func (c *EquipmentCategoryClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `equipmentcategory.Intercept(f(g(h())))`.

func (*EquipmentCategoryClient) Interceptors

func (c *EquipmentCategoryClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*EquipmentCategoryClient) Query

Query returns a query builder for EquipmentCategory.

func (*EquipmentCategoryClient) QueryChildren

QueryChildren queries the children edge of a EquipmentCategory.

func (*EquipmentCategoryClient) QueryEquipment

QueryEquipment queries the equipment edge of a EquipmentCategory.

func (*EquipmentCategoryClient) QueryParent

QueryParent queries the parent edge of a EquipmentCategory.

func (*EquipmentCategoryClient) Update

Update returns an update builder for EquipmentCategory.

func (*EquipmentCategoryClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*EquipmentCategoryClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*EquipmentCategoryClient) Use

func (c *EquipmentCategoryClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `equipmentcategory.Hooks(f(g(h())))`.

type EquipmentCategoryConnection

type EquipmentCategoryConnection struct {
	Edges      []*EquipmentCategoryEdge `json:"edges"`
	PageInfo   PageInfo                 `json:"pageInfo"`
	TotalCount int                      `json:"totalCount"`
}

EquipmentCategoryConnection is the connection containing edges to EquipmentCategory.

type EquipmentCategoryCreate

type EquipmentCategoryCreate struct {
	// contains filtered or unexported fields
}

EquipmentCategoryCreate is the builder for creating a EquipmentCategory entity.

func (*EquipmentCategoryCreate) AddChildIDs

func (ecc *EquipmentCategoryCreate) AddChildIDs(ids ...int) *EquipmentCategoryCreate

AddChildIDs adds the "children" edge to the EquipmentCategory entity by IDs.

func (*EquipmentCategoryCreate) AddChildren

AddChildren adds the "children" edges to the EquipmentCategory entity.

func (*EquipmentCategoryCreate) AddEquipment

func (ecc *EquipmentCategoryCreate) AddEquipment(e ...*Equipment) *EquipmentCategoryCreate

AddEquipment adds the "equipment" edges to the Equipment entity.

func (*EquipmentCategoryCreate) AddEquipmentIDs

func (ecc *EquipmentCategoryCreate) AddEquipmentIDs(ids ...int) *EquipmentCategoryCreate

AddEquipmentIDs adds the "equipment" edge to the Equipment entity by IDs.

func (*EquipmentCategoryCreate) Exec

Exec executes the query.

func (*EquipmentCategoryCreate) ExecX

func (ecc *EquipmentCategoryCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentCategoryCreate) Mutation

Mutation returns the EquipmentCategoryMutation object of the builder.

func (*EquipmentCategoryCreate) Save

Save creates the EquipmentCategory in the database.

func (*EquipmentCategoryCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*EquipmentCategoryCreate) SetEquipmentCategory

func (ecc *EquipmentCategoryCreate) SetEquipmentCategory(input *EquipmentCategory) *EquipmentCategoryCreate

func (*EquipmentCategoryCreate) SetName

SetName sets the "name" field.

func (*EquipmentCategoryCreate) SetNillableParentCategoryID

func (ecc *EquipmentCategoryCreate) SetNillableParentCategoryID(i *int) *EquipmentCategoryCreate

SetNillableParentCategoryID sets the "parent_category_id" field if the given value is not nil.

func (*EquipmentCategoryCreate) SetNillableParentID

func (ecc *EquipmentCategoryCreate) SetNillableParentID(id *int) *EquipmentCategoryCreate

SetNillableParentID sets the "parent" edge to the EquipmentCategory entity by ID if the given value is not nil.

func (*EquipmentCategoryCreate) SetParent

SetParent sets the "parent" edge to the EquipmentCategory entity.

func (*EquipmentCategoryCreate) SetParentCategoryID

func (ecc *EquipmentCategoryCreate) SetParentCategoryID(i int) *EquipmentCategoryCreate

SetParentCategoryID sets the "parent_category_id" field.

func (*EquipmentCategoryCreate) SetParentID

func (ecc *EquipmentCategoryCreate) SetParentID(id int) *EquipmentCategoryCreate

SetParentID sets the "parent" edge to the EquipmentCategory entity by ID.

type EquipmentCategoryCreateBulk

type EquipmentCategoryCreateBulk struct {
	// contains filtered or unexported fields
}

EquipmentCategoryCreateBulk is the builder for creating many EquipmentCategory entities in bulk.

func (*EquipmentCategoryCreateBulk) Exec

Exec executes the query.

func (*EquipmentCategoryCreateBulk) ExecX

func (eccb *EquipmentCategoryCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentCategoryCreateBulk) Save

Save creates the EquipmentCategory entities in the database.

func (*EquipmentCategoryCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type EquipmentCategoryDelete

type EquipmentCategoryDelete struct {
	// contains filtered or unexported fields
}

EquipmentCategoryDelete is the builder for deleting a EquipmentCategory entity.

func (*EquipmentCategoryDelete) Exec

func (ecd *EquipmentCategoryDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*EquipmentCategoryDelete) ExecX

func (ecd *EquipmentCategoryDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentCategoryDelete) Where

Where appends a list predicates to the EquipmentCategoryDelete builder.

type EquipmentCategoryDeleteOne

type EquipmentCategoryDeleteOne struct {
	// contains filtered or unexported fields
}

EquipmentCategoryDeleteOne is the builder for deleting a single EquipmentCategory entity.

func (*EquipmentCategoryDeleteOne) Exec

Exec executes the deletion query.

func (*EquipmentCategoryDeleteOne) ExecX

func (ecdo *EquipmentCategoryDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentCategoryDeleteOne) Where

Where appends a list predicates to the EquipmentCategoryDelete builder.

type EquipmentCategoryEdge

type EquipmentCategoryEdge struct {
	Node   *EquipmentCategory `json:"node"`
	Cursor Cursor             `json:"cursor"`
}

EquipmentCategoryEdge is the edge representation of EquipmentCategory.

type EquipmentCategoryEdges

type EquipmentCategoryEdges struct {
	// Parent holds the value of the parent edge.
	Parent *EquipmentCategory `json:"parent,omitempty"`
	// Children holds the value of the children edge.
	Children []*EquipmentCategory `json:"children,omitempty"`
	// Equipment holds the value of the equipment edge.
	Equipment []*Equipment `json:"equipment,omitempty"`
	// contains filtered or unexported fields
}

EquipmentCategoryEdges holds the relations/edges for other nodes in the graph.

func (EquipmentCategoryEdges) ChildrenOrErr

func (e EquipmentCategoryEdges) ChildrenOrErr() ([]*EquipmentCategory, error)

ChildrenOrErr returns the Children value or an error if the edge was not loaded in eager-loading.

func (EquipmentCategoryEdges) EquipmentOrErr

func (e EquipmentCategoryEdges) EquipmentOrErr() ([]*Equipment, error)

EquipmentOrErr returns the Equipment value or an error if the edge was not loaded in eager-loading.

func (EquipmentCategoryEdges) ParentOrErr

func (e EquipmentCategoryEdges) ParentOrErr() (*EquipmentCategory, error)

ParentOrErr returns the Parent value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type EquipmentCategoryGroupBy

type EquipmentCategoryGroupBy struct {
	// contains filtered or unexported fields
}

EquipmentCategoryGroupBy is the group-by builder for EquipmentCategory entities.

func (*EquipmentCategoryGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*EquipmentCategoryGroupBy) Bool

func (s *EquipmentCategoryGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*EquipmentCategoryGroupBy) BoolX

func (s *EquipmentCategoryGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*EquipmentCategoryGroupBy) Bools

func (s *EquipmentCategoryGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*EquipmentCategoryGroupBy) BoolsX

func (s *EquipmentCategoryGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*EquipmentCategoryGroupBy) Float64

func (s *EquipmentCategoryGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*EquipmentCategoryGroupBy) Float64X

func (s *EquipmentCategoryGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*EquipmentCategoryGroupBy) Float64s

func (s *EquipmentCategoryGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*EquipmentCategoryGroupBy) Float64sX

func (s *EquipmentCategoryGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EquipmentCategoryGroupBy) Int

func (s *EquipmentCategoryGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*EquipmentCategoryGroupBy) IntX

func (s *EquipmentCategoryGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*EquipmentCategoryGroupBy) Ints

func (s *EquipmentCategoryGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*EquipmentCategoryGroupBy) IntsX

func (s *EquipmentCategoryGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EquipmentCategoryGroupBy) Scan

func (ecgb *EquipmentCategoryGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*EquipmentCategoryGroupBy) ScanX

func (s *EquipmentCategoryGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*EquipmentCategoryGroupBy) String

func (s *EquipmentCategoryGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*EquipmentCategoryGroupBy) StringX

func (s *EquipmentCategoryGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*EquipmentCategoryGroupBy) Strings

func (s *EquipmentCategoryGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*EquipmentCategoryGroupBy) StringsX

func (s *EquipmentCategoryGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EquipmentCategoryMutation

type EquipmentCategoryMutation struct {
	// contains filtered or unexported fields
}

EquipmentCategoryMutation represents an operation that mutates the EquipmentCategory nodes in the graph.

func (*EquipmentCategoryMutation) AddChildIDs

func (m *EquipmentCategoryMutation) AddChildIDs(ids ...int)

AddChildIDs adds the "children" edge to the EquipmentCategory entity by ids.

func (*EquipmentCategoryMutation) AddEquipmentIDs

func (m *EquipmentCategoryMutation) AddEquipmentIDs(ids ...int)

AddEquipmentIDs adds the "equipment" edge to the Equipment entity by ids.

func (*EquipmentCategoryMutation) AddField

func (m *EquipmentCategoryMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*EquipmentCategoryMutation) AddedEdges

func (m *EquipmentCategoryMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*EquipmentCategoryMutation) AddedField

func (m *EquipmentCategoryMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*EquipmentCategoryMutation) AddedFields

func (m *EquipmentCategoryMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*EquipmentCategoryMutation) AddedIDs

func (m *EquipmentCategoryMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*EquipmentCategoryMutation) ChildrenCleared

func (m *EquipmentCategoryMutation) ChildrenCleared() bool

ChildrenCleared reports if the "children" edge to the EquipmentCategory entity was cleared.

func (*EquipmentCategoryMutation) ChildrenIDs

func (m *EquipmentCategoryMutation) ChildrenIDs() (ids []int)

ChildrenIDs returns the "children" edge IDs in the mutation.

func (*EquipmentCategoryMutation) ClearChildren

func (m *EquipmentCategoryMutation) ClearChildren()

ClearChildren clears the "children" edge to the EquipmentCategory entity.

func (*EquipmentCategoryMutation) ClearEdge

func (m *EquipmentCategoryMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*EquipmentCategoryMutation) ClearEquipment

func (m *EquipmentCategoryMutation) ClearEquipment()

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*EquipmentCategoryMutation) ClearField

func (m *EquipmentCategoryMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*EquipmentCategoryMutation) ClearParent

func (m *EquipmentCategoryMutation) ClearParent()

ClearParent clears the "parent" edge to the EquipmentCategory entity.

func (*EquipmentCategoryMutation) ClearParentCategoryID

func (m *EquipmentCategoryMutation) ClearParentCategoryID()

ClearParentCategoryID clears the value of the "parent_category_id" field.

func (*EquipmentCategoryMutation) ClearedEdges

func (m *EquipmentCategoryMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*EquipmentCategoryMutation) ClearedFields

func (m *EquipmentCategoryMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (EquipmentCategoryMutation) Client

func (m EquipmentCategoryMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*EquipmentCategoryMutation) EdgeCleared

func (m *EquipmentCategoryMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*EquipmentCategoryMutation) EquipmentCleared

func (m *EquipmentCategoryMutation) EquipmentCleared() bool

EquipmentCleared reports if the "equipment" edge to the Equipment entity was cleared.

func (*EquipmentCategoryMutation) EquipmentIDs

func (m *EquipmentCategoryMutation) EquipmentIDs() (ids []int)

EquipmentIDs returns the "equipment" edge IDs in the mutation.

func (*EquipmentCategoryMutation) Field

func (m *EquipmentCategoryMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*EquipmentCategoryMutation) FieldCleared

func (m *EquipmentCategoryMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*EquipmentCategoryMutation) Fields

func (m *EquipmentCategoryMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*EquipmentCategoryMutation) ID

func (m *EquipmentCategoryMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*EquipmentCategoryMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*EquipmentCategoryMutation) Name

func (m *EquipmentCategoryMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*EquipmentCategoryMutation) OldField

func (m *EquipmentCategoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*EquipmentCategoryMutation) OldName

func (m *EquipmentCategoryMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the EquipmentCategory entity. If the EquipmentCategory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EquipmentCategoryMutation) OldParentCategoryID

func (m *EquipmentCategoryMutation) OldParentCategoryID(ctx context.Context) (v int, err error)

OldParentCategoryID returns the old "parent_category_id" field's value of the EquipmentCategory entity. If the EquipmentCategory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EquipmentCategoryMutation) Op

func (m *EquipmentCategoryMutation) Op() Op

Op returns the operation name.

func (*EquipmentCategoryMutation) ParentCategoryID

func (m *EquipmentCategoryMutation) ParentCategoryID() (r int, exists bool)

ParentCategoryID returns the value of the "parent_category_id" field in the mutation.

func (*EquipmentCategoryMutation) ParentCategoryIDCleared

func (m *EquipmentCategoryMutation) ParentCategoryIDCleared() bool

ParentCategoryIDCleared returns if the "parent_category_id" field was cleared in this mutation.

func (*EquipmentCategoryMutation) ParentCleared

func (m *EquipmentCategoryMutation) ParentCleared() bool

ParentCleared reports if the "parent" edge to the EquipmentCategory entity was cleared.

func (*EquipmentCategoryMutation) ParentID

func (m *EquipmentCategoryMutation) ParentID() (id int, exists bool)

ParentID returns the "parent" edge ID in the mutation.

func (*EquipmentCategoryMutation) ParentIDs

func (m *EquipmentCategoryMutation) ParentIDs() (ids []int)

ParentIDs returns the "parent" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ParentID instead. It exists only for internal usage by the builders.

func (*EquipmentCategoryMutation) RemoveChildIDs

func (m *EquipmentCategoryMutation) RemoveChildIDs(ids ...int)

RemoveChildIDs removes the "children" edge to the EquipmentCategory entity by IDs.

func (*EquipmentCategoryMutation) RemoveEquipmentIDs

func (m *EquipmentCategoryMutation) RemoveEquipmentIDs(ids ...int)

RemoveEquipmentIDs removes the "equipment" edge to the Equipment entity by IDs.

func (*EquipmentCategoryMutation) RemovedChildrenIDs

func (m *EquipmentCategoryMutation) RemovedChildrenIDs() (ids []int)

RemovedChildren returns the removed IDs of the "children" edge to the EquipmentCategory entity.

func (*EquipmentCategoryMutation) RemovedEdges

func (m *EquipmentCategoryMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*EquipmentCategoryMutation) RemovedEquipmentIDs

func (m *EquipmentCategoryMutation) RemovedEquipmentIDs() (ids []int)

RemovedEquipment returns the removed IDs of the "equipment" edge to the Equipment entity.

func (*EquipmentCategoryMutation) RemovedIDs

func (m *EquipmentCategoryMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*EquipmentCategoryMutation) ResetChildren

func (m *EquipmentCategoryMutation) ResetChildren()

ResetChildren resets all changes to the "children" edge.

func (*EquipmentCategoryMutation) ResetEdge

func (m *EquipmentCategoryMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*EquipmentCategoryMutation) ResetEquipment

func (m *EquipmentCategoryMutation) ResetEquipment()

ResetEquipment resets all changes to the "equipment" edge.

func (*EquipmentCategoryMutation) ResetField

func (m *EquipmentCategoryMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*EquipmentCategoryMutation) ResetName

func (m *EquipmentCategoryMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*EquipmentCategoryMutation) ResetParent

func (m *EquipmentCategoryMutation) ResetParent()

ResetParent resets all changes to the "parent" edge.

func (*EquipmentCategoryMutation) ResetParentCategoryID

func (m *EquipmentCategoryMutation) ResetParentCategoryID()

ResetParentCategoryID resets all changes to the "parent_category_id" field.

func (*EquipmentCategoryMutation) SetField

func (m *EquipmentCategoryMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*EquipmentCategoryMutation) SetName

func (m *EquipmentCategoryMutation) SetName(s string)

SetName sets the "name" field.

func (*EquipmentCategoryMutation) SetOp

func (m *EquipmentCategoryMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*EquipmentCategoryMutation) SetParentCategoryID

func (m *EquipmentCategoryMutation) SetParentCategoryID(i int)

SetParentCategoryID sets the "parent_category_id" field.

func (*EquipmentCategoryMutation) SetParentID

func (m *EquipmentCategoryMutation) SetParentID(id int)

SetParentID sets the "parent" edge to the EquipmentCategory entity by id.

func (EquipmentCategoryMutation) Tx

func (m EquipmentCategoryMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*EquipmentCategoryMutation) Type

Type returns the node type of this mutation (EquipmentCategory).

func (*EquipmentCategoryMutation) Where

Where appends a list predicates to the EquipmentCategoryMutation builder.

func (*EquipmentCategoryMutation) WhereP

func (m *EquipmentCategoryMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the EquipmentCategoryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type EquipmentCategoryOrder

type EquipmentCategoryOrder struct {
	Direction OrderDirection               `json:"direction"`
	Field     *EquipmentCategoryOrderField `json:"field"`
}

EquipmentCategoryOrder defines the ordering of EquipmentCategory.

type EquipmentCategoryOrderField

type EquipmentCategoryOrderField struct {
	// Value extracts the ordering value from the given EquipmentCategory.
	Value func(*EquipmentCategory) (ent.Value, error)
	// contains filtered or unexported fields
}

EquipmentCategoryOrderField defines the ordering field of EquipmentCategory.

type EquipmentCategoryPaginateOption

type EquipmentCategoryPaginateOption func(*equipmentcategoryPager) error

EquipmentCategoryPaginateOption enables pagination customization.

func WithEquipmentCategoryFilter

func WithEquipmentCategoryFilter(filter func(*EquipmentCategoryQuery) (*EquipmentCategoryQuery, error)) EquipmentCategoryPaginateOption

WithEquipmentCategoryFilter configures pagination filter.

func WithEquipmentCategoryOrder

func WithEquipmentCategoryOrder(order *EquipmentCategoryOrder) EquipmentCategoryPaginateOption

WithEquipmentCategoryOrder configures pagination ordering.

type EquipmentCategoryQuery

type EquipmentCategoryQuery struct {
	// contains filtered or unexported fields
}

EquipmentCategoryQuery is the builder for querying EquipmentCategory entities.

func (*EquipmentCategoryQuery) Aggregate

Aggregate returns a EquipmentCategorySelect configured with the given aggregations.

func (*EquipmentCategoryQuery) All

All executes the query and returns a list of EquipmentCategories.

func (*EquipmentCategoryQuery) AllX

AllX is like All, but panics if an error occurs.

func (*EquipmentCategoryQuery) Clone

Clone returns a duplicate of the EquipmentCategoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*EquipmentCategoryQuery) CollectFields

func (ec *EquipmentCategoryQuery) CollectFields(ctx context.Context, satisfies ...string) (*EquipmentCategoryQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*EquipmentCategoryQuery) Count

func (ecq *EquipmentCategoryQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*EquipmentCategoryQuery) CountX

func (ecq *EquipmentCategoryQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*EquipmentCategoryQuery) Exist

func (ecq *EquipmentCategoryQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*EquipmentCategoryQuery) ExistX

func (ecq *EquipmentCategoryQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*EquipmentCategoryQuery) First

First returns the first EquipmentCategory entity from the query. Returns a *NotFoundError when no EquipmentCategory was found.

func (*EquipmentCategoryQuery) FirstID

func (ecq *EquipmentCategoryQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first EquipmentCategory ID from the query. Returns a *NotFoundError when no EquipmentCategory ID was found.

func (*EquipmentCategoryQuery) FirstIDX

func (ecq *EquipmentCategoryQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*EquipmentCategoryQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*EquipmentCategoryQuery) GroupBy

func (ecq *EquipmentCategoryQuery) GroupBy(field string, fields ...string) *EquipmentCategoryGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	ParentCategoryID int `json:"parent_category_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.EquipmentCategory.Query().
	GroupBy(equipmentcategory.FieldParentCategoryID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*EquipmentCategoryQuery) IDs

func (ecq *EquipmentCategoryQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of EquipmentCategory IDs.

func (*EquipmentCategoryQuery) IDsX

func (ecq *EquipmentCategoryQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*EquipmentCategoryQuery) Limit

Limit the number of records to be returned by this query.

func (*EquipmentCategoryQuery) Offset

func (ecq *EquipmentCategoryQuery) Offset(offset int) *EquipmentCategoryQuery

Offset to start from.

func (*EquipmentCategoryQuery) Only

Only returns a single EquipmentCategory entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one EquipmentCategory entity is found. Returns a *NotFoundError when no EquipmentCategory entities are found.

func (*EquipmentCategoryQuery) OnlyID

func (ecq *EquipmentCategoryQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only EquipmentCategory ID in the query. Returns a *NotSingularError when more than one EquipmentCategory ID is found. Returns a *NotFoundError when no entities are found.

func (*EquipmentCategoryQuery) OnlyIDX

func (ecq *EquipmentCategoryQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*EquipmentCategoryQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*EquipmentCategoryQuery) Order

Order specifies how the records should be ordered.

func (*EquipmentCategoryQuery) Paginate

func (ec *EquipmentCategoryQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...EquipmentCategoryPaginateOption,
) (*EquipmentCategoryConnection, error)

Paginate executes the query and returns a relay based cursor connection to EquipmentCategory.

func (*EquipmentCategoryQuery) QueryChildren

func (ecq *EquipmentCategoryQuery) QueryChildren() *EquipmentCategoryQuery

QueryChildren chains the current query on the "children" edge.

func (*EquipmentCategoryQuery) QueryEquipment

func (ecq *EquipmentCategoryQuery) QueryEquipment() *EquipmentQuery

QueryEquipment chains the current query on the "equipment" edge.

func (*EquipmentCategoryQuery) QueryParent

func (ecq *EquipmentCategoryQuery) QueryParent() *EquipmentCategoryQuery

QueryParent chains the current query on the "parent" edge.

func (*EquipmentCategoryQuery) Select

func (ecq *EquipmentCategoryQuery) Select(fields ...string) *EquipmentCategorySelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	ParentCategoryID int `json:"parent_category_id,omitempty"`
}

client.EquipmentCategory.Query().
	Select(equipmentcategory.FieldParentCategoryID).
	Scan(ctx, &v)

func (*EquipmentCategoryQuery) Unique

func (ecq *EquipmentCategoryQuery) Unique(unique bool) *EquipmentCategoryQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*EquipmentCategoryQuery) Where

Where adds a new predicate for the EquipmentCategoryQuery builder.

func (*EquipmentCategoryQuery) WithChildren

func (ecq *EquipmentCategoryQuery) WithChildren(opts ...func(*EquipmentCategoryQuery)) *EquipmentCategoryQuery

WithChildren tells the query-builder to eager-load the nodes that are connected to the "children" edge. The optional arguments are used to configure the query builder of the edge.

func (*EquipmentCategoryQuery) WithEquipment

func (ecq *EquipmentCategoryQuery) WithEquipment(opts ...func(*EquipmentQuery)) *EquipmentCategoryQuery

WithEquipment tells the query-builder to eager-load the nodes that are connected to the "equipment" edge. The optional arguments are used to configure the query builder of the edge.

func (*EquipmentCategoryQuery) WithNamedChildren

func (ecq *EquipmentCategoryQuery) WithNamedChildren(name string, opts ...func(*EquipmentCategoryQuery)) *EquipmentCategoryQuery

WithNamedChildren tells the query-builder to eager-load the nodes that are connected to the "children" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*EquipmentCategoryQuery) WithNamedEquipment

func (ecq *EquipmentCategoryQuery) WithNamedEquipment(name string, opts ...func(*EquipmentQuery)) *EquipmentCategoryQuery

WithNamedEquipment tells the query-builder to eager-load the nodes that are connected to the "equipment" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*EquipmentCategoryQuery) WithParent

func (ecq *EquipmentCategoryQuery) WithParent(opts ...func(*EquipmentCategoryQuery)) *EquipmentCategoryQuery

WithParent tells the query-builder to eager-load the nodes that are connected to the "parent" edge. The optional arguments are used to configure the query builder of the edge.

type EquipmentCategorySelect

type EquipmentCategorySelect struct {
	*EquipmentCategoryQuery
	// contains filtered or unexported fields
}

EquipmentCategorySelect is the builder for selecting fields of EquipmentCategory entities.

func (*EquipmentCategorySelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*EquipmentCategorySelect) Bool

func (s *EquipmentCategorySelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*EquipmentCategorySelect) BoolX

func (s *EquipmentCategorySelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*EquipmentCategorySelect) Bools

func (s *EquipmentCategorySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*EquipmentCategorySelect) BoolsX

func (s *EquipmentCategorySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*EquipmentCategorySelect) Float64

func (s *EquipmentCategorySelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*EquipmentCategorySelect) Float64X

func (s *EquipmentCategorySelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*EquipmentCategorySelect) Float64s

func (s *EquipmentCategorySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*EquipmentCategorySelect) Float64sX

func (s *EquipmentCategorySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EquipmentCategorySelect) Int

func (s *EquipmentCategorySelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*EquipmentCategorySelect) IntX

func (s *EquipmentCategorySelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*EquipmentCategorySelect) Ints

func (s *EquipmentCategorySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*EquipmentCategorySelect) IntsX

func (s *EquipmentCategorySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EquipmentCategorySelect) Scan

func (ecs *EquipmentCategorySelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*EquipmentCategorySelect) ScanX

func (s *EquipmentCategorySelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*EquipmentCategorySelect) String

func (s *EquipmentCategorySelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*EquipmentCategorySelect) StringX

func (s *EquipmentCategorySelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*EquipmentCategorySelect) Strings

func (s *EquipmentCategorySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*EquipmentCategorySelect) StringsX

func (s *EquipmentCategorySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EquipmentCategoryUpdate

type EquipmentCategoryUpdate struct {
	// contains filtered or unexported fields
}

EquipmentCategoryUpdate is the builder for updating EquipmentCategory entities.

func (*EquipmentCategoryUpdate) AddChildIDs

func (ecu *EquipmentCategoryUpdate) AddChildIDs(ids ...int) *EquipmentCategoryUpdate

AddChildIDs adds the "children" edge to the EquipmentCategory entity by IDs.

func (*EquipmentCategoryUpdate) AddChildren

AddChildren adds the "children" edges to the EquipmentCategory entity.

func (*EquipmentCategoryUpdate) AddEquipment

func (ecu *EquipmentCategoryUpdate) AddEquipment(e ...*Equipment) *EquipmentCategoryUpdate

AddEquipment adds the "equipment" edges to the Equipment entity.

func (*EquipmentCategoryUpdate) AddEquipmentIDs

func (ecu *EquipmentCategoryUpdate) AddEquipmentIDs(ids ...int) *EquipmentCategoryUpdate

AddEquipmentIDs adds the "equipment" edge to the Equipment entity by IDs.

func (*EquipmentCategoryUpdate) ClearChildren

func (ecu *EquipmentCategoryUpdate) ClearChildren() *EquipmentCategoryUpdate

ClearChildren clears all "children" edges to the EquipmentCategory entity.

func (*EquipmentCategoryUpdate) ClearEquipment

func (ecu *EquipmentCategoryUpdate) ClearEquipment() *EquipmentCategoryUpdate

ClearEquipment clears all "equipment" edges to the Equipment entity.

func (*EquipmentCategoryUpdate) ClearParent

ClearParent clears the "parent" edge to the EquipmentCategory entity.

func (*EquipmentCategoryUpdate) ClearParentCategoryID

func (ecu *EquipmentCategoryUpdate) ClearParentCategoryID() *EquipmentCategoryUpdate

ClearParentCategoryID clears the value of the "parent_category_id" field.

func (*EquipmentCategoryUpdate) Exec

Exec executes the query.

func (*EquipmentCategoryUpdate) ExecX

func (ecu *EquipmentCategoryUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentCategoryUpdate) Mutation

Mutation returns the EquipmentCategoryMutation object of the builder.

func (*EquipmentCategoryUpdate) RemoveChildIDs

func (ecu *EquipmentCategoryUpdate) RemoveChildIDs(ids ...int) *EquipmentCategoryUpdate

RemoveChildIDs removes the "children" edge to EquipmentCategory entities by IDs.

func (*EquipmentCategoryUpdate) RemoveChildren

RemoveChildren removes "children" edges to EquipmentCategory entities.

func (*EquipmentCategoryUpdate) RemoveEquipment

func (ecu *EquipmentCategoryUpdate) RemoveEquipment(e ...*Equipment) *EquipmentCategoryUpdate

RemoveEquipment removes "equipment" edges to Equipment entities.

func (*EquipmentCategoryUpdate) RemoveEquipmentIDs

func (ecu *EquipmentCategoryUpdate) RemoveEquipmentIDs(ids ...int) *EquipmentCategoryUpdate

RemoveEquipmentIDs removes the "equipment" edge to Equipment entities by IDs.

func (*EquipmentCategoryUpdate) Save

func (ecu *EquipmentCategoryUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*EquipmentCategoryUpdate) SaveX

func (ecu *EquipmentCategoryUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*EquipmentCategoryUpdate) SetName

SetName sets the "name" field.

func (*EquipmentCategoryUpdate) SetNillableParentCategoryID

func (ecu *EquipmentCategoryUpdate) SetNillableParentCategoryID(i *int) *EquipmentCategoryUpdate

SetNillableParentCategoryID sets the "parent_category_id" field if the given value is not nil.

func (*EquipmentCategoryUpdate) SetNillableParentID

func (ecu *EquipmentCategoryUpdate) SetNillableParentID(id *int) *EquipmentCategoryUpdate

SetNillableParentID sets the "parent" edge to the EquipmentCategory entity by ID if the given value is not nil.

func (*EquipmentCategoryUpdate) SetParent

SetParent sets the "parent" edge to the EquipmentCategory entity.

func (*EquipmentCategoryUpdate) SetParentCategoryID

func (ecu *EquipmentCategoryUpdate) SetParentCategoryID(i int) *EquipmentCategoryUpdate

SetParentCategoryID sets the "parent_category_id" field.

func (*EquipmentCategoryUpdate) SetParentID

func (ecu *EquipmentCategoryUpdate) SetParentID(id int) *EquipmentCategoryUpdate

SetParentID sets the "parent" edge to the EquipmentCategory entity by ID.

func (*EquipmentCategoryUpdate) Where

Where appends a list predicates to the EquipmentCategoryUpdate builder.

type EquipmentCategoryUpdateOne

type EquipmentCategoryUpdateOne struct {
	// contains filtered or unexported fields
}

EquipmentCategoryUpdateOne is the builder for updating a single EquipmentCategory entity.

func (*EquipmentCategoryUpdateOne) AddChildIDs

func (ecuo *EquipmentCategoryUpdateOne) AddChildIDs(ids ...int) *EquipmentCategoryUpdateOne

AddChildIDs adds the "children" edge to the EquipmentCategory entity by IDs.

func (*EquipmentCategoryUpdateOne) AddChildren

AddChildren adds the "children" edges to the EquipmentCategory entity.

func (*EquipmentCategoryUpdateOne) AddEquipment

AddEquipment adds the "equipment" edges to the Equipment entity.

func (*EquipmentCategoryUpdateOne) AddEquipmentIDs

func (ecuo *EquipmentCategoryUpdateOne) AddEquipmentIDs(ids ...int) *EquipmentCategoryUpdateOne

AddEquipmentIDs adds the "equipment" edge to the Equipment entity by IDs.

func (*EquipmentCategoryUpdateOne) ClearChildren

ClearChildren clears all "children" edges to the EquipmentCategory entity.

func (*EquipmentCategoryUpdateOne) ClearEquipment

ClearEquipment clears all "equipment" edges to the Equipment entity.

func (*EquipmentCategoryUpdateOne) ClearParent

ClearParent clears the "parent" edge to the EquipmentCategory entity.

func (*EquipmentCategoryUpdateOne) ClearParentCategoryID

func (ecuo *EquipmentCategoryUpdateOne) ClearParentCategoryID() *EquipmentCategoryUpdateOne

ClearParentCategoryID clears the value of the "parent_category_id" field.

func (*EquipmentCategoryUpdateOne) Exec

Exec executes the query on the entity.

func (*EquipmentCategoryUpdateOne) ExecX

func (ecuo *EquipmentCategoryUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentCategoryUpdateOne) Mutation

Mutation returns the EquipmentCategoryMutation object of the builder.

func (*EquipmentCategoryUpdateOne) RemoveChildIDs

func (ecuo *EquipmentCategoryUpdateOne) RemoveChildIDs(ids ...int) *EquipmentCategoryUpdateOne

RemoveChildIDs removes the "children" edge to EquipmentCategory entities by IDs.

func (*EquipmentCategoryUpdateOne) RemoveChildren

RemoveChildren removes "children" edges to EquipmentCategory entities.

func (*EquipmentCategoryUpdateOne) RemoveEquipment

func (ecuo *EquipmentCategoryUpdateOne) RemoveEquipment(e ...*Equipment) *EquipmentCategoryUpdateOne

RemoveEquipment removes "equipment" edges to Equipment entities.

func (*EquipmentCategoryUpdateOne) RemoveEquipmentIDs

func (ecuo *EquipmentCategoryUpdateOne) RemoveEquipmentIDs(ids ...int) *EquipmentCategoryUpdateOne

RemoveEquipmentIDs removes the "equipment" edge to Equipment entities by IDs.

func (*EquipmentCategoryUpdateOne) Save

Save executes the query and returns the updated EquipmentCategory entity.

func (*EquipmentCategoryUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*EquipmentCategoryUpdateOne) Select

func (ecuo *EquipmentCategoryUpdateOne) Select(field string, fields ...string) *EquipmentCategoryUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*EquipmentCategoryUpdateOne) SetName

SetName sets the "name" field.

func (*EquipmentCategoryUpdateOne) SetNillableParentCategoryID

func (ecuo *EquipmentCategoryUpdateOne) SetNillableParentCategoryID(i *int) *EquipmentCategoryUpdateOne

SetNillableParentCategoryID sets the "parent_category_id" field if the given value is not nil.

func (*EquipmentCategoryUpdateOne) SetNillableParentID

func (ecuo *EquipmentCategoryUpdateOne) SetNillableParentID(id *int) *EquipmentCategoryUpdateOne

SetNillableParentID sets the "parent" edge to the EquipmentCategory entity by ID if the given value is not nil.

func (*EquipmentCategoryUpdateOne) SetParent

SetParent sets the "parent" edge to the EquipmentCategory entity.

func (*EquipmentCategoryUpdateOne) SetParentCategoryID

func (ecuo *EquipmentCategoryUpdateOne) SetParentCategoryID(i int) *EquipmentCategoryUpdateOne

SetParentCategoryID sets the "parent_category_id" field.

func (*EquipmentCategoryUpdateOne) SetParentID

SetParentID sets the "parent" edge to the EquipmentCategory entity by ID.

func (*EquipmentCategoryUpdateOne) Where

Where appends a list predicates to the EquipmentCategoryUpdate builder.

type EquipmentCategoryWhereInput

type EquipmentCategoryWhereInput struct {
	Predicates []predicate.EquipmentCategory  `json:"-"`
	Not        *EquipmentCategoryWhereInput   `json:"not,omitempty"`
	Or         []*EquipmentCategoryWhereInput `json:"or,omitempty"`
	And        []*EquipmentCategoryWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "parent_category_id" field predicates.
	ParentCategoryID       *int  `json:"parentCategoryID,omitempty"`
	ParentCategoryIDNEQ    *int  `json:"parentCategoryIDNEQ,omitempty"`
	ParentCategoryIDIn     []int `json:"parentCategoryIDIn,omitempty"`
	ParentCategoryIDNotIn  []int `json:"parentCategoryIDNotIn,omitempty"`
	ParentCategoryIDIsNil  bool  `json:"parentCategoryIDIsNil,omitempty"`
	ParentCategoryIDNotNil bool  `json:"parentCategoryIDNotNil,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "parent" edge predicates.
	HasParent     *bool                          `json:"hasParent,omitempty"`
	HasParentWith []*EquipmentCategoryWhereInput `json:"hasParentWith,omitempty"`

	// "children" edge predicates.
	HasChildren     *bool                          `json:"hasChildren,omitempty"`
	HasChildrenWith []*EquipmentCategoryWhereInput `json:"hasChildrenWith,omitempty"`

	// "equipment" edge predicates.
	HasEquipment     *bool                  `json:"hasEquipment,omitempty"`
	HasEquipmentWith []*EquipmentWhereInput `json:"hasEquipmentWith,omitempty"`
}

EquipmentCategoryWhereInput represents a where input for filtering EquipmentCategory queries.

func (*EquipmentCategoryWhereInput) AddPredicates

func (i *EquipmentCategoryWhereInput) AddPredicates(predicates ...predicate.EquipmentCategory)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*EquipmentCategoryWhereInput) Filter

Filter applies the EquipmentCategoryWhereInput filter on the EquipmentCategoryQuery builder.

func (*EquipmentCategoryWhereInput) P

P returns a predicate for filtering equipmentcategories. An error is returned if the input is empty or invalid.

type EquipmentChoice

type EquipmentChoice struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Choose holds the value of the "choose" field.
	Choose int `json:"choose,omitempty"`
	// Desc holds the value of the "desc" field.
	Desc string `json:"desc,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the EquipmentChoiceQuery when eager-loading is set.
	Edges EquipmentChoiceEdges `json:"-"`
	// contains filtered or unexported fields
}

EquipmentChoice is the model entity for the EquipmentChoice schema.

func (*EquipmentChoice) Class

func (ec *EquipmentChoice) Class(ctx context.Context) (result []*Class, err error)

func (*EquipmentChoice) Equipment

func (ec *EquipmentChoice) Equipment(ctx context.Context) (result []*Equipment, err error)

func (*EquipmentChoice) IsNode

func (n *EquipmentChoice) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*EquipmentChoice) MarshalJSON

func (ec *EquipmentChoice) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*EquipmentChoice) NamedClass

func (ec *EquipmentChoice) NamedClass(name string) ([]*Class, error)

NamedClass returns the Class named value or an error if the edge was not loaded in eager-loading with this name.

func (*EquipmentChoice) NamedEquipment

func (ec *EquipmentChoice) NamedEquipment(name string) ([]*Equipment, error)

NamedEquipment returns the Equipment named value or an error if the edge was not loaded in eager-loading with this name.

func (*EquipmentChoice) Node

func (ec *EquipmentChoice) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*EquipmentChoice) QueryClass

func (ec *EquipmentChoice) QueryClass() *ClassQuery

QueryClass queries the "class" edge of the EquipmentChoice entity.

func (*EquipmentChoice) QueryEquipment

func (ec *EquipmentChoice) QueryEquipment() *EquipmentQuery

QueryEquipment queries the "equipment" edge of the EquipmentChoice entity.

func (*EquipmentChoice) String

func (ec *EquipmentChoice) String() string

String implements the fmt.Stringer.

func (*EquipmentChoice) ToEdge

ToEdge converts EquipmentChoice into EquipmentChoiceEdge.

func (*EquipmentChoice) UnmarshalJSON

func (ec *EquipmentChoice) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*EquipmentChoice) Unwrap

func (ec *EquipmentChoice) Unwrap() *EquipmentChoice

Unwrap unwraps the EquipmentChoice entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*EquipmentChoice) Update

Update returns a builder for updating this EquipmentChoice. Note that you need to call EquipmentChoice.Unwrap() before calling this method if this EquipmentChoice was returned from a transaction, and the transaction was committed or rolled back.

func (*EquipmentChoice) Value

func (ec *EquipmentChoice) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the EquipmentChoice. This includes values selected through modifiers, order, etc.

type EquipmentChoiceClient

type EquipmentChoiceClient struct {
	// contains filtered or unexported fields
}

EquipmentChoiceClient is a client for the EquipmentChoice schema.

func NewEquipmentChoiceClient

func NewEquipmentChoiceClient(c config) *EquipmentChoiceClient

NewEquipmentChoiceClient returns a client for the EquipmentChoice from the given config.

func (*EquipmentChoiceClient) Create

Create returns a builder for creating a EquipmentChoice entity.

func (*EquipmentChoiceClient) CreateBulk

CreateBulk returns a builder for creating a bulk of EquipmentChoice entities.

func (*EquipmentChoiceClient) Delete

Delete returns a delete builder for EquipmentChoice.

func (*EquipmentChoiceClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*EquipmentChoiceClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*EquipmentChoiceClient) Get

Get returns a EquipmentChoice entity by its id.

func (*EquipmentChoiceClient) GetX

GetX is like Get, but panics if an error occurs.

func (*EquipmentChoiceClient) Hooks

func (c *EquipmentChoiceClient) Hooks() []Hook

Hooks returns the client hooks.

func (*EquipmentChoiceClient) Intercept

func (c *EquipmentChoiceClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `equipmentchoice.Intercept(f(g(h())))`.

func (*EquipmentChoiceClient) Interceptors

func (c *EquipmentChoiceClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*EquipmentChoiceClient) Query

Query returns a query builder for EquipmentChoice.

func (*EquipmentChoiceClient) QueryClass

func (c *EquipmentChoiceClient) QueryClass(ec *EquipmentChoice) *ClassQuery

QueryClass queries the class edge of a EquipmentChoice.

func (*EquipmentChoiceClient) QueryEquipment

func (c *EquipmentChoiceClient) QueryEquipment(ec *EquipmentChoice) *EquipmentQuery

QueryEquipment queries the equipment edge of a EquipmentChoice.

func (*EquipmentChoiceClient) Update

Update returns an update builder for EquipmentChoice.

func (*EquipmentChoiceClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*EquipmentChoiceClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*EquipmentChoiceClient) Use

func (c *EquipmentChoiceClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `equipmentchoice.Hooks(f(g(h())))`.

type EquipmentChoiceConnection

type EquipmentChoiceConnection struct {
	Edges      []*EquipmentChoiceEdge `json:"edges"`
	PageInfo   PageInfo               `json:"pageInfo"`
	TotalCount int                    `json:"totalCount"`
}

EquipmentChoiceConnection is the connection containing edges to EquipmentChoice.

type EquipmentChoiceCreate

type EquipmentChoiceCreate struct {
	// contains filtered or unexported fields
}

EquipmentChoiceCreate is the builder for creating a EquipmentChoice entity.

func (*EquipmentChoiceCreate) AddClasIDs

func (ecc *EquipmentChoiceCreate) AddClasIDs(ids ...int) *EquipmentChoiceCreate

AddClasIDs adds the "class" edge to the Class entity by IDs.

func (*EquipmentChoiceCreate) AddClass

func (ecc *EquipmentChoiceCreate) AddClass(c ...*Class) *EquipmentChoiceCreate

AddClass adds the "class" edges to the Class entity.

func (*EquipmentChoiceCreate) AddEquipment

func (ecc *EquipmentChoiceCreate) AddEquipment(e ...*Equipment) *EquipmentChoiceCreate

AddEquipment adds the "equipment" edges to the Equipment entity.

func (*EquipmentChoiceCreate) AddEquipmentIDs

func (ecc *EquipmentChoiceCreate) AddEquipmentIDs(ids ...int) *EquipmentChoiceCreate

AddEquipmentIDs adds the "equipment" edge to the Equipment entity by IDs.

func (*EquipmentChoiceCreate) Exec

func (ecc *EquipmentChoiceCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*EquipmentChoiceCreate) ExecX

func (ecc *EquipmentChoiceCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentChoiceCreate) Mutation

Mutation returns the EquipmentChoiceMutation object of the builder.

func (*EquipmentChoiceCreate) Save

Save creates the EquipmentChoice in the database.

func (*EquipmentChoiceCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*EquipmentChoiceCreate) SetChoose

func (ecc *EquipmentChoiceCreate) SetChoose(i int) *EquipmentChoiceCreate

SetChoose sets the "choose" field.

func (*EquipmentChoiceCreate) SetDesc

SetDesc sets the "desc" field.

func (*EquipmentChoiceCreate) SetEquipmentChoice

func (ecc *EquipmentChoiceCreate) SetEquipmentChoice(input *EquipmentChoice) *EquipmentChoiceCreate

func (*EquipmentChoiceCreate) SetNillableDesc

func (ecc *EquipmentChoiceCreate) SetNillableDesc(s *string) *EquipmentChoiceCreate

SetNillableDesc sets the "desc" field if the given value is not nil.

type EquipmentChoiceCreateBulk

type EquipmentChoiceCreateBulk struct {
	// contains filtered or unexported fields
}

EquipmentChoiceCreateBulk is the builder for creating many EquipmentChoice entities in bulk.

func (*EquipmentChoiceCreateBulk) Exec

Exec executes the query.

func (*EquipmentChoiceCreateBulk) ExecX

func (eccb *EquipmentChoiceCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentChoiceCreateBulk) Save

Save creates the EquipmentChoice entities in the database.

func (*EquipmentChoiceCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type EquipmentChoiceDelete

type EquipmentChoiceDelete struct {
	// contains filtered or unexported fields
}

EquipmentChoiceDelete is the builder for deleting a EquipmentChoice entity.

func (*EquipmentChoiceDelete) Exec

func (ecd *EquipmentChoiceDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*EquipmentChoiceDelete) ExecX

func (ecd *EquipmentChoiceDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentChoiceDelete) Where

Where appends a list predicates to the EquipmentChoiceDelete builder.

type EquipmentChoiceDeleteOne

type EquipmentChoiceDeleteOne struct {
	// contains filtered or unexported fields
}

EquipmentChoiceDeleteOne is the builder for deleting a single EquipmentChoice entity.

func (*EquipmentChoiceDeleteOne) Exec

Exec executes the deletion query.

func (*EquipmentChoiceDeleteOne) ExecX

func (ecdo *EquipmentChoiceDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentChoiceDeleteOne) Where

Where appends a list predicates to the EquipmentChoiceDelete builder.

type EquipmentChoiceEdge

type EquipmentChoiceEdge struct {
	Node   *EquipmentChoice `json:"node"`
	Cursor Cursor           `json:"cursor"`
}

EquipmentChoiceEdge is the edge representation of EquipmentChoice.

type EquipmentChoiceEdges

type EquipmentChoiceEdges struct {
	// Class holds the value of the class edge.
	Class []*Class `json:"class,omitempty"`
	// Equipment holds the value of the equipment edge.
	Equipment []*Equipment `json:"equipment,omitempty"`
	// contains filtered or unexported fields
}

EquipmentChoiceEdges holds the relations/edges for other nodes in the graph.

func (EquipmentChoiceEdges) ClassOrErr

func (e EquipmentChoiceEdges) ClassOrErr() ([]*Class, error)

ClassOrErr returns the Class value or an error if the edge was not loaded in eager-loading.

func (EquipmentChoiceEdges) EquipmentOrErr

func (e EquipmentChoiceEdges) EquipmentOrErr() ([]*Equipment, error)

EquipmentOrErr returns the Equipment value or an error if the edge was not loaded in eager-loading.

type EquipmentChoiceGroupBy

type EquipmentChoiceGroupBy struct {
	// contains filtered or unexported fields
}

EquipmentChoiceGroupBy is the group-by builder for EquipmentChoice entities.

func (*EquipmentChoiceGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*EquipmentChoiceGroupBy) Bool

func (s *EquipmentChoiceGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*EquipmentChoiceGroupBy) BoolX

func (s *EquipmentChoiceGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*EquipmentChoiceGroupBy) Bools

func (s *EquipmentChoiceGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*EquipmentChoiceGroupBy) BoolsX

func (s *EquipmentChoiceGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*EquipmentChoiceGroupBy) Float64

func (s *EquipmentChoiceGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*EquipmentChoiceGroupBy) Float64X

func (s *EquipmentChoiceGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*EquipmentChoiceGroupBy) Float64s

func (s *EquipmentChoiceGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*EquipmentChoiceGroupBy) Float64sX

func (s *EquipmentChoiceGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EquipmentChoiceGroupBy) Int

func (s *EquipmentChoiceGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*EquipmentChoiceGroupBy) IntX

func (s *EquipmentChoiceGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*EquipmentChoiceGroupBy) Ints

func (s *EquipmentChoiceGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*EquipmentChoiceGroupBy) IntsX

func (s *EquipmentChoiceGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EquipmentChoiceGroupBy) Scan

func (ecgb *EquipmentChoiceGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*EquipmentChoiceGroupBy) ScanX

func (s *EquipmentChoiceGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*EquipmentChoiceGroupBy) String

func (s *EquipmentChoiceGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*EquipmentChoiceGroupBy) StringX

func (s *EquipmentChoiceGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*EquipmentChoiceGroupBy) Strings

func (s *EquipmentChoiceGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*EquipmentChoiceGroupBy) StringsX

func (s *EquipmentChoiceGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EquipmentChoiceMutation

type EquipmentChoiceMutation struct {
	// contains filtered or unexported fields
}

EquipmentChoiceMutation represents an operation that mutates the EquipmentChoice nodes in the graph.

func (*EquipmentChoiceMutation) AddChoose

func (m *EquipmentChoiceMutation) AddChoose(i int)

AddChoose adds i to the "choose" field.

func (*EquipmentChoiceMutation) AddClasIDs

func (m *EquipmentChoiceMutation) AddClasIDs(ids ...int)

AddClasIDs adds the "class" edge to the Class entity by ids.

func (*EquipmentChoiceMutation) AddEquipmentIDs

func (m *EquipmentChoiceMutation) AddEquipmentIDs(ids ...int)

AddEquipmentIDs adds the "equipment" edge to the Equipment entity by ids.

func (*EquipmentChoiceMutation) AddField

func (m *EquipmentChoiceMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*EquipmentChoiceMutation) AddedChoose

func (m *EquipmentChoiceMutation) AddedChoose() (r int, exists bool)

AddedChoose returns the value that was added to the "choose" field in this mutation.

func (*EquipmentChoiceMutation) AddedEdges

func (m *EquipmentChoiceMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*EquipmentChoiceMutation) AddedField

func (m *EquipmentChoiceMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*EquipmentChoiceMutation) AddedFields

func (m *EquipmentChoiceMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*EquipmentChoiceMutation) AddedIDs

func (m *EquipmentChoiceMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*EquipmentChoiceMutation) Choose

func (m *EquipmentChoiceMutation) Choose() (r int, exists bool)

Choose returns the value of the "choose" field in the mutation.

func (*EquipmentChoiceMutation) ClassCleared

func (m *EquipmentChoiceMutation) ClassCleared() bool

ClassCleared reports if the "class" edge to the Class entity was cleared.

func (*EquipmentChoiceMutation) ClassIDs

func (m *EquipmentChoiceMutation) ClassIDs() (ids []int)

ClassIDs returns the "class" edge IDs in the mutation.

func (*EquipmentChoiceMutation) ClearClass

func (m *EquipmentChoiceMutation) ClearClass()

ClearClass clears the "class" edge to the Class entity.

func (*EquipmentChoiceMutation) ClearDesc

func (m *EquipmentChoiceMutation) ClearDesc()

ClearDesc clears the value of the "desc" field.

func (*EquipmentChoiceMutation) ClearEdge

func (m *EquipmentChoiceMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*EquipmentChoiceMutation) ClearEquipment

func (m *EquipmentChoiceMutation) ClearEquipment()

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*EquipmentChoiceMutation) ClearField

func (m *EquipmentChoiceMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*EquipmentChoiceMutation) ClearedEdges

func (m *EquipmentChoiceMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*EquipmentChoiceMutation) ClearedFields

func (m *EquipmentChoiceMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (EquipmentChoiceMutation) Client

func (m EquipmentChoiceMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*EquipmentChoiceMutation) Desc

func (m *EquipmentChoiceMutation) Desc() (r string, exists bool)

Desc returns the value of the "desc" field in the mutation.

func (*EquipmentChoiceMutation) DescCleared

func (m *EquipmentChoiceMutation) DescCleared() bool

DescCleared returns if the "desc" field was cleared in this mutation.

func (*EquipmentChoiceMutation) EdgeCleared

func (m *EquipmentChoiceMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*EquipmentChoiceMutation) EquipmentCleared

func (m *EquipmentChoiceMutation) EquipmentCleared() bool

EquipmentCleared reports if the "equipment" edge to the Equipment entity was cleared.

func (*EquipmentChoiceMutation) EquipmentIDs

func (m *EquipmentChoiceMutation) EquipmentIDs() (ids []int)

EquipmentIDs returns the "equipment" edge IDs in the mutation.

func (*EquipmentChoiceMutation) Field

func (m *EquipmentChoiceMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*EquipmentChoiceMutation) FieldCleared

func (m *EquipmentChoiceMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*EquipmentChoiceMutation) Fields

func (m *EquipmentChoiceMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*EquipmentChoiceMutation) ID

func (m *EquipmentChoiceMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*EquipmentChoiceMutation) IDs

func (m *EquipmentChoiceMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*EquipmentChoiceMutation) OldChoose

func (m *EquipmentChoiceMutation) OldChoose(ctx context.Context) (v int, err error)

OldChoose returns the old "choose" field's value of the EquipmentChoice entity. If the EquipmentChoice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EquipmentChoiceMutation) OldDesc

func (m *EquipmentChoiceMutation) OldDesc(ctx context.Context) (v string, err error)

OldDesc returns the old "desc" field's value of the EquipmentChoice entity. If the EquipmentChoice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EquipmentChoiceMutation) OldField

func (m *EquipmentChoiceMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*EquipmentChoiceMutation) Op

func (m *EquipmentChoiceMutation) Op() Op

Op returns the operation name.

func (*EquipmentChoiceMutation) RemoveClasIDs

func (m *EquipmentChoiceMutation) RemoveClasIDs(ids ...int)

RemoveClasIDs removes the "class" edge to the Class entity by IDs.

func (*EquipmentChoiceMutation) RemoveEquipmentIDs

func (m *EquipmentChoiceMutation) RemoveEquipmentIDs(ids ...int)

RemoveEquipmentIDs removes the "equipment" edge to the Equipment entity by IDs.

func (*EquipmentChoiceMutation) RemovedClassIDs

func (m *EquipmentChoiceMutation) RemovedClassIDs() (ids []int)

RemovedClass returns the removed IDs of the "class" edge to the Class entity.

func (*EquipmentChoiceMutation) RemovedEdges

func (m *EquipmentChoiceMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*EquipmentChoiceMutation) RemovedEquipmentIDs

func (m *EquipmentChoiceMutation) RemovedEquipmentIDs() (ids []int)

RemovedEquipment returns the removed IDs of the "equipment" edge to the Equipment entity.

func (*EquipmentChoiceMutation) RemovedIDs

func (m *EquipmentChoiceMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*EquipmentChoiceMutation) ResetChoose

func (m *EquipmentChoiceMutation) ResetChoose()

ResetChoose resets all changes to the "choose" field.

func (*EquipmentChoiceMutation) ResetClass

func (m *EquipmentChoiceMutation) ResetClass()

ResetClass resets all changes to the "class" edge.

func (*EquipmentChoiceMutation) ResetDesc

func (m *EquipmentChoiceMutation) ResetDesc()

ResetDesc resets all changes to the "desc" field.

func (*EquipmentChoiceMutation) ResetEdge

func (m *EquipmentChoiceMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*EquipmentChoiceMutation) ResetEquipment

func (m *EquipmentChoiceMutation) ResetEquipment()

ResetEquipment resets all changes to the "equipment" edge.

func (*EquipmentChoiceMutation) ResetField

func (m *EquipmentChoiceMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*EquipmentChoiceMutation) SetChoose

func (m *EquipmentChoiceMutation) SetChoose(i int)

SetChoose sets the "choose" field.

func (*EquipmentChoiceMutation) SetDesc

func (m *EquipmentChoiceMutation) SetDesc(s string)

SetDesc sets the "desc" field.

func (*EquipmentChoiceMutation) SetField

func (m *EquipmentChoiceMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*EquipmentChoiceMutation) SetOp

func (m *EquipmentChoiceMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (EquipmentChoiceMutation) Tx

func (m EquipmentChoiceMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*EquipmentChoiceMutation) Type

func (m *EquipmentChoiceMutation) Type() string

Type returns the node type of this mutation (EquipmentChoice).

func (*EquipmentChoiceMutation) Where

Where appends a list predicates to the EquipmentChoiceMutation builder.

func (*EquipmentChoiceMutation) WhereP

func (m *EquipmentChoiceMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the EquipmentChoiceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type EquipmentChoiceOrder

type EquipmentChoiceOrder struct {
	Direction OrderDirection             `json:"direction"`
	Field     *EquipmentChoiceOrderField `json:"field"`
}

EquipmentChoiceOrder defines the ordering of EquipmentChoice.

type EquipmentChoiceOrderField

type EquipmentChoiceOrderField struct {
	// Value extracts the ordering value from the given EquipmentChoice.
	Value func(*EquipmentChoice) (ent.Value, error)
	// contains filtered or unexported fields
}

EquipmentChoiceOrderField defines the ordering field of EquipmentChoice.

type EquipmentChoicePaginateOption

type EquipmentChoicePaginateOption func(*equipmentchoicePager) error

EquipmentChoicePaginateOption enables pagination customization.

func WithEquipmentChoiceFilter

func WithEquipmentChoiceFilter(filter func(*EquipmentChoiceQuery) (*EquipmentChoiceQuery, error)) EquipmentChoicePaginateOption

WithEquipmentChoiceFilter configures pagination filter.

func WithEquipmentChoiceOrder

func WithEquipmentChoiceOrder(order *EquipmentChoiceOrder) EquipmentChoicePaginateOption

WithEquipmentChoiceOrder configures pagination ordering.

type EquipmentChoiceQuery

type EquipmentChoiceQuery struct {
	// contains filtered or unexported fields
}

EquipmentChoiceQuery is the builder for querying EquipmentChoice entities.

func (*EquipmentChoiceQuery) Aggregate

Aggregate returns a EquipmentChoiceSelect configured with the given aggregations.

func (*EquipmentChoiceQuery) All

All executes the query and returns a list of EquipmentChoices.

func (*EquipmentChoiceQuery) AllX

AllX is like All, but panics if an error occurs.

func (*EquipmentChoiceQuery) Clone

Clone returns a duplicate of the EquipmentChoiceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*EquipmentChoiceQuery) CollectFields

func (ec *EquipmentChoiceQuery) CollectFields(ctx context.Context, satisfies ...string) (*EquipmentChoiceQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*EquipmentChoiceQuery) Count

func (ecq *EquipmentChoiceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*EquipmentChoiceQuery) CountX

func (ecq *EquipmentChoiceQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*EquipmentChoiceQuery) Exist

func (ecq *EquipmentChoiceQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*EquipmentChoiceQuery) ExistX

func (ecq *EquipmentChoiceQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*EquipmentChoiceQuery) First

First returns the first EquipmentChoice entity from the query. Returns a *NotFoundError when no EquipmentChoice was found.

func (*EquipmentChoiceQuery) FirstID

func (ecq *EquipmentChoiceQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first EquipmentChoice ID from the query. Returns a *NotFoundError when no EquipmentChoice ID was found.

func (*EquipmentChoiceQuery) FirstIDX

func (ecq *EquipmentChoiceQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*EquipmentChoiceQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*EquipmentChoiceQuery) GroupBy

func (ecq *EquipmentChoiceQuery) GroupBy(field string, fields ...string) *EquipmentChoiceGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Choose int `json:"choose,omitempty"`
	Count int `json:"count,omitempty"`
}

client.EquipmentChoice.Query().
	GroupBy(equipmentchoice.FieldChoose).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*EquipmentChoiceQuery) IDs

func (ecq *EquipmentChoiceQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of EquipmentChoice IDs.

func (*EquipmentChoiceQuery) IDsX

func (ecq *EquipmentChoiceQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*EquipmentChoiceQuery) Limit

func (ecq *EquipmentChoiceQuery) Limit(limit int) *EquipmentChoiceQuery

Limit the number of records to be returned by this query.

func (*EquipmentChoiceQuery) Offset

func (ecq *EquipmentChoiceQuery) Offset(offset int) *EquipmentChoiceQuery

Offset to start from.

func (*EquipmentChoiceQuery) Only

Only returns a single EquipmentChoice entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one EquipmentChoice entity is found. Returns a *NotFoundError when no EquipmentChoice entities are found.

func (*EquipmentChoiceQuery) OnlyID

func (ecq *EquipmentChoiceQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only EquipmentChoice ID in the query. Returns a *NotSingularError when more than one EquipmentChoice ID is found. Returns a *NotFoundError when no entities are found.

func (*EquipmentChoiceQuery) OnlyIDX

func (ecq *EquipmentChoiceQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*EquipmentChoiceQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*EquipmentChoiceQuery) Order

Order specifies how the records should be ordered.

func (*EquipmentChoiceQuery) Paginate

func (ec *EquipmentChoiceQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...EquipmentChoicePaginateOption,
) (*EquipmentChoiceConnection, error)

Paginate executes the query and returns a relay based cursor connection to EquipmentChoice.

func (*EquipmentChoiceQuery) QueryClass

func (ecq *EquipmentChoiceQuery) QueryClass() *ClassQuery

QueryClass chains the current query on the "class" edge.

func (*EquipmentChoiceQuery) QueryEquipment

func (ecq *EquipmentChoiceQuery) QueryEquipment() *EquipmentQuery

QueryEquipment chains the current query on the "equipment" edge.

func (*EquipmentChoiceQuery) Select

func (ecq *EquipmentChoiceQuery) Select(fields ...string) *EquipmentChoiceSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Choose int `json:"choose,omitempty"`
}

client.EquipmentChoice.Query().
	Select(equipmentchoice.FieldChoose).
	Scan(ctx, &v)

func (*EquipmentChoiceQuery) Unique

func (ecq *EquipmentChoiceQuery) Unique(unique bool) *EquipmentChoiceQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*EquipmentChoiceQuery) Where

Where adds a new predicate for the EquipmentChoiceQuery builder.

func (*EquipmentChoiceQuery) WithClass

func (ecq *EquipmentChoiceQuery) WithClass(opts ...func(*ClassQuery)) *EquipmentChoiceQuery

WithClass tells the query-builder to eager-load the nodes that are connected to the "class" edge. The optional arguments are used to configure the query builder of the edge.

func (*EquipmentChoiceQuery) WithEquipment

func (ecq *EquipmentChoiceQuery) WithEquipment(opts ...func(*EquipmentQuery)) *EquipmentChoiceQuery

WithEquipment tells the query-builder to eager-load the nodes that are connected to the "equipment" edge. The optional arguments are used to configure the query builder of the edge.

func (*EquipmentChoiceQuery) WithNamedClass

func (ecq *EquipmentChoiceQuery) WithNamedClass(name string, opts ...func(*ClassQuery)) *EquipmentChoiceQuery

WithNamedClass tells the query-builder to eager-load the nodes that are connected to the "class" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*EquipmentChoiceQuery) WithNamedEquipment

func (ecq *EquipmentChoiceQuery) WithNamedEquipment(name string, opts ...func(*EquipmentQuery)) *EquipmentChoiceQuery

WithNamedEquipment tells the query-builder to eager-load the nodes that are connected to the "equipment" edge with the given name. The optional arguments are used to configure the query builder of the edge.

type EquipmentChoiceSelect

type EquipmentChoiceSelect struct {
	*EquipmentChoiceQuery
	// contains filtered or unexported fields
}

EquipmentChoiceSelect is the builder for selecting fields of EquipmentChoice entities.

func (*EquipmentChoiceSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*EquipmentChoiceSelect) Bool

func (s *EquipmentChoiceSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*EquipmentChoiceSelect) BoolX

func (s *EquipmentChoiceSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*EquipmentChoiceSelect) Bools

func (s *EquipmentChoiceSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*EquipmentChoiceSelect) BoolsX

func (s *EquipmentChoiceSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*EquipmentChoiceSelect) Float64

func (s *EquipmentChoiceSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*EquipmentChoiceSelect) Float64X

func (s *EquipmentChoiceSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*EquipmentChoiceSelect) Float64s

func (s *EquipmentChoiceSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*EquipmentChoiceSelect) Float64sX

func (s *EquipmentChoiceSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EquipmentChoiceSelect) Int

func (s *EquipmentChoiceSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*EquipmentChoiceSelect) IntX

func (s *EquipmentChoiceSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*EquipmentChoiceSelect) Ints

func (s *EquipmentChoiceSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*EquipmentChoiceSelect) IntsX

func (s *EquipmentChoiceSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EquipmentChoiceSelect) Scan

func (ecs *EquipmentChoiceSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*EquipmentChoiceSelect) ScanX

func (s *EquipmentChoiceSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*EquipmentChoiceSelect) String

func (s *EquipmentChoiceSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*EquipmentChoiceSelect) StringX

func (s *EquipmentChoiceSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*EquipmentChoiceSelect) Strings

func (s *EquipmentChoiceSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*EquipmentChoiceSelect) StringsX

func (s *EquipmentChoiceSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EquipmentChoiceUpdate

type EquipmentChoiceUpdate struct {
	// contains filtered or unexported fields
}

EquipmentChoiceUpdate is the builder for updating EquipmentChoice entities.

func (*EquipmentChoiceUpdate) AddChoose

func (ecu *EquipmentChoiceUpdate) AddChoose(i int) *EquipmentChoiceUpdate

AddChoose adds i to the "choose" field.

func (*EquipmentChoiceUpdate) AddClasIDs

func (ecu *EquipmentChoiceUpdate) AddClasIDs(ids ...int) *EquipmentChoiceUpdate

AddClasIDs adds the "class" edge to the Class entity by IDs.

func (*EquipmentChoiceUpdate) AddClass

func (ecu *EquipmentChoiceUpdate) AddClass(c ...*Class) *EquipmentChoiceUpdate

AddClass adds the "class" edges to the Class entity.

func (*EquipmentChoiceUpdate) AddEquipment

func (ecu *EquipmentChoiceUpdate) AddEquipment(e ...*Equipment) *EquipmentChoiceUpdate

AddEquipment adds the "equipment" edges to the Equipment entity.

func (*EquipmentChoiceUpdate) AddEquipmentIDs

func (ecu *EquipmentChoiceUpdate) AddEquipmentIDs(ids ...int) *EquipmentChoiceUpdate

AddEquipmentIDs adds the "equipment" edge to the Equipment entity by IDs.

func (*EquipmentChoiceUpdate) ClearClass

func (ecu *EquipmentChoiceUpdate) ClearClass() *EquipmentChoiceUpdate

ClearClass clears all "class" edges to the Class entity.

func (*EquipmentChoiceUpdate) ClearDesc

func (ecu *EquipmentChoiceUpdate) ClearDesc() *EquipmentChoiceUpdate

ClearDesc clears the value of the "desc" field.

func (*EquipmentChoiceUpdate) ClearEquipment

func (ecu *EquipmentChoiceUpdate) ClearEquipment() *EquipmentChoiceUpdate

ClearEquipment clears all "equipment" edges to the Equipment entity.

func (*EquipmentChoiceUpdate) Exec

func (ecu *EquipmentChoiceUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*EquipmentChoiceUpdate) ExecX

func (ecu *EquipmentChoiceUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentChoiceUpdate) Mutation

Mutation returns the EquipmentChoiceMutation object of the builder.

func (*EquipmentChoiceUpdate) RemoveClasIDs

func (ecu *EquipmentChoiceUpdate) RemoveClasIDs(ids ...int) *EquipmentChoiceUpdate

RemoveClasIDs removes the "class" edge to Class entities by IDs.

func (*EquipmentChoiceUpdate) RemoveClass

func (ecu *EquipmentChoiceUpdate) RemoveClass(c ...*Class) *EquipmentChoiceUpdate

RemoveClass removes "class" edges to Class entities.

func (*EquipmentChoiceUpdate) RemoveEquipment

func (ecu *EquipmentChoiceUpdate) RemoveEquipment(e ...*Equipment) *EquipmentChoiceUpdate

RemoveEquipment removes "equipment" edges to Equipment entities.

func (*EquipmentChoiceUpdate) RemoveEquipmentIDs

func (ecu *EquipmentChoiceUpdate) RemoveEquipmentIDs(ids ...int) *EquipmentChoiceUpdate

RemoveEquipmentIDs removes the "equipment" edge to Equipment entities by IDs.

func (*EquipmentChoiceUpdate) Save

func (ecu *EquipmentChoiceUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*EquipmentChoiceUpdate) SaveX

func (ecu *EquipmentChoiceUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*EquipmentChoiceUpdate) SetChoose

func (ecu *EquipmentChoiceUpdate) SetChoose(i int) *EquipmentChoiceUpdate

SetChoose sets the "choose" field.

func (*EquipmentChoiceUpdate) SetDesc

SetDesc sets the "desc" field.

func (*EquipmentChoiceUpdate) SetNillableDesc

func (ecu *EquipmentChoiceUpdate) SetNillableDesc(s *string) *EquipmentChoiceUpdate

SetNillableDesc sets the "desc" field if the given value is not nil.

func (*EquipmentChoiceUpdate) Where

Where appends a list predicates to the EquipmentChoiceUpdate builder.

type EquipmentChoiceUpdateOne

type EquipmentChoiceUpdateOne struct {
	// contains filtered or unexported fields
}

EquipmentChoiceUpdateOne is the builder for updating a single EquipmentChoice entity.

func (*EquipmentChoiceUpdateOne) AddChoose

AddChoose adds i to the "choose" field.

func (*EquipmentChoiceUpdateOne) AddClasIDs

func (ecuo *EquipmentChoiceUpdateOne) AddClasIDs(ids ...int) *EquipmentChoiceUpdateOne

AddClasIDs adds the "class" edge to the Class entity by IDs.

func (*EquipmentChoiceUpdateOne) AddClass

AddClass adds the "class" edges to the Class entity.

func (*EquipmentChoiceUpdateOne) AddEquipment

func (ecuo *EquipmentChoiceUpdateOne) AddEquipment(e ...*Equipment) *EquipmentChoiceUpdateOne

AddEquipment adds the "equipment" edges to the Equipment entity.

func (*EquipmentChoiceUpdateOne) AddEquipmentIDs

func (ecuo *EquipmentChoiceUpdateOne) AddEquipmentIDs(ids ...int) *EquipmentChoiceUpdateOne

AddEquipmentIDs adds the "equipment" edge to the Equipment entity by IDs.

func (*EquipmentChoiceUpdateOne) ClearClass

ClearClass clears all "class" edges to the Class entity.

func (*EquipmentChoiceUpdateOne) ClearDesc

ClearDesc clears the value of the "desc" field.

func (*EquipmentChoiceUpdateOne) ClearEquipment

func (ecuo *EquipmentChoiceUpdateOne) ClearEquipment() *EquipmentChoiceUpdateOne

ClearEquipment clears all "equipment" edges to the Equipment entity.

func (*EquipmentChoiceUpdateOne) Exec

Exec executes the query on the entity.

func (*EquipmentChoiceUpdateOne) ExecX

func (ecuo *EquipmentChoiceUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentChoiceUpdateOne) Mutation

Mutation returns the EquipmentChoiceMutation object of the builder.

func (*EquipmentChoiceUpdateOne) RemoveClasIDs

func (ecuo *EquipmentChoiceUpdateOne) RemoveClasIDs(ids ...int) *EquipmentChoiceUpdateOne

RemoveClasIDs removes the "class" edge to Class entities by IDs.

func (*EquipmentChoiceUpdateOne) RemoveClass

func (ecuo *EquipmentChoiceUpdateOne) RemoveClass(c ...*Class) *EquipmentChoiceUpdateOne

RemoveClass removes "class" edges to Class entities.

func (*EquipmentChoiceUpdateOne) RemoveEquipment

func (ecuo *EquipmentChoiceUpdateOne) RemoveEquipment(e ...*Equipment) *EquipmentChoiceUpdateOne

RemoveEquipment removes "equipment" edges to Equipment entities.

func (*EquipmentChoiceUpdateOne) RemoveEquipmentIDs

func (ecuo *EquipmentChoiceUpdateOne) RemoveEquipmentIDs(ids ...int) *EquipmentChoiceUpdateOne

RemoveEquipmentIDs removes the "equipment" edge to Equipment entities by IDs.

func (*EquipmentChoiceUpdateOne) Save

Save executes the query and returns the updated EquipmentChoice entity.

func (*EquipmentChoiceUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*EquipmentChoiceUpdateOne) Select

func (ecuo *EquipmentChoiceUpdateOne) Select(field string, fields ...string) *EquipmentChoiceUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*EquipmentChoiceUpdateOne) SetChoose

SetChoose sets the "choose" field.

func (*EquipmentChoiceUpdateOne) SetDesc

SetDesc sets the "desc" field.

func (*EquipmentChoiceUpdateOne) SetNillableDesc

func (ecuo *EquipmentChoiceUpdateOne) SetNillableDesc(s *string) *EquipmentChoiceUpdateOne

SetNillableDesc sets the "desc" field if the given value is not nil.

func (*EquipmentChoiceUpdateOne) Where

Where appends a list predicates to the EquipmentChoiceUpdate builder.

type EquipmentChoiceWhereInput

type EquipmentChoiceWhereInput struct {
	Predicates []predicate.EquipmentChoice  `json:"-"`
	Not        *EquipmentChoiceWhereInput   `json:"not,omitempty"`
	Or         []*EquipmentChoiceWhereInput `json:"or,omitempty"`
	And        []*EquipmentChoiceWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "choose" field predicates.
	Choose      *int  `json:"choose,omitempty"`
	ChooseNEQ   *int  `json:"chooseNEQ,omitempty"`
	ChooseIn    []int `json:"chooseIn,omitempty"`
	ChooseNotIn []int `json:"chooseNotIn,omitempty"`
	ChooseGT    *int  `json:"chooseGT,omitempty"`
	ChooseGTE   *int  `json:"chooseGTE,omitempty"`
	ChooseLT    *int  `json:"chooseLT,omitempty"`
	ChooseLTE   *int  `json:"chooseLTE,omitempty"`

	// "desc" field predicates.
	Desc             *string  `json:"desc,omitempty"`
	DescNEQ          *string  `json:"descNEQ,omitempty"`
	DescIn           []string `json:"descIn,omitempty"`
	DescNotIn        []string `json:"descNotIn,omitempty"`
	DescGT           *string  `json:"descGT,omitempty"`
	DescGTE          *string  `json:"descGTE,omitempty"`
	DescLT           *string  `json:"descLT,omitempty"`
	DescLTE          *string  `json:"descLTE,omitempty"`
	DescContains     *string  `json:"descContains,omitempty"`
	DescHasPrefix    *string  `json:"descHasPrefix,omitempty"`
	DescHasSuffix    *string  `json:"descHasSuffix,omitempty"`
	DescIsNil        bool     `json:"descIsNil,omitempty"`
	DescNotNil       bool     `json:"descNotNil,omitempty"`
	DescEqualFold    *string  `json:"descEqualFold,omitempty"`
	DescContainsFold *string  `json:"descContainsFold,omitempty"`

	// "class" edge predicates.
	HasClass     *bool              `json:"hasClass,omitempty"`
	HasClassWith []*ClassWhereInput `json:"hasClassWith,omitempty"`

	// "equipment" edge predicates.
	HasEquipment     *bool                  `json:"hasEquipment,omitempty"`
	HasEquipmentWith []*EquipmentWhereInput `json:"hasEquipmentWith,omitempty"`
}

EquipmentChoiceWhereInput represents a where input for filtering EquipmentChoice queries.

func (*EquipmentChoiceWhereInput) AddPredicates

func (i *EquipmentChoiceWhereInput) AddPredicates(predicates ...predicate.EquipmentChoice)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*EquipmentChoiceWhereInput) Filter

Filter applies the EquipmentChoiceWhereInput filter on the EquipmentChoiceQuery builder.

func (*EquipmentChoiceWhereInput) P

P returns a predicate for filtering equipmentchoices. An error is returned if the input is empty or invalid.

type EquipmentChoices

type EquipmentChoices []*EquipmentChoice

EquipmentChoices is a parsable slice of EquipmentChoice.

type EquipmentClient

type EquipmentClient struct {
	// contains filtered or unexported fields
}

EquipmentClient is a client for the Equipment schema.

func NewEquipmentClient

func NewEquipmentClient(c config) *EquipmentClient

NewEquipmentClient returns a client for the Equipment from the given config.

func (*EquipmentClient) Create

func (c *EquipmentClient) Create() *EquipmentCreate

Create returns a builder for creating a Equipment entity.

func (*EquipmentClient) CreateBulk

func (c *EquipmentClient) CreateBulk(builders ...*EquipmentCreate) *EquipmentCreateBulk

CreateBulk returns a builder for creating a bulk of Equipment entities.

func (*EquipmentClient) Delete

func (c *EquipmentClient) Delete() *EquipmentDelete

Delete returns a delete builder for Equipment.

func (*EquipmentClient) DeleteOne

func (c *EquipmentClient) DeleteOne(e *Equipment) *EquipmentDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*EquipmentClient) DeleteOneID

func (c *EquipmentClient) DeleteOneID(id int) *EquipmentDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*EquipmentClient) Get

func (c *EquipmentClient) Get(ctx context.Context, id int) (*Equipment, error)

Get returns a Equipment entity by its id.

func (*EquipmentClient) GetX

func (c *EquipmentClient) GetX(ctx context.Context, id int) *Equipment

GetX is like Get, but panics if an error occurs.

func (*EquipmentClient) Hooks

func (c *EquipmentClient) Hooks() []Hook

Hooks returns the client hooks.

func (*EquipmentClient) Intercept

func (c *EquipmentClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `equipment.Intercept(f(g(h())))`.

func (*EquipmentClient) Interceptors

func (c *EquipmentClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*EquipmentClient) Query

func (c *EquipmentClient) Query() *EquipmentQuery

Query returns a query builder for Equipment.

func (*EquipmentClient) QueryArmor

func (c *EquipmentClient) QueryArmor(e *Equipment) *ArmorQuery

QueryArmor queries the armor edge of a Equipment.

func (*EquipmentClient) QueryChoice

func (c *EquipmentClient) QueryChoice(e *Equipment) *EquipmentChoiceQuery

QueryChoice queries the choice edge of a Equipment.

func (*EquipmentClient) QueryClass

func (c *EquipmentClient) QueryClass(e *Equipment) *ClassQuery

QueryClass queries the class edge of a Equipment.

func (*EquipmentClient) QueryClassEquipment

func (c *EquipmentClient) QueryClassEquipment(e *Equipment) *ClassEquipmentQuery

QueryClassEquipment queries the class_equipment edge of a Equipment.

func (*EquipmentClient) QueryCost

func (c *EquipmentClient) QueryCost(e *Equipment) *EquipmentCostQuery

QueryCost queries the cost edge of a Equipment.

func (*EquipmentClient) QueryEquipmentCategory

func (c *EquipmentClient) QueryEquipmentCategory(e *Equipment) *EquipmentCategoryQuery

QueryEquipmentCategory queries the equipment_category edge of a Equipment.

func (*EquipmentClient) QueryGear

func (c *EquipmentClient) QueryGear(e *Equipment) *GearQuery

QueryGear queries the gear edge of a Equipment.

func (*EquipmentClient) QueryTool

func (c *EquipmentClient) QueryTool(e *Equipment) *ToolQuery

QueryTool queries the tool edge of a Equipment.

func (*EquipmentClient) QueryVehicle

func (c *EquipmentClient) QueryVehicle(e *Equipment) *VehicleQuery

QueryVehicle queries the vehicle edge of a Equipment.

func (*EquipmentClient) QueryWeapon

func (c *EquipmentClient) QueryWeapon(e *Equipment) *WeaponQuery

QueryWeapon queries the weapon edge of a Equipment.

func (*EquipmentClient) Update

func (c *EquipmentClient) Update() *EquipmentUpdate

Update returns an update builder for Equipment.

func (*EquipmentClient) UpdateOne

func (c *EquipmentClient) UpdateOne(e *Equipment) *EquipmentUpdateOne

UpdateOne returns an update builder for the given entity.

func (*EquipmentClient) UpdateOneID

func (c *EquipmentClient) UpdateOneID(id int) *EquipmentUpdateOne

UpdateOneID returns an update builder for the given id.

func (*EquipmentClient) Use

func (c *EquipmentClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `equipment.Hooks(f(g(h())))`.

type EquipmentConnection

type EquipmentConnection struct {
	Edges      []*EquipmentEdge `json:"edges"`
	PageInfo   PageInfo         `json:"pageInfo"`
	TotalCount int              `json:"totalCount"`
}

EquipmentConnection is the connection containing edges to Equipment.

type EquipmentCost

type EquipmentCost struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// EquipmentID holds the value of the "equipment_id" field.
	EquipmentID int `json:"equipment_id,omitempty"`
	// CoinID holds the value of the "coin_id" field.
	CoinID int `json:"coin_id,omitempty"`
	// Quantity holds the value of the "quantity" field.
	Quantity int `json:"quantity,omitempty"`
	// GpValue holds the value of the "gp_value" field.
	GpValue float64 `json:"gp_value,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the EquipmentCostQuery when eager-loading is set.
	Edges EquipmentCostEdges `json:"-"`
	// contains filtered or unexported fields
}

EquipmentCost is the model entity for the EquipmentCost schema.

func (*EquipmentCost) Coin

func (ec *EquipmentCost) Coin(ctx context.Context) (*Coin, error)

func (*EquipmentCost) Equipment

func (ec *EquipmentCost) Equipment(ctx context.Context) (*Equipment, error)

func (*EquipmentCost) IsNode

func (n *EquipmentCost) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*EquipmentCost) MarshalJSON

func (ec *EquipmentCost) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*EquipmentCost) Node

func (ec *EquipmentCost) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*EquipmentCost) QueryCoin

func (ec *EquipmentCost) QueryCoin() *CoinQuery

QueryCoin queries the "coin" edge of the EquipmentCost entity.

func (*EquipmentCost) QueryEquipment

func (ec *EquipmentCost) QueryEquipment() *EquipmentQuery

QueryEquipment queries the "equipment" edge of the EquipmentCost entity.

func (*EquipmentCost) String

func (ec *EquipmentCost) String() string

String implements the fmt.Stringer.

func (*EquipmentCost) ToEdge

ToEdge converts EquipmentCost into EquipmentCostEdge.

func (*EquipmentCost) UnmarshalJSON

func (ec *EquipmentCost) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*EquipmentCost) Unwrap

func (ec *EquipmentCost) Unwrap() *EquipmentCost

Unwrap unwraps the EquipmentCost entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*EquipmentCost) Update

func (ec *EquipmentCost) Update() *EquipmentCostUpdateOne

Update returns a builder for updating this EquipmentCost. Note that you need to call EquipmentCost.Unwrap() before calling this method if this EquipmentCost was returned from a transaction, and the transaction was committed or rolled back.

func (*EquipmentCost) Value

func (ec *EquipmentCost) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the EquipmentCost. This includes values selected through modifiers, order, etc.

type EquipmentCostClient

type EquipmentCostClient struct {
	// contains filtered or unexported fields
}

EquipmentCostClient is a client for the EquipmentCost schema.

func NewEquipmentCostClient

func NewEquipmentCostClient(c config) *EquipmentCostClient

NewEquipmentCostClient returns a client for the EquipmentCost from the given config.

func (*EquipmentCostClient) Create

Create returns a builder for creating a EquipmentCost entity.

func (*EquipmentCostClient) CreateBulk

CreateBulk returns a builder for creating a bulk of EquipmentCost entities.

func (*EquipmentCostClient) Delete

Delete returns a delete builder for EquipmentCost.

func (*EquipmentCostClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*EquipmentCostClient) DeleteOneID

func (c *EquipmentCostClient) DeleteOneID(id int) *EquipmentCostDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*EquipmentCostClient) Get

Get returns a EquipmentCost entity by its id.

func (*EquipmentCostClient) GetX

GetX is like Get, but panics if an error occurs.

func (*EquipmentCostClient) Hooks

func (c *EquipmentCostClient) Hooks() []Hook

Hooks returns the client hooks.

func (*EquipmentCostClient) Intercept

func (c *EquipmentCostClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `equipmentcost.Intercept(f(g(h())))`.

func (*EquipmentCostClient) Interceptors

func (c *EquipmentCostClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*EquipmentCostClient) Query

Query returns a query builder for EquipmentCost.

func (*EquipmentCostClient) QueryCoin

func (c *EquipmentCostClient) QueryCoin(ec *EquipmentCost) *CoinQuery

QueryCoin queries the coin edge of a EquipmentCost.

func (*EquipmentCostClient) QueryEquipment

func (c *EquipmentCostClient) QueryEquipment(ec *EquipmentCost) *EquipmentQuery

QueryEquipment queries the equipment edge of a EquipmentCost.

func (*EquipmentCostClient) Update

Update returns an update builder for EquipmentCost.

func (*EquipmentCostClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*EquipmentCostClient) UpdateOneID

func (c *EquipmentCostClient) UpdateOneID(id int) *EquipmentCostUpdateOne

UpdateOneID returns an update builder for the given id.

func (*EquipmentCostClient) Use

func (c *EquipmentCostClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `equipmentcost.Hooks(f(g(h())))`.

type EquipmentCostConnection

type EquipmentCostConnection struct {
	Edges      []*EquipmentCostEdge `json:"edges"`
	PageInfo   PageInfo             `json:"pageInfo"`
	TotalCount int                  `json:"totalCount"`
}

EquipmentCostConnection is the connection containing edges to EquipmentCost.

type EquipmentCostCreate

type EquipmentCostCreate struct {
	// contains filtered or unexported fields
}

EquipmentCostCreate is the builder for creating a EquipmentCost entity.

func (*EquipmentCostCreate) Exec

func (ecc *EquipmentCostCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*EquipmentCostCreate) ExecX

func (ecc *EquipmentCostCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentCostCreate) Mutation

func (ecc *EquipmentCostCreate) Mutation() *EquipmentCostMutation

Mutation returns the EquipmentCostMutation object of the builder.

func (*EquipmentCostCreate) Save

Save creates the EquipmentCost in the database.

func (*EquipmentCostCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*EquipmentCostCreate) SetCoin

func (ecc *EquipmentCostCreate) SetCoin(c *Coin) *EquipmentCostCreate

SetCoin sets the "coin" edge to the Coin entity.

func (*EquipmentCostCreate) SetCoinID

func (ecc *EquipmentCostCreate) SetCoinID(i int) *EquipmentCostCreate

SetCoinID sets the "coin_id" field.

func (*EquipmentCostCreate) SetEquipment

func (ecc *EquipmentCostCreate) SetEquipment(e *Equipment) *EquipmentCostCreate

SetEquipment sets the "equipment" edge to the Equipment entity.

func (*EquipmentCostCreate) SetEquipmentCost

func (ecc *EquipmentCostCreate) SetEquipmentCost(input *EquipmentCost) *EquipmentCostCreate

func (*EquipmentCostCreate) SetEquipmentID

func (ecc *EquipmentCostCreate) SetEquipmentID(i int) *EquipmentCostCreate

SetEquipmentID sets the "equipment_id" field.

func (*EquipmentCostCreate) SetGpValue

func (ecc *EquipmentCostCreate) SetGpValue(f float64) *EquipmentCostCreate

SetGpValue sets the "gp_value" field.

func (*EquipmentCostCreate) SetQuantity

func (ecc *EquipmentCostCreate) SetQuantity(i int) *EquipmentCostCreate

SetQuantity sets the "quantity" field.

type EquipmentCostCreateBulk

type EquipmentCostCreateBulk struct {
	// contains filtered or unexported fields
}

EquipmentCostCreateBulk is the builder for creating many EquipmentCost entities in bulk.

func (*EquipmentCostCreateBulk) Exec

func (eccb *EquipmentCostCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*EquipmentCostCreateBulk) ExecX

func (eccb *EquipmentCostCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentCostCreateBulk) Save

Save creates the EquipmentCost entities in the database.

func (*EquipmentCostCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type EquipmentCostDelete

type EquipmentCostDelete struct {
	// contains filtered or unexported fields
}

EquipmentCostDelete is the builder for deleting a EquipmentCost entity.

func (*EquipmentCostDelete) Exec

func (ecd *EquipmentCostDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*EquipmentCostDelete) ExecX

func (ecd *EquipmentCostDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentCostDelete) Where

Where appends a list predicates to the EquipmentCostDelete builder.

type EquipmentCostDeleteOne

type EquipmentCostDeleteOne struct {
	// contains filtered or unexported fields
}

EquipmentCostDeleteOne is the builder for deleting a single EquipmentCost entity.

func (*EquipmentCostDeleteOne) Exec

func (ecdo *EquipmentCostDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*EquipmentCostDeleteOne) ExecX

func (ecdo *EquipmentCostDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentCostDeleteOne) Where

Where appends a list predicates to the EquipmentCostDelete builder.

type EquipmentCostEdge

type EquipmentCostEdge struct {
	Node   *EquipmentCost `json:"node"`
	Cursor Cursor         `json:"cursor"`
}

EquipmentCostEdge is the edge representation of EquipmentCost.

type EquipmentCostEdges

type EquipmentCostEdges struct {
	// Equipment holds the value of the equipment edge.
	Equipment *Equipment `json:"equipment,omitempty"`
	// Coin holds the value of the coin edge.
	Coin *Coin `json:"coin,omitempty"`
	// contains filtered or unexported fields
}

EquipmentCostEdges holds the relations/edges for other nodes in the graph.

func (EquipmentCostEdges) CoinOrErr

func (e EquipmentCostEdges) CoinOrErr() (*Coin, error)

CoinOrErr returns the Coin value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (EquipmentCostEdges) EquipmentOrErr

func (e EquipmentCostEdges) EquipmentOrErr() (*Equipment, error)

EquipmentOrErr returns the Equipment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type EquipmentCostGroupBy

type EquipmentCostGroupBy struct {
	// contains filtered or unexported fields
}

EquipmentCostGroupBy is the group-by builder for EquipmentCost entities.

func (*EquipmentCostGroupBy) Aggregate

func (ecgb *EquipmentCostGroupBy) Aggregate(fns ...AggregateFunc) *EquipmentCostGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*EquipmentCostGroupBy) Bool

func (s *EquipmentCostGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*EquipmentCostGroupBy) BoolX

func (s *EquipmentCostGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*EquipmentCostGroupBy) Bools

func (s *EquipmentCostGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*EquipmentCostGroupBy) BoolsX

func (s *EquipmentCostGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*EquipmentCostGroupBy) Float64

func (s *EquipmentCostGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*EquipmentCostGroupBy) Float64X

func (s *EquipmentCostGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*EquipmentCostGroupBy) Float64s

func (s *EquipmentCostGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*EquipmentCostGroupBy) Float64sX

func (s *EquipmentCostGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EquipmentCostGroupBy) Int

func (s *EquipmentCostGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*EquipmentCostGroupBy) IntX

func (s *EquipmentCostGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*EquipmentCostGroupBy) Ints

func (s *EquipmentCostGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*EquipmentCostGroupBy) IntsX

func (s *EquipmentCostGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EquipmentCostGroupBy) Scan

func (ecgb *EquipmentCostGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*EquipmentCostGroupBy) ScanX

func (s *EquipmentCostGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*EquipmentCostGroupBy) String

func (s *EquipmentCostGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*EquipmentCostGroupBy) StringX

func (s *EquipmentCostGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*EquipmentCostGroupBy) Strings

func (s *EquipmentCostGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*EquipmentCostGroupBy) StringsX

func (s *EquipmentCostGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EquipmentCostMutation

type EquipmentCostMutation struct {
	// contains filtered or unexported fields
}

EquipmentCostMutation represents an operation that mutates the EquipmentCost nodes in the graph.

func (*EquipmentCostMutation) AddField

func (m *EquipmentCostMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*EquipmentCostMutation) AddGpValue

func (m *EquipmentCostMutation) AddGpValue(f float64)

AddGpValue adds f to the "gp_value" field.

func (*EquipmentCostMutation) AddQuantity

func (m *EquipmentCostMutation) AddQuantity(i int)

AddQuantity adds i to the "quantity" field.

func (*EquipmentCostMutation) AddedEdges

func (m *EquipmentCostMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*EquipmentCostMutation) AddedField

func (m *EquipmentCostMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*EquipmentCostMutation) AddedFields

func (m *EquipmentCostMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*EquipmentCostMutation) AddedGpValue

func (m *EquipmentCostMutation) AddedGpValue() (r float64, exists bool)

AddedGpValue returns the value that was added to the "gp_value" field in this mutation.

func (*EquipmentCostMutation) AddedIDs

func (m *EquipmentCostMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*EquipmentCostMutation) AddedQuantity

func (m *EquipmentCostMutation) AddedQuantity() (r int, exists bool)

AddedQuantity returns the value that was added to the "quantity" field in this mutation.

func (*EquipmentCostMutation) ClearCoin

func (m *EquipmentCostMutation) ClearCoin()

ClearCoin clears the "coin" edge to the Coin entity.

func (*EquipmentCostMutation) ClearEdge

func (m *EquipmentCostMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*EquipmentCostMutation) ClearEquipment

func (m *EquipmentCostMutation) ClearEquipment()

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*EquipmentCostMutation) ClearField

func (m *EquipmentCostMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*EquipmentCostMutation) ClearedEdges

func (m *EquipmentCostMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*EquipmentCostMutation) ClearedFields

func (m *EquipmentCostMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (EquipmentCostMutation) Client

func (m EquipmentCostMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*EquipmentCostMutation) CoinCleared

func (m *EquipmentCostMutation) CoinCleared() bool

CoinCleared reports if the "coin" edge to the Coin entity was cleared.

func (*EquipmentCostMutation) CoinID

func (m *EquipmentCostMutation) CoinID() (r int, exists bool)

CoinID returns the value of the "coin_id" field in the mutation.

func (*EquipmentCostMutation) CoinIDs

func (m *EquipmentCostMutation) CoinIDs() (ids []int)

CoinIDs returns the "coin" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CoinID instead. It exists only for internal usage by the builders.

func (*EquipmentCostMutation) EdgeCleared

func (m *EquipmentCostMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*EquipmentCostMutation) EquipmentCleared

func (m *EquipmentCostMutation) EquipmentCleared() bool

EquipmentCleared reports if the "equipment" edge to the Equipment entity was cleared.

func (*EquipmentCostMutation) EquipmentID

func (m *EquipmentCostMutation) EquipmentID() (r int, exists bool)

EquipmentID returns the value of the "equipment_id" field in the mutation.

func (*EquipmentCostMutation) EquipmentIDs

func (m *EquipmentCostMutation) EquipmentIDs() (ids []int)

EquipmentIDs returns the "equipment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EquipmentID instead. It exists only for internal usage by the builders.

func (*EquipmentCostMutation) Field

func (m *EquipmentCostMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*EquipmentCostMutation) FieldCleared

func (m *EquipmentCostMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*EquipmentCostMutation) Fields

func (m *EquipmentCostMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*EquipmentCostMutation) GpValue

func (m *EquipmentCostMutation) GpValue() (r float64, exists bool)

GpValue returns the value of the "gp_value" field in the mutation.

func (*EquipmentCostMutation) ID

func (m *EquipmentCostMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*EquipmentCostMutation) IDs

func (m *EquipmentCostMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*EquipmentCostMutation) OldCoinID

func (m *EquipmentCostMutation) OldCoinID(ctx context.Context) (v int, err error)

OldCoinID returns the old "coin_id" field's value of the EquipmentCost entity. If the EquipmentCost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EquipmentCostMutation) OldEquipmentID

func (m *EquipmentCostMutation) OldEquipmentID(ctx context.Context) (v int, err error)

OldEquipmentID returns the old "equipment_id" field's value of the EquipmentCost entity. If the EquipmentCost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EquipmentCostMutation) OldField

func (m *EquipmentCostMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*EquipmentCostMutation) OldGpValue

func (m *EquipmentCostMutation) OldGpValue(ctx context.Context) (v float64, err error)

OldGpValue returns the old "gp_value" field's value of the EquipmentCost entity. If the EquipmentCost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EquipmentCostMutation) OldQuantity

func (m *EquipmentCostMutation) OldQuantity(ctx context.Context) (v int, err error)

OldQuantity returns the old "quantity" field's value of the EquipmentCost entity. If the EquipmentCost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EquipmentCostMutation) Op

func (m *EquipmentCostMutation) Op() Op

Op returns the operation name.

func (*EquipmentCostMutation) Quantity

func (m *EquipmentCostMutation) Quantity() (r int, exists bool)

Quantity returns the value of the "quantity" field in the mutation.

func (*EquipmentCostMutation) RemovedEdges

func (m *EquipmentCostMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*EquipmentCostMutation) RemovedIDs

func (m *EquipmentCostMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*EquipmentCostMutation) ResetCoin

func (m *EquipmentCostMutation) ResetCoin()

ResetCoin resets all changes to the "coin" edge.

func (*EquipmentCostMutation) ResetCoinID

func (m *EquipmentCostMutation) ResetCoinID()

ResetCoinID resets all changes to the "coin_id" field.

func (*EquipmentCostMutation) ResetEdge

func (m *EquipmentCostMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*EquipmentCostMutation) ResetEquipment

func (m *EquipmentCostMutation) ResetEquipment()

ResetEquipment resets all changes to the "equipment" edge.

func (*EquipmentCostMutation) ResetEquipmentID

func (m *EquipmentCostMutation) ResetEquipmentID()

ResetEquipmentID resets all changes to the "equipment_id" field.

func (*EquipmentCostMutation) ResetField

func (m *EquipmentCostMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*EquipmentCostMutation) ResetGpValue

func (m *EquipmentCostMutation) ResetGpValue()

ResetGpValue resets all changes to the "gp_value" field.

func (*EquipmentCostMutation) ResetQuantity

func (m *EquipmentCostMutation) ResetQuantity()

ResetQuantity resets all changes to the "quantity" field.

func (*EquipmentCostMutation) SetCoinID

func (m *EquipmentCostMutation) SetCoinID(i int)

SetCoinID sets the "coin_id" field.

func (*EquipmentCostMutation) SetEquipmentID

func (m *EquipmentCostMutation) SetEquipmentID(i int)

SetEquipmentID sets the "equipment_id" field.

func (*EquipmentCostMutation) SetField

func (m *EquipmentCostMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*EquipmentCostMutation) SetGpValue

func (m *EquipmentCostMutation) SetGpValue(f float64)

SetGpValue sets the "gp_value" field.

func (*EquipmentCostMutation) SetOp

func (m *EquipmentCostMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*EquipmentCostMutation) SetQuantity

func (m *EquipmentCostMutation) SetQuantity(i int)

SetQuantity sets the "quantity" field.

func (EquipmentCostMutation) Tx

func (m EquipmentCostMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*EquipmentCostMutation) Type

func (m *EquipmentCostMutation) Type() string

Type returns the node type of this mutation (EquipmentCost).

func (*EquipmentCostMutation) Where

Where appends a list predicates to the EquipmentCostMutation builder.

func (*EquipmentCostMutation) WhereP

func (m *EquipmentCostMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the EquipmentCostMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type EquipmentCostOrder

type EquipmentCostOrder struct {
	Direction OrderDirection           `json:"direction"`
	Field     *EquipmentCostOrderField `json:"field"`
}

EquipmentCostOrder defines the ordering of EquipmentCost.

type EquipmentCostOrderField

type EquipmentCostOrderField struct {
	// Value extracts the ordering value from the given EquipmentCost.
	Value func(*EquipmentCost) (ent.Value, error)
	// contains filtered or unexported fields
}

EquipmentCostOrderField defines the ordering field of EquipmentCost.

type EquipmentCostPaginateOption

type EquipmentCostPaginateOption func(*equipmentcostPager) error

EquipmentCostPaginateOption enables pagination customization.

func WithEquipmentCostFilter

func WithEquipmentCostFilter(filter func(*EquipmentCostQuery) (*EquipmentCostQuery, error)) EquipmentCostPaginateOption

WithEquipmentCostFilter configures pagination filter.

func WithEquipmentCostOrder

func WithEquipmentCostOrder(order *EquipmentCostOrder) EquipmentCostPaginateOption

WithEquipmentCostOrder configures pagination ordering.

type EquipmentCostQuery

type EquipmentCostQuery struct {
	// contains filtered or unexported fields
}

EquipmentCostQuery is the builder for querying EquipmentCost entities.

func (*EquipmentCostQuery) Aggregate

func (ecq *EquipmentCostQuery) Aggregate(fns ...AggregateFunc) *EquipmentCostSelect

Aggregate returns a EquipmentCostSelect configured with the given aggregations.

func (*EquipmentCostQuery) All

All executes the query and returns a list of EquipmentCosts.

func (*EquipmentCostQuery) AllX

func (ecq *EquipmentCostQuery) AllX(ctx context.Context) []*EquipmentCost

AllX is like All, but panics if an error occurs.

func (*EquipmentCostQuery) Clone

func (ecq *EquipmentCostQuery) Clone() *EquipmentCostQuery

Clone returns a duplicate of the EquipmentCostQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*EquipmentCostQuery) CollectFields

func (ec *EquipmentCostQuery) CollectFields(ctx context.Context, satisfies ...string) (*EquipmentCostQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*EquipmentCostQuery) Count

func (ecq *EquipmentCostQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*EquipmentCostQuery) CountX

func (ecq *EquipmentCostQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*EquipmentCostQuery) Exist

func (ecq *EquipmentCostQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*EquipmentCostQuery) ExistX

func (ecq *EquipmentCostQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*EquipmentCostQuery) First

First returns the first EquipmentCost entity from the query. Returns a *NotFoundError when no EquipmentCost was found.

func (*EquipmentCostQuery) FirstID

func (ecq *EquipmentCostQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first EquipmentCost ID from the query. Returns a *NotFoundError when no EquipmentCost ID was found.

func (*EquipmentCostQuery) FirstIDX

func (ecq *EquipmentCostQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*EquipmentCostQuery) FirstX

func (ecq *EquipmentCostQuery) FirstX(ctx context.Context) *EquipmentCost

FirstX is like First, but panics if an error occurs.

func (*EquipmentCostQuery) GroupBy

func (ecq *EquipmentCostQuery) GroupBy(field string, fields ...string) *EquipmentCostGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	EquipmentID int `json:"equipment_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.EquipmentCost.Query().
	GroupBy(equipmentcost.FieldEquipmentID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*EquipmentCostQuery) IDs

func (ecq *EquipmentCostQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of EquipmentCost IDs.

func (*EquipmentCostQuery) IDsX

func (ecq *EquipmentCostQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*EquipmentCostQuery) Limit

func (ecq *EquipmentCostQuery) Limit(limit int) *EquipmentCostQuery

Limit the number of records to be returned by this query.

func (*EquipmentCostQuery) Offset

func (ecq *EquipmentCostQuery) Offset(offset int) *EquipmentCostQuery

Offset to start from.

func (*EquipmentCostQuery) Only

Only returns a single EquipmentCost entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one EquipmentCost entity is found. Returns a *NotFoundError when no EquipmentCost entities are found.

func (*EquipmentCostQuery) OnlyID

func (ecq *EquipmentCostQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only EquipmentCost ID in the query. Returns a *NotSingularError when more than one EquipmentCost ID is found. Returns a *NotFoundError when no entities are found.

func (*EquipmentCostQuery) OnlyIDX

func (ecq *EquipmentCostQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*EquipmentCostQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*EquipmentCostQuery) Order

Order specifies how the records should be ordered.

func (*EquipmentCostQuery) Paginate

func (ec *EquipmentCostQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...EquipmentCostPaginateOption,
) (*EquipmentCostConnection, error)

Paginate executes the query and returns a relay based cursor connection to EquipmentCost.

func (*EquipmentCostQuery) QueryCoin

func (ecq *EquipmentCostQuery) QueryCoin() *CoinQuery

QueryCoin chains the current query on the "coin" edge.

func (*EquipmentCostQuery) QueryEquipment

func (ecq *EquipmentCostQuery) QueryEquipment() *EquipmentQuery

QueryEquipment chains the current query on the "equipment" edge.

func (*EquipmentCostQuery) Select

func (ecq *EquipmentCostQuery) Select(fields ...string) *EquipmentCostSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	EquipmentID int `json:"equipment_id,omitempty"`
}

client.EquipmentCost.Query().
	Select(equipmentcost.FieldEquipmentID).
	Scan(ctx, &v)

func (*EquipmentCostQuery) Unique

func (ecq *EquipmentCostQuery) Unique(unique bool) *EquipmentCostQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*EquipmentCostQuery) Where

Where adds a new predicate for the EquipmentCostQuery builder.

func (*EquipmentCostQuery) WithCoin

func (ecq *EquipmentCostQuery) WithCoin(opts ...func(*CoinQuery)) *EquipmentCostQuery

WithCoin tells the query-builder to eager-load the nodes that are connected to the "coin" edge. The optional arguments are used to configure the query builder of the edge.

func (*EquipmentCostQuery) WithEquipment

func (ecq *EquipmentCostQuery) WithEquipment(opts ...func(*EquipmentQuery)) *EquipmentCostQuery

WithEquipment tells the query-builder to eager-load the nodes that are connected to the "equipment" edge. The optional arguments are used to configure the query builder of the edge.

type EquipmentCostSelect

type EquipmentCostSelect struct {
	*EquipmentCostQuery
	// contains filtered or unexported fields
}

EquipmentCostSelect is the builder for selecting fields of EquipmentCost entities.

func (*EquipmentCostSelect) Aggregate

func (ecs *EquipmentCostSelect) Aggregate(fns ...AggregateFunc) *EquipmentCostSelect

Aggregate adds the given aggregation functions to the selector query.

func (*EquipmentCostSelect) Bool

func (s *EquipmentCostSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*EquipmentCostSelect) BoolX

func (s *EquipmentCostSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*EquipmentCostSelect) Bools

func (s *EquipmentCostSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*EquipmentCostSelect) BoolsX

func (s *EquipmentCostSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*EquipmentCostSelect) Float64

func (s *EquipmentCostSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*EquipmentCostSelect) Float64X

func (s *EquipmentCostSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*EquipmentCostSelect) Float64s

func (s *EquipmentCostSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*EquipmentCostSelect) Float64sX

func (s *EquipmentCostSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EquipmentCostSelect) Int

func (s *EquipmentCostSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*EquipmentCostSelect) IntX

func (s *EquipmentCostSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*EquipmentCostSelect) Ints

func (s *EquipmentCostSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*EquipmentCostSelect) IntsX

func (s *EquipmentCostSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EquipmentCostSelect) Scan

func (ecs *EquipmentCostSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*EquipmentCostSelect) ScanX

func (s *EquipmentCostSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*EquipmentCostSelect) String

func (s *EquipmentCostSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*EquipmentCostSelect) StringX

func (s *EquipmentCostSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*EquipmentCostSelect) Strings

func (s *EquipmentCostSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*EquipmentCostSelect) StringsX

func (s *EquipmentCostSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EquipmentCostUpdate

type EquipmentCostUpdate struct {
	// contains filtered or unexported fields
}

EquipmentCostUpdate is the builder for updating EquipmentCost entities.

func (*EquipmentCostUpdate) AddGpValue

func (ecu *EquipmentCostUpdate) AddGpValue(f float64) *EquipmentCostUpdate

AddGpValue adds f to the "gp_value" field.

func (*EquipmentCostUpdate) AddQuantity

func (ecu *EquipmentCostUpdate) AddQuantity(i int) *EquipmentCostUpdate

AddQuantity adds i to the "quantity" field.

func (*EquipmentCostUpdate) ClearCoin

func (ecu *EquipmentCostUpdate) ClearCoin() *EquipmentCostUpdate

ClearCoin clears the "coin" edge to the Coin entity.

func (*EquipmentCostUpdate) ClearEquipment

func (ecu *EquipmentCostUpdate) ClearEquipment() *EquipmentCostUpdate

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*EquipmentCostUpdate) Exec

func (ecu *EquipmentCostUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*EquipmentCostUpdate) ExecX

func (ecu *EquipmentCostUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentCostUpdate) Mutation

func (ecu *EquipmentCostUpdate) Mutation() *EquipmentCostMutation

Mutation returns the EquipmentCostMutation object of the builder.

func (*EquipmentCostUpdate) Save

func (ecu *EquipmentCostUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*EquipmentCostUpdate) SaveX

func (ecu *EquipmentCostUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*EquipmentCostUpdate) SetCoin

func (ecu *EquipmentCostUpdate) SetCoin(c *Coin) *EquipmentCostUpdate

SetCoin sets the "coin" edge to the Coin entity.

func (*EquipmentCostUpdate) SetCoinID

func (ecu *EquipmentCostUpdate) SetCoinID(i int) *EquipmentCostUpdate

SetCoinID sets the "coin_id" field.

func (*EquipmentCostUpdate) SetEquipment

func (ecu *EquipmentCostUpdate) SetEquipment(e *Equipment) *EquipmentCostUpdate

SetEquipment sets the "equipment" edge to the Equipment entity.

func (*EquipmentCostUpdate) SetEquipmentID

func (ecu *EquipmentCostUpdate) SetEquipmentID(i int) *EquipmentCostUpdate

SetEquipmentID sets the "equipment_id" field.

func (*EquipmentCostUpdate) SetGpValue

func (ecu *EquipmentCostUpdate) SetGpValue(f float64) *EquipmentCostUpdate

SetGpValue sets the "gp_value" field.

func (*EquipmentCostUpdate) SetQuantity

func (ecu *EquipmentCostUpdate) SetQuantity(i int) *EquipmentCostUpdate

SetQuantity sets the "quantity" field.

func (*EquipmentCostUpdate) Where

Where appends a list predicates to the EquipmentCostUpdate builder.

type EquipmentCostUpdateOne

type EquipmentCostUpdateOne struct {
	// contains filtered or unexported fields
}

EquipmentCostUpdateOne is the builder for updating a single EquipmentCost entity.

func (*EquipmentCostUpdateOne) AddGpValue

AddGpValue adds f to the "gp_value" field.

func (*EquipmentCostUpdateOne) AddQuantity

func (ecuo *EquipmentCostUpdateOne) AddQuantity(i int) *EquipmentCostUpdateOne

AddQuantity adds i to the "quantity" field.

func (*EquipmentCostUpdateOne) ClearCoin

ClearCoin clears the "coin" edge to the Coin entity.

func (*EquipmentCostUpdateOne) ClearEquipment

func (ecuo *EquipmentCostUpdateOne) ClearEquipment() *EquipmentCostUpdateOne

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*EquipmentCostUpdateOne) Exec

func (ecuo *EquipmentCostUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*EquipmentCostUpdateOne) ExecX

func (ecuo *EquipmentCostUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentCostUpdateOne) Mutation

Mutation returns the EquipmentCostMutation object of the builder.

func (*EquipmentCostUpdateOne) Save

Save executes the query and returns the updated EquipmentCost entity.

func (*EquipmentCostUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*EquipmentCostUpdateOne) Select

func (ecuo *EquipmentCostUpdateOne) Select(field string, fields ...string) *EquipmentCostUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*EquipmentCostUpdateOne) SetCoin

SetCoin sets the "coin" edge to the Coin entity.

func (*EquipmentCostUpdateOne) SetCoinID

SetCoinID sets the "coin_id" field.

func (*EquipmentCostUpdateOne) SetEquipment

SetEquipment sets the "equipment" edge to the Equipment entity.

func (*EquipmentCostUpdateOne) SetEquipmentID

func (ecuo *EquipmentCostUpdateOne) SetEquipmentID(i int) *EquipmentCostUpdateOne

SetEquipmentID sets the "equipment_id" field.

func (*EquipmentCostUpdateOne) SetGpValue

SetGpValue sets the "gp_value" field.

func (*EquipmentCostUpdateOne) SetQuantity

func (ecuo *EquipmentCostUpdateOne) SetQuantity(i int) *EquipmentCostUpdateOne

SetQuantity sets the "quantity" field.

func (*EquipmentCostUpdateOne) Where

Where appends a list predicates to the EquipmentCostUpdate builder.

type EquipmentCostWhereInput

type EquipmentCostWhereInput struct {
	Predicates []predicate.EquipmentCost  `json:"-"`
	Not        *EquipmentCostWhereInput   `json:"not,omitempty"`
	Or         []*EquipmentCostWhereInput `json:"or,omitempty"`
	And        []*EquipmentCostWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "equipment_id" field predicates.
	EquipmentID      *int  `json:"equipmentID,omitempty"`
	EquipmentIDNEQ   *int  `json:"equipmentIDNEQ,omitempty"`
	EquipmentIDIn    []int `json:"equipmentIDIn,omitempty"`
	EquipmentIDNotIn []int `json:"equipmentIDNotIn,omitempty"`

	// "coin_id" field predicates.
	CoinID      *int  `json:"coinID,omitempty"`
	CoinIDNEQ   *int  `json:"coinIDNEQ,omitempty"`
	CoinIDIn    []int `json:"coinIDIn,omitempty"`
	CoinIDNotIn []int `json:"coinIDNotIn,omitempty"`

	// "quantity" field predicates.
	Quantity      *int  `json:"quantity,omitempty"`
	QuantityNEQ   *int  `json:"quantityNEQ,omitempty"`
	QuantityIn    []int `json:"quantityIn,omitempty"`
	QuantityNotIn []int `json:"quantityNotIn,omitempty"`
	QuantityGT    *int  `json:"quantityGT,omitempty"`
	QuantityGTE   *int  `json:"quantityGTE,omitempty"`
	QuantityLT    *int  `json:"quantityLT,omitempty"`
	QuantityLTE   *int  `json:"quantityLTE,omitempty"`

	// "gp_value" field predicates.
	GpValue      *float64  `json:"gpValue,omitempty"`
	GpValueNEQ   *float64  `json:"gpValueNEQ,omitempty"`
	GpValueIn    []float64 `json:"gpValueIn,omitempty"`
	GpValueNotIn []float64 `json:"gpValueNotIn,omitempty"`
	GpValueGT    *float64  `json:"gpValueGT,omitempty"`
	GpValueGTE   *float64  `json:"gpValueGTE,omitempty"`
	GpValueLT    *float64  `json:"gpValueLT,omitempty"`
	GpValueLTE   *float64  `json:"gpValueLTE,omitempty"`

	// "equipment" edge predicates.
	HasEquipment     *bool                  `json:"hasEquipment,omitempty"`
	HasEquipmentWith []*EquipmentWhereInput `json:"hasEquipmentWith,omitempty"`

	// "coin" edge predicates.
	HasCoin     *bool             `json:"hasCoin,omitempty"`
	HasCoinWith []*CoinWhereInput `json:"hasCoinWith,omitempty"`
}

EquipmentCostWhereInput represents a where input for filtering EquipmentCost queries.

func (*EquipmentCostWhereInput) AddPredicates

func (i *EquipmentCostWhereInput) AddPredicates(predicates ...predicate.EquipmentCost)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*EquipmentCostWhereInput) Filter

Filter applies the EquipmentCostWhereInput filter on the EquipmentCostQuery builder.

func (*EquipmentCostWhereInput) P

P returns a predicate for filtering equipmentcosts. An error is returned if the input is empty or invalid.

type EquipmentCosts

type EquipmentCosts []*EquipmentCost

EquipmentCosts is a parsable slice of EquipmentCost.

type EquipmentCreate

type EquipmentCreate struct {
	// contains filtered or unexported fields
}

EquipmentCreate is the builder for creating a Equipment entity.

func (*EquipmentCreate) AddChoice

func (ec *EquipmentCreate) AddChoice(e ...*EquipmentChoice) *EquipmentCreate

AddChoice adds the "choice" edges to the EquipmentChoice entity.

func (*EquipmentCreate) AddChoiceIDs

func (ec *EquipmentCreate) AddChoiceIDs(ids ...int) *EquipmentCreate

AddChoiceIDs adds the "choice" edge to the EquipmentChoice entity by IDs.

func (*EquipmentCreate) AddClasIDs

func (ec *EquipmentCreate) AddClasIDs(ids ...int) *EquipmentCreate

AddClasIDs adds the "class" edge to the Class entity by IDs.

func (*EquipmentCreate) AddClass

func (ec *EquipmentCreate) AddClass(c ...*Class) *EquipmentCreate

AddClass adds the "class" edges to the Class entity.

func (*EquipmentCreate) AddEquipmentCategory

func (ec *EquipmentCreate) AddEquipmentCategory(e ...*EquipmentCategory) *EquipmentCreate

AddEquipmentCategory adds the "equipment_category" edges to the EquipmentCategory entity.

func (*EquipmentCreate) AddEquipmentCategoryIDs

func (ec *EquipmentCreate) AddEquipmentCategoryIDs(ids ...int) *EquipmentCreate

AddEquipmentCategoryIDs adds the "equipment_category" edge to the EquipmentCategory entity by IDs.

func (*EquipmentCreate) Exec

func (ec *EquipmentCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*EquipmentCreate) ExecX

func (ec *EquipmentCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentCreate) Mutation

func (ec *EquipmentCreate) Mutation() *EquipmentMutation

Mutation returns the EquipmentMutation object of the builder.

func (*EquipmentCreate) Save

func (ec *EquipmentCreate) Save(ctx context.Context) (*Equipment, error)

Save creates the Equipment in the database.

func (*EquipmentCreate) SaveX

func (ec *EquipmentCreate) SaveX(ctx context.Context) *Equipment

SaveX calls Save and panics if Save returns an error.

func (*EquipmentCreate) SetArmor

func (ec *EquipmentCreate) SetArmor(a *Armor) *EquipmentCreate

SetArmor sets the "armor" edge to the Armor entity.

func (*EquipmentCreate) SetArmorID

func (ec *EquipmentCreate) SetArmorID(id int) *EquipmentCreate

SetArmorID sets the "armor" edge to the Armor entity by ID.

func (*EquipmentCreate) SetCost

SetCost sets the "cost" edge to the EquipmentCost entity.

func (*EquipmentCreate) SetCostID

func (ec *EquipmentCreate) SetCostID(id int) *EquipmentCreate

SetCostID sets the "cost" edge to the EquipmentCost entity by ID.

func (*EquipmentCreate) SetEquipment

func (ec *EquipmentCreate) SetEquipment(input *Equipment) *EquipmentCreate

func (*EquipmentCreate) SetGear

func (ec *EquipmentCreate) SetGear(g *Gear) *EquipmentCreate

SetGear sets the "gear" edge to the Gear entity.

func (*EquipmentCreate) SetGearID

func (ec *EquipmentCreate) SetGearID(id int) *EquipmentCreate

SetGearID sets the "gear" edge to the Gear entity by ID.

func (*EquipmentCreate) SetIndx

func (ec *EquipmentCreate) SetIndx(s string) *EquipmentCreate

SetIndx sets the "indx" field.

func (*EquipmentCreate) SetName

func (ec *EquipmentCreate) SetName(s string) *EquipmentCreate

SetName sets the "name" field.

func (*EquipmentCreate) SetNillableArmorID

func (ec *EquipmentCreate) SetNillableArmorID(id *int) *EquipmentCreate

SetNillableArmorID sets the "armor" edge to the Armor entity by ID if the given value is not nil.

func (*EquipmentCreate) SetNillableCostID

func (ec *EquipmentCreate) SetNillableCostID(id *int) *EquipmentCreate

SetNillableCostID sets the "cost" edge to the EquipmentCost entity by ID if the given value is not nil.

func (*EquipmentCreate) SetNillableGearID

func (ec *EquipmentCreate) SetNillableGearID(id *int) *EquipmentCreate

SetNillableGearID sets the "gear" edge to the Gear entity by ID if the given value is not nil.

func (*EquipmentCreate) SetNillableToolID

func (ec *EquipmentCreate) SetNillableToolID(id *int) *EquipmentCreate

SetNillableToolID sets the "tool" edge to the Tool entity by ID if the given value is not nil.

func (*EquipmentCreate) SetNillableVehicleID

func (ec *EquipmentCreate) SetNillableVehicleID(id *int) *EquipmentCreate

SetNillableVehicleID sets the "vehicle" edge to the Vehicle entity by ID if the given value is not nil.

func (*EquipmentCreate) SetNillableWeaponID

func (ec *EquipmentCreate) SetNillableWeaponID(id *int) *EquipmentCreate

SetNillableWeaponID sets the "weapon" edge to the Weapon entity by ID if the given value is not nil.

func (*EquipmentCreate) SetNillableWeight

func (ec *EquipmentCreate) SetNillableWeight(i *int) *EquipmentCreate

SetNillableWeight sets the "weight" field if the given value is not nil.

func (*EquipmentCreate) SetTool

func (ec *EquipmentCreate) SetTool(t *Tool) *EquipmentCreate

SetTool sets the "tool" edge to the Tool entity.

func (*EquipmentCreate) SetToolID

func (ec *EquipmentCreate) SetToolID(id int) *EquipmentCreate

SetToolID sets the "tool" edge to the Tool entity by ID.

func (*EquipmentCreate) SetVehicle

func (ec *EquipmentCreate) SetVehicle(v *Vehicle) *EquipmentCreate

SetVehicle sets the "vehicle" edge to the Vehicle entity.

func (*EquipmentCreate) SetVehicleID

func (ec *EquipmentCreate) SetVehicleID(id int) *EquipmentCreate

SetVehicleID sets the "vehicle" edge to the Vehicle entity by ID.

func (*EquipmentCreate) SetWeapon

func (ec *EquipmentCreate) SetWeapon(w *Weapon) *EquipmentCreate

SetWeapon sets the "weapon" edge to the Weapon entity.

func (*EquipmentCreate) SetWeaponID

func (ec *EquipmentCreate) SetWeaponID(id int) *EquipmentCreate

SetWeaponID sets the "weapon" edge to the Weapon entity by ID.

func (*EquipmentCreate) SetWeight

func (ec *EquipmentCreate) SetWeight(i int) *EquipmentCreate

SetWeight sets the "weight" field.

type EquipmentCreateBulk

type EquipmentCreateBulk struct {
	// contains filtered or unexported fields
}

EquipmentCreateBulk is the builder for creating many Equipment entities in bulk.

func (*EquipmentCreateBulk) Exec

func (ecb *EquipmentCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*EquipmentCreateBulk) ExecX

func (ecb *EquipmentCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentCreateBulk) Save

func (ecb *EquipmentCreateBulk) Save(ctx context.Context) ([]*Equipment, error)

Save creates the Equipment entities in the database.

func (*EquipmentCreateBulk) SaveX

func (ecb *EquipmentCreateBulk) SaveX(ctx context.Context) []*Equipment

SaveX is like Save, but panics if an error occurs.

type EquipmentDelete

type EquipmentDelete struct {
	// contains filtered or unexported fields
}

EquipmentDelete is the builder for deleting a Equipment entity.

func (*EquipmentDelete) Exec

func (ed *EquipmentDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*EquipmentDelete) ExecX

func (ed *EquipmentDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentDelete) Where

Where appends a list predicates to the EquipmentDelete builder.

type EquipmentDeleteOne

type EquipmentDeleteOne struct {
	// contains filtered or unexported fields
}

EquipmentDeleteOne is the builder for deleting a single Equipment entity.

func (*EquipmentDeleteOne) Exec

func (edo *EquipmentDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*EquipmentDeleteOne) ExecX

func (edo *EquipmentDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentDeleteOne) Where

Where appends a list predicates to the EquipmentDelete builder.

type EquipmentEdge

type EquipmentEdge struct {
	Node   *Equipment `json:"node"`
	Cursor Cursor     `json:"cursor"`
}

EquipmentEdge is the edge representation of Equipment.

type EquipmentEdges

type EquipmentEdges struct {
	// EquipmentCategory holds the value of the equipment_category edge.
	EquipmentCategory []*EquipmentCategory `json:"equipment_category,omitempty"`
	// Cost holds the value of the cost edge.
	Cost *EquipmentCost `json:"cost,omitempty"`
	// Weapon holds the value of the weapon edge.
	Weapon *Weapon `json:"weapon,omitempty"`
	// Armor holds the value of the armor edge.
	Armor *Armor `json:"armor,omitempty"`
	// Gear holds the value of the gear edge.
	Gear *Gear `json:"gear,omitempty"`
	// Tool holds the value of the tool edge.
	Tool *Tool `json:"tool,omitempty"`
	// Vehicle holds the value of the vehicle edge.
	Vehicle *Vehicle `json:"vehicle,omitempty"`
	// Class holds the value of the class edge.
	Class []*Class `json:"class,omitempty"`
	// Choice holds the value of the choice edge.
	Choice []*EquipmentChoice `json:"choice,omitempty"`
	// ClassEquipment holds the value of the class_equipment edge.
	ClassEquipment []*ClassEquipment `json:"class_equipment,omitempty"`
	// contains filtered or unexported fields
}

EquipmentEdges holds the relations/edges for other nodes in the graph.

func (EquipmentEdges) ArmorOrErr

func (e EquipmentEdges) ArmorOrErr() (*Armor, error)

ArmorOrErr returns the Armor value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (EquipmentEdges) ChoiceOrErr

func (e EquipmentEdges) ChoiceOrErr() ([]*EquipmentChoice, error)

ChoiceOrErr returns the Choice value or an error if the edge was not loaded in eager-loading.

func (EquipmentEdges) ClassEquipmentOrErr

func (e EquipmentEdges) ClassEquipmentOrErr() ([]*ClassEquipment, error)

ClassEquipmentOrErr returns the ClassEquipment value or an error if the edge was not loaded in eager-loading.

func (EquipmentEdges) ClassOrErr

func (e EquipmentEdges) ClassOrErr() ([]*Class, error)

ClassOrErr returns the Class value or an error if the edge was not loaded in eager-loading.

func (EquipmentEdges) CostOrErr

func (e EquipmentEdges) CostOrErr() (*EquipmentCost, error)

CostOrErr returns the Cost value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (EquipmentEdges) EquipmentCategoryOrErr

func (e EquipmentEdges) EquipmentCategoryOrErr() ([]*EquipmentCategory, error)

EquipmentCategoryOrErr returns the EquipmentCategory value or an error if the edge was not loaded in eager-loading.

func (EquipmentEdges) GearOrErr

func (e EquipmentEdges) GearOrErr() (*Gear, error)

GearOrErr returns the Gear value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (EquipmentEdges) ToolOrErr

func (e EquipmentEdges) ToolOrErr() (*Tool, error)

ToolOrErr returns the Tool value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (EquipmentEdges) VehicleOrErr

func (e EquipmentEdges) VehicleOrErr() (*Vehicle, error)

VehicleOrErr returns the Vehicle value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (EquipmentEdges) WeaponOrErr

func (e EquipmentEdges) WeaponOrErr() (*Weapon, error)

WeaponOrErr returns the Weapon value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type EquipmentGroupBy

type EquipmentGroupBy struct {
	// contains filtered or unexported fields
}

EquipmentGroupBy is the group-by builder for Equipment entities.

func (*EquipmentGroupBy) Aggregate

func (egb *EquipmentGroupBy) Aggregate(fns ...AggregateFunc) *EquipmentGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*EquipmentGroupBy) Bool

func (s *EquipmentGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*EquipmentGroupBy) BoolX

func (s *EquipmentGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*EquipmentGroupBy) Bools

func (s *EquipmentGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*EquipmentGroupBy) BoolsX

func (s *EquipmentGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*EquipmentGroupBy) Float64

func (s *EquipmentGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*EquipmentGroupBy) Float64X

func (s *EquipmentGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*EquipmentGroupBy) Float64s

func (s *EquipmentGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*EquipmentGroupBy) Float64sX

func (s *EquipmentGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EquipmentGroupBy) Int

func (s *EquipmentGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*EquipmentGroupBy) IntX

func (s *EquipmentGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*EquipmentGroupBy) Ints

func (s *EquipmentGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*EquipmentGroupBy) IntsX

func (s *EquipmentGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EquipmentGroupBy) Scan

func (egb *EquipmentGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*EquipmentGroupBy) ScanX

func (s *EquipmentGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*EquipmentGroupBy) String

func (s *EquipmentGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*EquipmentGroupBy) StringX

func (s *EquipmentGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*EquipmentGroupBy) Strings

func (s *EquipmentGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*EquipmentGroupBy) StringsX

func (s *EquipmentGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EquipmentMutation

type EquipmentMutation struct {
	// contains filtered or unexported fields
}

EquipmentMutation represents an operation that mutates the Equipment nodes in the graph.

func (*EquipmentMutation) AddChoiceIDs

func (m *EquipmentMutation) AddChoiceIDs(ids ...int)

AddChoiceIDs adds the "choice" edge to the EquipmentChoice entity by ids.

func (*EquipmentMutation) AddClasIDs

func (m *EquipmentMutation) AddClasIDs(ids ...int)

AddClasIDs adds the "class" edge to the Class entity by ids.

func (*EquipmentMutation) AddEquipmentCategoryIDs

func (m *EquipmentMutation) AddEquipmentCategoryIDs(ids ...int)

AddEquipmentCategoryIDs adds the "equipment_category" edge to the EquipmentCategory entity by ids.

func (*EquipmentMutation) AddField

func (m *EquipmentMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*EquipmentMutation) AddWeight

func (m *EquipmentMutation) AddWeight(i int)

AddWeight adds i to the "weight" field.

func (*EquipmentMutation) AddedEdges

func (m *EquipmentMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*EquipmentMutation) AddedField

func (m *EquipmentMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*EquipmentMutation) AddedFields

func (m *EquipmentMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*EquipmentMutation) AddedIDs

func (m *EquipmentMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*EquipmentMutation) AddedWeight

func (m *EquipmentMutation) AddedWeight() (r int, exists bool)

AddedWeight returns the value that was added to the "weight" field in this mutation.

func (*EquipmentMutation) ArmorCleared

func (m *EquipmentMutation) ArmorCleared() bool

ArmorCleared reports if the "armor" edge to the Armor entity was cleared.

func (*EquipmentMutation) ArmorID

func (m *EquipmentMutation) ArmorID() (id int, exists bool)

ArmorID returns the "armor" edge ID in the mutation.

func (*EquipmentMutation) ArmorIDs

func (m *EquipmentMutation) ArmorIDs() (ids []int)

ArmorIDs returns the "armor" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ArmorID instead. It exists only for internal usage by the builders.

func (*EquipmentMutation) ChoiceCleared

func (m *EquipmentMutation) ChoiceCleared() bool

ChoiceCleared reports if the "choice" edge to the EquipmentChoice entity was cleared.

func (*EquipmentMutation) ChoiceIDs

func (m *EquipmentMutation) ChoiceIDs() (ids []int)

ChoiceIDs returns the "choice" edge IDs in the mutation.

func (*EquipmentMutation) ClassCleared

func (m *EquipmentMutation) ClassCleared() bool

ClassCleared reports if the "class" edge to the Class entity was cleared.

func (*EquipmentMutation) ClassIDs

func (m *EquipmentMutation) ClassIDs() (ids []int)

ClassIDs returns the "class" edge IDs in the mutation.

func (*EquipmentMutation) ClearArmor

func (m *EquipmentMutation) ClearArmor()

ClearArmor clears the "armor" edge to the Armor entity.

func (*EquipmentMutation) ClearChoice

func (m *EquipmentMutation) ClearChoice()

ClearChoice clears the "choice" edge to the EquipmentChoice entity.

func (*EquipmentMutation) ClearClass

func (m *EquipmentMutation) ClearClass()

ClearClass clears the "class" edge to the Class entity.

func (*EquipmentMutation) ClearCost

func (m *EquipmentMutation) ClearCost()

ClearCost clears the "cost" edge to the EquipmentCost entity.

func (*EquipmentMutation) ClearEdge

func (m *EquipmentMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*EquipmentMutation) ClearEquipmentCategory

func (m *EquipmentMutation) ClearEquipmentCategory()

ClearEquipmentCategory clears the "equipment_category" edge to the EquipmentCategory entity.

func (*EquipmentMutation) ClearField

func (m *EquipmentMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*EquipmentMutation) ClearGear

func (m *EquipmentMutation) ClearGear()

ClearGear clears the "gear" edge to the Gear entity.

func (*EquipmentMutation) ClearTool

func (m *EquipmentMutation) ClearTool()

ClearTool clears the "tool" edge to the Tool entity.

func (*EquipmentMutation) ClearVehicle

func (m *EquipmentMutation) ClearVehicle()

ClearVehicle clears the "vehicle" edge to the Vehicle entity.

func (*EquipmentMutation) ClearWeapon

func (m *EquipmentMutation) ClearWeapon()

ClearWeapon clears the "weapon" edge to the Weapon entity.

func (*EquipmentMutation) ClearWeight

func (m *EquipmentMutation) ClearWeight()

ClearWeight clears the value of the "weight" field.

func (*EquipmentMutation) ClearedEdges

func (m *EquipmentMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*EquipmentMutation) ClearedFields

func (m *EquipmentMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (EquipmentMutation) Client

func (m EquipmentMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*EquipmentMutation) CostCleared

func (m *EquipmentMutation) CostCleared() bool

CostCleared reports if the "cost" edge to the EquipmentCost entity was cleared.

func (*EquipmentMutation) CostID

func (m *EquipmentMutation) CostID() (id int, exists bool)

CostID returns the "cost" edge ID in the mutation.

func (*EquipmentMutation) CostIDs

func (m *EquipmentMutation) CostIDs() (ids []int)

CostIDs returns the "cost" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CostID instead. It exists only for internal usage by the builders.

func (*EquipmentMutation) EdgeCleared

func (m *EquipmentMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*EquipmentMutation) EquipmentCategoryCleared

func (m *EquipmentMutation) EquipmentCategoryCleared() bool

EquipmentCategoryCleared reports if the "equipment_category" edge to the EquipmentCategory entity was cleared.

func (*EquipmentMutation) EquipmentCategoryIDs

func (m *EquipmentMutation) EquipmentCategoryIDs() (ids []int)

EquipmentCategoryIDs returns the "equipment_category" edge IDs in the mutation.

func (*EquipmentMutation) Field

func (m *EquipmentMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*EquipmentMutation) FieldCleared

func (m *EquipmentMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*EquipmentMutation) Fields

func (m *EquipmentMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*EquipmentMutation) GearCleared

func (m *EquipmentMutation) GearCleared() bool

GearCleared reports if the "gear" edge to the Gear entity was cleared.

func (*EquipmentMutation) GearID

func (m *EquipmentMutation) GearID() (id int, exists bool)

GearID returns the "gear" edge ID in the mutation.

func (*EquipmentMutation) GearIDs

func (m *EquipmentMutation) GearIDs() (ids []int)

GearIDs returns the "gear" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GearID instead. It exists only for internal usage by the builders.

func (*EquipmentMutation) ID

func (m *EquipmentMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*EquipmentMutation) IDs

func (m *EquipmentMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*EquipmentMutation) Indx

func (m *EquipmentMutation) Indx() (r string, exists bool)

Indx returns the value of the "indx" field in the mutation.

func (*EquipmentMutation) Name

func (m *EquipmentMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*EquipmentMutation) OldField

func (m *EquipmentMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*EquipmentMutation) OldIndx

func (m *EquipmentMutation) OldIndx(ctx context.Context) (v string, err error)

OldIndx returns the old "indx" field's value of the Equipment entity. If the Equipment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EquipmentMutation) OldName

func (m *EquipmentMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Equipment entity. If the Equipment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EquipmentMutation) OldWeight

func (m *EquipmentMutation) OldWeight(ctx context.Context) (v int, err error)

OldWeight returns the old "weight" field's value of the Equipment entity. If the Equipment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EquipmentMutation) Op

func (m *EquipmentMutation) Op() Op

Op returns the operation name.

func (*EquipmentMutation) RemoveChoiceIDs

func (m *EquipmentMutation) RemoveChoiceIDs(ids ...int)

RemoveChoiceIDs removes the "choice" edge to the EquipmentChoice entity by IDs.

func (*EquipmentMutation) RemoveClasIDs

func (m *EquipmentMutation) RemoveClasIDs(ids ...int)

RemoveClasIDs removes the "class" edge to the Class entity by IDs.

func (*EquipmentMutation) RemoveEquipmentCategoryIDs

func (m *EquipmentMutation) RemoveEquipmentCategoryIDs(ids ...int)

RemoveEquipmentCategoryIDs removes the "equipment_category" edge to the EquipmentCategory entity by IDs.

func (*EquipmentMutation) RemovedChoiceIDs

func (m *EquipmentMutation) RemovedChoiceIDs() (ids []int)

RemovedChoice returns the removed IDs of the "choice" edge to the EquipmentChoice entity.

func (*EquipmentMutation) RemovedClassIDs

func (m *EquipmentMutation) RemovedClassIDs() (ids []int)

RemovedClass returns the removed IDs of the "class" edge to the Class entity.

func (*EquipmentMutation) RemovedEdges

func (m *EquipmentMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*EquipmentMutation) RemovedEquipmentCategoryIDs

func (m *EquipmentMutation) RemovedEquipmentCategoryIDs() (ids []int)

RemovedEquipmentCategory returns the removed IDs of the "equipment_category" edge to the EquipmentCategory entity.

func (*EquipmentMutation) RemovedIDs

func (m *EquipmentMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*EquipmentMutation) ResetArmor

func (m *EquipmentMutation) ResetArmor()

ResetArmor resets all changes to the "armor" edge.

func (*EquipmentMutation) ResetChoice

func (m *EquipmentMutation) ResetChoice()

ResetChoice resets all changes to the "choice" edge.

func (*EquipmentMutation) ResetClass

func (m *EquipmentMutation) ResetClass()

ResetClass resets all changes to the "class" edge.

func (*EquipmentMutation) ResetCost

func (m *EquipmentMutation) ResetCost()

ResetCost resets all changes to the "cost" edge.

func (*EquipmentMutation) ResetEdge

func (m *EquipmentMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*EquipmentMutation) ResetEquipmentCategory

func (m *EquipmentMutation) ResetEquipmentCategory()

ResetEquipmentCategory resets all changes to the "equipment_category" edge.

func (*EquipmentMutation) ResetField

func (m *EquipmentMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*EquipmentMutation) ResetGear

func (m *EquipmentMutation) ResetGear()

ResetGear resets all changes to the "gear" edge.

func (*EquipmentMutation) ResetIndx

func (m *EquipmentMutation) ResetIndx()

ResetIndx resets all changes to the "indx" field.

func (*EquipmentMutation) ResetName

func (m *EquipmentMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*EquipmentMutation) ResetTool

func (m *EquipmentMutation) ResetTool()

ResetTool resets all changes to the "tool" edge.

func (*EquipmentMutation) ResetVehicle

func (m *EquipmentMutation) ResetVehicle()

ResetVehicle resets all changes to the "vehicle" edge.

func (*EquipmentMutation) ResetWeapon

func (m *EquipmentMutation) ResetWeapon()

ResetWeapon resets all changes to the "weapon" edge.

func (*EquipmentMutation) ResetWeight

func (m *EquipmentMutation) ResetWeight()

ResetWeight resets all changes to the "weight" field.

func (*EquipmentMutation) SetArmorID

func (m *EquipmentMutation) SetArmorID(id int)

SetArmorID sets the "armor" edge to the Armor entity by id.

func (*EquipmentMutation) SetCostID

func (m *EquipmentMutation) SetCostID(id int)

SetCostID sets the "cost" edge to the EquipmentCost entity by id.

func (*EquipmentMutation) SetField

func (m *EquipmentMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*EquipmentMutation) SetGearID

func (m *EquipmentMutation) SetGearID(id int)

SetGearID sets the "gear" edge to the Gear entity by id.

func (*EquipmentMutation) SetIndx

func (m *EquipmentMutation) SetIndx(s string)

SetIndx sets the "indx" field.

func (*EquipmentMutation) SetName

func (m *EquipmentMutation) SetName(s string)

SetName sets the "name" field.

func (*EquipmentMutation) SetOp

func (m *EquipmentMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*EquipmentMutation) SetToolID

func (m *EquipmentMutation) SetToolID(id int)

SetToolID sets the "tool" edge to the Tool entity by id.

func (*EquipmentMutation) SetVehicleID

func (m *EquipmentMutation) SetVehicleID(id int)

SetVehicleID sets the "vehicle" edge to the Vehicle entity by id.

func (*EquipmentMutation) SetWeaponID

func (m *EquipmentMutation) SetWeaponID(id int)

SetWeaponID sets the "weapon" edge to the Weapon entity by id.

func (*EquipmentMutation) SetWeight

func (m *EquipmentMutation) SetWeight(i int)

SetWeight sets the "weight" field.

func (*EquipmentMutation) ToolCleared

func (m *EquipmentMutation) ToolCleared() bool

ToolCleared reports if the "tool" edge to the Tool entity was cleared.

func (*EquipmentMutation) ToolID

func (m *EquipmentMutation) ToolID() (id int, exists bool)

ToolID returns the "tool" edge ID in the mutation.

func (*EquipmentMutation) ToolIDs

func (m *EquipmentMutation) ToolIDs() (ids []int)

ToolIDs returns the "tool" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ToolID instead. It exists only for internal usage by the builders.

func (EquipmentMutation) Tx

func (m EquipmentMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*EquipmentMutation) Type

func (m *EquipmentMutation) Type() string

Type returns the node type of this mutation (Equipment).

func (*EquipmentMutation) VehicleCleared

func (m *EquipmentMutation) VehicleCleared() bool

VehicleCleared reports if the "vehicle" edge to the Vehicle entity was cleared.

func (*EquipmentMutation) VehicleID

func (m *EquipmentMutation) VehicleID() (id int, exists bool)

VehicleID returns the "vehicle" edge ID in the mutation.

func (*EquipmentMutation) VehicleIDs

func (m *EquipmentMutation) VehicleIDs() (ids []int)

VehicleIDs returns the "vehicle" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use VehicleID instead. It exists only for internal usage by the builders.

func (*EquipmentMutation) WeaponCleared

func (m *EquipmentMutation) WeaponCleared() bool

WeaponCleared reports if the "weapon" edge to the Weapon entity was cleared.

func (*EquipmentMutation) WeaponID

func (m *EquipmentMutation) WeaponID() (id int, exists bool)

WeaponID returns the "weapon" edge ID in the mutation.

func (*EquipmentMutation) WeaponIDs

func (m *EquipmentMutation) WeaponIDs() (ids []int)

WeaponIDs returns the "weapon" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use WeaponID instead. It exists only for internal usage by the builders.

func (*EquipmentMutation) Weight

func (m *EquipmentMutation) Weight() (r int, exists bool)

Weight returns the value of the "weight" field in the mutation.

func (*EquipmentMutation) WeightCleared

func (m *EquipmentMutation) WeightCleared() bool

WeightCleared returns if the "weight" field was cleared in this mutation.

func (*EquipmentMutation) Where

func (m *EquipmentMutation) Where(ps ...predicate.Equipment)

Where appends a list predicates to the EquipmentMutation builder.

func (*EquipmentMutation) WhereP

func (m *EquipmentMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the EquipmentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type EquipmentOrder

type EquipmentOrder struct {
	Direction OrderDirection       `json:"direction"`
	Field     *EquipmentOrderField `json:"field"`
}

EquipmentOrder defines the ordering of Equipment.

type EquipmentOrderField

type EquipmentOrderField struct {
	// Value extracts the ordering value from the given Equipment.
	Value func(*Equipment) (ent.Value, error)
	// contains filtered or unexported fields
}

EquipmentOrderField defines the ordering field of Equipment.

func (EquipmentOrderField) MarshalGQL

func (f EquipmentOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (EquipmentOrderField) String

func (f EquipmentOrderField) String() string

String implement fmt.Stringer interface.

func (*EquipmentOrderField) UnmarshalGQL

func (f *EquipmentOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type EquipmentPaginateOption

type EquipmentPaginateOption func(*equipmentPager) error

EquipmentPaginateOption enables pagination customization.

func WithEquipmentFilter

func WithEquipmentFilter(filter func(*EquipmentQuery) (*EquipmentQuery, error)) EquipmentPaginateOption

WithEquipmentFilter configures pagination filter.

func WithEquipmentOrder

func WithEquipmentOrder(order *EquipmentOrder) EquipmentPaginateOption

WithEquipmentOrder configures pagination ordering.

type EquipmentQuery

type EquipmentQuery struct {
	// contains filtered or unexported fields
}

EquipmentQuery is the builder for querying Equipment entities.

func (*EquipmentQuery) Aggregate

func (eq *EquipmentQuery) Aggregate(fns ...AggregateFunc) *EquipmentSelect

Aggregate returns a EquipmentSelect configured with the given aggregations.

func (*EquipmentQuery) All

func (eq *EquipmentQuery) All(ctx context.Context) ([]*Equipment, error)

All executes the query and returns a list of EquipmentSlice.

func (*EquipmentQuery) AllX

func (eq *EquipmentQuery) AllX(ctx context.Context) []*Equipment

AllX is like All, but panics if an error occurs.

func (*EquipmentQuery) Clone

func (eq *EquipmentQuery) Clone() *EquipmentQuery

Clone returns a duplicate of the EquipmentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*EquipmentQuery) CollectFields

func (e *EquipmentQuery) CollectFields(ctx context.Context, satisfies ...string) (*EquipmentQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*EquipmentQuery) Count

func (eq *EquipmentQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*EquipmentQuery) CountX

func (eq *EquipmentQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*EquipmentQuery) Exist

func (eq *EquipmentQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*EquipmentQuery) ExistX

func (eq *EquipmentQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*EquipmentQuery) First

func (eq *EquipmentQuery) First(ctx context.Context) (*Equipment, error)

First returns the first Equipment entity from the query. Returns a *NotFoundError when no Equipment was found.

func (*EquipmentQuery) FirstID

func (eq *EquipmentQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Equipment ID from the query. Returns a *NotFoundError when no Equipment ID was found.

func (*EquipmentQuery) FirstIDX

func (eq *EquipmentQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*EquipmentQuery) FirstX

func (eq *EquipmentQuery) FirstX(ctx context.Context) *Equipment

FirstX is like First, but panics if an error occurs.

func (*EquipmentQuery) GroupBy

func (eq *EquipmentQuery) GroupBy(field string, fields ...string) *EquipmentGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Indx string `json:"index"`
	Count int `json:"count,omitempty"`
}

client.Equipment.Query().
	GroupBy(equipment.FieldIndx).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*EquipmentQuery) IDs

func (eq *EquipmentQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Equipment IDs.

func (*EquipmentQuery) IDsX

func (eq *EquipmentQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*EquipmentQuery) Limit

func (eq *EquipmentQuery) Limit(limit int) *EquipmentQuery

Limit the number of records to be returned by this query.

func (*EquipmentQuery) Offset

func (eq *EquipmentQuery) Offset(offset int) *EquipmentQuery

Offset to start from.

func (*EquipmentQuery) Only

func (eq *EquipmentQuery) Only(ctx context.Context) (*Equipment, error)

Only returns a single Equipment entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Equipment entity is found. Returns a *NotFoundError when no Equipment entities are found.

func (*EquipmentQuery) OnlyID

func (eq *EquipmentQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Equipment ID in the query. Returns a *NotSingularError when more than one Equipment ID is found. Returns a *NotFoundError when no entities are found.

func (*EquipmentQuery) OnlyIDX

func (eq *EquipmentQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*EquipmentQuery) OnlyX

func (eq *EquipmentQuery) OnlyX(ctx context.Context) *Equipment

OnlyX is like Only, but panics if an error occurs.

func (*EquipmentQuery) Order

Order specifies how the records should be ordered.

func (*EquipmentQuery) Paginate

func (e *EquipmentQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...EquipmentPaginateOption,
) (*EquipmentConnection, error)

Paginate executes the query and returns a relay based cursor connection to Equipment.

func (*EquipmentQuery) QueryArmor

func (eq *EquipmentQuery) QueryArmor() *ArmorQuery

QueryArmor chains the current query on the "armor" edge.

func (*EquipmentQuery) QueryChoice

func (eq *EquipmentQuery) QueryChoice() *EquipmentChoiceQuery

QueryChoice chains the current query on the "choice" edge.

func (*EquipmentQuery) QueryClass

func (eq *EquipmentQuery) QueryClass() *ClassQuery

QueryClass chains the current query on the "class" edge.

func (*EquipmentQuery) QueryClassEquipment

func (eq *EquipmentQuery) QueryClassEquipment() *ClassEquipmentQuery

QueryClassEquipment chains the current query on the "class_equipment" edge.

func (*EquipmentQuery) QueryCost

func (eq *EquipmentQuery) QueryCost() *EquipmentCostQuery

QueryCost chains the current query on the "cost" edge.

func (*EquipmentQuery) QueryEquipmentCategory

func (eq *EquipmentQuery) QueryEquipmentCategory() *EquipmentCategoryQuery

QueryEquipmentCategory chains the current query on the "equipment_category" edge.

func (*EquipmentQuery) QueryGear

func (eq *EquipmentQuery) QueryGear() *GearQuery

QueryGear chains the current query on the "gear" edge.

func (*EquipmentQuery) QueryTool

func (eq *EquipmentQuery) QueryTool() *ToolQuery

QueryTool chains the current query on the "tool" edge.

func (*EquipmentQuery) QueryVehicle

func (eq *EquipmentQuery) QueryVehicle() *VehicleQuery

QueryVehicle chains the current query on the "vehicle" edge.

func (*EquipmentQuery) QueryWeapon

func (eq *EquipmentQuery) QueryWeapon() *WeaponQuery

QueryWeapon chains the current query on the "weapon" edge.

func (*EquipmentQuery) Select

func (eq *EquipmentQuery) Select(fields ...string) *EquipmentSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Indx string `json:"index"`
}

client.Equipment.Query().
	Select(equipment.FieldIndx).
	Scan(ctx, &v)

func (*EquipmentQuery) Unique

func (eq *EquipmentQuery) Unique(unique bool) *EquipmentQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*EquipmentQuery) Where

Where adds a new predicate for the EquipmentQuery builder.

func (*EquipmentQuery) WithArmor

func (eq *EquipmentQuery) WithArmor(opts ...func(*ArmorQuery)) *EquipmentQuery

WithArmor tells the query-builder to eager-load the nodes that are connected to the "armor" edge. The optional arguments are used to configure the query builder of the edge.

func (*EquipmentQuery) WithChoice

func (eq *EquipmentQuery) WithChoice(opts ...func(*EquipmentChoiceQuery)) *EquipmentQuery

WithChoice tells the query-builder to eager-load the nodes that are connected to the "choice" edge. The optional arguments are used to configure the query builder of the edge.

func (*EquipmentQuery) WithClass

func (eq *EquipmentQuery) WithClass(opts ...func(*ClassQuery)) *EquipmentQuery

WithClass tells the query-builder to eager-load the nodes that are connected to the "class" edge. The optional arguments are used to configure the query builder of the edge.

func (*EquipmentQuery) WithClassEquipment

func (eq *EquipmentQuery) WithClassEquipment(opts ...func(*ClassEquipmentQuery)) *EquipmentQuery

WithClassEquipment tells the query-builder to eager-load the nodes that are connected to the "class_equipment" edge. The optional arguments are used to configure the query builder of the edge.

func (*EquipmentQuery) WithCost

func (eq *EquipmentQuery) WithCost(opts ...func(*EquipmentCostQuery)) *EquipmentQuery

WithCost tells the query-builder to eager-load the nodes that are connected to the "cost" edge. The optional arguments are used to configure the query builder of the edge.

func (*EquipmentQuery) WithEquipmentCategory

func (eq *EquipmentQuery) WithEquipmentCategory(opts ...func(*EquipmentCategoryQuery)) *EquipmentQuery

WithEquipmentCategory tells the query-builder to eager-load the nodes that are connected to the "equipment_category" edge. The optional arguments are used to configure the query builder of the edge.

func (*EquipmentQuery) WithGear

func (eq *EquipmentQuery) WithGear(opts ...func(*GearQuery)) *EquipmentQuery

WithGear tells the query-builder to eager-load the nodes that are connected to the "gear" edge. The optional arguments are used to configure the query builder of the edge.

func (*EquipmentQuery) WithNamedChoice

func (eq *EquipmentQuery) WithNamedChoice(name string, opts ...func(*EquipmentChoiceQuery)) *EquipmentQuery

WithNamedChoice tells the query-builder to eager-load the nodes that are connected to the "choice" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*EquipmentQuery) WithNamedClass

func (eq *EquipmentQuery) WithNamedClass(name string, opts ...func(*ClassQuery)) *EquipmentQuery

WithNamedClass tells the query-builder to eager-load the nodes that are connected to the "class" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*EquipmentQuery) WithNamedClassEquipment

func (eq *EquipmentQuery) WithNamedClassEquipment(name string, opts ...func(*ClassEquipmentQuery)) *EquipmentQuery

WithNamedClassEquipment tells the query-builder to eager-load the nodes that are connected to the "class_equipment" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*EquipmentQuery) WithNamedEquipmentCategory

func (eq *EquipmentQuery) WithNamedEquipmentCategory(name string, opts ...func(*EquipmentCategoryQuery)) *EquipmentQuery

WithNamedEquipmentCategory tells the query-builder to eager-load the nodes that are connected to the "equipment_category" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*EquipmentQuery) WithTool

func (eq *EquipmentQuery) WithTool(opts ...func(*ToolQuery)) *EquipmentQuery

WithTool tells the query-builder to eager-load the nodes that are connected to the "tool" edge. The optional arguments are used to configure the query builder of the edge.

func (*EquipmentQuery) WithVehicle

func (eq *EquipmentQuery) WithVehicle(opts ...func(*VehicleQuery)) *EquipmentQuery

WithVehicle tells the query-builder to eager-load the nodes that are connected to the "vehicle" edge. The optional arguments are used to configure the query builder of the edge.

func (*EquipmentQuery) WithWeapon

func (eq *EquipmentQuery) WithWeapon(opts ...func(*WeaponQuery)) *EquipmentQuery

WithWeapon tells the query-builder to eager-load the nodes that are connected to the "weapon" edge. The optional arguments are used to configure the query builder of the edge.

type EquipmentSelect

type EquipmentSelect struct {
	*EquipmentQuery
	// contains filtered or unexported fields
}

EquipmentSelect is the builder for selecting fields of Equipment entities.

func (*EquipmentSelect) Aggregate

func (es *EquipmentSelect) Aggregate(fns ...AggregateFunc) *EquipmentSelect

Aggregate adds the given aggregation functions to the selector query.

func (*EquipmentSelect) Bool

func (s *EquipmentSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*EquipmentSelect) BoolX

func (s *EquipmentSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*EquipmentSelect) Bools

func (s *EquipmentSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*EquipmentSelect) BoolsX

func (s *EquipmentSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*EquipmentSelect) Float64

func (s *EquipmentSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*EquipmentSelect) Float64X

func (s *EquipmentSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*EquipmentSelect) Float64s

func (s *EquipmentSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*EquipmentSelect) Float64sX

func (s *EquipmentSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EquipmentSelect) Int

func (s *EquipmentSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*EquipmentSelect) IntX

func (s *EquipmentSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*EquipmentSelect) Ints

func (s *EquipmentSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*EquipmentSelect) IntsX

func (s *EquipmentSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EquipmentSelect) Scan

func (es *EquipmentSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*EquipmentSelect) ScanX

func (s *EquipmentSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*EquipmentSelect) String

func (s *EquipmentSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*EquipmentSelect) StringX

func (s *EquipmentSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*EquipmentSelect) Strings

func (s *EquipmentSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*EquipmentSelect) StringsX

func (s *EquipmentSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EquipmentSlice

type EquipmentSlice []*Equipment

EquipmentSlice is a parsable slice of Equipment.

type EquipmentUpdate

type EquipmentUpdate struct {
	// contains filtered or unexported fields
}

EquipmentUpdate is the builder for updating Equipment entities.

func (*EquipmentUpdate) AddChoice

func (eu *EquipmentUpdate) AddChoice(e ...*EquipmentChoice) *EquipmentUpdate

AddChoice adds the "choice" edges to the EquipmentChoice entity.

func (*EquipmentUpdate) AddChoiceIDs

func (eu *EquipmentUpdate) AddChoiceIDs(ids ...int) *EquipmentUpdate

AddChoiceIDs adds the "choice" edge to the EquipmentChoice entity by IDs.

func (*EquipmentUpdate) AddClasIDs

func (eu *EquipmentUpdate) AddClasIDs(ids ...int) *EquipmentUpdate

AddClasIDs adds the "class" edge to the Class entity by IDs.

func (*EquipmentUpdate) AddClass

func (eu *EquipmentUpdate) AddClass(c ...*Class) *EquipmentUpdate

AddClass adds the "class" edges to the Class entity.

func (*EquipmentUpdate) AddEquipmentCategory

func (eu *EquipmentUpdate) AddEquipmentCategory(e ...*EquipmentCategory) *EquipmentUpdate

AddEquipmentCategory adds the "equipment_category" edges to the EquipmentCategory entity.

func (*EquipmentUpdate) AddEquipmentCategoryIDs

func (eu *EquipmentUpdate) AddEquipmentCategoryIDs(ids ...int) *EquipmentUpdate

AddEquipmentCategoryIDs adds the "equipment_category" edge to the EquipmentCategory entity by IDs.

func (*EquipmentUpdate) AddWeight

func (eu *EquipmentUpdate) AddWeight(i int) *EquipmentUpdate

AddWeight adds i to the "weight" field.

func (*EquipmentUpdate) ClearArmor

func (eu *EquipmentUpdate) ClearArmor() *EquipmentUpdate

ClearArmor clears the "armor" edge to the Armor entity.

func (*EquipmentUpdate) ClearChoice

func (eu *EquipmentUpdate) ClearChoice() *EquipmentUpdate

ClearChoice clears all "choice" edges to the EquipmentChoice entity.

func (*EquipmentUpdate) ClearClass

func (eu *EquipmentUpdate) ClearClass() *EquipmentUpdate

ClearClass clears all "class" edges to the Class entity.

func (*EquipmentUpdate) ClearCost

func (eu *EquipmentUpdate) ClearCost() *EquipmentUpdate

ClearCost clears the "cost" edge to the EquipmentCost entity.

func (*EquipmentUpdate) ClearEquipmentCategory

func (eu *EquipmentUpdate) ClearEquipmentCategory() *EquipmentUpdate

ClearEquipmentCategory clears all "equipment_category" edges to the EquipmentCategory entity.

func (*EquipmentUpdate) ClearGear

func (eu *EquipmentUpdate) ClearGear() *EquipmentUpdate

ClearGear clears the "gear" edge to the Gear entity.

func (*EquipmentUpdate) ClearTool

func (eu *EquipmentUpdate) ClearTool() *EquipmentUpdate

ClearTool clears the "tool" edge to the Tool entity.

func (*EquipmentUpdate) ClearVehicle

func (eu *EquipmentUpdate) ClearVehicle() *EquipmentUpdate

ClearVehicle clears the "vehicle" edge to the Vehicle entity.

func (*EquipmentUpdate) ClearWeapon

func (eu *EquipmentUpdate) ClearWeapon() *EquipmentUpdate

ClearWeapon clears the "weapon" edge to the Weapon entity.

func (*EquipmentUpdate) ClearWeight

func (eu *EquipmentUpdate) ClearWeight() *EquipmentUpdate

ClearWeight clears the value of the "weight" field.

func (*EquipmentUpdate) Exec

func (eu *EquipmentUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*EquipmentUpdate) ExecX

func (eu *EquipmentUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentUpdate) Mutation

func (eu *EquipmentUpdate) Mutation() *EquipmentMutation

Mutation returns the EquipmentMutation object of the builder.

func (*EquipmentUpdate) RemoveChoice

func (eu *EquipmentUpdate) RemoveChoice(e ...*EquipmentChoice) *EquipmentUpdate

RemoveChoice removes "choice" edges to EquipmentChoice entities.

func (*EquipmentUpdate) RemoveChoiceIDs

func (eu *EquipmentUpdate) RemoveChoiceIDs(ids ...int) *EquipmentUpdate

RemoveChoiceIDs removes the "choice" edge to EquipmentChoice entities by IDs.

func (*EquipmentUpdate) RemoveClasIDs

func (eu *EquipmentUpdate) RemoveClasIDs(ids ...int) *EquipmentUpdate

RemoveClasIDs removes the "class" edge to Class entities by IDs.

func (*EquipmentUpdate) RemoveClass

func (eu *EquipmentUpdate) RemoveClass(c ...*Class) *EquipmentUpdate

RemoveClass removes "class" edges to Class entities.

func (*EquipmentUpdate) RemoveEquipmentCategory

func (eu *EquipmentUpdate) RemoveEquipmentCategory(e ...*EquipmentCategory) *EquipmentUpdate

RemoveEquipmentCategory removes "equipment_category" edges to EquipmentCategory entities.

func (*EquipmentUpdate) RemoveEquipmentCategoryIDs

func (eu *EquipmentUpdate) RemoveEquipmentCategoryIDs(ids ...int) *EquipmentUpdate

RemoveEquipmentCategoryIDs removes the "equipment_category" edge to EquipmentCategory entities by IDs.

func (*EquipmentUpdate) Save

func (eu *EquipmentUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*EquipmentUpdate) SaveX

func (eu *EquipmentUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*EquipmentUpdate) SetArmor

func (eu *EquipmentUpdate) SetArmor(a *Armor) *EquipmentUpdate

SetArmor sets the "armor" edge to the Armor entity.

func (*EquipmentUpdate) SetArmorID

func (eu *EquipmentUpdate) SetArmorID(id int) *EquipmentUpdate

SetArmorID sets the "armor" edge to the Armor entity by ID.

func (*EquipmentUpdate) SetCost

SetCost sets the "cost" edge to the EquipmentCost entity.

func (*EquipmentUpdate) SetCostID

func (eu *EquipmentUpdate) SetCostID(id int) *EquipmentUpdate

SetCostID sets the "cost" edge to the EquipmentCost entity by ID.

func (*EquipmentUpdate) SetGear

func (eu *EquipmentUpdate) SetGear(g *Gear) *EquipmentUpdate

SetGear sets the "gear" edge to the Gear entity.

func (*EquipmentUpdate) SetGearID

func (eu *EquipmentUpdate) SetGearID(id int) *EquipmentUpdate

SetGearID sets the "gear" edge to the Gear entity by ID.

func (*EquipmentUpdate) SetIndx

func (eu *EquipmentUpdate) SetIndx(s string) *EquipmentUpdate

SetIndx sets the "indx" field.

func (*EquipmentUpdate) SetName

func (eu *EquipmentUpdate) SetName(s string) *EquipmentUpdate

SetName sets the "name" field.

func (*EquipmentUpdate) SetNillableArmorID

func (eu *EquipmentUpdate) SetNillableArmorID(id *int) *EquipmentUpdate

SetNillableArmorID sets the "armor" edge to the Armor entity by ID if the given value is not nil.

func (*EquipmentUpdate) SetNillableCostID

func (eu *EquipmentUpdate) SetNillableCostID(id *int) *EquipmentUpdate

SetNillableCostID sets the "cost" edge to the EquipmentCost entity by ID if the given value is not nil.

func (*EquipmentUpdate) SetNillableGearID

func (eu *EquipmentUpdate) SetNillableGearID(id *int) *EquipmentUpdate

SetNillableGearID sets the "gear" edge to the Gear entity by ID if the given value is not nil.

func (*EquipmentUpdate) SetNillableToolID

func (eu *EquipmentUpdate) SetNillableToolID(id *int) *EquipmentUpdate

SetNillableToolID sets the "tool" edge to the Tool entity by ID if the given value is not nil.

func (*EquipmentUpdate) SetNillableVehicleID

func (eu *EquipmentUpdate) SetNillableVehicleID(id *int) *EquipmentUpdate

SetNillableVehicleID sets the "vehicle" edge to the Vehicle entity by ID if the given value is not nil.

func (*EquipmentUpdate) SetNillableWeaponID

func (eu *EquipmentUpdate) SetNillableWeaponID(id *int) *EquipmentUpdate

SetNillableWeaponID sets the "weapon" edge to the Weapon entity by ID if the given value is not nil.

func (*EquipmentUpdate) SetNillableWeight

func (eu *EquipmentUpdate) SetNillableWeight(i *int) *EquipmentUpdate

SetNillableWeight sets the "weight" field if the given value is not nil.

func (*EquipmentUpdate) SetTool

func (eu *EquipmentUpdate) SetTool(t *Tool) *EquipmentUpdate

SetTool sets the "tool" edge to the Tool entity.

func (*EquipmentUpdate) SetToolID

func (eu *EquipmentUpdate) SetToolID(id int) *EquipmentUpdate

SetToolID sets the "tool" edge to the Tool entity by ID.

func (*EquipmentUpdate) SetVehicle

func (eu *EquipmentUpdate) SetVehicle(v *Vehicle) *EquipmentUpdate

SetVehicle sets the "vehicle" edge to the Vehicle entity.

func (*EquipmentUpdate) SetVehicleID

func (eu *EquipmentUpdate) SetVehicleID(id int) *EquipmentUpdate

SetVehicleID sets the "vehicle" edge to the Vehicle entity by ID.

func (*EquipmentUpdate) SetWeapon

func (eu *EquipmentUpdate) SetWeapon(w *Weapon) *EquipmentUpdate

SetWeapon sets the "weapon" edge to the Weapon entity.

func (*EquipmentUpdate) SetWeaponID

func (eu *EquipmentUpdate) SetWeaponID(id int) *EquipmentUpdate

SetWeaponID sets the "weapon" edge to the Weapon entity by ID.

func (*EquipmentUpdate) SetWeight

func (eu *EquipmentUpdate) SetWeight(i int) *EquipmentUpdate

SetWeight sets the "weight" field.

func (*EquipmentUpdate) Where

Where appends a list predicates to the EquipmentUpdate builder.

type EquipmentUpdateOne

type EquipmentUpdateOne struct {
	// contains filtered or unexported fields
}

EquipmentUpdateOne is the builder for updating a single Equipment entity.

func (*EquipmentUpdateOne) AddChoice

func (euo *EquipmentUpdateOne) AddChoice(e ...*EquipmentChoice) *EquipmentUpdateOne

AddChoice adds the "choice" edges to the EquipmentChoice entity.

func (*EquipmentUpdateOne) AddChoiceIDs

func (euo *EquipmentUpdateOne) AddChoiceIDs(ids ...int) *EquipmentUpdateOne

AddChoiceIDs adds the "choice" edge to the EquipmentChoice entity by IDs.

func (*EquipmentUpdateOne) AddClasIDs

func (euo *EquipmentUpdateOne) AddClasIDs(ids ...int) *EquipmentUpdateOne

AddClasIDs adds the "class" edge to the Class entity by IDs.

func (*EquipmentUpdateOne) AddClass

func (euo *EquipmentUpdateOne) AddClass(c ...*Class) *EquipmentUpdateOne

AddClass adds the "class" edges to the Class entity.

func (*EquipmentUpdateOne) AddEquipmentCategory

func (euo *EquipmentUpdateOne) AddEquipmentCategory(e ...*EquipmentCategory) *EquipmentUpdateOne

AddEquipmentCategory adds the "equipment_category" edges to the EquipmentCategory entity.

func (*EquipmentUpdateOne) AddEquipmentCategoryIDs

func (euo *EquipmentUpdateOne) AddEquipmentCategoryIDs(ids ...int) *EquipmentUpdateOne

AddEquipmentCategoryIDs adds the "equipment_category" edge to the EquipmentCategory entity by IDs.

func (*EquipmentUpdateOne) AddWeight

func (euo *EquipmentUpdateOne) AddWeight(i int) *EquipmentUpdateOne

AddWeight adds i to the "weight" field.

func (*EquipmentUpdateOne) ClearArmor

func (euo *EquipmentUpdateOne) ClearArmor() *EquipmentUpdateOne

ClearArmor clears the "armor" edge to the Armor entity.

func (*EquipmentUpdateOne) ClearChoice

func (euo *EquipmentUpdateOne) ClearChoice() *EquipmentUpdateOne

ClearChoice clears all "choice" edges to the EquipmentChoice entity.

func (*EquipmentUpdateOne) ClearClass

func (euo *EquipmentUpdateOne) ClearClass() *EquipmentUpdateOne

ClearClass clears all "class" edges to the Class entity.

func (*EquipmentUpdateOne) ClearCost

func (euo *EquipmentUpdateOne) ClearCost() *EquipmentUpdateOne

ClearCost clears the "cost" edge to the EquipmentCost entity.

func (*EquipmentUpdateOne) ClearEquipmentCategory

func (euo *EquipmentUpdateOne) ClearEquipmentCategory() *EquipmentUpdateOne

ClearEquipmentCategory clears all "equipment_category" edges to the EquipmentCategory entity.

func (*EquipmentUpdateOne) ClearGear

func (euo *EquipmentUpdateOne) ClearGear() *EquipmentUpdateOne

ClearGear clears the "gear" edge to the Gear entity.

func (*EquipmentUpdateOne) ClearTool

func (euo *EquipmentUpdateOne) ClearTool() *EquipmentUpdateOne

ClearTool clears the "tool" edge to the Tool entity.

func (*EquipmentUpdateOne) ClearVehicle

func (euo *EquipmentUpdateOne) ClearVehicle() *EquipmentUpdateOne

ClearVehicle clears the "vehicle" edge to the Vehicle entity.

func (*EquipmentUpdateOne) ClearWeapon

func (euo *EquipmentUpdateOne) ClearWeapon() *EquipmentUpdateOne

ClearWeapon clears the "weapon" edge to the Weapon entity.

func (*EquipmentUpdateOne) ClearWeight

func (euo *EquipmentUpdateOne) ClearWeight() *EquipmentUpdateOne

ClearWeight clears the value of the "weight" field.

func (*EquipmentUpdateOne) Exec

func (euo *EquipmentUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*EquipmentUpdateOne) ExecX

func (euo *EquipmentUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EquipmentUpdateOne) Mutation

func (euo *EquipmentUpdateOne) Mutation() *EquipmentMutation

Mutation returns the EquipmentMutation object of the builder.

func (*EquipmentUpdateOne) RemoveChoice

func (euo *EquipmentUpdateOne) RemoveChoice(e ...*EquipmentChoice) *EquipmentUpdateOne

RemoveChoice removes "choice" edges to EquipmentChoice entities.

func (*EquipmentUpdateOne) RemoveChoiceIDs

func (euo *EquipmentUpdateOne) RemoveChoiceIDs(ids ...int) *EquipmentUpdateOne

RemoveChoiceIDs removes the "choice" edge to EquipmentChoice entities by IDs.

func (*EquipmentUpdateOne) RemoveClasIDs

func (euo *EquipmentUpdateOne) RemoveClasIDs(ids ...int) *EquipmentUpdateOne

RemoveClasIDs removes the "class" edge to Class entities by IDs.

func (*EquipmentUpdateOne) RemoveClass

func (euo *EquipmentUpdateOne) RemoveClass(c ...*Class) *EquipmentUpdateOne

RemoveClass removes "class" edges to Class entities.

func (*EquipmentUpdateOne) RemoveEquipmentCategory

func (euo *EquipmentUpdateOne) RemoveEquipmentCategory(e ...*EquipmentCategory) *EquipmentUpdateOne

RemoveEquipmentCategory removes "equipment_category" edges to EquipmentCategory entities.

func (*EquipmentUpdateOne) RemoveEquipmentCategoryIDs

func (euo *EquipmentUpdateOne) RemoveEquipmentCategoryIDs(ids ...int) *EquipmentUpdateOne

RemoveEquipmentCategoryIDs removes the "equipment_category" edge to EquipmentCategory entities by IDs.

func (*EquipmentUpdateOne) Save

func (euo *EquipmentUpdateOne) Save(ctx context.Context) (*Equipment, error)

Save executes the query and returns the updated Equipment entity.

func (*EquipmentUpdateOne) SaveX

func (euo *EquipmentUpdateOne) SaveX(ctx context.Context) *Equipment

SaveX is like Save, but panics if an error occurs.

func (*EquipmentUpdateOne) Select

func (euo *EquipmentUpdateOne) Select(field string, fields ...string) *EquipmentUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*EquipmentUpdateOne) SetArmor

func (euo *EquipmentUpdateOne) SetArmor(a *Armor) *EquipmentUpdateOne

SetArmor sets the "armor" edge to the Armor entity.

func (*EquipmentUpdateOne) SetArmorID

func (euo *EquipmentUpdateOne) SetArmorID(id int) *EquipmentUpdateOne

SetArmorID sets the "armor" edge to the Armor entity by ID.

func (*EquipmentUpdateOne) SetCost

SetCost sets the "cost" edge to the EquipmentCost entity.

func (*EquipmentUpdateOne) SetCostID

func (euo *EquipmentUpdateOne) SetCostID(id int) *EquipmentUpdateOne

SetCostID sets the "cost" edge to the EquipmentCost entity by ID.

func (*EquipmentUpdateOne) SetGear

func (euo *EquipmentUpdateOne) SetGear(g *Gear) *EquipmentUpdateOne

SetGear sets the "gear" edge to the Gear entity.

func (*EquipmentUpdateOne) SetGearID

func (euo *EquipmentUpdateOne) SetGearID(id int) *EquipmentUpdateOne

SetGearID sets the "gear" edge to the Gear entity by ID.

func (*EquipmentUpdateOne) SetIndx

func (euo *EquipmentUpdateOne) SetIndx(s string) *EquipmentUpdateOne

SetIndx sets the "indx" field.

func (*EquipmentUpdateOne) SetName

func (euo *EquipmentUpdateOne) SetName(s string) *EquipmentUpdateOne

SetName sets the "name" field.

func (*EquipmentUpdateOne) SetNillableArmorID

func (euo *EquipmentUpdateOne) SetNillableArmorID(id *int) *EquipmentUpdateOne

SetNillableArmorID sets the "armor" edge to the Armor entity by ID if the given value is not nil.

func (*EquipmentUpdateOne) SetNillableCostID

func (euo *EquipmentUpdateOne) SetNillableCostID(id *int) *EquipmentUpdateOne

SetNillableCostID sets the "cost" edge to the EquipmentCost entity by ID if the given value is not nil.

func (*EquipmentUpdateOne) SetNillableGearID

func (euo *EquipmentUpdateOne) SetNillableGearID(id *int) *EquipmentUpdateOne

SetNillableGearID sets the "gear" edge to the Gear entity by ID if the given value is not nil.

func (*EquipmentUpdateOne) SetNillableToolID

func (euo *EquipmentUpdateOne) SetNillableToolID(id *int) *EquipmentUpdateOne

SetNillableToolID sets the "tool" edge to the Tool entity by ID if the given value is not nil.

func (*EquipmentUpdateOne) SetNillableVehicleID

func (euo *EquipmentUpdateOne) SetNillableVehicleID(id *int) *EquipmentUpdateOne

SetNillableVehicleID sets the "vehicle" edge to the Vehicle entity by ID if the given value is not nil.

func (*EquipmentUpdateOne) SetNillableWeaponID

func (euo *EquipmentUpdateOne) SetNillableWeaponID(id *int) *EquipmentUpdateOne

SetNillableWeaponID sets the "weapon" edge to the Weapon entity by ID if the given value is not nil.

func (*EquipmentUpdateOne) SetNillableWeight

func (euo *EquipmentUpdateOne) SetNillableWeight(i *int) *EquipmentUpdateOne

SetNillableWeight sets the "weight" field if the given value is not nil.

func (*EquipmentUpdateOne) SetTool

func (euo *EquipmentUpdateOne) SetTool(t *Tool) *EquipmentUpdateOne

SetTool sets the "tool" edge to the Tool entity.

func (*EquipmentUpdateOne) SetToolID

func (euo *EquipmentUpdateOne) SetToolID(id int) *EquipmentUpdateOne

SetToolID sets the "tool" edge to the Tool entity by ID.

func (*EquipmentUpdateOne) SetVehicle

func (euo *EquipmentUpdateOne) SetVehicle(v *Vehicle) *EquipmentUpdateOne

SetVehicle sets the "vehicle" edge to the Vehicle entity.

func (*EquipmentUpdateOne) SetVehicleID

func (euo *EquipmentUpdateOne) SetVehicleID(id int) *EquipmentUpdateOne

SetVehicleID sets the "vehicle" edge to the Vehicle entity by ID.

func (*EquipmentUpdateOne) SetWeapon

func (euo *EquipmentUpdateOne) SetWeapon(w *Weapon) *EquipmentUpdateOne

SetWeapon sets the "weapon" edge to the Weapon entity.

func (*EquipmentUpdateOne) SetWeaponID

func (euo *EquipmentUpdateOne) SetWeaponID(id int) *EquipmentUpdateOne

SetWeaponID sets the "weapon" edge to the Weapon entity by ID.

func (*EquipmentUpdateOne) SetWeight

func (euo *EquipmentUpdateOne) SetWeight(i int) *EquipmentUpdateOne

SetWeight sets the "weight" field.

func (*EquipmentUpdateOne) Where

Where appends a list predicates to the EquipmentUpdate builder.

type EquipmentWhereInput

type EquipmentWhereInput struct {
	Predicates []predicate.Equipment  `json:"-"`
	Not        *EquipmentWhereInput   `json:"not,omitempty"`
	Or         []*EquipmentWhereInput `json:"or,omitempty"`
	And        []*EquipmentWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "indx" field predicates.
	Indx             *string  `json:"indx,omitempty"`
	IndxNEQ          *string  `json:"indxNEQ,omitempty"`
	IndxIn           []string `json:"indxIn,omitempty"`
	IndxNotIn        []string `json:"indxNotIn,omitempty"`
	IndxGT           *string  `json:"indxGT,omitempty"`
	IndxGTE          *string  `json:"indxGTE,omitempty"`
	IndxLT           *string  `json:"indxLT,omitempty"`
	IndxLTE          *string  `json:"indxLTE,omitempty"`
	IndxContains     *string  `json:"indxContains,omitempty"`
	IndxHasPrefix    *string  `json:"indxHasPrefix,omitempty"`
	IndxHasSuffix    *string  `json:"indxHasSuffix,omitempty"`
	IndxEqualFold    *string  `json:"indxEqualFold,omitempty"`
	IndxContainsFold *string  `json:"indxContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "weight" field predicates.
	Weight       *int  `json:"weight,omitempty"`
	WeightNEQ    *int  `json:"weightNEQ,omitempty"`
	WeightIn     []int `json:"weightIn,omitempty"`
	WeightNotIn  []int `json:"weightNotIn,omitempty"`
	WeightGT     *int  `json:"weightGT,omitempty"`
	WeightGTE    *int  `json:"weightGTE,omitempty"`
	WeightLT     *int  `json:"weightLT,omitempty"`
	WeightLTE    *int  `json:"weightLTE,omitempty"`
	WeightIsNil  bool  `json:"weightIsNil,omitempty"`
	WeightNotNil bool  `json:"weightNotNil,omitempty"`

	// "equipment_category" edge predicates.
	HasEquipmentCategory     *bool                          `json:"hasEquipmentCategory,omitempty"`
	HasEquipmentCategoryWith []*EquipmentCategoryWhereInput `json:"hasEquipmentCategoryWith,omitempty"`

	// "cost" edge predicates.
	HasCost     *bool                      `json:"hasCost,omitempty"`
	HasCostWith []*EquipmentCostWhereInput `json:"hasCostWith,omitempty"`

	// "weapon" edge predicates.
	HasWeapon     *bool               `json:"hasWeapon,omitempty"`
	HasWeaponWith []*WeaponWhereInput `json:"hasWeaponWith,omitempty"`

	// "armor" edge predicates.
	HasArmor     *bool              `json:"hasArmor,omitempty"`
	HasArmorWith []*ArmorWhereInput `json:"hasArmorWith,omitempty"`

	// "gear" edge predicates.
	HasGear     *bool             `json:"hasGear,omitempty"`
	HasGearWith []*GearWhereInput `json:"hasGearWith,omitempty"`

	// "tool" edge predicates.
	HasTool     *bool             `json:"hasTool,omitempty"`
	HasToolWith []*ToolWhereInput `json:"hasToolWith,omitempty"`

	// "vehicle" edge predicates.
	HasVehicle     *bool                `json:"hasVehicle,omitempty"`
	HasVehicleWith []*VehicleWhereInput `json:"hasVehicleWith,omitempty"`

	// "class" edge predicates.
	HasClass     *bool              `json:"hasClass,omitempty"`
	HasClassWith []*ClassWhereInput `json:"hasClassWith,omitempty"`

	// "choice" edge predicates.
	HasChoice     *bool                        `json:"hasChoice,omitempty"`
	HasChoiceWith []*EquipmentChoiceWhereInput `json:"hasChoiceWith,omitempty"`
}

EquipmentWhereInput represents a where input for filtering Equipment queries.

func (*EquipmentWhereInput) AddPredicates

func (i *EquipmentWhereInput) AddPredicates(predicates ...predicate.Equipment)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*EquipmentWhereInput) Filter

Filter applies the EquipmentWhereInput filter on the EquipmentQuery builder.

func (*EquipmentWhereInput) P

P returns a predicate for filtering equipmentslice. An error is returned if the input is empty or invalid.

type Field

type Field struct {
	Type  string `json:"type,omitempty"`  // field type.
	Name  string `json:"name,omitempty"`  // field name (as in struct).
	Value string `json:"value,omitempty"` // stringified value.
}

Field of a node.

type Gear

type Gear struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Indx holds the value of the "indx" field.
	Indx string `json:"index"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// GearCategory holds the value of the "gear_category" field.
	GearCategory gear.GearCategory `json:"gear_category,omitempty"`
	// Quantity holds the value of the "quantity" field.
	Quantity int `json:"quantity,omitempty"`
	// EquipmentID holds the value of the "equipment_id" field.
	EquipmentID int `json:"equipment_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the GearQuery when eager-loading is set.
	Edges GearEdges `json:"-"`
	// contains filtered or unexported fields
}

Gear is the model entity for the Gear schema.

func (*Gear) Equipment

func (ge *Gear) Equipment(ctx context.Context) (*Equipment, error)

func (*Gear) IsNode

func (n *Gear) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Gear) MarshalJSON

func (ge *Gear) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Gear) Node

func (ge *Gear) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*Gear) QueryEquipment

func (ge *Gear) QueryEquipment() *EquipmentQuery

QueryEquipment queries the "equipment" edge of the Gear entity.

func (*Gear) String

func (ge *Gear) String() string

String implements the fmt.Stringer.

func (*Gear) ToEdge

func (ge *Gear) ToEdge(order *GearOrder) *GearEdge

ToEdge converts Gear into GearEdge.

func (*Gear) UnmarshalJSON

func (ge *Gear) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*Gear) Unwrap

func (ge *Gear) Unwrap() *Gear

Unwrap unwraps the Gear entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Gear) Update

func (ge *Gear) Update() *GearUpdateOne

Update returns a builder for updating this Gear. Note that you need to call Gear.Unwrap() before calling this method if this Gear was returned from a transaction, and the transaction was committed or rolled back.

func (*Gear) Value

func (ge *Gear) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Gear. This includes values selected through modifiers, order, etc.

type GearClient

type GearClient struct {
	// contains filtered or unexported fields
}

GearClient is a client for the Gear schema.

func NewGearClient

func NewGearClient(c config) *GearClient

NewGearClient returns a client for the Gear from the given config.

func (*GearClient) Create

func (c *GearClient) Create() *GearCreate

Create returns a builder for creating a Gear entity.

func (*GearClient) CreateBulk

func (c *GearClient) CreateBulk(builders ...*GearCreate) *GearCreateBulk

CreateBulk returns a builder for creating a bulk of Gear entities.

func (*GearClient) Delete

func (c *GearClient) Delete() *GearDelete

Delete returns a delete builder for Gear.

func (*GearClient) DeleteOne

func (c *GearClient) DeleteOne(ge *Gear) *GearDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*GearClient) DeleteOneID

func (c *GearClient) DeleteOneID(id int) *GearDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*GearClient) Get

func (c *GearClient) Get(ctx context.Context, id int) (*Gear, error)

Get returns a Gear entity by its id.

func (*GearClient) GetX

func (c *GearClient) GetX(ctx context.Context, id int) *Gear

GetX is like Get, but panics if an error occurs.

func (*GearClient) Hooks

func (c *GearClient) Hooks() []Hook

Hooks returns the client hooks.

func (*GearClient) Intercept

func (c *GearClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `gear.Intercept(f(g(h())))`.

func (*GearClient) Interceptors

func (c *GearClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*GearClient) Query

func (c *GearClient) Query() *GearQuery

Query returns a query builder for Gear.

func (*GearClient) QueryEquipment

func (c *GearClient) QueryEquipment(ge *Gear) *EquipmentQuery

QueryEquipment queries the equipment edge of a Gear.

func (*GearClient) Update

func (c *GearClient) Update() *GearUpdate

Update returns an update builder for Gear.

func (*GearClient) UpdateOne

func (c *GearClient) UpdateOne(ge *Gear) *GearUpdateOne

UpdateOne returns an update builder for the given entity.

func (*GearClient) UpdateOneID

func (c *GearClient) UpdateOneID(id int) *GearUpdateOne

UpdateOneID returns an update builder for the given id.

func (*GearClient) Use

func (c *GearClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `gear.Hooks(f(g(h())))`.

type GearConnection

type GearConnection struct {
	Edges      []*GearEdge `json:"edges"`
	PageInfo   PageInfo    `json:"pageInfo"`
	TotalCount int         `json:"totalCount"`
}

GearConnection is the connection containing edges to Gear.

type GearCreate

type GearCreate struct {
	// contains filtered or unexported fields
}

GearCreate is the builder for creating a Gear entity.

func (*GearCreate) Exec

func (gc *GearCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*GearCreate) ExecX

func (gc *GearCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GearCreate) Mutation

func (gc *GearCreate) Mutation() *GearMutation

Mutation returns the GearMutation object of the builder.

func (*GearCreate) Save

func (gc *GearCreate) Save(ctx context.Context) (*Gear, error)

Save creates the Gear in the database.

func (*GearCreate) SaveX

func (gc *GearCreate) SaveX(ctx context.Context) *Gear

SaveX calls Save and panics if Save returns an error.

func (*GearCreate) SetEquipment

func (gc *GearCreate) SetEquipment(e *Equipment) *GearCreate

SetEquipment sets the "equipment" edge to the Equipment entity.

func (*GearCreate) SetEquipmentID

func (gc *GearCreate) SetEquipmentID(i int) *GearCreate

SetEquipmentID sets the "equipment_id" field.

func (*GearCreate) SetGear

func (gc *GearCreate) SetGear(input *Gear) *GearCreate

func (*GearCreate) SetGearCategory

func (gc *GearCreate) SetGearCategory(value gear.GearCategory) *GearCreate

SetGearCategory sets the "gear_category" field.

func (*GearCreate) SetIndx

func (gc *GearCreate) SetIndx(s string) *GearCreate

SetIndx sets the "indx" field.

func (*GearCreate) SetName

func (gc *GearCreate) SetName(s string) *GearCreate

SetName sets the "name" field.

func (*GearCreate) SetNillableGearCategory

func (gc *GearCreate) SetNillableGearCategory(value *gear.GearCategory) *GearCreate

SetNillableGearCategory sets the "gear_category" field if the given value is not nil.

func (*GearCreate) SetNillableQuantity

func (gc *GearCreate) SetNillableQuantity(i *int) *GearCreate

SetNillableQuantity sets the "quantity" field if the given value is not nil.

func (*GearCreate) SetQuantity

func (gc *GearCreate) SetQuantity(i int) *GearCreate

SetQuantity sets the "quantity" field.

type GearCreateBulk

type GearCreateBulk struct {
	// contains filtered or unexported fields
}

GearCreateBulk is the builder for creating many Gear entities in bulk.

func (*GearCreateBulk) Exec

func (gcb *GearCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*GearCreateBulk) ExecX

func (gcb *GearCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GearCreateBulk) Save

func (gcb *GearCreateBulk) Save(ctx context.Context) ([]*Gear, error)

Save creates the Gear entities in the database.

func (*GearCreateBulk) SaveX

func (gcb *GearCreateBulk) SaveX(ctx context.Context) []*Gear

SaveX is like Save, but panics if an error occurs.

type GearDelete

type GearDelete struct {
	// contains filtered or unexported fields
}

GearDelete is the builder for deleting a Gear entity.

func (*GearDelete) Exec

func (gd *GearDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*GearDelete) ExecX

func (gd *GearDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*GearDelete) Where

func (gd *GearDelete) Where(ps ...predicate.Gear) *GearDelete

Where appends a list predicates to the GearDelete builder.

type GearDeleteOne

type GearDeleteOne struct {
	// contains filtered or unexported fields
}

GearDeleteOne is the builder for deleting a single Gear entity.

func (*GearDeleteOne) Exec

func (gdo *GearDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*GearDeleteOne) ExecX

func (gdo *GearDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GearDeleteOne) Where

func (gdo *GearDeleteOne) Where(ps ...predicate.Gear) *GearDeleteOne

Where appends a list predicates to the GearDelete builder.

type GearEdge

type GearEdge struct {
	Node   *Gear  `json:"node"`
	Cursor Cursor `json:"cursor"`
}

GearEdge is the edge representation of Gear.

type GearEdges

type GearEdges struct {
	// Equipment holds the value of the equipment edge.
	Equipment *Equipment `json:"equipment,omitempty"`
	// contains filtered or unexported fields
}

GearEdges holds the relations/edges for other nodes in the graph.

func (GearEdges) EquipmentOrErr

func (e GearEdges) EquipmentOrErr() (*Equipment, error)

EquipmentOrErr returns the Equipment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type GearGroupBy

type GearGroupBy struct {
	// contains filtered or unexported fields
}

GearGroupBy is the group-by builder for Gear entities.

func (*GearGroupBy) Aggregate

func (ggb *GearGroupBy) Aggregate(fns ...AggregateFunc) *GearGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*GearGroupBy) Bool

func (s *GearGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*GearGroupBy) BoolX

func (s *GearGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*GearGroupBy) Bools

func (s *GearGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*GearGroupBy) BoolsX

func (s *GearGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*GearGroupBy) Float64

func (s *GearGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*GearGroupBy) Float64X

func (s *GearGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*GearGroupBy) Float64s

func (s *GearGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*GearGroupBy) Float64sX

func (s *GearGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*GearGroupBy) Int

func (s *GearGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*GearGroupBy) IntX

func (s *GearGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*GearGroupBy) Ints

func (s *GearGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*GearGroupBy) IntsX

func (s *GearGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*GearGroupBy) Scan

func (ggb *GearGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*GearGroupBy) ScanX

func (s *GearGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*GearGroupBy) String

func (s *GearGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*GearGroupBy) StringX

func (s *GearGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*GearGroupBy) Strings

func (s *GearGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*GearGroupBy) StringsX

func (s *GearGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type GearMutation

type GearMutation struct {
	// contains filtered or unexported fields
}

GearMutation represents an operation that mutates the Gear nodes in the graph.

func (*GearMutation) AddField

func (m *GearMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*GearMutation) AddQuantity

func (m *GearMutation) AddQuantity(i int)

AddQuantity adds i to the "quantity" field.

func (*GearMutation) AddedEdges

func (m *GearMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*GearMutation) AddedField

func (m *GearMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*GearMutation) AddedFields

func (m *GearMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*GearMutation) AddedIDs

func (m *GearMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*GearMutation) AddedQuantity

func (m *GearMutation) AddedQuantity() (r int, exists bool)

AddedQuantity returns the value that was added to the "quantity" field in this mutation.

func (*GearMutation) ClearEdge

func (m *GearMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*GearMutation) ClearEquipment

func (m *GearMutation) ClearEquipment()

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*GearMutation) ClearField

func (m *GearMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*GearMutation) ClearQuantity

func (m *GearMutation) ClearQuantity()

ClearQuantity clears the value of the "quantity" field.

func (*GearMutation) ClearedEdges

func (m *GearMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*GearMutation) ClearedFields

func (m *GearMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (GearMutation) Client

func (m GearMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*GearMutation) EdgeCleared

func (m *GearMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*GearMutation) EquipmentCleared

func (m *GearMutation) EquipmentCleared() bool

EquipmentCleared reports if the "equipment" edge to the Equipment entity was cleared.

func (*GearMutation) EquipmentID

func (m *GearMutation) EquipmentID() (r int, exists bool)

EquipmentID returns the value of the "equipment_id" field in the mutation.

func (*GearMutation) EquipmentIDs

func (m *GearMutation) EquipmentIDs() (ids []int)

EquipmentIDs returns the "equipment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EquipmentID instead. It exists only for internal usage by the builders.

func (*GearMutation) Field

func (m *GearMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*GearMutation) FieldCleared

func (m *GearMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*GearMutation) Fields

func (m *GearMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*GearMutation) GearCategory

func (m *GearMutation) GearCategory() (r gear.GearCategory, exists bool)

GearCategory returns the value of the "gear_category" field in the mutation.

func (*GearMutation) ID

func (m *GearMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*GearMutation) IDs

func (m *GearMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*GearMutation) Indx

func (m *GearMutation) Indx() (r string, exists bool)

Indx returns the value of the "indx" field in the mutation.

func (*GearMutation) Name

func (m *GearMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*GearMutation) OldEquipmentID

func (m *GearMutation) OldEquipmentID(ctx context.Context) (v int, err error)

OldEquipmentID returns the old "equipment_id" field's value of the Gear entity. If the Gear object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*GearMutation) OldField

func (m *GearMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*GearMutation) OldGearCategory

func (m *GearMutation) OldGearCategory(ctx context.Context) (v gear.GearCategory, err error)

OldGearCategory returns the old "gear_category" field's value of the Gear entity. If the Gear object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*GearMutation) OldIndx

func (m *GearMutation) OldIndx(ctx context.Context) (v string, err error)

OldIndx returns the old "indx" field's value of the Gear entity. If the Gear object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*GearMutation) OldName

func (m *GearMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Gear entity. If the Gear object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*GearMutation) OldQuantity

func (m *GearMutation) OldQuantity(ctx context.Context) (v int, err error)

OldQuantity returns the old "quantity" field's value of the Gear entity. If the Gear object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*GearMutation) Op

func (m *GearMutation) Op() Op

Op returns the operation name.

func (*GearMutation) Quantity

func (m *GearMutation) Quantity() (r int, exists bool)

Quantity returns the value of the "quantity" field in the mutation.

func (*GearMutation) QuantityCleared

func (m *GearMutation) QuantityCleared() bool

QuantityCleared returns if the "quantity" field was cleared in this mutation.

func (*GearMutation) RemovedEdges

func (m *GearMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*GearMutation) RemovedIDs

func (m *GearMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*GearMutation) ResetEdge

func (m *GearMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*GearMutation) ResetEquipment

func (m *GearMutation) ResetEquipment()

ResetEquipment resets all changes to the "equipment" edge.

func (*GearMutation) ResetEquipmentID

func (m *GearMutation) ResetEquipmentID()

ResetEquipmentID resets all changes to the "equipment_id" field.

func (*GearMutation) ResetField

func (m *GearMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*GearMutation) ResetGearCategory

func (m *GearMutation) ResetGearCategory()

ResetGearCategory resets all changes to the "gear_category" field.

func (*GearMutation) ResetIndx

func (m *GearMutation) ResetIndx()

ResetIndx resets all changes to the "indx" field.

func (*GearMutation) ResetName

func (m *GearMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*GearMutation) ResetQuantity

func (m *GearMutation) ResetQuantity()

ResetQuantity resets all changes to the "quantity" field.

func (*GearMutation) SetEquipmentID

func (m *GearMutation) SetEquipmentID(i int)

SetEquipmentID sets the "equipment_id" field.

func (*GearMutation) SetField

func (m *GearMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*GearMutation) SetGearCategory

func (m *GearMutation) SetGearCategory(gc gear.GearCategory)

SetGearCategory sets the "gear_category" field.

func (*GearMutation) SetIndx

func (m *GearMutation) SetIndx(s string)

SetIndx sets the "indx" field.

func (*GearMutation) SetName

func (m *GearMutation) SetName(s string)

SetName sets the "name" field.

func (*GearMutation) SetOp

func (m *GearMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*GearMutation) SetQuantity

func (m *GearMutation) SetQuantity(i int)

SetQuantity sets the "quantity" field.

func (GearMutation) Tx

func (m GearMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*GearMutation) Type

func (m *GearMutation) Type() string

Type returns the node type of this mutation (Gear).

func (*GearMutation) Where

func (m *GearMutation) Where(ps ...predicate.Gear)

Where appends a list predicates to the GearMutation builder.

func (*GearMutation) WhereP

func (m *GearMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the GearMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type GearOrder

type GearOrder struct {
	Direction OrderDirection  `json:"direction"`
	Field     *GearOrderField `json:"field"`
}

GearOrder defines the ordering of Gear.

type GearOrderField

type GearOrderField struct {
	// Value extracts the ordering value from the given Gear.
	Value func(*Gear) (ent.Value, error)
	// contains filtered or unexported fields
}

GearOrderField defines the ordering field of Gear.

func (GearOrderField) MarshalGQL

func (f GearOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (GearOrderField) String

func (f GearOrderField) String() string

String implement fmt.Stringer interface.

func (*GearOrderField) UnmarshalGQL

func (f *GearOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type GearPaginateOption

type GearPaginateOption func(*gearPager) error

GearPaginateOption enables pagination customization.

func WithGearFilter

func WithGearFilter(filter func(*GearQuery) (*GearQuery, error)) GearPaginateOption

WithGearFilter configures pagination filter.

func WithGearOrder

func WithGearOrder(order *GearOrder) GearPaginateOption

WithGearOrder configures pagination ordering.

type GearQuery

type GearQuery struct {
	// contains filtered or unexported fields
}

GearQuery is the builder for querying Gear entities.

func (*GearQuery) Aggregate

func (gq *GearQuery) Aggregate(fns ...AggregateFunc) *GearSelect

Aggregate returns a GearSelect configured with the given aggregations.

func (*GearQuery) All

func (gq *GearQuery) All(ctx context.Context) ([]*Gear, error)

All executes the query and returns a list of Gears.

func (*GearQuery) AllX

func (gq *GearQuery) AllX(ctx context.Context) []*Gear

AllX is like All, but panics if an error occurs.

func (*GearQuery) Clone

func (gq *GearQuery) Clone() *GearQuery

Clone returns a duplicate of the GearQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*GearQuery) CollectFields

func (ge *GearQuery) CollectFields(ctx context.Context, satisfies ...string) (*GearQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*GearQuery) Count

func (gq *GearQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*GearQuery) CountX

func (gq *GearQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*GearQuery) Exist

func (gq *GearQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*GearQuery) ExistX

func (gq *GearQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*GearQuery) First

func (gq *GearQuery) First(ctx context.Context) (*Gear, error)

First returns the first Gear entity from the query. Returns a *NotFoundError when no Gear was found.

func (*GearQuery) FirstID

func (gq *GearQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Gear ID from the query. Returns a *NotFoundError when no Gear ID was found.

func (*GearQuery) FirstIDX

func (gq *GearQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*GearQuery) FirstX

func (gq *GearQuery) FirstX(ctx context.Context) *Gear

FirstX is like First, but panics if an error occurs.

func (*GearQuery) GroupBy

func (gq *GearQuery) GroupBy(field string, fields ...string) *GearGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Indx string `json:"index"`
	Count int `json:"count,omitempty"`
}

client.Gear.Query().
	GroupBy(gear.FieldIndx).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*GearQuery) IDs

func (gq *GearQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Gear IDs.

func (*GearQuery) IDsX

func (gq *GearQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*GearQuery) Limit

func (gq *GearQuery) Limit(limit int) *GearQuery

Limit the number of records to be returned by this query.

func (*GearQuery) Offset

func (gq *GearQuery) Offset(offset int) *GearQuery

Offset to start from.

func (*GearQuery) Only

func (gq *GearQuery) Only(ctx context.Context) (*Gear, error)

Only returns a single Gear entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Gear entity is found. Returns a *NotFoundError when no Gear entities are found.

func (*GearQuery) OnlyID

func (gq *GearQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Gear ID in the query. Returns a *NotSingularError when more than one Gear ID is found. Returns a *NotFoundError when no entities are found.

func (*GearQuery) OnlyIDX

func (gq *GearQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*GearQuery) OnlyX

func (gq *GearQuery) OnlyX(ctx context.Context) *Gear

OnlyX is like Only, but panics if an error occurs.

func (*GearQuery) Order

func (gq *GearQuery) Order(o ...gear.OrderOption) *GearQuery

Order specifies how the records should be ordered.

func (*GearQuery) Paginate

func (ge *GearQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...GearPaginateOption,
) (*GearConnection, error)

Paginate executes the query and returns a relay based cursor connection to Gear.

func (*GearQuery) QueryEquipment

func (gq *GearQuery) QueryEquipment() *EquipmentQuery

QueryEquipment chains the current query on the "equipment" edge.

func (*GearQuery) Select

func (gq *GearQuery) Select(fields ...string) *GearSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Indx string `json:"index"`
}

client.Gear.Query().
	Select(gear.FieldIndx).
	Scan(ctx, &v)

func (*GearQuery) Unique

func (gq *GearQuery) Unique(unique bool) *GearQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*GearQuery) Where

func (gq *GearQuery) Where(ps ...predicate.Gear) *GearQuery

Where adds a new predicate for the GearQuery builder.

func (*GearQuery) WithEquipment

func (gq *GearQuery) WithEquipment(opts ...func(*EquipmentQuery)) *GearQuery

WithEquipment tells the query-builder to eager-load the nodes that are connected to the "equipment" edge. The optional arguments are used to configure the query builder of the edge.

type GearSelect

type GearSelect struct {
	*GearQuery
	// contains filtered or unexported fields
}

GearSelect is the builder for selecting fields of Gear entities.

func (*GearSelect) Aggregate

func (gs *GearSelect) Aggregate(fns ...AggregateFunc) *GearSelect

Aggregate adds the given aggregation functions to the selector query.

func (*GearSelect) Bool

func (s *GearSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*GearSelect) BoolX

func (s *GearSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*GearSelect) Bools

func (s *GearSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*GearSelect) BoolsX

func (s *GearSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*GearSelect) Float64

func (s *GearSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*GearSelect) Float64X

func (s *GearSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*GearSelect) Float64s

func (s *GearSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*GearSelect) Float64sX

func (s *GearSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*GearSelect) Int

func (s *GearSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*GearSelect) IntX

func (s *GearSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*GearSelect) Ints

func (s *GearSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*GearSelect) IntsX

func (s *GearSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*GearSelect) Scan

func (gs *GearSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*GearSelect) ScanX

func (s *GearSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*GearSelect) String

func (s *GearSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*GearSelect) StringX

func (s *GearSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*GearSelect) Strings

func (s *GearSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*GearSelect) StringsX

func (s *GearSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type GearUpdate

type GearUpdate struct {
	// contains filtered or unexported fields
}

GearUpdate is the builder for updating Gear entities.

func (*GearUpdate) AddQuantity

func (gu *GearUpdate) AddQuantity(i int) *GearUpdate

AddQuantity adds i to the "quantity" field.

func (*GearUpdate) ClearEquipment

func (gu *GearUpdate) ClearEquipment() *GearUpdate

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*GearUpdate) ClearQuantity

func (gu *GearUpdate) ClearQuantity() *GearUpdate

ClearQuantity clears the value of the "quantity" field.

func (*GearUpdate) Exec

func (gu *GearUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*GearUpdate) ExecX

func (gu *GearUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GearUpdate) Mutation

func (gu *GearUpdate) Mutation() *GearMutation

Mutation returns the GearMutation object of the builder.

func (*GearUpdate) Save

func (gu *GearUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*GearUpdate) SaveX

func (gu *GearUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*GearUpdate) SetEquipment

func (gu *GearUpdate) SetEquipment(e *Equipment) *GearUpdate

SetEquipment sets the "equipment" edge to the Equipment entity.

func (*GearUpdate) SetEquipmentID

func (gu *GearUpdate) SetEquipmentID(i int) *GearUpdate

SetEquipmentID sets the "equipment_id" field.

func (*GearUpdate) SetGearCategory

func (gu *GearUpdate) SetGearCategory(gc gear.GearCategory) *GearUpdate

SetGearCategory sets the "gear_category" field.

func (*GearUpdate) SetIndx

func (gu *GearUpdate) SetIndx(s string) *GearUpdate

SetIndx sets the "indx" field.

func (*GearUpdate) SetName

func (gu *GearUpdate) SetName(s string) *GearUpdate

SetName sets the "name" field.

func (*GearUpdate) SetNillableGearCategory

func (gu *GearUpdate) SetNillableGearCategory(gc *gear.GearCategory) *GearUpdate

SetNillableGearCategory sets the "gear_category" field if the given value is not nil.

func (*GearUpdate) SetNillableQuantity

func (gu *GearUpdate) SetNillableQuantity(i *int) *GearUpdate

SetNillableQuantity sets the "quantity" field if the given value is not nil.

func (*GearUpdate) SetQuantity

func (gu *GearUpdate) SetQuantity(i int) *GearUpdate

SetQuantity sets the "quantity" field.

func (*GearUpdate) Where

func (gu *GearUpdate) Where(ps ...predicate.Gear) *GearUpdate

Where appends a list predicates to the GearUpdate builder.

type GearUpdateOne

type GearUpdateOne struct {
	// contains filtered or unexported fields
}

GearUpdateOne is the builder for updating a single Gear entity.

func (*GearUpdateOne) AddQuantity

func (guo *GearUpdateOne) AddQuantity(i int) *GearUpdateOne

AddQuantity adds i to the "quantity" field.

func (*GearUpdateOne) ClearEquipment

func (guo *GearUpdateOne) ClearEquipment() *GearUpdateOne

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*GearUpdateOne) ClearQuantity

func (guo *GearUpdateOne) ClearQuantity() *GearUpdateOne

ClearQuantity clears the value of the "quantity" field.

func (*GearUpdateOne) Exec

func (guo *GearUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*GearUpdateOne) ExecX

func (guo *GearUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GearUpdateOne) Mutation

func (guo *GearUpdateOne) Mutation() *GearMutation

Mutation returns the GearMutation object of the builder.

func (*GearUpdateOne) Save

func (guo *GearUpdateOne) Save(ctx context.Context) (*Gear, error)

Save executes the query and returns the updated Gear entity.

func (*GearUpdateOne) SaveX

func (guo *GearUpdateOne) SaveX(ctx context.Context) *Gear

SaveX is like Save, but panics if an error occurs.

func (*GearUpdateOne) Select

func (guo *GearUpdateOne) Select(field string, fields ...string) *GearUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*GearUpdateOne) SetEquipment

func (guo *GearUpdateOne) SetEquipment(e *Equipment) *GearUpdateOne

SetEquipment sets the "equipment" edge to the Equipment entity.

func (*GearUpdateOne) SetEquipmentID

func (guo *GearUpdateOne) SetEquipmentID(i int) *GearUpdateOne

SetEquipmentID sets the "equipment_id" field.

func (*GearUpdateOne) SetGearCategory

func (guo *GearUpdateOne) SetGearCategory(gc gear.GearCategory) *GearUpdateOne

SetGearCategory sets the "gear_category" field.

func (*GearUpdateOne) SetIndx

func (guo *GearUpdateOne) SetIndx(s string) *GearUpdateOne

SetIndx sets the "indx" field.

func (*GearUpdateOne) SetName

func (guo *GearUpdateOne) SetName(s string) *GearUpdateOne

SetName sets the "name" field.

func (*GearUpdateOne) SetNillableGearCategory

func (guo *GearUpdateOne) SetNillableGearCategory(gc *gear.GearCategory) *GearUpdateOne

SetNillableGearCategory sets the "gear_category" field if the given value is not nil.

func (*GearUpdateOne) SetNillableQuantity

func (guo *GearUpdateOne) SetNillableQuantity(i *int) *GearUpdateOne

SetNillableQuantity sets the "quantity" field if the given value is not nil.

func (*GearUpdateOne) SetQuantity

func (guo *GearUpdateOne) SetQuantity(i int) *GearUpdateOne

SetQuantity sets the "quantity" field.

func (*GearUpdateOne) Where

func (guo *GearUpdateOne) Where(ps ...predicate.Gear) *GearUpdateOne

Where appends a list predicates to the GearUpdate builder.

type GearWhereInput

type GearWhereInput struct {
	Predicates []predicate.Gear  `json:"-"`
	Not        *GearWhereInput   `json:"not,omitempty"`
	Or         []*GearWhereInput `json:"or,omitempty"`
	And        []*GearWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "indx" field predicates.
	Indx             *string  `json:"indx,omitempty"`
	IndxNEQ          *string  `json:"indxNEQ,omitempty"`
	IndxIn           []string `json:"indxIn,omitempty"`
	IndxNotIn        []string `json:"indxNotIn,omitempty"`
	IndxGT           *string  `json:"indxGT,omitempty"`
	IndxGTE          *string  `json:"indxGTE,omitempty"`
	IndxLT           *string  `json:"indxLT,omitempty"`
	IndxLTE          *string  `json:"indxLTE,omitempty"`
	IndxContains     *string  `json:"indxContains,omitempty"`
	IndxHasPrefix    *string  `json:"indxHasPrefix,omitempty"`
	IndxHasSuffix    *string  `json:"indxHasSuffix,omitempty"`
	IndxEqualFold    *string  `json:"indxEqualFold,omitempty"`
	IndxContainsFold *string  `json:"indxContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "gear_category" field predicates.
	GearCategory      *gear.GearCategory  `json:"gearCategory,omitempty"`
	GearCategoryNEQ   *gear.GearCategory  `json:"gearCategoryNEQ,omitempty"`
	GearCategoryIn    []gear.GearCategory `json:"gearCategoryIn,omitempty"`
	GearCategoryNotIn []gear.GearCategory `json:"gearCategoryNotIn,omitempty"`

	// "quantity" field predicates.
	Quantity       *int  `json:"quantity,omitempty"`
	QuantityNEQ    *int  `json:"quantityNEQ,omitempty"`
	QuantityIn     []int `json:"quantityIn,omitempty"`
	QuantityNotIn  []int `json:"quantityNotIn,omitempty"`
	QuantityGT     *int  `json:"quantityGT,omitempty"`
	QuantityGTE    *int  `json:"quantityGTE,omitempty"`
	QuantityLT     *int  `json:"quantityLT,omitempty"`
	QuantityLTE    *int  `json:"quantityLTE,omitempty"`
	QuantityIsNil  bool  `json:"quantityIsNil,omitempty"`
	QuantityNotNil bool  `json:"quantityNotNil,omitempty"`

	// "equipment_id" field predicates.
	EquipmentID      *int  `json:"equipmentID,omitempty"`
	EquipmentIDNEQ   *int  `json:"equipmentIDNEQ,omitempty"`
	EquipmentIDIn    []int `json:"equipmentIDIn,omitempty"`
	EquipmentIDNotIn []int `json:"equipmentIDNotIn,omitempty"`

	// "equipment" edge predicates.
	HasEquipment     *bool                  `json:"hasEquipment,omitempty"`
	HasEquipmentWith []*EquipmentWhereInput `json:"hasEquipmentWith,omitempty"`
}

GearWhereInput represents a where input for filtering Gear queries.

func (*GearWhereInput) AddPredicates

func (i *GearWhereInput) AddPredicates(predicates ...predicate.Gear)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*GearWhereInput) Filter

func (i *GearWhereInput) Filter(q *GearQuery) (*GearQuery, error)

Filter applies the GearWhereInput filter on the GearQuery builder.

func (*GearWhereInput) P

func (i *GearWhereInput) P() (predicate.Gear, error)

P returns a predicate for filtering gears. An error is returned if the input is empty or invalid.

type Gears

type Gears []*Gear

Gears is a parsable slice of Gear.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

ent aliases to avoid import conflicts in user's code.

type Interceptor

type Interceptor = ent.Interceptor

ent aliases to avoid import conflicts in user's code.

type Language

type Language struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Indx holds the value of the "indx" field.
	Indx string `json:"index"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Desc holds the value of the "desc" field.
	Desc string `json:"desc,omitempty"`
	// LanguageType holds the value of the "language_type" field.
	LanguageType language.LanguageType `json:"type"`
	// Script holds the value of the "script" field.
	Script language.Script `json:"script,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the LanguageQuery when eager-loading is set.
	Edges LanguageEdges `json:"-"`
	// contains filtered or unexported fields
}

Language is the model entity for the Language schema.

func (*Language) IsNode

func (n *Language) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Language) MarshalJSON

func (l *Language) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Language) NamedRaceSpeakers

func (l *Language) NamedRaceSpeakers(name string) ([]*Race, error)

NamedRaceSpeakers returns the RaceSpeakers named value or an error if the edge was not loaded in eager-loading with this name.

func (*Language) Node

func (l *Language) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*Language) QueryRaceSpeakers

func (l *Language) QueryRaceSpeakers() *RaceQuery

QueryRaceSpeakers queries the "race_speakers" edge of the Language entity.

func (*Language) RaceSpeakers

func (l *Language) RaceSpeakers(ctx context.Context) (result []*Race, err error)

func (*Language) String

func (l *Language) String() string

String implements the fmt.Stringer.

func (*Language) ToEdge

func (l *Language) ToEdge(order *LanguageOrder) *LanguageEdge

ToEdge converts Language into LanguageEdge.

func (*Language) UnmarshalJSON

func (l *Language) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*Language) Unwrap

func (l *Language) Unwrap() *Language

Unwrap unwraps the Language entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Language) Update

func (l *Language) Update() *LanguageUpdateOne

Update returns a builder for updating this Language. Note that you need to call Language.Unwrap() before calling this method if this Language was returned from a transaction, and the transaction was committed or rolled back.

func (*Language) Value

func (l *Language) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Language. This includes values selected through modifiers, order, etc.

type LanguageClient

type LanguageClient struct {
	// contains filtered or unexported fields
}

LanguageClient is a client for the Language schema.

func NewLanguageClient

func NewLanguageClient(c config) *LanguageClient

NewLanguageClient returns a client for the Language from the given config.

func (*LanguageClient) Create

func (c *LanguageClient) Create() *LanguageCreate

Create returns a builder for creating a Language entity.

func (*LanguageClient) CreateBulk

func (c *LanguageClient) CreateBulk(builders ...*LanguageCreate) *LanguageCreateBulk

CreateBulk returns a builder for creating a bulk of Language entities.

func (*LanguageClient) Delete

func (c *LanguageClient) Delete() *LanguageDelete

Delete returns a delete builder for Language.

func (*LanguageClient) DeleteOne

func (c *LanguageClient) DeleteOne(l *Language) *LanguageDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*LanguageClient) DeleteOneID

func (c *LanguageClient) DeleteOneID(id int) *LanguageDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*LanguageClient) Get

func (c *LanguageClient) Get(ctx context.Context, id int) (*Language, error)

Get returns a Language entity by its id.

func (*LanguageClient) GetX

func (c *LanguageClient) GetX(ctx context.Context, id int) *Language

GetX is like Get, but panics if an error occurs.

func (*LanguageClient) Hooks

func (c *LanguageClient) Hooks() []Hook

Hooks returns the client hooks.

func (*LanguageClient) Intercept

func (c *LanguageClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `language.Intercept(f(g(h())))`.

func (*LanguageClient) Interceptors

func (c *LanguageClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*LanguageClient) Query

func (c *LanguageClient) Query() *LanguageQuery

Query returns a query builder for Language.

func (*LanguageClient) QueryRaceSpeakers

func (c *LanguageClient) QueryRaceSpeakers(l *Language) *RaceQuery

QueryRaceSpeakers queries the race_speakers edge of a Language.

func (*LanguageClient) Update

func (c *LanguageClient) Update() *LanguageUpdate

Update returns an update builder for Language.

func (*LanguageClient) UpdateOne

func (c *LanguageClient) UpdateOne(l *Language) *LanguageUpdateOne

UpdateOne returns an update builder for the given entity.

func (*LanguageClient) UpdateOneID

func (c *LanguageClient) UpdateOneID(id int) *LanguageUpdateOne

UpdateOneID returns an update builder for the given id.

func (*LanguageClient) Use

func (c *LanguageClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `language.Hooks(f(g(h())))`.

type LanguageConnection

type LanguageConnection struct {
	Edges      []*LanguageEdge `json:"edges"`
	PageInfo   PageInfo        `json:"pageInfo"`
	TotalCount int             `json:"totalCount"`
}

LanguageConnection is the connection containing edges to Language.

type LanguageCreate

type LanguageCreate struct {
	// contains filtered or unexported fields
}

LanguageCreate is the builder for creating a Language entity.

func (*LanguageCreate) AddRaceSpeakerIDs

func (lc *LanguageCreate) AddRaceSpeakerIDs(ids ...int) *LanguageCreate

AddRaceSpeakerIDs adds the "race_speakers" edge to the Race entity by IDs.

func (*LanguageCreate) AddRaceSpeakers

func (lc *LanguageCreate) AddRaceSpeakers(r ...*Race) *LanguageCreate

AddRaceSpeakers adds the "race_speakers" edges to the Race entity.

func (*LanguageCreate) Exec

func (lc *LanguageCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*LanguageCreate) ExecX

func (lc *LanguageCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*LanguageCreate) Mutation

func (lc *LanguageCreate) Mutation() *LanguageMutation

Mutation returns the LanguageMutation object of the builder.

func (*LanguageCreate) Save

func (lc *LanguageCreate) Save(ctx context.Context) (*Language, error)

Save creates the Language in the database.

func (*LanguageCreate) SaveX

func (lc *LanguageCreate) SaveX(ctx context.Context) *Language

SaveX calls Save and panics if Save returns an error.

func (*LanguageCreate) SetDesc

func (lc *LanguageCreate) SetDesc(s string) *LanguageCreate

SetDesc sets the "desc" field.

func (*LanguageCreate) SetIndx

func (lc *LanguageCreate) SetIndx(s string) *LanguageCreate

SetIndx sets the "indx" field.

func (*LanguageCreate) SetLanguage

func (lc *LanguageCreate) SetLanguage(input *Language) *LanguageCreate

func (*LanguageCreate) SetLanguageType

func (lc *LanguageCreate) SetLanguageType(lt language.LanguageType) *LanguageCreate

SetLanguageType sets the "language_type" field.

func (*LanguageCreate) SetName

func (lc *LanguageCreate) SetName(s string) *LanguageCreate

SetName sets the "name" field.

func (*LanguageCreate) SetNillableLanguageType

func (lc *LanguageCreate) SetNillableLanguageType(lt *language.LanguageType) *LanguageCreate

SetNillableLanguageType sets the "language_type" field if the given value is not nil.

func (*LanguageCreate) SetNillableScript

func (lc *LanguageCreate) SetNillableScript(l *language.Script) *LanguageCreate

SetNillableScript sets the "script" field if the given value is not nil.

func (*LanguageCreate) SetScript

func (lc *LanguageCreate) SetScript(l language.Script) *LanguageCreate

SetScript sets the "script" field.

type LanguageCreateBulk

type LanguageCreateBulk struct {
	// contains filtered or unexported fields
}

LanguageCreateBulk is the builder for creating many Language entities in bulk.

func (*LanguageCreateBulk) Exec

func (lcb *LanguageCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*LanguageCreateBulk) ExecX

func (lcb *LanguageCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*LanguageCreateBulk) Save

func (lcb *LanguageCreateBulk) Save(ctx context.Context) ([]*Language, error)

Save creates the Language entities in the database.

func (*LanguageCreateBulk) SaveX

func (lcb *LanguageCreateBulk) SaveX(ctx context.Context) []*Language

SaveX is like Save, but panics if an error occurs.

type LanguageDelete

type LanguageDelete struct {
	// contains filtered or unexported fields
}

LanguageDelete is the builder for deleting a Language entity.

func (*LanguageDelete) Exec

func (ld *LanguageDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*LanguageDelete) ExecX

func (ld *LanguageDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*LanguageDelete) Where

func (ld *LanguageDelete) Where(ps ...predicate.Language) *LanguageDelete

Where appends a list predicates to the LanguageDelete builder.

type LanguageDeleteOne

type LanguageDeleteOne struct {
	// contains filtered or unexported fields
}

LanguageDeleteOne is the builder for deleting a single Language entity.

func (*LanguageDeleteOne) Exec

func (ldo *LanguageDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*LanguageDeleteOne) ExecX

func (ldo *LanguageDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*LanguageDeleteOne) Where

Where appends a list predicates to the LanguageDelete builder.

type LanguageEdge

type LanguageEdge struct {
	Node   *Language `json:"node"`
	Cursor Cursor    `json:"cursor"`
}

LanguageEdge is the edge representation of Language.

type LanguageEdges

type LanguageEdges struct {
	// RaceSpeakers holds the value of the race_speakers edge.
	RaceSpeakers []*Race `json:"race_speakers,omitempty"`
	// contains filtered or unexported fields
}

LanguageEdges holds the relations/edges for other nodes in the graph.

func (LanguageEdges) RaceSpeakersOrErr

func (e LanguageEdges) RaceSpeakersOrErr() ([]*Race, error)

RaceSpeakersOrErr returns the RaceSpeakers value or an error if the edge was not loaded in eager-loading.

type LanguageGroupBy

type LanguageGroupBy struct {
	// contains filtered or unexported fields
}

LanguageGroupBy is the group-by builder for Language entities.

func (*LanguageGroupBy) Aggregate

func (lgb *LanguageGroupBy) Aggregate(fns ...AggregateFunc) *LanguageGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*LanguageGroupBy) Bool

func (s *LanguageGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*LanguageGroupBy) BoolX

func (s *LanguageGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*LanguageGroupBy) Bools

func (s *LanguageGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*LanguageGroupBy) BoolsX

func (s *LanguageGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*LanguageGroupBy) Float64

func (s *LanguageGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*LanguageGroupBy) Float64X

func (s *LanguageGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*LanguageGroupBy) Float64s

func (s *LanguageGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*LanguageGroupBy) Float64sX

func (s *LanguageGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*LanguageGroupBy) Int

func (s *LanguageGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*LanguageGroupBy) IntX

func (s *LanguageGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*LanguageGroupBy) Ints

func (s *LanguageGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*LanguageGroupBy) IntsX

func (s *LanguageGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*LanguageGroupBy) Scan

func (lgb *LanguageGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*LanguageGroupBy) ScanX

func (s *LanguageGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*LanguageGroupBy) String

func (s *LanguageGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*LanguageGroupBy) StringX

func (s *LanguageGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*LanguageGroupBy) Strings

func (s *LanguageGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*LanguageGroupBy) StringsX

func (s *LanguageGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type LanguageMutation

type LanguageMutation struct {
	// contains filtered or unexported fields
}

LanguageMutation represents an operation that mutates the Language nodes in the graph.

func (*LanguageMutation) AddField

func (m *LanguageMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*LanguageMutation) AddRaceSpeakerIDs

func (m *LanguageMutation) AddRaceSpeakerIDs(ids ...int)

AddRaceSpeakerIDs adds the "race_speakers" edge to the Race entity by ids.

func (*LanguageMutation) AddedEdges

func (m *LanguageMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*LanguageMutation) AddedField

func (m *LanguageMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*LanguageMutation) AddedFields

func (m *LanguageMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*LanguageMutation) AddedIDs

func (m *LanguageMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*LanguageMutation) ClearEdge

func (m *LanguageMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*LanguageMutation) ClearField

func (m *LanguageMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*LanguageMutation) ClearRaceSpeakers

func (m *LanguageMutation) ClearRaceSpeakers()

ClearRaceSpeakers clears the "race_speakers" edge to the Race entity.

func (*LanguageMutation) ClearScript

func (m *LanguageMutation) ClearScript()

ClearScript clears the value of the "script" field.

func (*LanguageMutation) ClearedEdges

func (m *LanguageMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*LanguageMutation) ClearedFields

func (m *LanguageMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (LanguageMutation) Client

func (m LanguageMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*LanguageMutation) Desc

func (m *LanguageMutation) Desc() (r string, exists bool)

Desc returns the value of the "desc" field in the mutation.

func (*LanguageMutation) EdgeCleared

func (m *LanguageMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*LanguageMutation) Field

func (m *LanguageMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*LanguageMutation) FieldCleared

func (m *LanguageMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*LanguageMutation) Fields

func (m *LanguageMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*LanguageMutation) ID

func (m *LanguageMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*LanguageMutation) IDs

func (m *LanguageMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*LanguageMutation) Indx

func (m *LanguageMutation) Indx() (r string, exists bool)

Indx returns the value of the "indx" field in the mutation.

func (*LanguageMutation) LanguageType

func (m *LanguageMutation) LanguageType() (r language.LanguageType, exists bool)

LanguageType returns the value of the "language_type" field in the mutation.

func (*LanguageMutation) Name

func (m *LanguageMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*LanguageMutation) OldDesc

func (m *LanguageMutation) OldDesc(ctx context.Context) (v string, err error)

OldDesc returns the old "desc" field's value of the Language entity. If the Language object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*LanguageMutation) OldField

func (m *LanguageMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*LanguageMutation) OldIndx

func (m *LanguageMutation) OldIndx(ctx context.Context) (v string, err error)

OldIndx returns the old "indx" field's value of the Language entity. If the Language object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*LanguageMutation) OldLanguageType

func (m *LanguageMutation) OldLanguageType(ctx context.Context) (v language.LanguageType, err error)

OldLanguageType returns the old "language_type" field's value of the Language entity. If the Language object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*LanguageMutation) OldName

func (m *LanguageMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Language entity. If the Language object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*LanguageMutation) OldScript

func (m *LanguageMutation) OldScript(ctx context.Context) (v language.Script, err error)

OldScript returns the old "script" field's value of the Language entity. If the Language object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*LanguageMutation) Op

func (m *LanguageMutation) Op() Op

Op returns the operation name.

func (*LanguageMutation) RaceSpeakersCleared

func (m *LanguageMutation) RaceSpeakersCleared() bool

RaceSpeakersCleared reports if the "race_speakers" edge to the Race entity was cleared.

func (*LanguageMutation) RaceSpeakersIDs

func (m *LanguageMutation) RaceSpeakersIDs() (ids []int)

RaceSpeakersIDs returns the "race_speakers" edge IDs in the mutation.

func (*LanguageMutation) RemoveRaceSpeakerIDs

func (m *LanguageMutation) RemoveRaceSpeakerIDs(ids ...int)

RemoveRaceSpeakerIDs removes the "race_speakers" edge to the Race entity by IDs.

func (*LanguageMutation) RemovedEdges

func (m *LanguageMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*LanguageMutation) RemovedIDs

func (m *LanguageMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*LanguageMutation) RemovedRaceSpeakersIDs

func (m *LanguageMutation) RemovedRaceSpeakersIDs() (ids []int)

RemovedRaceSpeakers returns the removed IDs of the "race_speakers" edge to the Race entity.

func (*LanguageMutation) ResetDesc

func (m *LanguageMutation) ResetDesc()

ResetDesc resets all changes to the "desc" field.

func (*LanguageMutation) ResetEdge

func (m *LanguageMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*LanguageMutation) ResetField

func (m *LanguageMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*LanguageMutation) ResetIndx

func (m *LanguageMutation) ResetIndx()

ResetIndx resets all changes to the "indx" field.

func (*LanguageMutation) ResetLanguageType

func (m *LanguageMutation) ResetLanguageType()

ResetLanguageType resets all changes to the "language_type" field.

func (*LanguageMutation) ResetName

func (m *LanguageMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*LanguageMutation) ResetRaceSpeakers

func (m *LanguageMutation) ResetRaceSpeakers()

ResetRaceSpeakers resets all changes to the "race_speakers" edge.

func (*LanguageMutation) ResetScript

func (m *LanguageMutation) ResetScript()

ResetScript resets all changes to the "script" field.

func (*LanguageMutation) Script

func (m *LanguageMutation) Script() (r language.Script, exists bool)

Script returns the value of the "script" field in the mutation.

func (*LanguageMutation) ScriptCleared

func (m *LanguageMutation) ScriptCleared() bool

ScriptCleared returns if the "script" field was cleared in this mutation.

func (*LanguageMutation) SetDesc

func (m *LanguageMutation) SetDesc(s string)

SetDesc sets the "desc" field.

func (*LanguageMutation) SetField

func (m *LanguageMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*LanguageMutation) SetIndx

func (m *LanguageMutation) SetIndx(s string)

SetIndx sets the "indx" field.

func (*LanguageMutation) SetLanguageType

func (m *LanguageMutation) SetLanguageType(lt language.LanguageType)

SetLanguageType sets the "language_type" field.

func (*LanguageMutation) SetName

func (m *LanguageMutation) SetName(s string)

SetName sets the "name" field.

func (*LanguageMutation) SetOp

func (m *LanguageMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*LanguageMutation) SetScript

func (m *LanguageMutation) SetScript(l language.Script)

SetScript sets the "script" field.

func (LanguageMutation) Tx

func (m LanguageMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*LanguageMutation) Type

func (m *LanguageMutation) Type() string

Type returns the node type of this mutation (Language).

func (*LanguageMutation) Where

func (m *LanguageMutation) Where(ps ...predicate.Language)

Where appends a list predicates to the LanguageMutation builder.

func (*LanguageMutation) WhereP

func (m *LanguageMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the LanguageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type LanguageOrder

type LanguageOrder struct {
	Direction OrderDirection      `json:"direction"`
	Field     *LanguageOrderField `json:"field"`
}

LanguageOrder defines the ordering of Language.

type LanguageOrderField

type LanguageOrderField struct {
	// Value extracts the ordering value from the given Language.
	Value func(*Language) (ent.Value, error)
	// contains filtered or unexported fields
}

LanguageOrderField defines the ordering field of Language.

func (LanguageOrderField) MarshalGQL

func (f LanguageOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (LanguageOrderField) String

func (f LanguageOrderField) String() string

String implement fmt.Stringer interface.

func (*LanguageOrderField) UnmarshalGQL

func (f *LanguageOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type LanguagePaginateOption

type LanguagePaginateOption func(*languagePager) error

LanguagePaginateOption enables pagination customization.

func WithLanguageFilter

func WithLanguageFilter(filter func(*LanguageQuery) (*LanguageQuery, error)) LanguagePaginateOption

WithLanguageFilter configures pagination filter.

func WithLanguageOrder

func WithLanguageOrder(order *LanguageOrder) LanguagePaginateOption

WithLanguageOrder configures pagination ordering.

type LanguageQuery

type LanguageQuery struct {
	// contains filtered or unexported fields
}

LanguageQuery is the builder for querying Language entities.

func (*LanguageQuery) Aggregate

func (lq *LanguageQuery) Aggregate(fns ...AggregateFunc) *LanguageSelect

Aggregate returns a LanguageSelect configured with the given aggregations.

func (*LanguageQuery) All

func (lq *LanguageQuery) All(ctx context.Context) ([]*Language, error)

All executes the query and returns a list of Languages.

func (*LanguageQuery) AllX

func (lq *LanguageQuery) AllX(ctx context.Context) []*Language

AllX is like All, but panics if an error occurs.

func (*LanguageQuery) Clone

func (lq *LanguageQuery) Clone() *LanguageQuery

Clone returns a duplicate of the LanguageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*LanguageQuery) CollectFields

func (l *LanguageQuery) CollectFields(ctx context.Context, satisfies ...string) (*LanguageQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*LanguageQuery) Count

func (lq *LanguageQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*LanguageQuery) CountX

func (lq *LanguageQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*LanguageQuery) Exist

func (lq *LanguageQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*LanguageQuery) ExistX

func (lq *LanguageQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*LanguageQuery) First

func (lq *LanguageQuery) First(ctx context.Context) (*Language, error)

First returns the first Language entity from the query. Returns a *NotFoundError when no Language was found.

func (*LanguageQuery) FirstID

func (lq *LanguageQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Language ID from the query. Returns a *NotFoundError when no Language ID was found.

func (*LanguageQuery) FirstIDX

func (lq *LanguageQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*LanguageQuery) FirstX

func (lq *LanguageQuery) FirstX(ctx context.Context) *Language

FirstX is like First, but panics if an error occurs.

func (*LanguageQuery) GroupBy

func (lq *LanguageQuery) GroupBy(field string, fields ...string) *LanguageGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Indx string `json:"index"`
	Count int `json:"count,omitempty"`
}

client.Language.Query().
	GroupBy(language.FieldIndx).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*LanguageQuery) IDs

func (lq *LanguageQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Language IDs.

func (*LanguageQuery) IDsX

func (lq *LanguageQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*LanguageQuery) Limit

func (lq *LanguageQuery) Limit(limit int) *LanguageQuery

Limit the number of records to be returned by this query.

func (*LanguageQuery) Offset

func (lq *LanguageQuery) Offset(offset int) *LanguageQuery

Offset to start from.

func (*LanguageQuery) Only

func (lq *LanguageQuery) Only(ctx context.Context) (*Language, error)

Only returns a single Language entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Language entity is found. Returns a *NotFoundError when no Language entities are found.

func (*LanguageQuery) OnlyID

func (lq *LanguageQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Language ID in the query. Returns a *NotSingularError when more than one Language ID is found. Returns a *NotFoundError when no entities are found.

func (*LanguageQuery) OnlyIDX

func (lq *LanguageQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*LanguageQuery) OnlyX

func (lq *LanguageQuery) OnlyX(ctx context.Context) *Language

OnlyX is like Only, but panics if an error occurs.

func (*LanguageQuery) Order

Order specifies how the records should be ordered.

func (*LanguageQuery) Paginate

func (l *LanguageQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...LanguagePaginateOption,
) (*LanguageConnection, error)

Paginate executes the query and returns a relay based cursor connection to Language.

func (*LanguageQuery) QueryRaceSpeakers

func (lq *LanguageQuery) QueryRaceSpeakers() *RaceQuery

QueryRaceSpeakers chains the current query on the "race_speakers" edge.

func (*LanguageQuery) Select

func (lq *LanguageQuery) Select(fields ...string) *LanguageSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Indx string `json:"index"`
}

client.Language.Query().
	Select(language.FieldIndx).
	Scan(ctx, &v)

func (*LanguageQuery) Unique

func (lq *LanguageQuery) Unique(unique bool) *LanguageQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*LanguageQuery) Where

func (lq *LanguageQuery) Where(ps ...predicate.Language) *LanguageQuery

Where adds a new predicate for the LanguageQuery builder.

func (*LanguageQuery) WithNamedRaceSpeakers

func (lq *LanguageQuery) WithNamedRaceSpeakers(name string, opts ...func(*RaceQuery)) *LanguageQuery

WithNamedRaceSpeakers tells the query-builder to eager-load the nodes that are connected to the "race_speakers" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*LanguageQuery) WithRaceSpeakers

func (lq *LanguageQuery) WithRaceSpeakers(opts ...func(*RaceQuery)) *LanguageQuery

WithRaceSpeakers tells the query-builder to eager-load the nodes that are connected to the "race_speakers" edge. The optional arguments are used to configure the query builder of the edge.

type LanguageSelect

type LanguageSelect struct {
	*LanguageQuery
	// contains filtered or unexported fields
}

LanguageSelect is the builder for selecting fields of Language entities.

func (*LanguageSelect) Aggregate

func (ls *LanguageSelect) Aggregate(fns ...AggregateFunc) *LanguageSelect

Aggregate adds the given aggregation functions to the selector query.

func (*LanguageSelect) Bool

func (s *LanguageSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*LanguageSelect) BoolX

func (s *LanguageSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*LanguageSelect) Bools

func (s *LanguageSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*LanguageSelect) BoolsX

func (s *LanguageSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*LanguageSelect) Float64

func (s *LanguageSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*LanguageSelect) Float64X

func (s *LanguageSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*LanguageSelect) Float64s

func (s *LanguageSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*LanguageSelect) Float64sX

func (s *LanguageSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*LanguageSelect) Int

func (s *LanguageSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*LanguageSelect) IntX

func (s *LanguageSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*LanguageSelect) Ints

func (s *LanguageSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*LanguageSelect) IntsX

func (s *LanguageSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*LanguageSelect) Scan

func (ls *LanguageSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*LanguageSelect) ScanX

func (s *LanguageSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*LanguageSelect) String

func (s *LanguageSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*LanguageSelect) StringX

func (s *LanguageSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*LanguageSelect) Strings

func (s *LanguageSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*LanguageSelect) StringsX

func (s *LanguageSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type LanguageUpdate

type LanguageUpdate struct {
	// contains filtered or unexported fields
}

LanguageUpdate is the builder for updating Language entities.

func (*LanguageUpdate) AddRaceSpeakerIDs

func (lu *LanguageUpdate) AddRaceSpeakerIDs(ids ...int) *LanguageUpdate

AddRaceSpeakerIDs adds the "race_speakers" edge to the Race entity by IDs.

func (*LanguageUpdate) AddRaceSpeakers

func (lu *LanguageUpdate) AddRaceSpeakers(r ...*Race) *LanguageUpdate

AddRaceSpeakers adds the "race_speakers" edges to the Race entity.

func (*LanguageUpdate) ClearRaceSpeakers

func (lu *LanguageUpdate) ClearRaceSpeakers() *LanguageUpdate

ClearRaceSpeakers clears all "race_speakers" edges to the Race entity.

func (*LanguageUpdate) ClearScript

func (lu *LanguageUpdate) ClearScript() *LanguageUpdate

ClearScript clears the value of the "script" field.

func (*LanguageUpdate) Exec

func (lu *LanguageUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*LanguageUpdate) ExecX

func (lu *LanguageUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*LanguageUpdate) Mutation

func (lu *LanguageUpdate) Mutation() *LanguageMutation

Mutation returns the LanguageMutation object of the builder.

func (*LanguageUpdate) RemoveRaceSpeakerIDs

func (lu *LanguageUpdate) RemoveRaceSpeakerIDs(ids ...int) *LanguageUpdate

RemoveRaceSpeakerIDs removes the "race_speakers" edge to Race entities by IDs.

func (*LanguageUpdate) RemoveRaceSpeakers

func (lu *LanguageUpdate) RemoveRaceSpeakers(r ...*Race) *LanguageUpdate

RemoveRaceSpeakers removes "race_speakers" edges to Race entities.

func (*LanguageUpdate) Save

func (lu *LanguageUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*LanguageUpdate) SaveX

func (lu *LanguageUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*LanguageUpdate) SetDesc

func (lu *LanguageUpdate) SetDesc(s string) *LanguageUpdate

SetDesc sets the "desc" field.

func (*LanguageUpdate) SetIndx

func (lu *LanguageUpdate) SetIndx(s string) *LanguageUpdate

SetIndx sets the "indx" field.

func (*LanguageUpdate) SetLanguageType

func (lu *LanguageUpdate) SetLanguageType(lt language.LanguageType) *LanguageUpdate

SetLanguageType sets the "language_type" field.

func (*LanguageUpdate) SetName

func (lu *LanguageUpdate) SetName(s string) *LanguageUpdate

SetName sets the "name" field.

func (*LanguageUpdate) SetNillableLanguageType

func (lu *LanguageUpdate) SetNillableLanguageType(lt *language.LanguageType) *LanguageUpdate

SetNillableLanguageType sets the "language_type" field if the given value is not nil.

func (*LanguageUpdate) SetNillableScript

func (lu *LanguageUpdate) SetNillableScript(l *language.Script) *LanguageUpdate

SetNillableScript sets the "script" field if the given value is not nil.

func (*LanguageUpdate) SetScript

func (lu *LanguageUpdate) SetScript(l language.Script) *LanguageUpdate

SetScript sets the "script" field.

func (*LanguageUpdate) Where

func (lu *LanguageUpdate) Where(ps ...predicate.Language) *LanguageUpdate

Where appends a list predicates to the LanguageUpdate builder.

type LanguageUpdateOne

type LanguageUpdateOne struct {
	// contains filtered or unexported fields
}

LanguageUpdateOne is the builder for updating a single Language entity.

func (*LanguageUpdateOne) AddRaceSpeakerIDs

func (luo *LanguageUpdateOne) AddRaceSpeakerIDs(ids ...int) *LanguageUpdateOne

AddRaceSpeakerIDs adds the "race_speakers" edge to the Race entity by IDs.

func (*LanguageUpdateOne) AddRaceSpeakers

func (luo *LanguageUpdateOne) AddRaceSpeakers(r ...*Race) *LanguageUpdateOne

AddRaceSpeakers adds the "race_speakers" edges to the Race entity.

func (*LanguageUpdateOne) ClearRaceSpeakers

func (luo *LanguageUpdateOne) ClearRaceSpeakers() *LanguageUpdateOne

ClearRaceSpeakers clears all "race_speakers" edges to the Race entity.

func (*LanguageUpdateOne) ClearScript

func (luo *LanguageUpdateOne) ClearScript() *LanguageUpdateOne

ClearScript clears the value of the "script" field.

func (*LanguageUpdateOne) Exec

func (luo *LanguageUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*LanguageUpdateOne) ExecX

func (luo *LanguageUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*LanguageUpdateOne) Mutation

func (luo *LanguageUpdateOne) Mutation() *LanguageMutation

Mutation returns the LanguageMutation object of the builder.

func (*LanguageUpdateOne) RemoveRaceSpeakerIDs

func (luo *LanguageUpdateOne) RemoveRaceSpeakerIDs(ids ...int) *LanguageUpdateOne

RemoveRaceSpeakerIDs removes the "race_speakers" edge to Race entities by IDs.

func (*LanguageUpdateOne) RemoveRaceSpeakers

func (luo *LanguageUpdateOne) RemoveRaceSpeakers(r ...*Race) *LanguageUpdateOne

RemoveRaceSpeakers removes "race_speakers" edges to Race entities.

func (*LanguageUpdateOne) Save

func (luo *LanguageUpdateOne) Save(ctx context.Context) (*Language, error)

Save executes the query and returns the updated Language entity.

func (*LanguageUpdateOne) SaveX

func (luo *LanguageUpdateOne) SaveX(ctx context.Context) *Language

SaveX is like Save, but panics if an error occurs.

func (*LanguageUpdateOne) Select

func (luo *LanguageUpdateOne) Select(field string, fields ...string) *LanguageUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*LanguageUpdateOne) SetDesc

func (luo *LanguageUpdateOne) SetDesc(s string) *LanguageUpdateOne

SetDesc sets the "desc" field.

func (*LanguageUpdateOne) SetIndx

func (luo *LanguageUpdateOne) SetIndx(s string) *LanguageUpdateOne

SetIndx sets the "indx" field.

func (*LanguageUpdateOne) SetLanguageType

func (luo *LanguageUpdateOne) SetLanguageType(lt language.LanguageType) *LanguageUpdateOne

SetLanguageType sets the "language_type" field.

func (*LanguageUpdateOne) SetName

func (luo *LanguageUpdateOne) SetName(s string) *LanguageUpdateOne

SetName sets the "name" field.

func (*LanguageUpdateOne) SetNillableLanguageType

func (luo *LanguageUpdateOne) SetNillableLanguageType(lt *language.LanguageType) *LanguageUpdateOne

SetNillableLanguageType sets the "language_type" field if the given value is not nil.

func (*LanguageUpdateOne) SetNillableScript

func (luo *LanguageUpdateOne) SetNillableScript(l *language.Script) *LanguageUpdateOne

SetNillableScript sets the "script" field if the given value is not nil.

func (*LanguageUpdateOne) SetScript

SetScript sets the "script" field.

func (*LanguageUpdateOne) Where

Where appends a list predicates to the LanguageUpdate builder.

type LanguageWhereInput

type LanguageWhereInput struct {
	Predicates []predicate.Language  `json:"-"`
	Not        *LanguageWhereInput   `json:"not,omitempty"`
	Or         []*LanguageWhereInput `json:"or,omitempty"`
	And        []*LanguageWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "indx" field predicates.
	Indx             *string  `json:"indx,omitempty"`
	IndxNEQ          *string  `json:"indxNEQ,omitempty"`
	IndxIn           []string `json:"indxIn,omitempty"`
	IndxNotIn        []string `json:"indxNotIn,omitempty"`
	IndxGT           *string  `json:"indxGT,omitempty"`
	IndxGTE          *string  `json:"indxGTE,omitempty"`
	IndxLT           *string  `json:"indxLT,omitempty"`
	IndxLTE          *string  `json:"indxLTE,omitempty"`
	IndxContains     *string  `json:"indxContains,omitempty"`
	IndxHasPrefix    *string  `json:"indxHasPrefix,omitempty"`
	IndxHasSuffix    *string  `json:"indxHasSuffix,omitempty"`
	IndxEqualFold    *string  `json:"indxEqualFold,omitempty"`
	IndxContainsFold *string  `json:"indxContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "desc" field predicates.
	Desc             *string  `json:"desc,omitempty"`
	DescNEQ          *string  `json:"descNEQ,omitempty"`
	DescIn           []string `json:"descIn,omitempty"`
	DescNotIn        []string `json:"descNotIn,omitempty"`
	DescGT           *string  `json:"descGT,omitempty"`
	DescGTE          *string  `json:"descGTE,omitempty"`
	DescLT           *string  `json:"descLT,omitempty"`
	DescLTE          *string  `json:"descLTE,omitempty"`
	DescContains     *string  `json:"descContains,omitempty"`
	DescHasPrefix    *string  `json:"descHasPrefix,omitempty"`
	DescHasSuffix    *string  `json:"descHasSuffix,omitempty"`
	DescEqualFold    *string  `json:"descEqualFold,omitempty"`
	DescContainsFold *string  `json:"descContainsFold,omitempty"`

	// "language_type" field predicates.
	LanguageType      *language.LanguageType  `json:"languageType,omitempty"`
	LanguageTypeNEQ   *language.LanguageType  `json:"languageTypeNEQ,omitempty"`
	LanguageTypeIn    []language.LanguageType `json:"languageTypeIn,omitempty"`
	LanguageTypeNotIn []language.LanguageType `json:"languageTypeNotIn,omitempty"`

	// "script" field predicates.
	Script       *language.Script  `json:"script,omitempty"`
	ScriptNEQ    *language.Script  `json:"scriptNEQ,omitempty"`
	ScriptIn     []language.Script `json:"scriptIn,omitempty"`
	ScriptNotIn  []language.Script `json:"scriptNotIn,omitempty"`
	ScriptIsNil  bool              `json:"scriptIsNil,omitempty"`
	ScriptNotNil bool              `json:"scriptNotNil,omitempty"`

	// "race_speakers" edge predicates.
	HasRaceSpeakers     *bool             `json:"hasRaceSpeakers,omitempty"`
	HasRaceSpeakersWith []*RaceWhereInput `json:"hasRaceSpeakersWith,omitempty"`
}

LanguageWhereInput represents a where input for filtering Language queries.

func (*LanguageWhereInput) AddPredicates

func (i *LanguageWhereInput) AddPredicates(predicates ...predicate.Language)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*LanguageWhereInput) Filter

Filter applies the LanguageWhereInput filter on the LanguageQuery builder.

func (*LanguageWhereInput) P

P returns a predicate for filtering languages. An error is returned if the input is empty or invalid.

type Languages

type Languages []*Language

Languages is a parsable slice of Language.

type MagicSchool

type MagicSchool struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Indx holds the value of the "indx" field.
	Indx string `json:"index"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Desc holds the value of the "desc" field.
	Desc string `json:"desc,omitempty"`
	// contains filtered or unexported fields
}

MagicSchool is the model entity for the MagicSchool schema.

func (*MagicSchool) IsNode

func (n *MagicSchool) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*MagicSchool) Node

func (ms *MagicSchool) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*MagicSchool) String

func (ms *MagicSchool) String() string

String implements the fmt.Stringer.

func (*MagicSchool) ToEdge

func (ms *MagicSchool) ToEdge(order *MagicSchoolOrder) *MagicSchoolEdge

ToEdge converts MagicSchool into MagicSchoolEdge.

func (*MagicSchool) Unwrap

func (ms *MagicSchool) Unwrap() *MagicSchool

Unwrap unwraps the MagicSchool entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*MagicSchool) Update

func (ms *MagicSchool) Update() *MagicSchoolUpdateOne

Update returns a builder for updating this MagicSchool. Note that you need to call MagicSchool.Unwrap() before calling this method if this MagicSchool was returned from a transaction, and the transaction was committed or rolled back.

func (*MagicSchool) Value

func (ms *MagicSchool) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the MagicSchool. This includes values selected through modifiers, order, etc.

type MagicSchoolClient

type MagicSchoolClient struct {
	// contains filtered or unexported fields
}

MagicSchoolClient is a client for the MagicSchool schema.

func NewMagicSchoolClient

func NewMagicSchoolClient(c config) *MagicSchoolClient

NewMagicSchoolClient returns a client for the MagicSchool from the given config.

func (*MagicSchoolClient) Create

func (c *MagicSchoolClient) Create() *MagicSchoolCreate

Create returns a builder for creating a MagicSchool entity.

func (*MagicSchoolClient) CreateBulk

func (c *MagicSchoolClient) CreateBulk(builders ...*MagicSchoolCreate) *MagicSchoolCreateBulk

CreateBulk returns a builder for creating a bulk of MagicSchool entities.

func (*MagicSchoolClient) Delete

func (c *MagicSchoolClient) Delete() *MagicSchoolDelete

Delete returns a delete builder for MagicSchool.

func (*MagicSchoolClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MagicSchoolClient) DeleteOneID

func (c *MagicSchoolClient) DeleteOneID(id int) *MagicSchoolDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*MagicSchoolClient) Get

func (c *MagicSchoolClient) Get(ctx context.Context, id int) (*MagicSchool, error)

Get returns a MagicSchool entity by its id.

func (*MagicSchoolClient) GetX

func (c *MagicSchoolClient) GetX(ctx context.Context, id int) *MagicSchool

GetX is like Get, but panics if an error occurs.

func (*MagicSchoolClient) Hooks

func (c *MagicSchoolClient) Hooks() []Hook

Hooks returns the client hooks.

func (*MagicSchoolClient) Intercept

func (c *MagicSchoolClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `magicschool.Intercept(f(g(h())))`.

func (*MagicSchoolClient) Interceptors

func (c *MagicSchoolClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*MagicSchoolClient) Query

func (c *MagicSchoolClient) Query() *MagicSchoolQuery

Query returns a query builder for MagicSchool.

func (*MagicSchoolClient) Update

func (c *MagicSchoolClient) Update() *MagicSchoolUpdate

Update returns an update builder for MagicSchool.

func (*MagicSchoolClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*MagicSchoolClient) UpdateOneID

func (c *MagicSchoolClient) UpdateOneID(id int) *MagicSchoolUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MagicSchoolClient) Use

func (c *MagicSchoolClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `magicschool.Hooks(f(g(h())))`.

type MagicSchoolConnection

type MagicSchoolConnection struct {
	Edges      []*MagicSchoolEdge `json:"edges"`
	PageInfo   PageInfo           `json:"pageInfo"`
	TotalCount int                `json:"totalCount"`
}

MagicSchoolConnection is the connection containing edges to MagicSchool.

type MagicSchoolCreate

type MagicSchoolCreate struct {
	// contains filtered or unexported fields
}

MagicSchoolCreate is the builder for creating a MagicSchool entity.

func (*MagicSchoolCreate) Exec

func (msc *MagicSchoolCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MagicSchoolCreate) ExecX

func (msc *MagicSchoolCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MagicSchoolCreate) Mutation

func (msc *MagicSchoolCreate) Mutation() *MagicSchoolMutation

Mutation returns the MagicSchoolMutation object of the builder.

func (*MagicSchoolCreate) Save

func (msc *MagicSchoolCreate) Save(ctx context.Context) (*MagicSchool, error)

Save creates the MagicSchool in the database.

func (*MagicSchoolCreate) SaveX

func (msc *MagicSchoolCreate) SaveX(ctx context.Context) *MagicSchool

SaveX calls Save and panics if Save returns an error.

func (*MagicSchoolCreate) SetDesc

func (msc *MagicSchoolCreate) SetDesc(s string) *MagicSchoolCreate

SetDesc sets the "desc" field.

func (*MagicSchoolCreate) SetIndx

func (msc *MagicSchoolCreate) SetIndx(s string) *MagicSchoolCreate

SetIndx sets the "indx" field.

func (*MagicSchoolCreate) SetMagicSchool

func (msc *MagicSchoolCreate) SetMagicSchool(input *MagicSchool) *MagicSchoolCreate

func (*MagicSchoolCreate) SetName

func (msc *MagicSchoolCreate) SetName(s string) *MagicSchoolCreate

SetName sets the "name" field.

type MagicSchoolCreateBulk

type MagicSchoolCreateBulk struct {
	// contains filtered or unexported fields
}

MagicSchoolCreateBulk is the builder for creating many MagicSchool entities in bulk.

func (*MagicSchoolCreateBulk) Exec

func (mscb *MagicSchoolCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MagicSchoolCreateBulk) ExecX

func (mscb *MagicSchoolCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MagicSchoolCreateBulk) Save

func (mscb *MagicSchoolCreateBulk) Save(ctx context.Context) ([]*MagicSchool, error)

Save creates the MagicSchool entities in the database.

func (*MagicSchoolCreateBulk) SaveX

func (mscb *MagicSchoolCreateBulk) SaveX(ctx context.Context) []*MagicSchool

SaveX is like Save, but panics if an error occurs.

type MagicSchoolDelete

type MagicSchoolDelete struct {
	// contains filtered or unexported fields
}

MagicSchoolDelete is the builder for deleting a MagicSchool entity.

func (*MagicSchoolDelete) Exec

func (msd *MagicSchoolDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*MagicSchoolDelete) ExecX

func (msd *MagicSchoolDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*MagicSchoolDelete) Where

Where appends a list predicates to the MagicSchoolDelete builder.

type MagicSchoolDeleteOne

type MagicSchoolDeleteOne struct {
	// contains filtered or unexported fields
}

MagicSchoolDeleteOne is the builder for deleting a single MagicSchool entity.

func (*MagicSchoolDeleteOne) Exec

func (msdo *MagicSchoolDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MagicSchoolDeleteOne) ExecX

func (msdo *MagicSchoolDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MagicSchoolDeleteOne) Where

Where appends a list predicates to the MagicSchoolDelete builder.

type MagicSchoolEdge

type MagicSchoolEdge struct {
	Node   *MagicSchool `json:"node"`
	Cursor Cursor       `json:"cursor"`
}

MagicSchoolEdge is the edge representation of MagicSchool.

type MagicSchoolGroupBy

type MagicSchoolGroupBy struct {
	// contains filtered or unexported fields
}

MagicSchoolGroupBy is the group-by builder for MagicSchool entities.

func (*MagicSchoolGroupBy) Aggregate

func (msgb *MagicSchoolGroupBy) Aggregate(fns ...AggregateFunc) *MagicSchoolGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*MagicSchoolGroupBy) Bool

func (s *MagicSchoolGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MagicSchoolGroupBy) BoolX

func (s *MagicSchoolGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MagicSchoolGroupBy) Bools

func (s *MagicSchoolGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MagicSchoolGroupBy) BoolsX

func (s *MagicSchoolGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MagicSchoolGroupBy) Float64

func (s *MagicSchoolGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MagicSchoolGroupBy) Float64X

func (s *MagicSchoolGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MagicSchoolGroupBy) Float64s

func (s *MagicSchoolGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MagicSchoolGroupBy) Float64sX

func (s *MagicSchoolGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MagicSchoolGroupBy) Int

func (s *MagicSchoolGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MagicSchoolGroupBy) IntX

func (s *MagicSchoolGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MagicSchoolGroupBy) Ints

func (s *MagicSchoolGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MagicSchoolGroupBy) IntsX

func (s *MagicSchoolGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MagicSchoolGroupBy) Scan

func (msgb *MagicSchoolGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MagicSchoolGroupBy) ScanX

func (s *MagicSchoolGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MagicSchoolGroupBy) String

func (s *MagicSchoolGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MagicSchoolGroupBy) StringX

func (s *MagicSchoolGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MagicSchoolGroupBy) Strings

func (s *MagicSchoolGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MagicSchoolGroupBy) StringsX

func (s *MagicSchoolGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MagicSchoolMutation

type MagicSchoolMutation struct {
	// contains filtered or unexported fields
}

MagicSchoolMutation represents an operation that mutates the MagicSchool nodes in the graph.

func (*MagicSchoolMutation) AddField

func (m *MagicSchoolMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*MagicSchoolMutation) AddedEdges

func (m *MagicSchoolMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*MagicSchoolMutation) AddedField

func (m *MagicSchoolMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*MagicSchoolMutation) AddedFields

func (m *MagicSchoolMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*MagicSchoolMutation) AddedIDs

func (m *MagicSchoolMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*MagicSchoolMutation) ClearEdge

func (m *MagicSchoolMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*MagicSchoolMutation) ClearField

func (m *MagicSchoolMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*MagicSchoolMutation) ClearedEdges

func (m *MagicSchoolMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*MagicSchoolMutation) ClearedFields

func (m *MagicSchoolMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (MagicSchoolMutation) Client

func (m MagicSchoolMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*MagicSchoolMutation) Desc

func (m *MagicSchoolMutation) Desc() (r string, exists bool)

Desc returns the value of the "desc" field in the mutation.

func (*MagicSchoolMutation) EdgeCleared

func (m *MagicSchoolMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*MagicSchoolMutation) Field

func (m *MagicSchoolMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*MagicSchoolMutation) FieldCleared

func (m *MagicSchoolMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*MagicSchoolMutation) Fields

func (m *MagicSchoolMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*MagicSchoolMutation) ID

func (m *MagicSchoolMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*MagicSchoolMutation) IDs

func (m *MagicSchoolMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*MagicSchoolMutation) Indx

func (m *MagicSchoolMutation) Indx() (r string, exists bool)

Indx returns the value of the "indx" field in the mutation.

func (*MagicSchoolMutation) Name

func (m *MagicSchoolMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*MagicSchoolMutation) OldDesc

func (m *MagicSchoolMutation) OldDesc(ctx context.Context) (v string, err error)

OldDesc returns the old "desc" field's value of the MagicSchool entity. If the MagicSchool object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MagicSchoolMutation) OldField

func (m *MagicSchoolMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*MagicSchoolMutation) OldIndx

func (m *MagicSchoolMutation) OldIndx(ctx context.Context) (v string, err error)

OldIndx returns the old "indx" field's value of the MagicSchool entity. If the MagicSchool object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MagicSchoolMutation) OldName

func (m *MagicSchoolMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the MagicSchool entity. If the MagicSchool object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MagicSchoolMutation) Op

func (m *MagicSchoolMutation) Op() Op

Op returns the operation name.

func (*MagicSchoolMutation) RemovedEdges

func (m *MagicSchoolMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*MagicSchoolMutation) RemovedIDs

func (m *MagicSchoolMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*MagicSchoolMutation) ResetDesc

func (m *MagicSchoolMutation) ResetDesc()

ResetDesc resets all changes to the "desc" field.

func (*MagicSchoolMutation) ResetEdge

func (m *MagicSchoolMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*MagicSchoolMutation) ResetField

func (m *MagicSchoolMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*MagicSchoolMutation) ResetIndx

func (m *MagicSchoolMutation) ResetIndx()

ResetIndx resets all changes to the "indx" field.

func (*MagicSchoolMutation) ResetName

func (m *MagicSchoolMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*MagicSchoolMutation) SetDesc

func (m *MagicSchoolMutation) SetDesc(s string)

SetDesc sets the "desc" field.

func (*MagicSchoolMutation) SetField

func (m *MagicSchoolMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*MagicSchoolMutation) SetIndx

func (m *MagicSchoolMutation) SetIndx(s string)

SetIndx sets the "indx" field.

func (*MagicSchoolMutation) SetName

func (m *MagicSchoolMutation) SetName(s string)

SetName sets the "name" field.

func (*MagicSchoolMutation) SetOp

func (m *MagicSchoolMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (MagicSchoolMutation) Tx

func (m MagicSchoolMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*MagicSchoolMutation) Type

func (m *MagicSchoolMutation) Type() string

Type returns the node type of this mutation (MagicSchool).

func (*MagicSchoolMutation) Where

func (m *MagicSchoolMutation) Where(ps ...predicate.MagicSchool)

Where appends a list predicates to the MagicSchoolMutation builder.

func (*MagicSchoolMutation) WhereP

func (m *MagicSchoolMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the MagicSchoolMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type MagicSchoolOrder

type MagicSchoolOrder struct {
	Direction OrderDirection         `json:"direction"`
	Field     *MagicSchoolOrderField `json:"field"`
}

MagicSchoolOrder defines the ordering of MagicSchool.

type MagicSchoolOrderField

type MagicSchoolOrderField struct {
	// Value extracts the ordering value from the given MagicSchool.
	Value func(*MagicSchool) (ent.Value, error)
	// contains filtered or unexported fields
}

MagicSchoolOrderField defines the ordering field of MagicSchool.

func (MagicSchoolOrderField) MarshalGQL

func (f MagicSchoolOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (MagicSchoolOrderField) String

func (f MagicSchoolOrderField) String() string

String implement fmt.Stringer interface.

func (*MagicSchoolOrderField) UnmarshalGQL

func (f *MagicSchoolOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type MagicSchoolPaginateOption

type MagicSchoolPaginateOption func(*magicschoolPager) error

MagicSchoolPaginateOption enables pagination customization.

func WithMagicSchoolFilter

func WithMagicSchoolFilter(filter func(*MagicSchoolQuery) (*MagicSchoolQuery, error)) MagicSchoolPaginateOption

WithMagicSchoolFilter configures pagination filter.

func WithMagicSchoolOrder

func WithMagicSchoolOrder(order *MagicSchoolOrder) MagicSchoolPaginateOption

WithMagicSchoolOrder configures pagination ordering.

type MagicSchoolQuery

type MagicSchoolQuery struct {
	// contains filtered or unexported fields
}

MagicSchoolQuery is the builder for querying MagicSchool entities.

func (*MagicSchoolQuery) Aggregate

func (msq *MagicSchoolQuery) Aggregate(fns ...AggregateFunc) *MagicSchoolSelect

Aggregate returns a MagicSchoolSelect configured with the given aggregations.

func (*MagicSchoolQuery) All

func (msq *MagicSchoolQuery) All(ctx context.Context) ([]*MagicSchool, error)

All executes the query and returns a list of MagicSchools.

func (*MagicSchoolQuery) AllX

func (msq *MagicSchoolQuery) AllX(ctx context.Context) []*MagicSchool

AllX is like All, but panics if an error occurs.

func (*MagicSchoolQuery) Clone

func (msq *MagicSchoolQuery) Clone() *MagicSchoolQuery

Clone returns a duplicate of the MagicSchoolQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*MagicSchoolQuery) CollectFields

func (ms *MagicSchoolQuery) CollectFields(ctx context.Context, satisfies ...string) (*MagicSchoolQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*MagicSchoolQuery) Count

func (msq *MagicSchoolQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MagicSchoolQuery) CountX

func (msq *MagicSchoolQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MagicSchoolQuery) Exist

func (msq *MagicSchoolQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MagicSchoolQuery) ExistX

func (msq *MagicSchoolQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MagicSchoolQuery) First

func (msq *MagicSchoolQuery) First(ctx context.Context) (*MagicSchool, error)

First returns the first MagicSchool entity from the query. Returns a *NotFoundError when no MagicSchool was found.

func (*MagicSchoolQuery) FirstID

func (msq *MagicSchoolQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first MagicSchool ID from the query. Returns a *NotFoundError when no MagicSchool ID was found.

func (*MagicSchoolQuery) FirstIDX

func (msq *MagicSchoolQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*MagicSchoolQuery) FirstX

func (msq *MagicSchoolQuery) FirstX(ctx context.Context) *MagicSchool

FirstX is like First, but panics if an error occurs.

func (*MagicSchoolQuery) GroupBy

func (msq *MagicSchoolQuery) GroupBy(field string, fields ...string) *MagicSchoolGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Indx string `json:"index"`
	Count int `json:"count,omitempty"`
}

client.MagicSchool.Query().
	GroupBy(magicschool.FieldIndx).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MagicSchoolQuery) IDs

func (msq *MagicSchoolQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of MagicSchool IDs.

func (*MagicSchoolQuery) IDsX

func (msq *MagicSchoolQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*MagicSchoolQuery) Limit

func (msq *MagicSchoolQuery) Limit(limit int) *MagicSchoolQuery

Limit the number of records to be returned by this query.

func (*MagicSchoolQuery) Offset

func (msq *MagicSchoolQuery) Offset(offset int) *MagicSchoolQuery

Offset to start from.

func (*MagicSchoolQuery) Only

func (msq *MagicSchoolQuery) Only(ctx context.Context) (*MagicSchool, error)

Only returns a single MagicSchool entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MagicSchool entity is found. Returns a *NotFoundError when no MagicSchool entities are found.

func (*MagicSchoolQuery) OnlyID

func (msq *MagicSchoolQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only MagicSchool ID in the query. Returns a *NotSingularError when more than one MagicSchool ID is found. Returns a *NotFoundError when no entities are found.

func (*MagicSchoolQuery) OnlyIDX

func (msq *MagicSchoolQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*MagicSchoolQuery) OnlyX

func (msq *MagicSchoolQuery) OnlyX(ctx context.Context) *MagicSchool

OnlyX is like Only, but panics if an error occurs.

func (*MagicSchoolQuery) Order

Order specifies how the records should be ordered.

func (*MagicSchoolQuery) Paginate

func (ms *MagicSchoolQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...MagicSchoolPaginateOption,
) (*MagicSchoolConnection, error)

Paginate executes the query and returns a relay based cursor connection to MagicSchool.

func (*MagicSchoolQuery) Select

func (msq *MagicSchoolQuery) Select(fields ...string) *MagicSchoolSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Indx string `json:"index"`
}

client.MagicSchool.Query().
	Select(magicschool.FieldIndx).
	Scan(ctx, &v)

func (*MagicSchoolQuery) Unique

func (msq *MagicSchoolQuery) Unique(unique bool) *MagicSchoolQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*MagicSchoolQuery) Where

Where adds a new predicate for the MagicSchoolQuery builder.

type MagicSchoolSelect

type MagicSchoolSelect struct {
	*MagicSchoolQuery
	// contains filtered or unexported fields
}

MagicSchoolSelect is the builder for selecting fields of MagicSchool entities.

func (*MagicSchoolSelect) Aggregate

func (mss *MagicSchoolSelect) Aggregate(fns ...AggregateFunc) *MagicSchoolSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MagicSchoolSelect) Bool

func (s *MagicSchoolSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MagicSchoolSelect) BoolX

func (s *MagicSchoolSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MagicSchoolSelect) Bools

func (s *MagicSchoolSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MagicSchoolSelect) BoolsX

func (s *MagicSchoolSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MagicSchoolSelect) Float64

func (s *MagicSchoolSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MagicSchoolSelect) Float64X

func (s *MagicSchoolSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MagicSchoolSelect) Float64s

func (s *MagicSchoolSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MagicSchoolSelect) Float64sX

func (s *MagicSchoolSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MagicSchoolSelect) Int

func (s *MagicSchoolSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MagicSchoolSelect) IntX

func (s *MagicSchoolSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MagicSchoolSelect) Ints

func (s *MagicSchoolSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MagicSchoolSelect) IntsX

func (s *MagicSchoolSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MagicSchoolSelect) Scan

func (mss *MagicSchoolSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MagicSchoolSelect) ScanX

func (s *MagicSchoolSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MagicSchoolSelect) String

func (s *MagicSchoolSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MagicSchoolSelect) StringX

func (s *MagicSchoolSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MagicSchoolSelect) Strings

func (s *MagicSchoolSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MagicSchoolSelect) StringsX

func (s *MagicSchoolSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MagicSchoolUpdate

type MagicSchoolUpdate struct {
	// contains filtered or unexported fields
}

MagicSchoolUpdate is the builder for updating MagicSchool entities.

func (*MagicSchoolUpdate) Exec

func (msu *MagicSchoolUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MagicSchoolUpdate) ExecX

func (msu *MagicSchoolUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MagicSchoolUpdate) Mutation

func (msu *MagicSchoolUpdate) Mutation() *MagicSchoolMutation

Mutation returns the MagicSchoolMutation object of the builder.

func (*MagicSchoolUpdate) Save

func (msu *MagicSchoolUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*MagicSchoolUpdate) SaveX

func (msu *MagicSchoolUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MagicSchoolUpdate) SetDesc

func (msu *MagicSchoolUpdate) SetDesc(s string) *MagicSchoolUpdate

SetDesc sets the "desc" field.

func (*MagicSchoolUpdate) SetIndx

func (msu *MagicSchoolUpdate) SetIndx(s string) *MagicSchoolUpdate

SetIndx sets the "indx" field.

func (*MagicSchoolUpdate) SetName

func (msu *MagicSchoolUpdate) SetName(s string) *MagicSchoolUpdate

SetName sets the "name" field.

func (*MagicSchoolUpdate) Where

Where appends a list predicates to the MagicSchoolUpdate builder.

type MagicSchoolUpdateOne

type MagicSchoolUpdateOne struct {
	// contains filtered or unexported fields
}

MagicSchoolUpdateOne is the builder for updating a single MagicSchool entity.

func (*MagicSchoolUpdateOne) Exec

func (msuo *MagicSchoolUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MagicSchoolUpdateOne) ExecX

func (msuo *MagicSchoolUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MagicSchoolUpdateOne) Mutation

func (msuo *MagicSchoolUpdateOne) Mutation() *MagicSchoolMutation

Mutation returns the MagicSchoolMutation object of the builder.

func (*MagicSchoolUpdateOne) Save

Save executes the query and returns the updated MagicSchool entity.

func (*MagicSchoolUpdateOne) SaveX

func (msuo *MagicSchoolUpdateOne) SaveX(ctx context.Context) *MagicSchool

SaveX is like Save, but panics if an error occurs.

func (*MagicSchoolUpdateOne) Select

func (msuo *MagicSchoolUpdateOne) Select(field string, fields ...string) *MagicSchoolUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*MagicSchoolUpdateOne) SetDesc

SetDesc sets the "desc" field.

func (*MagicSchoolUpdateOne) SetIndx

SetIndx sets the "indx" field.

func (*MagicSchoolUpdateOne) SetName

SetName sets the "name" field.

func (*MagicSchoolUpdateOne) Where

Where appends a list predicates to the MagicSchoolUpdate builder.

type MagicSchoolWhereInput

type MagicSchoolWhereInput struct {
	Predicates []predicate.MagicSchool  `json:"-"`
	Not        *MagicSchoolWhereInput   `json:"not,omitempty"`
	Or         []*MagicSchoolWhereInput `json:"or,omitempty"`
	And        []*MagicSchoolWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "indx" field predicates.
	Indx             *string  `json:"indx,omitempty"`
	IndxNEQ          *string  `json:"indxNEQ,omitempty"`
	IndxIn           []string `json:"indxIn,omitempty"`
	IndxNotIn        []string `json:"indxNotIn,omitempty"`
	IndxGT           *string  `json:"indxGT,omitempty"`
	IndxGTE          *string  `json:"indxGTE,omitempty"`
	IndxLT           *string  `json:"indxLT,omitempty"`
	IndxLTE          *string  `json:"indxLTE,omitempty"`
	IndxContains     *string  `json:"indxContains,omitempty"`
	IndxHasPrefix    *string  `json:"indxHasPrefix,omitempty"`
	IndxHasSuffix    *string  `json:"indxHasSuffix,omitempty"`
	IndxEqualFold    *string  `json:"indxEqualFold,omitempty"`
	IndxContainsFold *string  `json:"indxContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "desc" field predicates.
	Desc             *string  `json:"desc,omitempty"`
	DescNEQ          *string  `json:"descNEQ,omitempty"`
	DescIn           []string `json:"descIn,omitempty"`
	DescNotIn        []string `json:"descNotIn,omitempty"`
	DescGT           *string  `json:"descGT,omitempty"`
	DescGTE          *string  `json:"descGTE,omitempty"`
	DescLT           *string  `json:"descLT,omitempty"`
	DescLTE          *string  `json:"descLTE,omitempty"`
	DescContains     *string  `json:"descContains,omitempty"`
	DescHasPrefix    *string  `json:"descHasPrefix,omitempty"`
	DescHasSuffix    *string  `json:"descHasSuffix,omitempty"`
	DescEqualFold    *string  `json:"descEqualFold,omitempty"`
	DescContainsFold *string  `json:"descContainsFold,omitempty"`
}

MagicSchoolWhereInput represents a where input for filtering MagicSchool queries.

func (*MagicSchoolWhereInput) AddPredicates

func (i *MagicSchoolWhereInput) AddPredicates(predicates ...predicate.MagicSchool)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*MagicSchoolWhereInput) Filter

Filter applies the MagicSchoolWhereInput filter on the MagicSchoolQuery builder.

func (*MagicSchoolWhereInput) P

P returns a predicate for filtering magicschools. An error is returned if the input is empty or invalid.

type MagicSchools

type MagicSchools []*MagicSchool

MagicSchools is a parsable slice of MagicSchool.

type MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

ent aliases to avoid import conflicts in user's code.

type Node

type Node struct {
	ID     int      `json:"id,omitempty"`     // node id.
	Type   string   `json:"type,omitempty"`   // node type.
	Fields []*Field `json:"fields,omitempty"` // node fields.
	Edges  []*Edge  `json:"edges,omitempty"`  // node edges.
}

Node in the graph.

type NodeOption

type NodeOption func(*nodeOptions)

NodeOption allows configuring the Noder execution using functional options.

func WithFixedNodeType

func WithFixedNodeType(t string) NodeOption

WithFixedNodeType sets the Type of the node to a fixed value.

func WithNodeType

func WithNodeType(f func(context.Context, int) (string, error)) NodeOption

WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.

type Noder

type Noder interface {
	Node(context.Context) (*Node, error)
	IsNode()
}

Noder wraps the basic Node method.

type NotFoundError

type NotFoundError struct {
	// contains filtered or unexported fields
}

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

type NotLoadedError struct {
	// contains filtered or unexported fields
}

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

type NotSingularError struct {
	// contains filtered or unexported fields
}

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderDirection

type OrderDirection = entgql.OrderDirection

Common entgql types.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.

type PageInfo

type PageInfo = entgql.PageInfo[int]

Common entgql types.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Proficiencies

type Proficiencies []*Proficiency

Proficiencies is a parsable slice of Proficiency.

type Proficiency

type Proficiency struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Indx holds the value of the "indx" field.
	Indx string `json:"index"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// ProficiencyCategory holds the value of the "proficiency_category" field.
	ProficiencyCategory string `json:"type"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ProficiencyQuery when eager-loading is set.
	Edges ProficiencyEdges `json:"-"`
	// contains filtered or unexported fields
}

Proficiency is the model entity for the Proficiency schema.

func (*Proficiency) Choice

func (pr *Proficiency) Choice(ctx context.Context) (result []*ProficiencyChoice, err error)

func (*Proficiency) Classes

func (pr *Proficiency) Classes(ctx context.Context) (result []*Class, err error)

func (*Proficiency) Equipment

func (pr *Proficiency) Equipment(ctx context.Context) (result []*Equipment, err error)

func (*Proficiency) EquipmentCategory

func (pr *Proficiency) EquipmentCategory(ctx context.Context) (result []*EquipmentCategory, err error)

func (*Proficiency) IsNode

func (n *Proficiency) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Proficiency) MarshalJSON

func (pr *Proficiency) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Proficiency) NamedChoice

func (pr *Proficiency) NamedChoice(name string) ([]*ProficiencyChoice, error)

NamedChoice returns the Choice named value or an error if the edge was not loaded in eager-loading with this name.

func (*Proficiency) NamedClasses

func (pr *Proficiency) NamedClasses(name string) ([]*Class, error)

NamedClasses returns the Classes named value or an error if the edge was not loaded in eager-loading with this name.

func (*Proficiency) NamedEquipment

func (pr *Proficiency) NamedEquipment(name string) ([]*Equipment, error)

NamedEquipment returns the Equipment named value or an error if the edge was not loaded in eager-loading with this name.

func (*Proficiency) NamedEquipmentCategory

func (pr *Proficiency) NamedEquipmentCategory(name string) ([]*EquipmentCategory, error)

NamedEquipmentCategory returns the EquipmentCategory named value or an error if the edge was not loaded in eager-loading with this name.

func (*Proficiency) NamedRaces

func (pr *Proficiency) NamedRaces(name string) ([]*Race, error)

NamedRaces returns the Races named value or an error if the edge was not loaded in eager-loading with this name.

func (*Proficiency) NamedSavingThrow

func (pr *Proficiency) NamedSavingThrow(name string) ([]*AbilityScore, error)

NamedSavingThrow returns the SavingThrow named value or an error if the edge was not loaded in eager-loading with this name.

func (*Proficiency) NamedSkill

func (pr *Proficiency) NamedSkill(name string) ([]*Skill, error)

NamedSkill returns the Skill named value or an error if the edge was not loaded in eager-loading with this name.

func (*Proficiency) NamedSubraces

func (pr *Proficiency) NamedSubraces(name string) ([]*Subrace, error)

NamedSubraces returns the Subraces named value or an error if the edge was not loaded in eager-loading with this name.

func (*Proficiency) Node

func (pr *Proficiency) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*Proficiency) QueryChoice

func (pr *Proficiency) QueryChoice() *ProficiencyChoiceQuery

QueryChoice queries the "choice" edge of the Proficiency entity.

func (*Proficiency) QueryClasses

func (pr *Proficiency) QueryClasses() *ClassQuery

QueryClasses queries the "classes" edge of the Proficiency entity.

func (*Proficiency) QueryEquipment

func (pr *Proficiency) QueryEquipment() *EquipmentQuery

QueryEquipment queries the "equipment" edge of the Proficiency entity.

func (*Proficiency) QueryEquipmentCategory

func (pr *Proficiency) QueryEquipmentCategory() *EquipmentCategoryQuery

QueryEquipmentCategory queries the "equipment_category" edge of the Proficiency entity.

func (*Proficiency) QueryRaces

func (pr *Proficiency) QueryRaces() *RaceQuery

QueryRaces queries the "races" edge of the Proficiency entity.

func (*Proficiency) QuerySavingThrow

func (pr *Proficiency) QuerySavingThrow() *AbilityScoreQuery

QuerySavingThrow queries the "saving_throw" edge of the Proficiency entity.

func (*Proficiency) QuerySkill

func (pr *Proficiency) QuerySkill() *SkillQuery

QuerySkill queries the "skill" edge of the Proficiency entity.

func (*Proficiency) QuerySubraces

func (pr *Proficiency) QuerySubraces() *SubraceQuery

QuerySubraces queries the "subraces" edge of the Proficiency entity.

func (*Proficiency) Races

func (pr *Proficiency) Races(ctx context.Context) (result []*Race, err error)

func (*Proficiency) SavingThrow

func (pr *Proficiency) SavingThrow(ctx context.Context) (result []*AbilityScore, err error)

func (*Proficiency) Skill

func (pr *Proficiency) Skill(ctx context.Context) (result []*Skill, err error)

func (*Proficiency) String

func (pr *Proficiency) String() string

String implements the fmt.Stringer.

func (*Proficiency) Subraces

func (pr *Proficiency) Subraces(ctx context.Context) (result []*Subrace, err error)

func (*Proficiency) ToEdge

func (pr *Proficiency) ToEdge(order *ProficiencyOrder) *ProficiencyEdge

ToEdge converts Proficiency into ProficiencyEdge.

func (*Proficiency) UnmarshalJSON

func (pr *Proficiency) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*Proficiency) Unwrap

func (pr *Proficiency) Unwrap() *Proficiency

Unwrap unwraps the Proficiency entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Proficiency) Update

func (pr *Proficiency) Update() *ProficiencyUpdateOne

Update returns a builder for updating this Proficiency. Note that you need to call Proficiency.Unwrap() before calling this method if this Proficiency was returned from a transaction, and the transaction was committed or rolled back.

func (*Proficiency) Value

func (pr *Proficiency) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Proficiency. This includes values selected through modifiers, order, etc.

type ProficiencyChoice

type ProficiencyChoice struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Choose holds the value of the "choose" field.
	Choose int `json:"choose,omitempty"`
	// Desc holds the value of the "desc" field.
	Desc string `json:"desc,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ProficiencyChoiceQuery when eager-loading is set.
	Edges ProficiencyChoiceEdges `json:"-"`
	// contains filtered or unexported fields
}

ProficiencyChoice is the model entity for the ProficiencyChoice schema.

func (*ProficiencyChoice) Class

func (pc *ProficiencyChoice) Class(ctx context.Context) (result []*Class, err error)

func (*ProficiencyChoice) IsNode

func (n *ProficiencyChoice) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*ProficiencyChoice) MarshalJSON

func (pc *ProficiencyChoice) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*ProficiencyChoice) NamedClass

func (pc *ProficiencyChoice) NamedClass(name string) ([]*Class, error)

NamedClass returns the Class named value or an error if the edge was not loaded in eager-loading with this name.

func (*ProficiencyChoice) NamedProficiency

func (pc *ProficiencyChoice) NamedProficiency(name string) ([]*Proficiency, error)

NamedProficiency returns the Proficiency named value or an error if the edge was not loaded in eager-loading with this name.

func (*ProficiencyChoice) NamedRace

func (pc *ProficiencyChoice) NamedRace(name string) ([]*Race, error)

NamedRace returns the Race named value or an error if the edge was not loaded in eager-loading with this name.

func (*ProficiencyChoice) NamedSubChoice

func (pc *ProficiencyChoice) NamedSubChoice(name string) ([]*ProficiencyChoice, error)

NamedSubChoice returns the SubChoice named value or an error if the edge was not loaded in eager-loading with this name.

func (*ProficiencyChoice) Node

func (pc *ProficiencyChoice) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*ProficiencyChoice) ParentChoice

func (pc *ProficiencyChoice) ParentChoice(ctx context.Context) (*ProficiencyChoice, error)

func (*ProficiencyChoice) Proficiency

func (pc *ProficiencyChoice) Proficiency(ctx context.Context) (result []*Proficiency, err error)

func (*ProficiencyChoice) QueryClass

func (pc *ProficiencyChoice) QueryClass() *ClassQuery

QueryClass queries the "class" edge of the ProficiencyChoice entity.

func (*ProficiencyChoice) QueryParentChoice

func (pc *ProficiencyChoice) QueryParentChoice() *ProficiencyChoiceQuery

QueryParentChoice queries the "parent_choice" edge of the ProficiencyChoice entity.

func (*ProficiencyChoice) QueryProficiency

func (pc *ProficiencyChoice) QueryProficiency() *ProficiencyQuery

QueryProficiency queries the "proficiency" edge of the ProficiencyChoice entity.

func (*ProficiencyChoice) QueryRace

func (pc *ProficiencyChoice) QueryRace() *RaceQuery

QueryRace queries the "race" edge of the ProficiencyChoice entity.

func (*ProficiencyChoice) QuerySubChoice

func (pc *ProficiencyChoice) QuerySubChoice() *ProficiencyChoiceQuery

QuerySubChoice queries the "sub_choice" edge of the ProficiencyChoice entity.

func (*ProficiencyChoice) Race

func (pc *ProficiencyChoice) Race(ctx context.Context) (result []*Race, err error)

func (*ProficiencyChoice) String

func (pc *ProficiencyChoice) String() string

String implements the fmt.Stringer.

func (*ProficiencyChoice) SubChoice

func (pc *ProficiencyChoice) SubChoice(ctx context.Context) (result []*ProficiencyChoice, err error)

func (*ProficiencyChoice) ToEdge

ToEdge converts ProficiencyChoice into ProficiencyChoiceEdge.

func (*ProficiencyChoice) UnmarshalJSON

func (pc *ProficiencyChoice) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*ProficiencyChoice) Unwrap

func (pc *ProficiencyChoice) Unwrap() *ProficiencyChoice

Unwrap unwraps the ProficiencyChoice entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*ProficiencyChoice) Update

Update returns a builder for updating this ProficiencyChoice. Note that you need to call ProficiencyChoice.Unwrap() before calling this method if this ProficiencyChoice was returned from a transaction, and the transaction was committed or rolled back.

func (*ProficiencyChoice) Value

func (pc *ProficiencyChoice) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ProficiencyChoice. This includes values selected through modifiers, order, etc.

type ProficiencyChoiceClient

type ProficiencyChoiceClient struct {
	// contains filtered or unexported fields
}

ProficiencyChoiceClient is a client for the ProficiencyChoice schema.

func NewProficiencyChoiceClient

func NewProficiencyChoiceClient(c config) *ProficiencyChoiceClient

NewProficiencyChoiceClient returns a client for the ProficiencyChoice from the given config.

func (*ProficiencyChoiceClient) Create

Create returns a builder for creating a ProficiencyChoice entity.

func (*ProficiencyChoiceClient) CreateBulk

CreateBulk returns a builder for creating a bulk of ProficiencyChoice entities.

func (*ProficiencyChoiceClient) Delete

Delete returns a delete builder for ProficiencyChoice.

func (*ProficiencyChoiceClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ProficiencyChoiceClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ProficiencyChoiceClient) Get

Get returns a ProficiencyChoice entity by its id.

func (*ProficiencyChoiceClient) GetX

GetX is like Get, but panics if an error occurs.

func (*ProficiencyChoiceClient) Hooks

func (c *ProficiencyChoiceClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ProficiencyChoiceClient) Intercept

func (c *ProficiencyChoiceClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `proficiencychoice.Intercept(f(g(h())))`.

func (*ProficiencyChoiceClient) Interceptors

func (c *ProficiencyChoiceClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ProficiencyChoiceClient) Query

Query returns a query builder for ProficiencyChoice.

func (*ProficiencyChoiceClient) QueryClass

QueryClass queries the class edge of a ProficiencyChoice.

func (*ProficiencyChoiceClient) QueryParentChoice

QueryParentChoice queries the parent_choice edge of a ProficiencyChoice.

func (*ProficiencyChoiceClient) QueryProficiency

QueryProficiency queries the proficiency edge of a ProficiencyChoice.

func (*ProficiencyChoiceClient) QueryRace

QueryRace queries the race edge of a ProficiencyChoice.

func (*ProficiencyChoiceClient) QuerySubChoice

QuerySubChoice queries the sub_choice edge of a ProficiencyChoice.

func (*ProficiencyChoiceClient) Update

Update returns an update builder for ProficiencyChoice.

func (*ProficiencyChoiceClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ProficiencyChoiceClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*ProficiencyChoiceClient) Use

func (c *ProficiencyChoiceClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `proficiencychoice.Hooks(f(g(h())))`.

type ProficiencyChoiceConnection

type ProficiencyChoiceConnection struct {
	Edges      []*ProficiencyChoiceEdge `json:"edges"`
	PageInfo   PageInfo                 `json:"pageInfo"`
	TotalCount int                      `json:"totalCount"`
}

ProficiencyChoiceConnection is the connection containing edges to ProficiencyChoice.

type ProficiencyChoiceCreate

type ProficiencyChoiceCreate struct {
	// contains filtered or unexported fields
}

ProficiencyChoiceCreate is the builder for creating a ProficiencyChoice entity.

func (*ProficiencyChoiceCreate) AddClasIDs

func (pcc *ProficiencyChoiceCreate) AddClasIDs(ids ...int) *ProficiencyChoiceCreate

AddClasIDs adds the "class" edge to the Class entity by IDs.

func (*ProficiencyChoiceCreate) AddClass

AddClass adds the "class" edges to the Class entity.

func (*ProficiencyChoiceCreate) AddProficiency

func (pcc *ProficiencyChoiceCreate) AddProficiency(p ...*Proficiency) *ProficiencyChoiceCreate

AddProficiency adds the "proficiency" edges to the Proficiency entity.

func (*ProficiencyChoiceCreate) AddProficiencyIDs

func (pcc *ProficiencyChoiceCreate) AddProficiencyIDs(ids ...int) *ProficiencyChoiceCreate

AddProficiencyIDs adds the "proficiency" edge to the Proficiency entity by IDs.

func (*ProficiencyChoiceCreate) AddRace

AddRace adds the "race" edges to the Race entity.

func (*ProficiencyChoiceCreate) AddRaceIDs

func (pcc *ProficiencyChoiceCreate) AddRaceIDs(ids ...int) *ProficiencyChoiceCreate

AddRaceIDs adds the "race" edge to the Race entity by IDs.

func (*ProficiencyChoiceCreate) AddSubChoice

AddSubChoice adds the "sub_choice" edges to the ProficiencyChoice entity.

func (*ProficiencyChoiceCreate) AddSubChoiceIDs

func (pcc *ProficiencyChoiceCreate) AddSubChoiceIDs(ids ...int) *ProficiencyChoiceCreate

AddSubChoiceIDs adds the "sub_choice" edge to the ProficiencyChoice entity by IDs.

func (*ProficiencyChoiceCreate) Exec

Exec executes the query.

func (*ProficiencyChoiceCreate) ExecX

func (pcc *ProficiencyChoiceCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProficiencyChoiceCreate) Mutation

Mutation returns the ProficiencyChoiceMutation object of the builder.

func (*ProficiencyChoiceCreate) Save

Save creates the ProficiencyChoice in the database.

func (*ProficiencyChoiceCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ProficiencyChoiceCreate) SetChoose

SetChoose sets the "choose" field.

func (*ProficiencyChoiceCreate) SetDesc

SetDesc sets the "desc" field.

func (*ProficiencyChoiceCreate) SetNillableDesc

func (pcc *ProficiencyChoiceCreate) SetNillableDesc(s *string) *ProficiencyChoiceCreate

SetNillableDesc sets the "desc" field if the given value is not nil.

func (*ProficiencyChoiceCreate) SetNillableParentChoiceID

func (pcc *ProficiencyChoiceCreate) SetNillableParentChoiceID(id *int) *ProficiencyChoiceCreate

SetNillableParentChoiceID sets the "parent_choice" edge to the ProficiencyChoice entity by ID if the given value is not nil.

func (*ProficiencyChoiceCreate) SetParentChoice

SetParentChoice sets the "parent_choice" edge to the ProficiencyChoice entity.

func (*ProficiencyChoiceCreate) SetParentChoiceID

func (pcc *ProficiencyChoiceCreate) SetParentChoiceID(id int) *ProficiencyChoiceCreate

SetParentChoiceID sets the "parent_choice" edge to the ProficiencyChoice entity by ID.

func (*ProficiencyChoiceCreate) SetProficiencyChoice

func (pcc *ProficiencyChoiceCreate) SetProficiencyChoice(input *ProficiencyChoice) *ProficiencyChoiceCreate

type ProficiencyChoiceCreateBulk

type ProficiencyChoiceCreateBulk struct {
	// contains filtered or unexported fields
}

ProficiencyChoiceCreateBulk is the builder for creating many ProficiencyChoice entities in bulk.

func (*ProficiencyChoiceCreateBulk) Exec

Exec executes the query.

func (*ProficiencyChoiceCreateBulk) ExecX

func (pccb *ProficiencyChoiceCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProficiencyChoiceCreateBulk) Save

Save creates the ProficiencyChoice entities in the database.

func (*ProficiencyChoiceCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type ProficiencyChoiceDelete

type ProficiencyChoiceDelete struct {
	// contains filtered or unexported fields
}

ProficiencyChoiceDelete is the builder for deleting a ProficiencyChoice entity.

func (*ProficiencyChoiceDelete) Exec

func (pcd *ProficiencyChoiceDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ProficiencyChoiceDelete) ExecX

func (pcd *ProficiencyChoiceDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ProficiencyChoiceDelete) Where

Where appends a list predicates to the ProficiencyChoiceDelete builder.

type ProficiencyChoiceDeleteOne

type ProficiencyChoiceDeleteOne struct {
	// contains filtered or unexported fields
}

ProficiencyChoiceDeleteOne is the builder for deleting a single ProficiencyChoice entity.

func (*ProficiencyChoiceDeleteOne) Exec

Exec executes the deletion query.

func (*ProficiencyChoiceDeleteOne) ExecX

func (pcdo *ProficiencyChoiceDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProficiencyChoiceDeleteOne) Where

Where appends a list predicates to the ProficiencyChoiceDelete builder.

type ProficiencyChoiceEdge

type ProficiencyChoiceEdge struct {
	Node   *ProficiencyChoice `json:"node"`
	Cursor Cursor             `json:"cursor"`
}

ProficiencyChoiceEdge is the edge representation of ProficiencyChoice.

type ProficiencyChoiceEdges

type ProficiencyChoiceEdges struct {
	// Proficiency holds the value of the proficiency edge.
	Proficiency []*Proficiency `json:"proficiency,omitempty"`
	// ParentChoice holds the value of the parent_choice edge.
	ParentChoice *ProficiencyChoice `json:"parent_choice,omitempty"`
	// SubChoice holds the value of the sub_choice edge.
	SubChoice []*ProficiencyChoice `json:"sub_choice,omitempty"`
	// Class holds the value of the class edge.
	Class []*Class `json:"class,omitempty"`
	// Race holds the value of the race edge.
	Race []*Race `json:"race,omitempty"`
	// contains filtered or unexported fields
}

ProficiencyChoiceEdges holds the relations/edges for other nodes in the graph.

func (ProficiencyChoiceEdges) ClassOrErr

func (e ProficiencyChoiceEdges) ClassOrErr() ([]*Class, error)

ClassOrErr returns the Class value or an error if the edge was not loaded in eager-loading.

func (ProficiencyChoiceEdges) ParentChoiceOrErr

func (e ProficiencyChoiceEdges) ParentChoiceOrErr() (*ProficiencyChoice, error)

ParentChoiceOrErr returns the ParentChoice value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ProficiencyChoiceEdges) ProficiencyOrErr

func (e ProficiencyChoiceEdges) ProficiencyOrErr() ([]*Proficiency, error)

ProficiencyOrErr returns the Proficiency value or an error if the edge was not loaded in eager-loading.

func (ProficiencyChoiceEdges) RaceOrErr

func (e ProficiencyChoiceEdges) RaceOrErr() ([]*Race, error)

RaceOrErr returns the Race value or an error if the edge was not loaded in eager-loading.

func (ProficiencyChoiceEdges) SubChoiceOrErr

func (e ProficiencyChoiceEdges) SubChoiceOrErr() ([]*ProficiencyChoice, error)

SubChoiceOrErr returns the SubChoice value or an error if the edge was not loaded in eager-loading.

type ProficiencyChoiceGroupBy

type ProficiencyChoiceGroupBy struct {
	// contains filtered or unexported fields
}

ProficiencyChoiceGroupBy is the group-by builder for ProficiencyChoice entities.

func (*ProficiencyChoiceGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*ProficiencyChoiceGroupBy) Bool

func (s *ProficiencyChoiceGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProficiencyChoiceGroupBy) BoolX

func (s *ProficiencyChoiceGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProficiencyChoiceGroupBy) Bools

func (s *ProficiencyChoiceGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProficiencyChoiceGroupBy) BoolsX

func (s *ProficiencyChoiceGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProficiencyChoiceGroupBy) Float64

func (s *ProficiencyChoiceGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProficiencyChoiceGroupBy) Float64X

func (s *ProficiencyChoiceGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProficiencyChoiceGroupBy) Float64s

func (s *ProficiencyChoiceGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProficiencyChoiceGroupBy) Float64sX

func (s *ProficiencyChoiceGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProficiencyChoiceGroupBy) Int

func (s *ProficiencyChoiceGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProficiencyChoiceGroupBy) IntX

func (s *ProficiencyChoiceGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProficiencyChoiceGroupBy) Ints

func (s *ProficiencyChoiceGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProficiencyChoiceGroupBy) IntsX

func (s *ProficiencyChoiceGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ProficiencyChoiceGroupBy) Scan

func (pcgb *ProficiencyChoiceGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ProficiencyChoiceGroupBy) ScanX

func (s *ProficiencyChoiceGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProficiencyChoiceGroupBy) String

func (s *ProficiencyChoiceGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProficiencyChoiceGroupBy) StringX

func (s *ProficiencyChoiceGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProficiencyChoiceGroupBy) Strings

func (s *ProficiencyChoiceGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProficiencyChoiceGroupBy) StringsX

func (s *ProficiencyChoiceGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProficiencyChoiceMutation

type ProficiencyChoiceMutation struct {
	// contains filtered or unexported fields
}

ProficiencyChoiceMutation represents an operation that mutates the ProficiencyChoice nodes in the graph.

func (*ProficiencyChoiceMutation) AddChoose

func (m *ProficiencyChoiceMutation) AddChoose(i int)

AddChoose adds i to the "choose" field.

func (*ProficiencyChoiceMutation) AddClasIDs

func (m *ProficiencyChoiceMutation) AddClasIDs(ids ...int)

AddClasIDs adds the "class" edge to the Class entity by ids.

func (*ProficiencyChoiceMutation) AddField

func (m *ProficiencyChoiceMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ProficiencyChoiceMutation) AddProficiencyIDs

func (m *ProficiencyChoiceMutation) AddProficiencyIDs(ids ...int)

AddProficiencyIDs adds the "proficiency" edge to the Proficiency entity by ids.

func (*ProficiencyChoiceMutation) AddRaceIDs

func (m *ProficiencyChoiceMutation) AddRaceIDs(ids ...int)

AddRaceIDs adds the "race" edge to the Race entity by ids.

func (*ProficiencyChoiceMutation) AddSubChoiceIDs

func (m *ProficiencyChoiceMutation) AddSubChoiceIDs(ids ...int)

AddSubChoiceIDs adds the "sub_choice" edge to the ProficiencyChoice entity by ids.

func (*ProficiencyChoiceMutation) AddedChoose

func (m *ProficiencyChoiceMutation) AddedChoose() (r int, exists bool)

AddedChoose returns the value that was added to the "choose" field in this mutation.

func (*ProficiencyChoiceMutation) AddedEdges

func (m *ProficiencyChoiceMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ProficiencyChoiceMutation) AddedField

func (m *ProficiencyChoiceMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ProficiencyChoiceMutation) AddedFields

func (m *ProficiencyChoiceMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ProficiencyChoiceMutation) AddedIDs

func (m *ProficiencyChoiceMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ProficiencyChoiceMutation) Choose

func (m *ProficiencyChoiceMutation) Choose() (r int, exists bool)

Choose returns the value of the "choose" field in the mutation.

func (*ProficiencyChoiceMutation) ClassCleared

func (m *ProficiencyChoiceMutation) ClassCleared() bool

ClassCleared reports if the "class" edge to the Class entity was cleared.

func (*ProficiencyChoiceMutation) ClassIDs

func (m *ProficiencyChoiceMutation) ClassIDs() (ids []int)

ClassIDs returns the "class" edge IDs in the mutation.

func (*ProficiencyChoiceMutation) ClearClass

func (m *ProficiencyChoiceMutation) ClearClass()

ClearClass clears the "class" edge to the Class entity.

func (*ProficiencyChoiceMutation) ClearDesc

func (m *ProficiencyChoiceMutation) ClearDesc()

ClearDesc clears the value of the "desc" field.

func (*ProficiencyChoiceMutation) ClearEdge

func (m *ProficiencyChoiceMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*ProficiencyChoiceMutation) ClearField

func (m *ProficiencyChoiceMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*ProficiencyChoiceMutation) ClearParentChoice

func (m *ProficiencyChoiceMutation) ClearParentChoice()

ClearParentChoice clears the "parent_choice" edge to the ProficiencyChoice entity.

func (*ProficiencyChoiceMutation) ClearProficiency

func (m *ProficiencyChoiceMutation) ClearProficiency()

ClearProficiency clears the "proficiency" edge to the Proficiency entity.

func (*ProficiencyChoiceMutation) ClearRace

func (m *ProficiencyChoiceMutation) ClearRace()

ClearRace clears the "race" edge to the Race entity.

func (*ProficiencyChoiceMutation) ClearSubChoice

func (m *ProficiencyChoiceMutation) ClearSubChoice()

ClearSubChoice clears the "sub_choice" edge to the ProficiencyChoice entity.

func (*ProficiencyChoiceMutation) ClearedEdges

func (m *ProficiencyChoiceMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ProficiencyChoiceMutation) ClearedFields

func (m *ProficiencyChoiceMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ProficiencyChoiceMutation) Client

func (m ProficiencyChoiceMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*ProficiencyChoiceMutation) Desc

func (m *ProficiencyChoiceMutation) Desc() (r string, exists bool)

Desc returns the value of the "desc" field in the mutation.

func (*ProficiencyChoiceMutation) DescCleared

func (m *ProficiencyChoiceMutation) DescCleared() bool

DescCleared returns if the "desc" field was cleared in this mutation.

func (*ProficiencyChoiceMutation) EdgeCleared

func (m *ProficiencyChoiceMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ProficiencyChoiceMutation) Field

func (m *ProficiencyChoiceMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ProficiencyChoiceMutation) FieldCleared

func (m *ProficiencyChoiceMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ProficiencyChoiceMutation) Fields

func (m *ProficiencyChoiceMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*ProficiencyChoiceMutation) ID

func (m *ProficiencyChoiceMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*ProficiencyChoiceMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*ProficiencyChoiceMutation) OldChoose

func (m *ProficiencyChoiceMutation) OldChoose(ctx context.Context) (v int, err error)

OldChoose returns the old "choose" field's value of the ProficiencyChoice entity. If the ProficiencyChoice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProficiencyChoiceMutation) OldDesc

func (m *ProficiencyChoiceMutation) OldDesc(ctx context.Context) (v string, err error)

OldDesc returns the old "desc" field's value of the ProficiencyChoice entity. If the ProficiencyChoice object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProficiencyChoiceMutation) OldField

func (m *ProficiencyChoiceMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*ProficiencyChoiceMutation) Op

func (m *ProficiencyChoiceMutation) Op() Op

Op returns the operation name.

func (*ProficiencyChoiceMutation) ParentChoiceCleared

func (m *ProficiencyChoiceMutation) ParentChoiceCleared() bool

ParentChoiceCleared reports if the "parent_choice" edge to the ProficiencyChoice entity was cleared.

func (*ProficiencyChoiceMutation) ParentChoiceID

func (m *ProficiencyChoiceMutation) ParentChoiceID() (id int, exists bool)

ParentChoiceID returns the "parent_choice" edge ID in the mutation.

func (*ProficiencyChoiceMutation) ParentChoiceIDs

func (m *ProficiencyChoiceMutation) ParentChoiceIDs() (ids []int)

ParentChoiceIDs returns the "parent_choice" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ParentChoiceID instead. It exists only for internal usage by the builders.

func (*ProficiencyChoiceMutation) ProficiencyCleared

func (m *ProficiencyChoiceMutation) ProficiencyCleared() bool

ProficiencyCleared reports if the "proficiency" edge to the Proficiency entity was cleared.

func (*ProficiencyChoiceMutation) ProficiencyIDs

func (m *ProficiencyChoiceMutation) ProficiencyIDs() (ids []int)

ProficiencyIDs returns the "proficiency" edge IDs in the mutation.

func (*ProficiencyChoiceMutation) RaceCleared

func (m *ProficiencyChoiceMutation) RaceCleared() bool

RaceCleared reports if the "race" edge to the Race entity was cleared.

func (*ProficiencyChoiceMutation) RaceIDs

func (m *ProficiencyChoiceMutation) RaceIDs() (ids []int)

RaceIDs returns the "race" edge IDs in the mutation.

func (*ProficiencyChoiceMutation) RemoveClasIDs

func (m *ProficiencyChoiceMutation) RemoveClasIDs(ids ...int)

RemoveClasIDs removes the "class" edge to the Class entity by IDs.

func (*ProficiencyChoiceMutation) RemoveProficiencyIDs

func (m *ProficiencyChoiceMutation) RemoveProficiencyIDs(ids ...int)

RemoveProficiencyIDs removes the "proficiency" edge to the Proficiency entity by IDs.

func (*ProficiencyChoiceMutation) RemoveRaceIDs

func (m *ProficiencyChoiceMutation) RemoveRaceIDs(ids ...int)

RemoveRaceIDs removes the "race" edge to the Race entity by IDs.

func (*ProficiencyChoiceMutation) RemoveSubChoiceIDs

func (m *ProficiencyChoiceMutation) RemoveSubChoiceIDs(ids ...int)

RemoveSubChoiceIDs removes the "sub_choice" edge to the ProficiencyChoice entity by IDs.

func (*ProficiencyChoiceMutation) RemovedClassIDs

func (m *ProficiencyChoiceMutation) RemovedClassIDs() (ids []int)

RemovedClass returns the removed IDs of the "class" edge to the Class entity.

func (*ProficiencyChoiceMutation) RemovedEdges

func (m *ProficiencyChoiceMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ProficiencyChoiceMutation) RemovedIDs

func (m *ProficiencyChoiceMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*ProficiencyChoiceMutation) RemovedProficiencyIDs

func (m *ProficiencyChoiceMutation) RemovedProficiencyIDs() (ids []int)

RemovedProficiency returns the removed IDs of the "proficiency" edge to the Proficiency entity.

func (*ProficiencyChoiceMutation) RemovedRaceIDs

func (m *ProficiencyChoiceMutation) RemovedRaceIDs() (ids []int)

RemovedRace returns the removed IDs of the "race" edge to the Race entity.

func (*ProficiencyChoiceMutation) RemovedSubChoiceIDs

func (m *ProficiencyChoiceMutation) RemovedSubChoiceIDs() (ids []int)

RemovedSubChoice returns the removed IDs of the "sub_choice" edge to the ProficiencyChoice entity.

func (*ProficiencyChoiceMutation) ResetChoose

func (m *ProficiencyChoiceMutation) ResetChoose()

ResetChoose resets all changes to the "choose" field.

func (*ProficiencyChoiceMutation) ResetClass

func (m *ProficiencyChoiceMutation) ResetClass()

ResetClass resets all changes to the "class" edge.

func (*ProficiencyChoiceMutation) ResetDesc

func (m *ProficiencyChoiceMutation) ResetDesc()

ResetDesc resets all changes to the "desc" field.

func (*ProficiencyChoiceMutation) ResetEdge

func (m *ProficiencyChoiceMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*ProficiencyChoiceMutation) ResetField

func (m *ProficiencyChoiceMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*ProficiencyChoiceMutation) ResetParentChoice

func (m *ProficiencyChoiceMutation) ResetParentChoice()

ResetParentChoice resets all changes to the "parent_choice" edge.

func (*ProficiencyChoiceMutation) ResetProficiency

func (m *ProficiencyChoiceMutation) ResetProficiency()

ResetProficiency resets all changes to the "proficiency" edge.

func (*ProficiencyChoiceMutation) ResetRace

func (m *ProficiencyChoiceMutation) ResetRace()

ResetRace resets all changes to the "race" edge.

func (*ProficiencyChoiceMutation) ResetSubChoice

func (m *ProficiencyChoiceMutation) ResetSubChoice()

ResetSubChoice resets all changes to the "sub_choice" edge.

func (*ProficiencyChoiceMutation) SetChoose

func (m *ProficiencyChoiceMutation) SetChoose(i int)

SetChoose sets the "choose" field.

func (*ProficiencyChoiceMutation) SetDesc

func (m *ProficiencyChoiceMutation) SetDesc(s string)

SetDesc sets the "desc" field.

func (*ProficiencyChoiceMutation) SetField

func (m *ProficiencyChoiceMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ProficiencyChoiceMutation) SetOp

func (m *ProficiencyChoiceMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ProficiencyChoiceMutation) SetParentChoiceID

func (m *ProficiencyChoiceMutation) SetParentChoiceID(id int)

SetParentChoiceID sets the "parent_choice" edge to the ProficiencyChoice entity by id.

func (*ProficiencyChoiceMutation) SubChoiceCleared

func (m *ProficiencyChoiceMutation) SubChoiceCleared() bool

SubChoiceCleared reports if the "sub_choice" edge to the ProficiencyChoice entity was cleared.

func (*ProficiencyChoiceMutation) SubChoiceIDs

func (m *ProficiencyChoiceMutation) SubChoiceIDs() (ids []int)

SubChoiceIDs returns the "sub_choice" edge IDs in the mutation.

func (ProficiencyChoiceMutation) Tx

func (m ProficiencyChoiceMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ProficiencyChoiceMutation) Type

Type returns the node type of this mutation (ProficiencyChoice).

func (*ProficiencyChoiceMutation) Where

Where appends a list predicates to the ProficiencyChoiceMutation builder.

func (*ProficiencyChoiceMutation) WhereP

func (m *ProficiencyChoiceMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ProficiencyChoiceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ProficiencyChoiceOrder

type ProficiencyChoiceOrder struct {
	Direction OrderDirection               `json:"direction"`
	Field     *ProficiencyChoiceOrderField `json:"field"`
}

ProficiencyChoiceOrder defines the ordering of ProficiencyChoice.

type ProficiencyChoiceOrderField

type ProficiencyChoiceOrderField struct {
	// Value extracts the ordering value from the given ProficiencyChoice.
	Value func(*ProficiencyChoice) (ent.Value, error)
	// contains filtered or unexported fields
}

ProficiencyChoiceOrderField defines the ordering field of ProficiencyChoice.

type ProficiencyChoicePaginateOption

type ProficiencyChoicePaginateOption func(*proficiencychoicePager) error

ProficiencyChoicePaginateOption enables pagination customization.

func WithProficiencyChoiceFilter

func WithProficiencyChoiceFilter(filter func(*ProficiencyChoiceQuery) (*ProficiencyChoiceQuery, error)) ProficiencyChoicePaginateOption

WithProficiencyChoiceFilter configures pagination filter.

func WithProficiencyChoiceOrder

func WithProficiencyChoiceOrder(order *ProficiencyChoiceOrder) ProficiencyChoicePaginateOption

WithProficiencyChoiceOrder configures pagination ordering.

type ProficiencyChoiceQuery

type ProficiencyChoiceQuery struct {
	// contains filtered or unexported fields
}

ProficiencyChoiceQuery is the builder for querying ProficiencyChoice entities.

func (*ProficiencyChoiceQuery) Aggregate

Aggregate returns a ProficiencyChoiceSelect configured with the given aggregations.

func (*ProficiencyChoiceQuery) All

All executes the query and returns a list of ProficiencyChoices.

func (*ProficiencyChoiceQuery) AllX

AllX is like All, but panics if an error occurs.

func (*ProficiencyChoiceQuery) Clone

Clone returns a duplicate of the ProficiencyChoiceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ProficiencyChoiceQuery) CollectFields

func (pc *ProficiencyChoiceQuery) CollectFields(ctx context.Context, satisfies ...string) (*ProficiencyChoiceQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*ProficiencyChoiceQuery) Count

func (pcq *ProficiencyChoiceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ProficiencyChoiceQuery) CountX

func (pcq *ProficiencyChoiceQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ProficiencyChoiceQuery) Exist

func (pcq *ProficiencyChoiceQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ProficiencyChoiceQuery) ExistX

func (pcq *ProficiencyChoiceQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ProficiencyChoiceQuery) First

First returns the first ProficiencyChoice entity from the query. Returns a *NotFoundError when no ProficiencyChoice was found.

func (*ProficiencyChoiceQuery) FirstID

func (pcq *ProficiencyChoiceQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first ProficiencyChoice ID from the query. Returns a *NotFoundError when no ProficiencyChoice ID was found.

func (*ProficiencyChoiceQuery) FirstIDX

func (pcq *ProficiencyChoiceQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*ProficiencyChoiceQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*ProficiencyChoiceQuery) GroupBy

func (pcq *ProficiencyChoiceQuery) GroupBy(field string, fields ...string) *ProficiencyChoiceGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Choose int `json:"choose,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ProficiencyChoice.Query().
	GroupBy(proficiencychoice.FieldChoose).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ProficiencyChoiceQuery) IDs

func (pcq *ProficiencyChoiceQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of ProficiencyChoice IDs.

func (*ProficiencyChoiceQuery) IDsX

func (pcq *ProficiencyChoiceQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*ProficiencyChoiceQuery) Limit

Limit the number of records to be returned by this query.

func (*ProficiencyChoiceQuery) Offset

func (pcq *ProficiencyChoiceQuery) Offset(offset int) *ProficiencyChoiceQuery

Offset to start from.

func (*ProficiencyChoiceQuery) Only

Only returns a single ProficiencyChoice entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ProficiencyChoice entity is found. Returns a *NotFoundError when no ProficiencyChoice entities are found.

func (*ProficiencyChoiceQuery) OnlyID

func (pcq *ProficiencyChoiceQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only ProficiencyChoice ID in the query. Returns a *NotSingularError when more than one ProficiencyChoice ID is found. Returns a *NotFoundError when no entities are found.

func (*ProficiencyChoiceQuery) OnlyIDX

func (pcq *ProficiencyChoiceQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ProficiencyChoiceQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*ProficiencyChoiceQuery) Order

Order specifies how the records should be ordered.

func (*ProficiencyChoiceQuery) Paginate

func (pc *ProficiencyChoiceQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...ProficiencyChoicePaginateOption,
) (*ProficiencyChoiceConnection, error)

Paginate executes the query and returns a relay based cursor connection to ProficiencyChoice.

func (*ProficiencyChoiceQuery) QueryClass

func (pcq *ProficiencyChoiceQuery) QueryClass() *ClassQuery

QueryClass chains the current query on the "class" edge.

func (*ProficiencyChoiceQuery) QueryParentChoice

func (pcq *ProficiencyChoiceQuery) QueryParentChoice() *ProficiencyChoiceQuery

QueryParentChoice chains the current query on the "parent_choice" edge.

func (*ProficiencyChoiceQuery) QueryProficiency

func (pcq *ProficiencyChoiceQuery) QueryProficiency() *ProficiencyQuery

QueryProficiency chains the current query on the "proficiency" edge.

func (*ProficiencyChoiceQuery) QueryRace

func (pcq *ProficiencyChoiceQuery) QueryRace() *RaceQuery

QueryRace chains the current query on the "race" edge.

func (*ProficiencyChoiceQuery) QuerySubChoice

func (pcq *ProficiencyChoiceQuery) QuerySubChoice() *ProficiencyChoiceQuery

QuerySubChoice chains the current query on the "sub_choice" edge.

func (*ProficiencyChoiceQuery) Select

func (pcq *ProficiencyChoiceQuery) Select(fields ...string) *ProficiencyChoiceSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Choose int `json:"choose,omitempty"`
}

client.ProficiencyChoice.Query().
	Select(proficiencychoice.FieldChoose).
	Scan(ctx, &v)

func (*ProficiencyChoiceQuery) Unique

func (pcq *ProficiencyChoiceQuery) Unique(unique bool) *ProficiencyChoiceQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*ProficiencyChoiceQuery) Where

Where adds a new predicate for the ProficiencyChoiceQuery builder.

func (*ProficiencyChoiceQuery) WithClass

func (pcq *ProficiencyChoiceQuery) WithClass(opts ...func(*ClassQuery)) *ProficiencyChoiceQuery

WithClass tells the query-builder to eager-load the nodes that are connected to the "class" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyChoiceQuery) WithNamedClass

func (pcq *ProficiencyChoiceQuery) WithNamedClass(name string, opts ...func(*ClassQuery)) *ProficiencyChoiceQuery

WithNamedClass tells the query-builder to eager-load the nodes that are connected to the "class" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyChoiceQuery) WithNamedProficiency

func (pcq *ProficiencyChoiceQuery) WithNamedProficiency(name string, opts ...func(*ProficiencyQuery)) *ProficiencyChoiceQuery

WithNamedProficiency tells the query-builder to eager-load the nodes that are connected to the "proficiency" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyChoiceQuery) WithNamedRace

func (pcq *ProficiencyChoiceQuery) WithNamedRace(name string, opts ...func(*RaceQuery)) *ProficiencyChoiceQuery

WithNamedRace tells the query-builder to eager-load the nodes that are connected to the "race" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyChoiceQuery) WithNamedSubChoice

func (pcq *ProficiencyChoiceQuery) WithNamedSubChoice(name string, opts ...func(*ProficiencyChoiceQuery)) *ProficiencyChoiceQuery

WithNamedSubChoice tells the query-builder to eager-load the nodes that are connected to the "sub_choice" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyChoiceQuery) WithParentChoice

func (pcq *ProficiencyChoiceQuery) WithParentChoice(opts ...func(*ProficiencyChoiceQuery)) *ProficiencyChoiceQuery

WithParentChoice tells the query-builder to eager-load the nodes that are connected to the "parent_choice" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyChoiceQuery) WithProficiency

func (pcq *ProficiencyChoiceQuery) WithProficiency(opts ...func(*ProficiencyQuery)) *ProficiencyChoiceQuery

WithProficiency tells the query-builder to eager-load the nodes that are connected to the "proficiency" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyChoiceQuery) WithRace

func (pcq *ProficiencyChoiceQuery) WithRace(opts ...func(*RaceQuery)) *ProficiencyChoiceQuery

WithRace tells the query-builder to eager-load the nodes that are connected to the "race" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyChoiceQuery) WithSubChoice

func (pcq *ProficiencyChoiceQuery) WithSubChoice(opts ...func(*ProficiencyChoiceQuery)) *ProficiencyChoiceQuery

WithSubChoice tells the query-builder to eager-load the nodes that are connected to the "sub_choice" edge. The optional arguments are used to configure the query builder of the edge.

type ProficiencyChoiceSelect

type ProficiencyChoiceSelect struct {
	*ProficiencyChoiceQuery
	// contains filtered or unexported fields
}

ProficiencyChoiceSelect is the builder for selecting fields of ProficiencyChoice entities.

func (*ProficiencyChoiceSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*ProficiencyChoiceSelect) Bool

func (s *ProficiencyChoiceSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProficiencyChoiceSelect) BoolX

func (s *ProficiencyChoiceSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProficiencyChoiceSelect) Bools

func (s *ProficiencyChoiceSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProficiencyChoiceSelect) BoolsX

func (s *ProficiencyChoiceSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProficiencyChoiceSelect) Float64

func (s *ProficiencyChoiceSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProficiencyChoiceSelect) Float64X

func (s *ProficiencyChoiceSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProficiencyChoiceSelect) Float64s

func (s *ProficiencyChoiceSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProficiencyChoiceSelect) Float64sX

func (s *ProficiencyChoiceSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProficiencyChoiceSelect) Int

func (s *ProficiencyChoiceSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProficiencyChoiceSelect) IntX

func (s *ProficiencyChoiceSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProficiencyChoiceSelect) Ints

func (s *ProficiencyChoiceSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProficiencyChoiceSelect) IntsX

func (s *ProficiencyChoiceSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ProficiencyChoiceSelect) Scan

func (pcs *ProficiencyChoiceSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ProficiencyChoiceSelect) ScanX

func (s *ProficiencyChoiceSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProficiencyChoiceSelect) String

func (s *ProficiencyChoiceSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProficiencyChoiceSelect) StringX

func (s *ProficiencyChoiceSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProficiencyChoiceSelect) Strings

func (s *ProficiencyChoiceSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProficiencyChoiceSelect) StringsX

func (s *ProficiencyChoiceSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProficiencyChoiceUpdate

type ProficiencyChoiceUpdate struct {
	// contains filtered or unexported fields
}

ProficiencyChoiceUpdate is the builder for updating ProficiencyChoice entities.

func (*ProficiencyChoiceUpdate) AddChoose

AddChoose adds i to the "choose" field.

func (*ProficiencyChoiceUpdate) AddClasIDs

func (pcu *ProficiencyChoiceUpdate) AddClasIDs(ids ...int) *ProficiencyChoiceUpdate

AddClasIDs adds the "class" edge to the Class entity by IDs.

func (*ProficiencyChoiceUpdate) AddClass

AddClass adds the "class" edges to the Class entity.

func (*ProficiencyChoiceUpdate) AddProficiency

func (pcu *ProficiencyChoiceUpdate) AddProficiency(p ...*Proficiency) *ProficiencyChoiceUpdate

AddProficiency adds the "proficiency" edges to the Proficiency entity.

func (*ProficiencyChoiceUpdate) AddProficiencyIDs

func (pcu *ProficiencyChoiceUpdate) AddProficiencyIDs(ids ...int) *ProficiencyChoiceUpdate

AddProficiencyIDs adds the "proficiency" edge to the Proficiency entity by IDs.

func (*ProficiencyChoiceUpdate) AddRace

AddRace adds the "race" edges to the Race entity.

func (*ProficiencyChoiceUpdate) AddRaceIDs

func (pcu *ProficiencyChoiceUpdate) AddRaceIDs(ids ...int) *ProficiencyChoiceUpdate

AddRaceIDs adds the "race" edge to the Race entity by IDs.

func (*ProficiencyChoiceUpdate) AddSubChoice

AddSubChoice adds the "sub_choice" edges to the ProficiencyChoice entity.

func (*ProficiencyChoiceUpdate) AddSubChoiceIDs

func (pcu *ProficiencyChoiceUpdate) AddSubChoiceIDs(ids ...int) *ProficiencyChoiceUpdate

AddSubChoiceIDs adds the "sub_choice" edge to the ProficiencyChoice entity by IDs.

func (*ProficiencyChoiceUpdate) ClearClass

ClearClass clears all "class" edges to the Class entity.

func (*ProficiencyChoiceUpdate) ClearDesc

ClearDesc clears the value of the "desc" field.

func (*ProficiencyChoiceUpdate) ClearParentChoice

func (pcu *ProficiencyChoiceUpdate) ClearParentChoice() *ProficiencyChoiceUpdate

ClearParentChoice clears the "parent_choice" edge to the ProficiencyChoice entity.

func (*ProficiencyChoiceUpdate) ClearProficiency

func (pcu *ProficiencyChoiceUpdate) ClearProficiency() *ProficiencyChoiceUpdate

ClearProficiency clears all "proficiency" edges to the Proficiency entity.

func (*ProficiencyChoiceUpdate) ClearRace

ClearRace clears all "race" edges to the Race entity.

func (*ProficiencyChoiceUpdate) ClearSubChoice

func (pcu *ProficiencyChoiceUpdate) ClearSubChoice() *ProficiencyChoiceUpdate

ClearSubChoice clears all "sub_choice" edges to the ProficiencyChoice entity.

func (*ProficiencyChoiceUpdate) Exec

Exec executes the query.

func (*ProficiencyChoiceUpdate) ExecX

func (pcu *ProficiencyChoiceUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProficiencyChoiceUpdate) Mutation

Mutation returns the ProficiencyChoiceMutation object of the builder.

func (*ProficiencyChoiceUpdate) RemoveClasIDs

func (pcu *ProficiencyChoiceUpdate) RemoveClasIDs(ids ...int) *ProficiencyChoiceUpdate

RemoveClasIDs removes the "class" edge to Class entities by IDs.

func (*ProficiencyChoiceUpdate) RemoveClass

func (pcu *ProficiencyChoiceUpdate) RemoveClass(c ...*Class) *ProficiencyChoiceUpdate

RemoveClass removes "class" edges to Class entities.

func (*ProficiencyChoiceUpdate) RemoveProficiency

func (pcu *ProficiencyChoiceUpdate) RemoveProficiency(p ...*Proficiency) *ProficiencyChoiceUpdate

RemoveProficiency removes "proficiency" edges to Proficiency entities.

func (*ProficiencyChoiceUpdate) RemoveProficiencyIDs

func (pcu *ProficiencyChoiceUpdate) RemoveProficiencyIDs(ids ...int) *ProficiencyChoiceUpdate

RemoveProficiencyIDs removes the "proficiency" edge to Proficiency entities by IDs.

func (*ProficiencyChoiceUpdate) RemoveRace

func (pcu *ProficiencyChoiceUpdate) RemoveRace(r ...*Race) *ProficiencyChoiceUpdate

RemoveRace removes "race" edges to Race entities.

func (*ProficiencyChoiceUpdate) RemoveRaceIDs

func (pcu *ProficiencyChoiceUpdate) RemoveRaceIDs(ids ...int) *ProficiencyChoiceUpdate

RemoveRaceIDs removes the "race" edge to Race entities by IDs.

func (*ProficiencyChoiceUpdate) RemoveSubChoice

RemoveSubChoice removes "sub_choice" edges to ProficiencyChoice entities.

func (*ProficiencyChoiceUpdate) RemoveSubChoiceIDs

func (pcu *ProficiencyChoiceUpdate) RemoveSubChoiceIDs(ids ...int) *ProficiencyChoiceUpdate

RemoveSubChoiceIDs removes the "sub_choice" edge to ProficiencyChoice entities by IDs.

func (*ProficiencyChoiceUpdate) Save

func (pcu *ProficiencyChoiceUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ProficiencyChoiceUpdate) SaveX

func (pcu *ProficiencyChoiceUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ProficiencyChoiceUpdate) SetChoose

SetChoose sets the "choose" field.

func (*ProficiencyChoiceUpdate) SetDesc

SetDesc sets the "desc" field.

func (*ProficiencyChoiceUpdate) SetNillableDesc

func (pcu *ProficiencyChoiceUpdate) SetNillableDesc(s *string) *ProficiencyChoiceUpdate

SetNillableDesc sets the "desc" field if the given value is not nil.

func (*ProficiencyChoiceUpdate) SetNillableParentChoiceID

func (pcu *ProficiencyChoiceUpdate) SetNillableParentChoiceID(id *int) *ProficiencyChoiceUpdate

SetNillableParentChoiceID sets the "parent_choice" edge to the ProficiencyChoice entity by ID if the given value is not nil.

func (*ProficiencyChoiceUpdate) SetParentChoice

SetParentChoice sets the "parent_choice" edge to the ProficiencyChoice entity.

func (*ProficiencyChoiceUpdate) SetParentChoiceID

func (pcu *ProficiencyChoiceUpdate) SetParentChoiceID(id int) *ProficiencyChoiceUpdate

SetParentChoiceID sets the "parent_choice" edge to the ProficiencyChoice entity by ID.

func (*ProficiencyChoiceUpdate) Where

Where appends a list predicates to the ProficiencyChoiceUpdate builder.

type ProficiencyChoiceUpdateOne

type ProficiencyChoiceUpdateOne struct {
	// contains filtered or unexported fields
}

ProficiencyChoiceUpdateOne is the builder for updating a single ProficiencyChoice entity.

func (*ProficiencyChoiceUpdateOne) AddChoose

AddChoose adds i to the "choose" field.

func (*ProficiencyChoiceUpdateOne) AddClasIDs

func (pcuo *ProficiencyChoiceUpdateOne) AddClasIDs(ids ...int) *ProficiencyChoiceUpdateOne

AddClasIDs adds the "class" edge to the Class entity by IDs.

func (*ProficiencyChoiceUpdateOne) AddClass

AddClass adds the "class" edges to the Class entity.

func (*ProficiencyChoiceUpdateOne) AddProficiency

AddProficiency adds the "proficiency" edges to the Proficiency entity.

func (*ProficiencyChoiceUpdateOne) AddProficiencyIDs

func (pcuo *ProficiencyChoiceUpdateOne) AddProficiencyIDs(ids ...int) *ProficiencyChoiceUpdateOne

AddProficiencyIDs adds the "proficiency" edge to the Proficiency entity by IDs.

func (*ProficiencyChoiceUpdateOne) AddRace

AddRace adds the "race" edges to the Race entity.

func (*ProficiencyChoiceUpdateOne) AddRaceIDs

func (pcuo *ProficiencyChoiceUpdateOne) AddRaceIDs(ids ...int) *ProficiencyChoiceUpdateOne

AddRaceIDs adds the "race" edge to the Race entity by IDs.

func (*ProficiencyChoiceUpdateOne) AddSubChoice

AddSubChoice adds the "sub_choice" edges to the ProficiencyChoice entity.

func (*ProficiencyChoiceUpdateOne) AddSubChoiceIDs

func (pcuo *ProficiencyChoiceUpdateOne) AddSubChoiceIDs(ids ...int) *ProficiencyChoiceUpdateOne

AddSubChoiceIDs adds the "sub_choice" edge to the ProficiencyChoice entity by IDs.

func (*ProficiencyChoiceUpdateOne) ClearClass

ClearClass clears all "class" edges to the Class entity.

func (*ProficiencyChoiceUpdateOne) ClearDesc

ClearDesc clears the value of the "desc" field.

func (*ProficiencyChoiceUpdateOne) ClearParentChoice

func (pcuo *ProficiencyChoiceUpdateOne) ClearParentChoice() *ProficiencyChoiceUpdateOne

ClearParentChoice clears the "parent_choice" edge to the ProficiencyChoice entity.

func (*ProficiencyChoiceUpdateOne) ClearProficiency

func (pcuo *ProficiencyChoiceUpdateOne) ClearProficiency() *ProficiencyChoiceUpdateOne

ClearProficiency clears all "proficiency" edges to the Proficiency entity.

func (*ProficiencyChoiceUpdateOne) ClearRace

ClearRace clears all "race" edges to the Race entity.

func (*ProficiencyChoiceUpdateOne) ClearSubChoice

ClearSubChoice clears all "sub_choice" edges to the ProficiencyChoice entity.

func (*ProficiencyChoiceUpdateOne) Exec

Exec executes the query on the entity.

func (*ProficiencyChoiceUpdateOne) ExecX

func (pcuo *ProficiencyChoiceUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProficiencyChoiceUpdateOne) Mutation

Mutation returns the ProficiencyChoiceMutation object of the builder.

func (*ProficiencyChoiceUpdateOne) RemoveClasIDs

func (pcuo *ProficiencyChoiceUpdateOne) RemoveClasIDs(ids ...int) *ProficiencyChoiceUpdateOne

RemoveClasIDs removes the "class" edge to Class entities by IDs.

func (*ProficiencyChoiceUpdateOne) RemoveClass

RemoveClass removes "class" edges to Class entities.

func (*ProficiencyChoiceUpdateOne) RemoveProficiency

func (pcuo *ProficiencyChoiceUpdateOne) RemoveProficiency(p ...*Proficiency) *ProficiencyChoiceUpdateOne

RemoveProficiency removes "proficiency" edges to Proficiency entities.

func (*ProficiencyChoiceUpdateOne) RemoveProficiencyIDs

func (pcuo *ProficiencyChoiceUpdateOne) RemoveProficiencyIDs(ids ...int) *ProficiencyChoiceUpdateOne

RemoveProficiencyIDs removes the "proficiency" edge to Proficiency entities by IDs.

func (*ProficiencyChoiceUpdateOne) RemoveRace

RemoveRace removes "race" edges to Race entities.

func (*ProficiencyChoiceUpdateOne) RemoveRaceIDs

func (pcuo *ProficiencyChoiceUpdateOne) RemoveRaceIDs(ids ...int) *ProficiencyChoiceUpdateOne

RemoveRaceIDs removes the "race" edge to Race entities by IDs.

func (*ProficiencyChoiceUpdateOne) RemoveSubChoice

RemoveSubChoice removes "sub_choice" edges to ProficiencyChoice entities.

func (*ProficiencyChoiceUpdateOne) RemoveSubChoiceIDs

func (pcuo *ProficiencyChoiceUpdateOne) RemoveSubChoiceIDs(ids ...int) *ProficiencyChoiceUpdateOne

RemoveSubChoiceIDs removes the "sub_choice" edge to ProficiencyChoice entities by IDs.

func (*ProficiencyChoiceUpdateOne) Save

Save executes the query and returns the updated ProficiencyChoice entity.

func (*ProficiencyChoiceUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*ProficiencyChoiceUpdateOne) Select

func (pcuo *ProficiencyChoiceUpdateOne) Select(field string, fields ...string) *ProficiencyChoiceUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ProficiencyChoiceUpdateOne) SetChoose

SetChoose sets the "choose" field.

func (*ProficiencyChoiceUpdateOne) SetDesc

SetDesc sets the "desc" field.

func (*ProficiencyChoiceUpdateOne) SetNillableDesc

SetNillableDesc sets the "desc" field if the given value is not nil.

func (*ProficiencyChoiceUpdateOne) SetNillableParentChoiceID

func (pcuo *ProficiencyChoiceUpdateOne) SetNillableParentChoiceID(id *int) *ProficiencyChoiceUpdateOne

SetNillableParentChoiceID sets the "parent_choice" edge to the ProficiencyChoice entity by ID if the given value is not nil.

func (*ProficiencyChoiceUpdateOne) SetParentChoice

SetParentChoice sets the "parent_choice" edge to the ProficiencyChoice entity.

func (*ProficiencyChoiceUpdateOne) SetParentChoiceID

func (pcuo *ProficiencyChoiceUpdateOne) SetParentChoiceID(id int) *ProficiencyChoiceUpdateOne

SetParentChoiceID sets the "parent_choice" edge to the ProficiencyChoice entity by ID.

func (*ProficiencyChoiceUpdateOne) Where

Where appends a list predicates to the ProficiencyChoiceUpdate builder.

type ProficiencyChoiceWhereInput

type ProficiencyChoiceWhereInput struct {
	Predicates []predicate.ProficiencyChoice  `json:"-"`
	Not        *ProficiencyChoiceWhereInput   `json:"not,omitempty"`
	Or         []*ProficiencyChoiceWhereInput `json:"or,omitempty"`
	And        []*ProficiencyChoiceWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "choose" field predicates.
	Choose      *int  `json:"choose,omitempty"`
	ChooseNEQ   *int  `json:"chooseNEQ,omitempty"`
	ChooseIn    []int `json:"chooseIn,omitempty"`
	ChooseNotIn []int `json:"chooseNotIn,omitempty"`
	ChooseGT    *int  `json:"chooseGT,omitempty"`
	ChooseGTE   *int  `json:"chooseGTE,omitempty"`
	ChooseLT    *int  `json:"chooseLT,omitempty"`
	ChooseLTE   *int  `json:"chooseLTE,omitempty"`

	// "desc" field predicates.
	Desc             *string  `json:"desc,omitempty"`
	DescNEQ          *string  `json:"descNEQ,omitempty"`
	DescIn           []string `json:"descIn,omitempty"`
	DescNotIn        []string `json:"descNotIn,omitempty"`
	DescGT           *string  `json:"descGT,omitempty"`
	DescGTE          *string  `json:"descGTE,omitempty"`
	DescLT           *string  `json:"descLT,omitempty"`
	DescLTE          *string  `json:"descLTE,omitempty"`
	DescContains     *string  `json:"descContains,omitempty"`
	DescHasPrefix    *string  `json:"descHasPrefix,omitempty"`
	DescHasSuffix    *string  `json:"descHasSuffix,omitempty"`
	DescIsNil        bool     `json:"descIsNil,omitempty"`
	DescNotNil       bool     `json:"descNotNil,omitempty"`
	DescEqualFold    *string  `json:"descEqualFold,omitempty"`
	DescContainsFold *string  `json:"descContainsFold,omitempty"`

	// "proficiency" edge predicates.
	HasProficiency     *bool                    `json:"hasProficiency,omitempty"`
	HasProficiencyWith []*ProficiencyWhereInput `json:"hasProficiencyWith,omitempty"`

	// "parent_choice" edge predicates.
	HasParentChoice     *bool                          `json:"hasParentChoice,omitempty"`
	HasParentChoiceWith []*ProficiencyChoiceWhereInput `json:"hasParentChoiceWith,omitempty"`

	// "sub_choice" edge predicates.
	HasSubChoice     *bool                          `json:"hasSubChoice,omitempty"`
	HasSubChoiceWith []*ProficiencyChoiceWhereInput `json:"hasSubChoiceWith,omitempty"`

	// "class" edge predicates.
	HasClass     *bool              `json:"hasClass,omitempty"`
	HasClassWith []*ClassWhereInput `json:"hasClassWith,omitempty"`

	// "race" edge predicates.
	HasRace     *bool             `json:"hasRace,omitempty"`
	HasRaceWith []*RaceWhereInput `json:"hasRaceWith,omitempty"`
}

ProficiencyChoiceWhereInput represents a where input for filtering ProficiencyChoice queries.

func (*ProficiencyChoiceWhereInput) AddPredicates

func (i *ProficiencyChoiceWhereInput) AddPredicates(predicates ...predicate.ProficiencyChoice)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*ProficiencyChoiceWhereInput) Filter

Filter applies the ProficiencyChoiceWhereInput filter on the ProficiencyChoiceQuery builder.

func (*ProficiencyChoiceWhereInput) P

P returns a predicate for filtering proficiencychoices. An error is returned if the input is empty or invalid.

type ProficiencyChoices

type ProficiencyChoices []*ProficiencyChoice

ProficiencyChoices is a parsable slice of ProficiencyChoice.

type ProficiencyClient

type ProficiencyClient struct {
	// contains filtered or unexported fields
}

ProficiencyClient is a client for the Proficiency schema.

func NewProficiencyClient

func NewProficiencyClient(c config) *ProficiencyClient

NewProficiencyClient returns a client for the Proficiency from the given config.

func (*ProficiencyClient) Create

func (c *ProficiencyClient) Create() *ProficiencyCreate

Create returns a builder for creating a Proficiency entity.

func (*ProficiencyClient) CreateBulk

func (c *ProficiencyClient) CreateBulk(builders ...*ProficiencyCreate) *ProficiencyCreateBulk

CreateBulk returns a builder for creating a bulk of Proficiency entities.

func (*ProficiencyClient) Delete

func (c *ProficiencyClient) Delete() *ProficiencyDelete

Delete returns a delete builder for Proficiency.

func (*ProficiencyClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ProficiencyClient) DeleteOneID

func (c *ProficiencyClient) DeleteOneID(id int) *ProficiencyDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ProficiencyClient) Get

func (c *ProficiencyClient) Get(ctx context.Context, id int) (*Proficiency, error)

Get returns a Proficiency entity by its id.

func (*ProficiencyClient) GetX

func (c *ProficiencyClient) GetX(ctx context.Context, id int) *Proficiency

GetX is like Get, but panics if an error occurs.

func (*ProficiencyClient) Hooks

func (c *ProficiencyClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ProficiencyClient) Intercept

func (c *ProficiencyClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `proficiency.Intercept(f(g(h())))`.

func (*ProficiencyClient) Interceptors

func (c *ProficiencyClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ProficiencyClient) Query

func (c *ProficiencyClient) Query() *ProficiencyQuery

Query returns a query builder for Proficiency.

func (*ProficiencyClient) QueryChoice

QueryChoice queries the choice edge of a Proficiency.

func (*ProficiencyClient) QueryClasses

func (c *ProficiencyClient) QueryClasses(pr *Proficiency) *ClassQuery

QueryClasses queries the classes edge of a Proficiency.

func (*ProficiencyClient) QueryEquipment

func (c *ProficiencyClient) QueryEquipment(pr *Proficiency) *EquipmentQuery

QueryEquipment queries the equipment edge of a Proficiency.

func (*ProficiencyClient) QueryEquipmentCategory

func (c *ProficiencyClient) QueryEquipmentCategory(pr *Proficiency) *EquipmentCategoryQuery

QueryEquipmentCategory queries the equipment_category edge of a Proficiency.

func (*ProficiencyClient) QueryRaces

func (c *ProficiencyClient) QueryRaces(pr *Proficiency) *RaceQuery

QueryRaces queries the races edge of a Proficiency.

func (*ProficiencyClient) QuerySavingThrow

func (c *ProficiencyClient) QuerySavingThrow(pr *Proficiency) *AbilityScoreQuery

QuerySavingThrow queries the saving_throw edge of a Proficiency.

func (*ProficiencyClient) QuerySkill

func (c *ProficiencyClient) QuerySkill(pr *Proficiency) *SkillQuery

QuerySkill queries the skill edge of a Proficiency.

func (*ProficiencyClient) QuerySubraces

func (c *ProficiencyClient) QuerySubraces(pr *Proficiency) *SubraceQuery

QuerySubraces queries the subraces edge of a Proficiency.

func (*ProficiencyClient) Update

func (c *ProficiencyClient) Update() *ProficiencyUpdate

Update returns an update builder for Proficiency.

func (*ProficiencyClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ProficiencyClient) UpdateOneID

func (c *ProficiencyClient) UpdateOneID(id int) *ProficiencyUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ProficiencyClient) Use

func (c *ProficiencyClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `proficiency.Hooks(f(g(h())))`.

type ProficiencyConnection

type ProficiencyConnection struct {
	Edges      []*ProficiencyEdge `json:"edges"`
	PageInfo   PageInfo           `json:"pageInfo"`
	TotalCount int                `json:"totalCount"`
}

ProficiencyConnection is the connection containing edges to Proficiency.

type ProficiencyCreate

type ProficiencyCreate struct {
	// contains filtered or unexported fields
}

ProficiencyCreate is the builder for creating a Proficiency entity.

func (*ProficiencyCreate) AddChoice

AddChoice adds the "choice" edges to the ProficiencyChoice entity.

func (*ProficiencyCreate) AddChoiceIDs

func (pc *ProficiencyCreate) AddChoiceIDs(ids ...int) *ProficiencyCreate

AddChoiceIDs adds the "choice" edge to the ProficiencyChoice entity by IDs.

func (*ProficiencyCreate) AddClassIDs

func (pc *ProficiencyCreate) AddClassIDs(ids ...int) *ProficiencyCreate

AddClassIDs adds the "classes" edge to the Class entity by IDs.

func (*ProficiencyCreate) AddClasses

func (pc *ProficiencyCreate) AddClasses(c ...*Class) *ProficiencyCreate

AddClasses adds the "classes" edges to the Class entity.

func (*ProficiencyCreate) AddEquipment

func (pc *ProficiencyCreate) AddEquipment(e ...*Equipment) *ProficiencyCreate

AddEquipment adds the "equipment" edges to the Equipment entity.

func (*ProficiencyCreate) AddEquipmentCategory

func (pc *ProficiencyCreate) AddEquipmentCategory(e ...*EquipmentCategory) *ProficiencyCreate

AddEquipmentCategory adds the "equipment_category" edges to the EquipmentCategory entity.

func (*ProficiencyCreate) AddEquipmentCategoryIDs

func (pc *ProficiencyCreate) AddEquipmentCategoryIDs(ids ...int) *ProficiencyCreate

AddEquipmentCategoryIDs adds the "equipment_category" edge to the EquipmentCategory entity by IDs.

func (*ProficiencyCreate) AddEquipmentIDs

func (pc *ProficiencyCreate) AddEquipmentIDs(ids ...int) *ProficiencyCreate

AddEquipmentIDs adds the "equipment" edge to the Equipment entity by IDs.

func (*ProficiencyCreate) AddRaceIDs

func (pc *ProficiencyCreate) AddRaceIDs(ids ...int) *ProficiencyCreate

AddRaceIDs adds the "races" edge to the Race entity by IDs.

func (*ProficiencyCreate) AddRaces

func (pc *ProficiencyCreate) AddRaces(r ...*Race) *ProficiencyCreate

AddRaces adds the "races" edges to the Race entity.

func (*ProficiencyCreate) AddSavingThrow

func (pc *ProficiencyCreate) AddSavingThrow(a ...*AbilityScore) *ProficiencyCreate

AddSavingThrow adds the "saving_throw" edges to the AbilityScore entity.

func (*ProficiencyCreate) AddSavingThrowIDs

func (pc *ProficiencyCreate) AddSavingThrowIDs(ids ...int) *ProficiencyCreate

AddSavingThrowIDs adds the "saving_throw" edge to the AbilityScore entity by IDs.

func (*ProficiencyCreate) AddSkill

func (pc *ProficiencyCreate) AddSkill(s ...*Skill) *ProficiencyCreate

AddSkill adds the "skill" edges to the Skill entity.

func (*ProficiencyCreate) AddSkillIDs

func (pc *ProficiencyCreate) AddSkillIDs(ids ...int) *ProficiencyCreate

AddSkillIDs adds the "skill" edge to the Skill entity by IDs.

func (*ProficiencyCreate) AddSubraceIDs

func (pc *ProficiencyCreate) AddSubraceIDs(ids ...int) *ProficiencyCreate

AddSubraceIDs adds the "subraces" edge to the Subrace entity by IDs.

func (*ProficiencyCreate) AddSubraces

func (pc *ProficiencyCreate) AddSubraces(s ...*Subrace) *ProficiencyCreate

AddSubraces adds the "subraces" edges to the Subrace entity.

func (*ProficiencyCreate) Exec

func (pc *ProficiencyCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProficiencyCreate) ExecX

func (pc *ProficiencyCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProficiencyCreate) Mutation

func (pc *ProficiencyCreate) Mutation() *ProficiencyMutation

Mutation returns the ProficiencyMutation object of the builder.

func (*ProficiencyCreate) Save

Save creates the Proficiency in the database.

func (*ProficiencyCreate) SaveX

func (pc *ProficiencyCreate) SaveX(ctx context.Context) *Proficiency

SaveX calls Save and panics if Save returns an error.

func (*ProficiencyCreate) SetIndx

func (pc *ProficiencyCreate) SetIndx(s string) *ProficiencyCreate

SetIndx sets the "indx" field.

func (*ProficiencyCreate) SetName

func (pc *ProficiencyCreate) SetName(s string) *ProficiencyCreate

SetName sets the "name" field.

func (*ProficiencyCreate) SetProficiency

func (pc *ProficiencyCreate) SetProficiency(input *Proficiency) *ProficiencyCreate

func (*ProficiencyCreate) SetProficiencyCategory

func (pc *ProficiencyCreate) SetProficiencyCategory(s string) *ProficiencyCreate

SetProficiencyCategory sets the "proficiency_category" field.

type ProficiencyCreateBulk

type ProficiencyCreateBulk struct {
	// contains filtered or unexported fields
}

ProficiencyCreateBulk is the builder for creating many Proficiency entities in bulk.

func (*ProficiencyCreateBulk) Exec

func (pcb *ProficiencyCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ProficiencyCreateBulk) ExecX

func (pcb *ProficiencyCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProficiencyCreateBulk) Save

func (pcb *ProficiencyCreateBulk) Save(ctx context.Context) ([]*Proficiency, error)

Save creates the Proficiency entities in the database.

func (*ProficiencyCreateBulk) SaveX

func (pcb *ProficiencyCreateBulk) SaveX(ctx context.Context) []*Proficiency

SaveX is like Save, but panics if an error occurs.

type ProficiencyDelete

type ProficiencyDelete struct {
	// contains filtered or unexported fields
}

ProficiencyDelete is the builder for deleting a Proficiency entity.

func (*ProficiencyDelete) Exec

func (pd *ProficiencyDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ProficiencyDelete) ExecX

func (pd *ProficiencyDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ProficiencyDelete) Where

Where appends a list predicates to the ProficiencyDelete builder.

type ProficiencyDeleteOne

type ProficiencyDeleteOne struct {
	// contains filtered or unexported fields
}

ProficiencyDeleteOne is the builder for deleting a single Proficiency entity.

func (*ProficiencyDeleteOne) Exec

func (pdo *ProficiencyDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ProficiencyDeleteOne) ExecX

func (pdo *ProficiencyDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProficiencyDeleteOne) Where

Where appends a list predicates to the ProficiencyDelete builder.

type ProficiencyEdge

type ProficiencyEdge struct {
	Node   *Proficiency `json:"node"`
	Cursor Cursor       `json:"cursor"`
}

ProficiencyEdge is the edge representation of Proficiency.

type ProficiencyEdges

type ProficiencyEdges struct {
	// Classes holds the value of the classes edge.
	Classes []*Class `json:"classes,omitempty"`
	// Races holds the value of the races edge.
	Races []*Race `json:"races,omitempty"`
	// Subraces holds the value of the subraces edge.
	Subraces []*Subrace `json:"subraces,omitempty"`
	// Choice holds the value of the choice edge.
	Choice []*ProficiencyChoice `json:"choice,omitempty"`
	// Skill holds the value of the skill edge.
	Skill []*Skill `json:"skill,omitempty"`
	// Equipment holds the value of the equipment edge.
	Equipment []*Equipment `json:"equipment,omitempty"`
	// EquipmentCategory holds the value of the equipment_category edge.
	EquipmentCategory []*EquipmentCategory `json:"equipment_category,omitempty"`
	// SavingThrow holds the value of the saving_throw edge.
	SavingThrow []*AbilityScore `json:"saving_throw,omitempty"`
	// contains filtered or unexported fields
}

ProficiencyEdges holds the relations/edges for other nodes in the graph.

func (ProficiencyEdges) ChoiceOrErr

func (e ProficiencyEdges) ChoiceOrErr() ([]*ProficiencyChoice, error)

ChoiceOrErr returns the Choice value or an error if the edge was not loaded in eager-loading.

func (ProficiencyEdges) ClassesOrErr

func (e ProficiencyEdges) ClassesOrErr() ([]*Class, error)

ClassesOrErr returns the Classes value or an error if the edge was not loaded in eager-loading.

func (ProficiencyEdges) EquipmentCategoryOrErr

func (e ProficiencyEdges) EquipmentCategoryOrErr() ([]*EquipmentCategory, error)

EquipmentCategoryOrErr returns the EquipmentCategory value or an error if the edge was not loaded in eager-loading.

func (ProficiencyEdges) EquipmentOrErr

func (e ProficiencyEdges) EquipmentOrErr() ([]*Equipment, error)

EquipmentOrErr returns the Equipment value or an error if the edge was not loaded in eager-loading.

func (ProficiencyEdges) RacesOrErr

func (e ProficiencyEdges) RacesOrErr() ([]*Race, error)

RacesOrErr returns the Races value or an error if the edge was not loaded in eager-loading.

func (ProficiencyEdges) SavingThrowOrErr

func (e ProficiencyEdges) SavingThrowOrErr() ([]*AbilityScore, error)

SavingThrowOrErr returns the SavingThrow value or an error if the edge was not loaded in eager-loading.

func (ProficiencyEdges) SkillOrErr

func (e ProficiencyEdges) SkillOrErr() ([]*Skill, error)

SkillOrErr returns the Skill value or an error if the edge was not loaded in eager-loading.

func (ProficiencyEdges) SubracesOrErr

func (e ProficiencyEdges) SubracesOrErr() ([]*Subrace, error)

SubracesOrErr returns the Subraces value or an error if the edge was not loaded in eager-loading.

type ProficiencyGroupBy

type ProficiencyGroupBy struct {
	// contains filtered or unexported fields
}

ProficiencyGroupBy is the group-by builder for Proficiency entities.

func (*ProficiencyGroupBy) Aggregate

func (pgb *ProficiencyGroupBy) Aggregate(fns ...AggregateFunc) *ProficiencyGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ProficiencyGroupBy) Bool

func (s *ProficiencyGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProficiencyGroupBy) BoolX

func (s *ProficiencyGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProficiencyGroupBy) Bools

func (s *ProficiencyGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProficiencyGroupBy) BoolsX

func (s *ProficiencyGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProficiencyGroupBy) Float64

func (s *ProficiencyGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProficiencyGroupBy) Float64X

func (s *ProficiencyGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProficiencyGroupBy) Float64s

func (s *ProficiencyGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProficiencyGroupBy) Float64sX

func (s *ProficiencyGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProficiencyGroupBy) Int

func (s *ProficiencyGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProficiencyGroupBy) IntX

func (s *ProficiencyGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProficiencyGroupBy) Ints

func (s *ProficiencyGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProficiencyGroupBy) IntsX

func (s *ProficiencyGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ProficiencyGroupBy) Scan

func (pgb *ProficiencyGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ProficiencyGroupBy) ScanX

func (s *ProficiencyGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProficiencyGroupBy) String

func (s *ProficiencyGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProficiencyGroupBy) StringX

func (s *ProficiencyGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProficiencyGroupBy) Strings

func (s *ProficiencyGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProficiencyGroupBy) StringsX

func (s *ProficiencyGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProficiencyMutation

type ProficiencyMutation struct {
	// contains filtered or unexported fields
}

ProficiencyMutation represents an operation that mutates the Proficiency nodes in the graph.

func (*ProficiencyMutation) AddChoiceIDs

func (m *ProficiencyMutation) AddChoiceIDs(ids ...int)

AddChoiceIDs adds the "choice" edge to the ProficiencyChoice entity by ids.

func (*ProficiencyMutation) AddClassIDs

func (m *ProficiencyMutation) AddClassIDs(ids ...int)

AddClassIDs adds the "classes" edge to the Class entity by ids.

func (*ProficiencyMutation) AddEquipmentCategoryIDs

func (m *ProficiencyMutation) AddEquipmentCategoryIDs(ids ...int)

AddEquipmentCategoryIDs adds the "equipment_category" edge to the EquipmentCategory entity by ids.

func (*ProficiencyMutation) AddEquipmentIDs

func (m *ProficiencyMutation) AddEquipmentIDs(ids ...int)

AddEquipmentIDs adds the "equipment" edge to the Equipment entity by ids.

func (*ProficiencyMutation) AddField

func (m *ProficiencyMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ProficiencyMutation) AddRaceIDs

func (m *ProficiencyMutation) AddRaceIDs(ids ...int)

AddRaceIDs adds the "races" edge to the Race entity by ids.

func (*ProficiencyMutation) AddSavingThrowIDs

func (m *ProficiencyMutation) AddSavingThrowIDs(ids ...int)

AddSavingThrowIDs adds the "saving_throw" edge to the AbilityScore entity by ids.

func (*ProficiencyMutation) AddSkillIDs

func (m *ProficiencyMutation) AddSkillIDs(ids ...int)

AddSkillIDs adds the "skill" edge to the Skill entity by ids.

func (*ProficiencyMutation) AddSubraceIDs

func (m *ProficiencyMutation) AddSubraceIDs(ids ...int)

AddSubraceIDs adds the "subraces" edge to the Subrace entity by ids.

func (*ProficiencyMutation) AddedEdges

func (m *ProficiencyMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ProficiencyMutation) AddedField

func (m *ProficiencyMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ProficiencyMutation) AddedFields

func (m *ProficiencyMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ProficiencyMutation) AddedIDs

func (m *ProficiencyMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ProficiencyMutation) ChoiceCleared

func (m *ProficiencyMutation) ChoiceCleared() bool

ChoiceCleared reports if the "choice" edge to the ProficiencyChoice entity was cleared.

func (*ProficiencyMutation) ChoiceIDs

func (m *ProficiencyMutation) ChoiceIDs() (ids []int)

ChoiceIDs returns the "choice" edge IDs in the mutation.

func (*ProficiencyMutation) ClassesCleared

func (m *ProficiencyMutation) ClassesCleared() bool

ClassesCleared reports if the "classes" edge to the Class entity was cleared.

func (*ProficiencyMutation) ClassesIDs

func (m *ProficiencyMutation) ClassesIDs() (ids []int)

ClassesIDs returns the "classes" edge IDs in the mutation.

func (*ProficiencyMutation) ClearChoice

func (m *ProficiencyMutation) ClearChoice()

ClearChoice clears the "choice" edge to the ProficiencyChoice entity.

func (*ProficiencyMutation) ClearClasses

func (m *ProficiencyMutation) ClearClasses()

ClearClasses clears the "classes" edge to the Class entity.

func (*ProficiencyMutation) ClearEdge

func (m *ProficiencyMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*ProficiencyMutation) ClearEquipment

func (m *ProficiencyMutation) ClearEquipment()

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*ProficiencyMutation) ClearEquipmentCategory

func (m *ProficiencyMutation) ClearEquipmentCategory()

ClearEquipmentCategory clears the "equipment_category" edge to the EquipmentCategory entity.

func (*ProficiencyMutation) ClearField

func (m *ProficiencyMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*ProficiencyMutation) ClearRaces

func (m *ProficiencyMutation) ClearRaces()

ClearRaces clears the "races" edge to the Race entity.

func (*ProficiencyMutation) ClearSavingThrow

func (m *ProficiencyMutation) ClearSavingThrow()

ClearSavingThrow clears the "saving_throw" edge to the AbilityScore entity.

func (*ProficiencyMutation) ClearSkill

func (m *ProficiencyMutation) ClearSkill()

ClearSkill clears the "skill" edge to the Skill entity.

func (*ProficiencyMutation) ClearSubraces

func (m *ProficiencyMutation) ClearSubraces()

ClearSubraces clears the "subraces" edge to the Subrace entity.

func (*ProficiencyMutation) ClearedEdges

func (m *ProficiencyMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ProficiencyMutation) ClearedFields

func (m *ProficiencyMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ProficiencyMutation) Client

func (m ProficiencyMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*ProficiencyMutation) EdgeCleared

func (m *ProficiencyMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ProficiencyMutation) EquipmentCategoryCleared

func (m *ProficiencyMutation) EquipmentCategoryCleared() bool

EquipmentCategoryCleared reports if the "equipment_category" edge to the EquipmentCategory entity was cleared.

func (*ProficiencyMutation) EquipmentCategoryIDs

func (m *ProficiencyMutation) EquipmentCategoryIDs() (ids []int)

EquipmentCategoryIDs returns the "equipment_category" edge IDs in the mutation.

func (*ProficiencyMutation) EquipmentCleared

func (m *ProficiencyMutation) EquipmentCleared() bool

EquipmentCleared reports if the "equipment" edge to the Equipment entity was cleared.

func (*ProficiencyMutation) EquipmentIDs

func (m *ProficiencyMutation) EquipmentIDs() (ids []int)

EquipmentIDs returns the "equipment" edge IDs in the mutation.

func (*ProficiencyMutation) Field

func (m *ProficiencyMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ProficiencyMutation) FieldCleared

func (m *ProficiencyMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ProficiencyMutation) Fields

func (m *ProficiencyMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*ProficiencyMutation) ID

func (m *ProficiencyMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*ProficiencyMutation) IDs

func (m *ProficiencyMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*ProficiencyMutation) Indx

func (m *ProficiencyMutation) Indx() (r string, exists bool)

Indx returns the value of the "indx" field in the mutation.

func (*ProficiencyMutation) Name

func (m *ProficiencyMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ProficiencyMutation) OldField

func (m *ProficiencyMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*ProficiencyMutation) OldIndx

func (m *ProficiencyMutation) OldIndx(ctx context.Context) (v string, err error)

OldIndx returns the old "indx" field's value of the Proficiency entity. If the Proficiency object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProficiencyMutation) OldName

func (m *ProficiencyMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Proficiency entity. If the Proficiency object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProficiencyMutation) OldProficiencyCategory

func (m *ProficiencyMutation) OldProficiencyCategory(ctx context.Context) (v string, err error)

OldProficiencyCategory returns the old "proficiency_category" field's value of the Proficiency entity. If the Proficiency object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProficiencyMutation) Op

func (m *ProficiencyMutation) Op() Op

Op returns the operation name.

func (*ProficiencyMutation) ProficiencyCategory

func (m *ProficiencyMutation) ProficiencyCategory() (r string, exists bool)

ProficiencyCategory returns the value of the "proficiency_category" field in the mutation.

func (*ProficiencyMutation) RacesCleared

func (m *ProficiencyMutation) RacesCleared() bool

RacesCleared reports if the "races" edge to the Race entity was cleared.

func (*ProficiencyMutation) RacesIDs

func (m *ProficiencyMutation) RacesIDs() (ids []int)

RacesIDs returns the "races" edge IDs in the mutation.

func (*ProficiencyMutation) RemoveChoiceIDs

func (m *ProficiencyMutation) RemoveChoiceIDs(ids ...int)

RemoveChoiceIDs removes the "choice" edge to the ProficiencyChoice entity by IDs.

func (*ProficiencyMutation) RemoveClassIDs

func (m *ProficiencyMutation) RemoveClassIDs(ids ...int)

RemoveClassIDs removes the "classes" edge to the Class entity by IDs.

func (*ProficiencyMutation) RemoveEquipmentCategoryIDs

func (m *ProficiencyMutation) RemoveEquipmentCategoryIDs(ids ...int)

RemoveEquipmentCategoryIDs removes the "equipment_category" edge to the EquipmentCategory entity by IDs.

func (*ProficiencyMutation) RemoveEquipmentIDs

func (m *ProficiencyMutation) RemoveEquipmentIDs(ids ...int)

RemoveEquipmentIDs removes the "equipment" edge to the Equipment entity by IDs.

func (*ProficiencyMutation) RemoveRaceIDs

func (m *ProficiencyMutation) RemoveRaceIDs(ids ...int)

RemoveRaceIDs removes the "races" edge to the Race entity by IDs.

func (*ProficiencyMutation) RemoveSavingThrowIDs

func (m *ProficiencyMutation) RemoveSavingThrowIDs(ids ...int)

RemoveSavingThrowIDs removes the "saving_throw" edge to the AbilityScore entity by IDs.

func (*ProficiencyMutation) RemoveSkillIDs

func (m *ProficiencyMutation) RemoveSkillIDs(ids ...int)

RemoveSkillIDs removes the "skill" edge to the Skill entity by IDs.

func (*ProficiencyMutation) RemoveSubraceIDs

func (m *ProficiencyMutation) RemoveSubraceIDs(ids ...int)

RemoveSubraceIDs removes the "subraces" edge to the Subrace entity by IDs.

func (*ProficiencyMutation) RemovedChoiceIDs

func (m *ProficiencyMutation) RemovedChoiceIDs() (ids []int)

RemovedChoice returns the removed IDs of the "choice" edge to the ProficiencyChoice entity.

func (*ProficiencyMutation) RemovedClassesIDs

func (m *ProficiencyMutation) RemovedClassesIDs() (ids []int)

RemovedClasses returns the removed IDs of the "classes" edge to the Class entity.

func (*ProficiencyMutation) RemovedEdges

func (m *ProficiencyMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ProficiencyMutation) RemovedEquipmentCategoryIDs

func (m *ProficiencyMutation) RemovedEquipmentCategoryIDs() (ids []int)

RemovedEquipmentCategory returns the removed IDs of the "equipment_category" edge to the EquipmentCategory entity.

func (*ProficiencyMutation) RemovedEquipmentIDs

func (m *ProficiencyMutation) RemovedEquipmentIDs() (ids []int)

RemovedEquipment returns the removed IDs of the "equipment" edge to the Equipment entity.

func (*ProficiencyMutation) RemovedIDs

func (m *ProficiencyMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*ProficiencyMutation) RemovedRacesIDs

func (m *ProficiencyMutation) RemovedRacesIDs() (ids []int)

RemovedRaces returns the removed IDs of the "races" edge to the Race entity.

func (*ProficiencyMutation) RemovedSavingThrowIDs

func (m *ProficiencyMutation) RemovedSavingThrowIDs() (ids []int)

RemovedSavingThrow returns the removed IDs of the "saving_throw" edge to the AbilityScore entity.

func (*ProficiencyMutation) RemovedSkillIDs

func (m *ProficiencyMutation) RemovedSkillIDs() (ids []int)

RemovedSkill returns the removed IDs of the "skill" edge to the Skill entity.

func (*ProficiencyMutation) RemovedSubracesIDs

func (m *ProficiencyMutation) RemovedSubracesIDs() (ids []int)

RemovedSubraces returns the removed IDs of the "subraces" edge to the Subrace entity.

func (*ProficiencyMutation) ResetChoice

func (m *ProficiencyMutation) ResetChoice()

ResetChoice resets all changes to the "choice" edge.

func (*ProficiencyMutation) ResetClasses

func (m *ProficiencyMutation) ResetClasses()

ResetClasses resets all changes to the "classes" edge.

func (*ProficiencyMutation) ResetEdge

func (m *ProficiencyMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*ProficiencyMutation) ResetEquipment

func (m *ProficiencyMutation) ResetEquipment()

ResetEquipment resets all changes to the "equipment" edge.

func (*ProficiencyMutation) ResetEquipmentCategory

func (m *ProficiencyMutation) ResetEquipmentCategory()

ResetEquipmentCategory resets all changes to the "equipment_category" edge.

func (*ProficiencyMutation) ResetField

func (m *ProficiencyMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*ProficiencyMutation) ResetIndx

func (m *ProficiencyMutation) ResetIndx()

ResetIndx resets all changes to the "indx" field.

func (*ProficiencyMutation) ResetName

func (m *ProficiencyMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ProficiencyMutation) ResetProficiencyCategory

func (m *ProficiencyMutation) ResetProficiencyCategory()

ResetProficiencyCategory resets all changes to the "proficiency_category" field.

func (*ProficiencyMutation) ResetRaces

func (m *ProficiencyMutation) ResetRaces()

ResetRaces resets all changes to the "races" edge.

func (*ProficiencyMutation) ResetSavingThrow

func (m *ProficiencyMutation) ResetSavingThrow()

ResetSavingThrow resets all changes to the "saving_throw" edge.

func (*ProficiencyMutation) ResetSkill

func (m *ProficiencyMutation) ResetSkill()

ResetSkill resets all changes to the "skill" edge.

func (*ProficiencyMutation) ResetSubraces

func (m *ProficiencyMutation) ResetSubraces()

ResetSubraces resets all changes to the "subraces" edge.

func (*ProficiencyMutation) SavingThrowCleared

func (m *ProficiencyMutation) SavingThrowCleared() bool

SavingThrowCleared reports if the "saving_throw" edge to the AbilityScore entity was cleared.

func (*ProficiencyMutation) SavingThrowIDs

func (m *ProficiencyMutation) SavingThrowIDs() (ids []int)

SavingThrowIDs returns the "saving_throw" edge IDs in the mutation.

func (*ProficiencyMutation) SetField

func (m *ProficiencyMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ProficiencyMutation) SetIndx

func (m *ProficiencyMutation) SetIndx(s string)

SetIndx sets the "indx" field.

func (*ProficiencyMutation) SetName

func (m *ProficiencyMutation) SetName(s string)

SetName sets the "name" field.

func (*ProficiencyMutation) SetOp

func (m *ProficiencyMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ProficiencyMutation) SetProficiencyCategory

func (m *ProficiencyMutation) SetProficiencyCategory(s string)

SetProficiencyCategory sets the "proficiency_category" field.

func (*ProficiencyMutation) SkillCleared

func (m *ProficiencyMutation) SkillCleared() bool

SkillCleared reports if the "skill" edge to the Skill entity was cleared.

func (*ProficiencyMutation) SkillIDs

func (m *ProficiencyMutation) SkillIDs() (ids []int)

SkillIDs returns the "skill" edge IDs in the mutation.

func (*ProficiencyMutation) SubracesCleared

func (m *ProficiencyMutation) SubracesCleared() bool

SubracesCleared reports if the "subraces" edge to the Subrace entity was cleared.

func (*ProficiencyMutation) SubracesIDs

func (m *ProficiencyMutation) SubracesIDs() (ids []int)

SubracesIDs returns the "subraces" edge IDs in the mutation.

func (ProficiencyMutation) Tx

func (m ProficiencyMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ProficiencyMutation) Type

func (m *ProficiencyMutation) Type() string

Type returns the node type of this mutation (Proficiency).

func (*ProficiencyMutation) Where

func (m *ProficiencyMutation) Where(ps ...predicate.Proficiency)

Where appends a list predicates to the ProficiencyMutation builder.

func (*ProficiencyMutation) WhereP

func (m *ProficiencyMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ProficiencyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ProficiencyOrder

type ProficiencyOrder struct {
	Direction OrderDirection         `json:"direction"`
	Field     *ProficiencyOrderField `json:"field"`
}

ProficiencyOrder defines the ordering of Proficiency.

type ProficiencyOrderField

type ProficiencyOrderField struct {
	// Value extracts the ordering value from the given Proficiency.
	Value func(*Proficiency) (ent.Value, error)
	// contains filtered or unexported fields
}

ProficiencyOrderField defines the ordering field of Proficiency.

func (ProficiencyOrderField) MarshalGQL

func (f ProficiencyOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (ProficiencyOrderField) String

func (f ProficiencyOrderField) String() string

String implement fmt.Stringer interface.

func (*ProficiencyOrderField) UnmarshalGQL

func (f *ProficiencyOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type ProficiencyPaginateOption

type ProficiencyPaginateOption func(*proficiencyPager) error

ProficiencyPaginateOption enables pagination customization.

func WithProficiencyFilter

func WithProficiencyFilter(filter func(*ProficiencyQuery) (*ProficiencyQuery, error)) ProficiencyPaginateOption

WithProficiencyFilter configures pagination filter.

func WithProficiencyOrder

func WithProficiencyOrder(order *ProficiencyOrder) ProficiencyPaginateOption

WithProficiencyOrder configures pagination ordering.

type ProficiencyQuery

type ProficiencyQuery struct {
	// contains filtered or unexported fields
}

ProficiencyQuery is the builder for querying Proficiency entities.

func (*ProficiencyQuery) Aggregate

func (pq *ProficiencyQuery) Aggregate(fns ...AggregateFunc) *ProficiencySelect

Aggregate returns a ProficiencySelect configured with the given aggregations.

func (*ProficiencyQuery) All

func (pq *ProficiencyQuery) All(ctx context.Context) ([]*Proficiency, error)

All executes the query and returns a list of Proficiencies.

func (*ProficiencyQuery) AllX

func (pq *ProficiencyQuery) AllX(ctx context.Context) []*Proficiency

AllX is like All, but panics if an error occurs.

func (*ProficiencyQuery) Clone

func (pq *ProficiencyQuery) Clone() *ProficiencyQuery

Clone returns a duplicate of the ProficiencyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ProficiencyQuery) CollectFields

func (pr *ProficiencyQuery) CollectFields(ctx context.Context, satisfies ...string) (*ProficiencyQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*ProficiencyQuery) Count

func (pq *ProficiencyQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ProficiencyQuery) CountX

func (pq *ProficiencyQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ProficiencyQuery) Exist

func (pq *ProficiencyQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ProficiencyQuery) ExistX

func (pq *ProficiencyQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ProficiencyQuery) First

func (pq *ProficiencyQuery) First(ctx context.Context) (*Proficiency, error)

First returns the first Proficiency entity from the query. Returns a *NotFoundError when no Proficiency was found.

func (*ProficiencyQuery) FirstID

func (pq *ProficiencyQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Proficiency ID from the query. Returns a *NotFoundError when no Proficiency ID was found.

func (*ProficiencyQuery) FirstIDX

func (pq *ProficiencyQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*ProficiencyQuery) FirstX

func (pq *ProficiencyQuery) FirstX(ctx context.Context) *Proficiency

FirstX is like First, but panics if an error occurs.

func (*ProficiencyQuery) GroupBy

func (pq *ProficiencyQuery) GroupBy(field string, fields ...string) *ProficiencyGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Indx string `json:"index"`
	Count int `json:"count,omitempty"`
}

client.Proficiency.Query().
	GroupBy(proficiency.FieldIndx).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ProficiencyQuery) IDs

func (pq *ProficiencyQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Proficiency IDs.

func (*ProficiencyQuery) IDsX

func (pq *ProficiencyQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*ProficiencyQuery) Limit

func (pq *ProficiencyQuery) Limit(limit int) *ProficiencyQuery

Limit the number of records to be returned by this query.

func (*ProficiencyQuery) Offset

func (pq *ProficiencyQuery) Offset(offset int) *ProficiencyQuery

Offset to start from.

func (*ProficiencyQuery) Only

func (pq *ProficiencyQuery) Only(ctx context.Context) (*Proficiency, error)

Only returns a single Proficiency entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Proficiency entity is found. Returns a *NotFoundError when no Proficiency entities are found.

func (*ProficiencyQuery) OnlyID

func (pq *ProficiencyQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Proficiency ID in the query. Returns a *NotSingularError when more than one Proficiency ID is found. Returns a *NotFoundError when no entities are found.

func (*ProficiencyQuery) OnlyIDX

func (pq *ProficiencyQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ProficiencyQuery) OnlyX

func (pq *ProficiencyQuery) OnlyX(ctx context.Context) *Proficiency

OnlyX is like Only, but panics if an error occurs.

func (*ProficiencyQuery) Order

Order specifies how the records should be ordered.

func (*ProficiencyQuery) Paginate

func (pr *ProficiencyQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...ProficiencyPaginateOption,
) (*ProficiencyConnection, error)

Paginate executes the query and returns a relay based cursor connection to Proficiency.

func (*ProficiencyQuery) QueryChoice

func (pq *ProficiencyQuery) QueryChoice() *ProficiencyChoiceQuery

QueryChoice chains the current query on the "choice" edge.

func (*ProficiencyQuery) QueryClasses

func (pq *ProficiencyQuery) QueryClasses() *ClassQuery

QueryClasses chains the current query on the "classes" edge.

func (*ProficiencyQuery) QueryEquipment

func (pq *ProficiencyQuery) QueryEquipment() *EquipmentQuery

QueryEquipment chains the current query on the "equipment" edge.

func (*ProficiencyQuery) QueryEquipmentCategory

func (pq *ProficiencyQuery) QueryEquipmentCategory() *EquipmentCategoryQuery

QueryEquipmentCategory chains the current query on the "equipment_category" edge.

func (*ProficiencyQuery) QueryRaces

func (pq *ProficiencyQuery) QueryRaces() *RaceQuery

QueryRaces chains the current query on the "races" edge.

func (*ProficiencyQuery) QuerySavingThrow

func (pq *ProficiencyQuery) QuerySavingThrow() *AbilityScoreQuery

QuerySavingThrow chains the current query on the "saving_throw" edge.

func (*ProficiencyQuery) QuerySkill

func (pq *ProficiencyQuery) QuerySkill() *SkillQuery

QuerySkill chains the current query on the "skill" edge.

func (*ProficiencyQuery) QuerySubraces

func (pq *ProficiencyQuery) QuerySubraces() *SubraceQuery

QuerySubraces chains the current query on the "subraces" edge.

func (*ProficiencyQuery) Select

func (pq *ProficiencyQuery) Select(fields ...string) *ProficiencySelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Indx string `json:"index"`
}

client.Proficiency.Query().
	Select(proficiency.FieldIndx).
	Scan(ctx, &v)

func (*ProficiencyQuery) Unique

func (pq *ProficiencyQuery) Unique(unique bool) *ProficiencyQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*ProficiencyQuery) Where

Where adds a new predicate for the ProficiencyQuery builder.

func (*ProficiencyQuery) WithChoice

func (pq *ProficiencyQuery) WithChoice(opts ...func(*ProficiencyChoiceQuery)) *ProficiencyQuery

WithChoice tells the query-builder to eager-load the nodes that are connected to the "choice" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyQuery) WithClasses

func (pq *ProficiencyQuery) WithClasses(opts ...func(*ClassQuery)) *ProficiencyQuery

WithClasses tells the query-builder to eager-load the nodes that are connected to the "classes" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyQuery) WithEquipment

func (pq *ProficiencyQuery) WithEquipment(opts ...func(*EquipmentQuery)) *ProficiencyQuery

WithEquipment tells the query-builder to eager-load the nodes that are connected to the "equipment" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyQuery) WithEquipmentCategory

func (pq *ProficiencyQuery) WithEquipmentCategory(opts ...func(*EquipmentCategoryQuery)) *ProficiencyQuery

WithEquipmentCategory tells the query-builder to eager-load the nodes that are connected to the "equipment_category" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyQuery) WithNamedChoice

func (pq *ProficiencyQuery) WithNamedChoice(name string, opts ...func(*ProficiencyChoiceQuery)) *ProficiencyQuery

WithNamedChoice tells the query-builder to eager-load the nodes that are connected to the "choice" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyQuery) WithNamedClasses

func (pq *ProficiencyQuery) WithNamedClasses(name string, opts ...func(*ClassQuery)) *ProficiencyQuery

WithNamedClasses tells the query-builder to eager-load the nodes that are connected to the "classes" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyQuery) WithNamedEquipment

func (pq *ProficiencyQuery) WithNamedEquipment(name string, opts ...func(*EquipmentQuery)) *ProficiencyQuery

WithNamedEquipment tells the query-builder to eager-load the nodes that are connected to the "equipment" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyQuery) WithNamedEquipmentCategory

func (pq *ProficiencyQuery) WithNamedEquipmentCategory(name string, opts ...func(*EquipmentCategoryQuery)) *ProficiencyQuery

WithNamedEquipmentCategory tells the query-builder to eager-load the nodes that are connected to the "equipment_category" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyQuery) WithNamedRaces

func (pq *ProficiencyQuery) WithNamedRaces(name string, opts ...func(*RaceQuery)) *ProficiencyQuery

WithNamedRaces tells the query-builder to eager-load the nodes that are connected to the "races" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyQuery) WithNamedSavingThrow

func (pq *ProficiencyQuery) WithNamedSavingThrow(name string, opts ...func(*AbilityScoreQuery)) *ProficiencyQuery

WithNamedSavingThrow tells the query-builder to eager-load the nodes that are connected to the "saving_throw" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyQuery) WithNamedSkill

func (pq *ProficiencyQuery) WithNamedSkill(name string, opts ...func(*SkillQuery)) *ProficiencyQuery

WithNamedSkill tells the query-builder to eager-load the nodes that are connected to the "skill" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyQuery) WithNamedSubraces

func (pq *ProficiencyQuery) WithNamedSubraces(name string, opts ...func(*SubraceQuery)) *ProficiencyQuery

WithNamedSubraces tells the query-builder to eager-load the nodes that are connected to the "subraces" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyQuery) WithRaces

func (pq *ProficiencyQuery) WithRaces(opts ...func(*RaceQuery)) *ProficiencyQuery

WithRaces tells the query-builder to eager-load the nodes that are connected to the "races" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyQuery) WithSavingThrow

func (pq *ProficiencyQuery) WithSavingThrow(opts ...func(*AbilityScoreQuery)) *ProficiencyQuery

WithSavingThrow tells the query-builder to eager-load the nodes that are connected to the "saving_throw" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyQuery) WithSkill

func (pq *ProficiencyQuery) WithSkill(opts ...func(*SkillQuery)) *ProficiencyQuery

WithSkill tells the query-builder to eager-load the nodes that are connected to the "skill" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProficiencyQuery) WithSubraces

func (pq *ProficiencyQuery) WithSubraces(opts ...func(*SubraceQuery)) *ProficiencyQuery

WithSubraces tells the query-builder to eager-load the nodes that are connected to the "subraces" edge. The optional arguments are used to configure the query builder of the edge.

type ProficiencySelect

type ProficiencySelect struct {
	*ProficiencyQuery
	// contains filtered or unexported fields
}

ProficiencySelect is the builder for selecting fields of Proficiency entities.

func (*ProficiencySelect) Aggregate

func (ps *ProficiencySelect) Aggregate(fns ...AggregateFunc) *ProficiencySelect

Aggregate adds the given aggregation functions to the selector query.

func (*ProficiencySelect) Bool

func (s *ProficiencySelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProficiencySelect) BoolX

func (s *ProficiencySelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProficiencySelect) Bools

func (s *ProficiencySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProficiencySelect) BoolsX

func (s *ProficiencySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProficiencySelect) Float64

func (s *ProficiencySelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProficiencySelect) Float64X

func (s *ProficiencySelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProficiencySelect) Float64s

func (s *ProficiencySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProficiencySelect) Float64sX

func (s *ProficiencySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProficiencySelect) Int

func (s *ProficiencySelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProficiencySelect) IntX

func (s *ProficiencySelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProficiencySelect) Ints

func (s *ProficiencySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProficiencySelect) IntsX

func (s *ProficiencySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ProficiencySelect) Scan

func (ps *ProficiencySelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ProficiencySelect) ScanX

func (s *ProficiencySelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProficiencySelect) String

func (s *ProficiencySelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProficiencySelect) StringX

func (s *ProficiencySelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProficiencySelect) Strings

func (s *ProficiencySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProficiencySelect) StringsX

func (s *ProficiencySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProficiencyUpdate

type ProficiencyUpdate struct {
	// contains filtered or unexported fields
}

ProficiencyUpdate is the builder for updating Proficiency entities.

func (*ProficiencyUpdate) AddChoice

AddChoice adds the "choice" edges to the ProficiencyChoice entity.

func (*ProficiencyUpdate) AddChoiceIDs

func (pu *ProficiencyUpdate) AddChoiceIDs(ids ...int) *ProficiencyUpdate

AddChoiceIDs adds the "choice" edge to the ProficiencyChoice entity by IDs.

func (*ProficiencyUpdate) AddClassIDs

func (pu *ProficiencyUpdate) AddClassIDs(ids ...int) *ProficiencyUpdate

AddClassIDs adds the "classes" edge to the Class entity by IDs.

func (*ProficiencyUpdate) AddClasses

func (pu *ProficiencyUpdate) AddClasses(c ...*Class) *ProficiencyUpdate

AddClasses adds the "classes" edges to the Class entity.

func (*ProficiencyUpdate) AddEquipment

func (pu *ProficiencyUpdate) AddEquipment(e ...*Equipment) *ProficiencyUpdate

AddEquipment adds the "equipment" edges to the Equipment entity.

func (*ProficiencyUpdate) AddEquipmentCategory

func (pu *ProficiencyUpdate) AddEquipmentCategory(e ...*EquipmentCategory) *ProficiencyUpdate

AddEquipmentCategory adds the "equipment_category" edges to the EquipmentCategory entity.

func (*ProficiencyUpdate) AddEquipmentCategoryIDs

func (pu *ProficiencyUpdate) AddEquipmentCategoryIDs(ids ...int) *ProficiencyUpdate

AddEquipmentCategoryIDs adds the "equipment_category" edge to the EquipmentCategory entity by IDs.

func (*ProficiencyUpdate) AddEquipmentIDs

func (pu *ProficiencyUpdate) AddEquipmentIDs(ids ...int) *ProficiencyUpdate

AddEquipmentIDs adds the "equipment" edge to the Equipment entity by IDs.

func (*ProficiencyUpdate) AddRaceIDs

func (pu *ProficiencyUpdate) AddRaceIDs(ids ...int) *ProficiencyUpdate

AddRaceIDs adds the "races" edge to the Race entity by IDs.

func (*ProficiencyUpdate) AddRaces

func (pu *ProficiencyUpdate) AddRaces(r ...*Race) *ProficiencyUpdate

AddRaces adds the "races" edges to the Race entity.

func (*ProficiencyUpdate) AddSavingThrow

func (pu *ProficiencyUpdate) AddSavingThrow(a ...*AbilityScore) *ProficiencyUpdate

AddSavingThrow adds the "saving_throw" edges to the AbilityScore entity.

func (*ProficiencyUpdate) AddSavingThrowIDs

func (pu *ProficiencyUpdate) AddSavingThrowIDs(ids ...int) *ProficiencyUpdate

AddSavingThrowIDs adds the "saving_throw" edge to the AbilityScore entity by IDs.

func (*ProficiencyUpdate) AddSkill

func (pu *ProficiencyUpdate) AddSkill(s ...*Skill) *ProficiencyUpdate

AddSkill adds the "skill" edges to the Skill entity.

func (*ProficiencyUpdate) AddSkillIDs

func (pu *ProficiencyUpdate) AddSkillIDs(ids ...int) *ProficiencyUpdate

AddSkillIDs adds the "skill" edge to the Skill entity by IDs.

func (*ProficiencyUpdate) AddSubraceIDs

func (pu *ProficiencyUpdate) AddSubraceIDs(ids ...int) *ProficiencyUpdate

AddSubraceIDs adds the "subraces" edge to the Subrace entity by IDs.

func (*ProficiencyUpdate) AddSubraces

func (pu *ProficiencyUpdate) AddSubraces(s ...*Subrace) *ProficiencyUpdate

AddSubraces adds the "subraces" edges to the Subrace entity.

func (*ProficiencyUpdate) ClearChoice

func (pu *ProficiencyUpdate) ClearChoice() *ProficiencyUpdate

ClearChoice clears all "choice" edges to the ProficiencyChoice entity.

func (*ProficiencyUpdate) ClearClasses

func (pu *ProficiencyUpdate) ClearClasses() *ProficiencyUpdate

ClearClasses clears all "classes" edges to the Class entity.

func (*ProficiencyUpdate) ClearEquipment

func (pu *ProficiencyUpdate) ClearEquipment() *ProficiencyUpdate

ClearEquipment clears all "equipment" edges to the Equipment entity.

func (*ProficiencyUpdate) ClearEquipmentCategory

func (pu *ProficiencyUpdate) ClearEquipmentCategory() *ProficiencyUpdate

ClearEquipmentCategory clears all "equipment_category" edges to the EquipmentCategory entity.

func (*ProficiencyUpdate) ClearRaces

func (pu *ProficiencyUpdate) ClearRaces() *ProficiencyUpdate

ClearRaces clears all "races" edges to the Race entity.

func (*ProficiencyUpdate) ClearSavingThrow

func (pu *ProficiencyUpdate) ClearSavingThrow() *ProficiencyUpdate

ClearSavingThrow clears all "saving_throw" edges to the AbilityScore entity.

func (*ProficiencyUpdate) ClearSkill

func (pu *ProficiencyUpdate) ClearSkill() *ProficiencyUpdate

ClearSkill clears all "skill" edges to the Skill entity.

func (*ProficiencyUpdate) ClearSubraces

func (pu *ProficiencyUpdate) ClearSubraces() *ProficiencyUpdate

ClearSubraces clears all "subraces" edges to the Subrace entity.

func (*ProficiencyUpdate) Exec

func (pu *ProficiencyUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProficiencyUpdate) ExecX

func (pu *ProficiencyUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProficiencyUpdate) Mutation

func (pu *ProficiencyUpdate) Mutation() *ProficiencyMutation

Mutation returns the ProficiencyMutation object of the builder.

func (*ProficiencyUpdate) RemoveChoice

func (pu *ProficiencyUpdate) RemoveChoice(p ...*ProficiencyChoice) *ProficiencyUpdate

RemoveChoice removes "choice" edges to ProficiencyChoice entities.

func (*ProficiencyUpdate) RemoveChoiceIDs

func (pu *ProficiencyUpdate) RemoveChoiceIDs(ids ...int) *ProficiencyUpdate

RemoveChoiceIDs removes the "choice" edge to ProficiencyChoice entities by IDs.

func (*ProficiencyUpdate) RemoveClassIDs

func (pu *ProficiencyUpdate) RemoveClassIDs(ids ...int) *ProficiencyUpdate

RemoveClassIDs removes the "classes" edge to Class entities by IDs.

func (*ProficiencyUpdate) RemoveClasses

func (pu *ProficiencyUpdate) RemoveClasses(c ...*Class) *ProficiencyUpdate

RemoveClasses removes "classes" edges to Class entities.

func (*ProficiencyUpdate) RemoveEquipment

func (pu *ProficiencyUpdate) RemoveEquipment(e ...*Equipment) *ProficiencyUpdate

RemoveEquipment removes "equipment" edges to Equipment entities.

func (*ProficiencyUpdate) RemoveEquipmentCategory

func (pu *ProficiencyUpdate) RemoveEquipmentCategory(e ...*EquipmentCategory) *ProficiencyUpdate

RemoveEquipmentCategory removes "equipment_category" edges to EquipmentCategory entities.

func (*ProficiencyUpdate) RemoveEquipmentCategoryIDs

func (pu *ProficiencyUpdate) RemoveEquipmentCategoryIDs(ids ...int) *ProficiencyUpdate

RemoveEquipmentCategoryIDs removes the "equipment_category" edge to EquipmentCategory entities by IDs.

func (*ProficiencyUpdate) RemoveEquipmentIDs

func (pu *ProficiencyUpdate) RemoveEquipmentIDs(ids ...int) *ProficiencyUpdate

RemoveEquipmentIDs removes the "equipment" edge to Equipment entities by IDs.

func (*ProficiencyUpdate) RemoveRaceIDs

func (pu *ProficiencyUpdate) RemoveRaceIDs(ids ...int) *ProficiencyUpdate

RemoveRaceIDs removes the "races" edge to Race entities by IDs.

func (*ProficiencyUpdate) RemoveRaces

func (pu *ProficiencyUpdate) RemoveRaces(r ...*Race) *ProficiencyUpdate

RemoveRaces removes "races" edges to Race entities.

func (*ProficiencyUpdate) RemoveSavingThrow

func (pu *ProficiencyUpdate) RemoveSavingThrow(a ...*AbilityScore) *ProficiencyUpdate

RemoveSavingThrow removes "saving_throw" edges to AbilityScore entities.

func (*ProficiencyUpdate) RemoveSavingThrowIDs

func (pu *ProficiencyUpdate) RemoveSavingThrowIDs(ids ...int) *ProficiencyUpdate

RemoveSavingThrowIDs removes the "saving_throw" edge to AbilityScore entities by IDs.

func (*ProficiencyUpdate) RemoveSkill

func (pu *ProficiencyUpdate) RemoveSkill(s ...*Skill) *ProficiencyUpdate

RemoveSkill removes "skill" edges to Skill entities.

func (*ProficiencyUpdate) RemoveSkillIDs

func (pu *ProficiencyUpdate) RemoveSkillIDs(ids ...int) *ProficiencyUpdate

RemoveSkillIDs removes the "skill" edge to Skill entities by IDs.

func (*ProficiencyUpdate) RemoveSubraceIDs

func (pu *ProficiencyUpdate) RemoveSubraceIDs(ids ...int) *ProficiencyUpdate

RemoveSubraceIDs removes the "subraces" edge to Subrace entities by IDs.

func (*ProficiencyUpdate) RemoveSubraces

func (pu *ProficiencyUpdate) RemoveSubraces(s ...*Subrace) *ProficiencyUpdate

RemoveSubraces removes "subraces" edges to Subrace entities.

func (*ProficiencyUpdate) Save

func (pu *ProficiencyUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ProficiencyUpdate) SaveX

func (pu *ProficiencyUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ProficiencyUpdate) SetIndx

func (pu *ProficiencyUpdate) SetIndx(s string) *ProficiencyUpdate

SetIndx sets the "indx" field.

func (*ProficiencyUpdate) SetName

func (pu *ProficiencyUpdate) SetName(s string) *ProficiencyUpdate

SetName sets the "name" field.

func (*ProficiencyUpdate) SetProficiencyCategory

func (pu *ProficiencyUpdate) SetProficiencyCategory(s string) *ProficiencyUpdate

SetProficiencyCategory sets the "proficiency_category" field.

func (*ProficiencyUpdate) Where

Where appends a list predicates to the ProficiencyUpdate builder.

type ProficiencyUpdateOne

type ProficiencyUpdateOne struct {
	// contains filtered or unexported fields
}

ProficiencyUpdateOne is the builder for updating a single Proficiency entity.

func (*ProficiencyUpdateOne) AddChoice

AddChoice adds the "choice" edges to the ProficiencyChoice entity.

func (*ProficiencyUpdateOne) AddChoiceIDs

func (puo *ProficiencyUpdateOne) AddChoiceIDs(ids ...int) *ProficiencyUpdateOne

AddChoiceIDs adds the "choice" edge to the ProficiencyChoice entity by IDs.

func (*ProficiencyUpdateOne) AddClassIDs

func (puo *ProficiencyUpdateOne) AddClassIDs(ids ...int) *ProficiencyUpdateOne

AddClassIDs adds the "classes" edge to the Class entity by IDs.

func (*ProficiencyUpdateOne) AddClasses

func (puo *ProficiencyUpdateOne) AddClasses(c ...*Class) *ProficiencyUpdateOne

AddClasses adds the "classes" edges to the Class entity.

func (*ProficiencyUpdateOne) AddEquipment

func (puo *ProficiencyUpdateOne) AddEquipment(e ...*Equipment) *ProficiencyUpdateOne

AddEquipment adds the "equipment" edges to the Equipment entity.

func (*ProficiencyUpdateOne) AddEquipmentCategory

func (puo *ProficiencyUpdateOne) AddEquipmentCategory(e ...*EquipmentCategory) *ProficiencyUpdateOne

AddEquipmentCategory adds the "equipment_category" edges to the EquipmentCategory entity.

func (*ProficiencyUpdateOne) AddEquipmentCategoryIDs

func (puo *ProficiencyUpdateOne) AddEquipmentCategoryIDs(ids ...int) *ProficiencyUpdateOne

AddEquipmentCategoryIDs adds the "equipment_category" edge to the EquipmentCategory entity by IDs.

func (*ProficiencyUpdateOne) AddEquipmentIDs

func (puo *ProficiencyUpdateOne) AddEquipmentIDs(ids ...int) *ProficiencyUpdateOne

AddEquipmentIDs adds the "equipment" edge to the Equipment entity by IDs.

func (*ProficiencyUpdateOne) AddRaceIDs

func (puo *ProficiencyUpdateOne) AddRaceIDs(ids ...int) *ProficiencyUpdateOne

AddRaceIDs adds the "races" edge to the Race entity by IDs.

func (*ProficiencyUpdateOne) AddRaces

func (puo *ProficiencyUpdateOne) AddRaces(r ...*Race) *ProficiencyUpdateOne

AddRaces adds the "races" edges to the Race entity.

func (*ProficiencyUpdateOne) AddSavingThrow

func (puo *ProficiencyUpdateOne) AddSavingThrow(a ...*AbilityScore) *ProficiencyUpdateOne

AddSavingThrow adds the "saving_throw" edges to the AbilityScore entity.

func (*ProficiencyUpdateOne) AddSavingThrowIDs

func (puo *ProficiencyUpdateOne) AddSavingThrowIDs(ids ...int) *ProficiencyUpdateOne

AddSavingThrowIDs adds the "saving_throw" edge to the AbilityScore entity by IDs.

func (*ProficiencyUpdateOne) AddSkill

func (puo *ProficiencyUpdateOne) AddSkill(s ...*Skill) *ProficiencyUpdateOne

AddSkill adds the "skill" edges to the Skill entity.

func (*ProficiencyUpdateOne) AddSkillIDs

func (puo *ProficiencyUpdateOne) AddSkillIDs(ids ...int) *ProficiencyUpdateOne

AddSkillIDs adds the "skill" edge to the Skill entity by IDs.

func (*ProficiencyUpdateOne) AddSubraceIDs

func (puo *ProficiencyUpdateOne) AddSubraceIDs(ids ...int) *ProficiencyUpdateOne

AddSubraceIDs adds the "subraces" edge to the Subrace entity by IDs.

func (*ProficiencyUpdateOne) AddSubraces

func (puo *ProficiencyUpdateOne) AddSubraces(s ...*Subrace) *ProficiencyUpdateOne

AddSubraces adds the "subraces" edges to the Subrace entity.

func (*ProficiencyUpdateOne) ClearChoice

func (puo *ProficiencyUpdateOne) ClearChoice() *ProficiencyUpdateOne

ClearChoice clears all "choice" edges to the ProficiencyChoice entity.

func (*ProficiencyUpdateOne) ClearClasses

func (puo *ProficiencyUpdateOne) ClearClasses() *ProficiencyUpdateOne

ClearClasses clears all "classes" edges to the Class entity.

func (*ProficiencyUpdateOne) ClearEquipment

func (puo *ProficiencyUpdateOne) ClearEquipment() *ProficiencyUpdateOne

ClearEquipment clears all "equipment" edges to the Equipment entity.

func (*ProficiencyUpdateOne) ClearEquipmentCategory

func (puo *ProficiencyUpdateOne) ClearEquipmentCategory() *ProficiencyUpdateOne

ClearEquipmentCategory clears all "equipment_category" edges to the EquipmentCategory entity.

func (*ProficiencyUpdateOne) ClearRaces

func (puo *ProficiencyUpdateOne) ClearRaces() *ProficiencyUpdateOne

ClearRaces clears all "races" edges to the Race entity.

func (*ProficiencyUpdateOne) ClearSavingThrow

func (puo *ProficiencyUpdateOne) ClearSavingThrow() *ProficiencyUpdateOne

ClearSavingThrow clears all "saving_throw" edges to the AbilityScore entity.

func (*ProficiencyUpdateOne) ClearSkill

func (puo *ProficiencyUpdateOne) ClearSkill() *ProficiencyUpdateOne

ClearSkill clears all "skill" edges to the Skill entity.

func (*ProficiencyUpdateOne) ClearSubraces

func (puo *ProficiencyUpdateOne) ClearSubraces() *ProficiencyUpdateOne

ClearSubraces clears all "subraces" edges to the Subrace entity.

func (*ProficiencyUpdateOne) Exec

func (puo *ProficiencyUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ProficiencyUpdateOne) ExecX

func (puo *ProficiencyUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProficiencyUpdateOne) Mutation

func (puo *ProficiencyUpdateOne) Mutation() *ProficiencyMutation

Mutation returns the ProficiencyMutation object of the builder.

func (*ProficiencyUpdateOne) RemoveChoice

RemoveChoice removes "choice" edges to ProficiencyChoice entities.

func (*ProficiencyUpdateOne) RemoveChoiceIDs

func (puo *ProficiencyUpdateOne) RemoveChoiceIDs(ids ...int) *ProficiencyUpdateOne

RemoveChoiceIDs removes the "choice" edge to ProficiencyChoice entities by IDs.

func (*ProficiencyUpdateOne) RemoveClassIDs

func (puo *ProficiencyUpdateOne) RemoveClassIDs(ids ...int) *ProficiencyUpdateOne

RemoveClassIDs removes the "classes" edge to Class entities by IDs.

func (*ProficiencyUpdateOne) RemoveClasses

func (puo *ProficiencyUpdateOne) RemoveClasses(c ...*Class) *ProficiencyUpdateOne

RemoveClasses removes "classes" edges to Class entities.

func (*ProficiencyUpdateOne) RemoveEquipment

func (puo *ProficiencyUpdateOne) RemoveEquipment(e ...*Equipment) *ProficiencyUpdateOne

RemoveEquipment removes "equipment" edges to Equipment entities.

func (*ProficiencyUpdateOne) RemoveEquipmentCategory

func (puo *ProficiencyUpdateOne) RemoveEquipmentCategory(e ...*EquipmentCategory) *ProficiencyUpdateOne

RemoveEquipmentCategory removes "equipment_category" edges to EquipmentCategory entities.

func (*ProficiencyUpdateOne) RemoveEquipmentCategoryIDs

func (puo *ProficiencyUpdateOne) RemoveEquipmentCategoryIDs(ids ...int) *ProficiencyUpdateOne

RemoveEquipmentCategoryIDs removes the "equipment_category" edge to EquipmentCategory entities by IDs.

func (*ProficiencyUpdateOne) RemoveEquipmentIDs

func (puo *ProficiencyUpdateOne) RemoveEquipmentIDs(ids ...int) *ProficiencyUpdateOne

RemoveEquipmentIDs removes the "equipment" edge to Equipment entities by IDs.

func (*ProficiencyUpdateOne) RemoveRaceIDs

func (puo *ProficiencyUpdateOne) RemoveRaceIDs(ids ...int) *ProficiencyUpdateOne

RemoveRaceIDs removes the "races" edge to Race entities by IDs.

func (*ProficiencyUpdateOne) RemoveRaces

func (puo *ProficiencyUpdateOne) RemoveRaces(r ...*Race) *ProficiencyUpdateOne

RemoveRaces removes "races" edges to Race entities.

func (*ProficiencyUpdateOne) RemoveSavingThrow

func (puo *ProficiencyUpdateOne) RemoveSavingThrow(a ...*AbilityScore) *ProficiencyUpdateOne

RemoveSavingThrow removes "saving_throw" edges to AbilityScore entities.

func (*ProficiencyUpdateOne) RemoveSavingThrowIDs

func (puo *ProficiencyUpdateOne) RemoveSavingThrowIDs(ids ...int) *ProficiencyUpdateOne

RemoveSavingThrowIDs removes the "saving_throw" edge to AbilityScore entities by IDs.

func (*ProficiencyUpdateOne) RemoveSkill

func (puo *ProficiencyUpdateOne) RemoveSkill(s ...*Skill) *ProficiencyUpdateOne

RemoveSkill removes "skill" edges to Skill entities.

func (*ProficiencyUpdateOne) RemoveSkillIDs

func (puo *ProficiencyUpdateOne) RemoveSkillIDs(ids ...int) *ProficiencyUpdateOne

RemoveSkillIDs removes the "skill" edge to Skill entities by IDs.

func (*ProficiencyUpdateOne) RemoveSubraceIDs

func (puo *ProficiencyUpdateOne) RemoveSubraceIDs(ids ...int) *ProficiencyUpdateOne

RemoveSubraceIDs removes the "subraces" edge to Subrace entities by IDs.

func (*ProficiencyUpdateOne) RemoveSubraces

func (puo *ProficiencyUpdateOne) RemoveSubraces(s ...*Subrace) *ProficiencyUpdateOne

RemoveSubraces removes "subraces" edges to Subrace entities.

func (*ProficiencyUpdateOne) Save

Save executes the query and returns the updated Proficiency entity.

func (*ProficiencyUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*ProficiencyUpdateOne) Select

func (puo *ProficiencyUpdateOne) Select(field string, fields ...string) *ProficiencyUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ProficiencyUpdateOne) SetIndx

SetIndx sets the "indx" field.

func (*ProficiencyUpdateOne) SetName

SetName sets the "name" field.

func (*ProficiencyUpdateOne) SetProficiencyCategory

func (puo *ProficiencyUpdateOne) SetProficiencyCategory(s string) *ProficiencyUpdateOne

SetProficiencyCategory sets the "proficiency_category" field.

func (*ProficiencyUpdateOne) Where

Where appends a list predicates to the ProficiencyUpdate builder.

type ProficiencyWhereInput

type ProficiencyWhereInput struct {
	Predicates []predicate.Proficiency  `json:"-"`
	Not        *ProficiencyWhereInput   `json:"not,omitempty"`
	Or         []*ProficiencyWhereInput `json:"or,omitempty"`
	And        []*ProficiencyWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "indx" field predicates.
	Indx             *string  `json:"indx,omitempty"`
	IndxNEQ          *string  `json:"indxNEQ,omitempty"`
	IndxIn           []string `json:"indxIn,omitempty"`
	IndxNotIn        []string `json:"indxNotIn,omitempty"`
	IndxGT           *string  `json:"indxGT,omitempty"`
	IndxGTE          *string  `json:"indxGTE,omitempty"`
	IndxLT           *string  `json:"indxLT,omitempty"`
	IndxLTE          *string  `json:"indxLTE,omitempty"`
	IndxContains     *string  `json:"indxContains,omitempty"`
	IndxHasPrefix    *string  `json:"indxHasPrefix,omitempty"`
	IndxHasSuffix    *string  `json:"indxHasSuffix,omitempty"`
	IndxEqualFold    *string  `json:"indxEqualFold,omitempty"`
	IndxContainsFold *string  `json:"indxContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "proficiency_category" field predicates.
	ProficiencyCategory             *string  `json:"proficiencyCategory,omitempty"`
	ProficiencyCategoryNEQ          *string  `json:"proficiencyCategoryNEQ,omitempty"`
	ProficiencyCategoryIn           []string `json:"proficiencyCategoryIn,omitempty"`
	ProficiencyCategoryNotIn        []string `json:"proficiencyCategoryNotIn,omitempty"`
	ProficiencyCategoryGT           *string  `json:"proficiencyCategoryGT,omitempty"`
	ProficiencyCategoryGTE          *string  `json:"proficiencyCategoryGTE,omitempty"`
	ProficiencyCategoryLT           *string  `json:"proficiencyCategoryLT,omitempty"`
	ProficiencyCategoryLTE          *string  `json:"proficiencyCategoryLTE,omitempty"`
	ProficiencyCategoryContains     *string  `json:"proficiencyCategoryContains,omitempty"`
	ProficiencyCategoryHasPrefix    *string  `json:"proficiencyCategoryHasPrefix,omitempty"`
	ProficiencyCategoryHasSuffix    *string  `json:"proficiencyCategoryHasSuffix,omitempty"`
	ProficiencyCategoryEqualFold    *string  `json:"proficiencyCategoryEqualFold,omitempty"`
	ProficiencyCategoryContainsFold *string  `json:"proficiencyCategoryContainsFold,omitempty"`

	// "classes" edge predicates.
	HasClasses     *bool              `json:"hasClasses,omitempty"`
	HasClassesWith []*ClassWhereInput `json:"hasClassesWith,omitempty"`

	// "races" edge predicates.
	HasRaces     *bool             `json:"hasRaces,omitempty"`
	HasRacesWith []*RaceWhereInput `json:"hasRacesWith,omitempty"`

	// "subraces" edge predicates.
	HasSubraces     *bool                `json:"hasSubraces,omitempty"`
	HasSubracesWith []*SubraceWhereInput `json:"hasSubracesWith,omitempty"`

	// "choice" edge predicates.
	HasChoice     *bool                          `json:"hasChoice,omitempty"`
	HasChoiceWith []*ProficiencyChoiceWhereInput `json:"hasChoiceWith,omitempty"`

	// "skill" edge predicates.
	HasSkill     *bool              `json:"hasSkill,omitempty"`
	HasSkillWith []*SkillWhereInput `json:"hasSkillWith,omitempty"`

	// "equipment" edge predicates.
	HasEquipment     *bool                  `json:"hasEquipment,omitempty"`
	HasEquipmentWith []*EquipmentWhereInput `json:"hasEquipmentWith,omitempty"`

	// "equipment_category" edge predicates.
	HasEquipmentCategory     *bool                          `json:"hasEquipmentCategory,omitempty"`
	HasEquipmentCategoryWith []*EquipmentCategoryWhereInput `json:"hasEquipmentCategoryWith,omitempty"`

	// "saving_throw" edge predicates.
	HasSavingThrow     *bool                     `json:"hasSavingThrow,omitempty"`
	HasSavingThrowWith []*AbilityScoreWhereInput `json:"hasSavingThrowWith,omitempty"`
}

ProficiencyWhereInput represents a where input for filtering Proficiency queries.

func (*ProficiencyWhereInput) AddPredicates

func (i *ProficiencyWhereInput) AddPredicates(predicates ...predicate.Proficiency)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*ProficiencyWhereInput) Filter

Filter applies the ProficiencyWhereInput filter on the ProficiencyQuery builder.

func (*ProficiencyWhereInput) P

P returns a predicate for filtering proficiencies. An error is returned if the input is empty or invalid.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type QueryContext

type QueryContext = ent.QueryContext

ent aliases to avoid import conflicts in user's code.

type Race

type Race struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Indx holds the value of the "indx" field.
	Indx string `json:"index"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Alignment holds the value of the "alignment" field.
	Alignment string `json:"alignment,omitempty"`
	// Age holds the value of the "age" field.
	Age string `json:"age,omitempty"`
	// Size holds the value of the "size" field.
	Size string `json:"size,omitempty"`
	// SizeDescription holds the value of the "size_description" field.
	SizeDescription string `json:"size_description,omitempty"`
	// LanguageDesc holds the value of the "language_desc" field.
	LanguageDesc string `json:"language_desc,omitempty"`
	// Speed holds the value of the "speed" field.
	Speed int `json:"speed,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the RaceQuery when eager-loading is set.
	Edges RaceEdges `json:"-"`
	// contains filtered or unexported fields
}

Race is the model entity for the Race schema.

func (*Race) AbilityBonuses

func (r *Race) AbilityBonuses(ctx context.Context) (result []*AbilityBonus, err error)

func (*Race) IsNode

func (n *Race) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Race) Languages

func (r *Race) Languages(ctx context.Context) (result []*Language, err error)

func (*Race) MarshalJSON

func (r *Race) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Race) NamedAbilityBonuses

func (r *Race) NamedAbilityBonuses(name string) ([]*AbilityBonus, error)

NamedAbilityBonuses returns the AbilityBonuses named value or an error if the edge was not loaded in eager-loading with this name.

func (*Race) NamedLanguages

func (r *Race) NamedLanguages(name string) ([]*Language, error)

NamedLanguages returns the Languages named value or an error if the edge was not loaded in eager-loading with this name.

func (*Race) NamedProficiencies

func (r *Race) NamedProficiencies(name string) ([]*Proficiency, error)

NamedProficiencies returns the Proficiencies named value or an error if the edge was not loaded in eager-loading with this name.

func (*Race) NamedProficiencyChoice

func (r *Race) NamedProficiencyChoice(name string) ([]*ProficiencyChoice, error)

NamedProficiencyChoice returns the ProficiencyChoice named value or an error if the edge was not loaded in eager-loading with this name.

func (*Race) NamedSubrace

func (r *Race) NamedSubrace(name string) ([]*Subrace, error)

NamedSubrace returns the Subrace named value or an error if the edge was not loaded in eager-loading with this name.

func (*Race) NamedTraits

func (r *Race) NamedTraits(name string) ([]*Trait, error)

NamedTraits returns the Traits named value or an error if the edge was not loaded in eager-loading with this name.

func (*Race) Node

func (r *Race) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*Race) Proficiencies

func (r *Race) Proficiencies(ctx context.Context) (result []*Proficiency, err error)

func (*Race) ProficiencyChoice

func (r *Race) ProficiencyChoice(ctx context.Context) (result []*ProficiencyChoice, err error)

func (*Race) QueryAbilityBonuses

func (r *Race) QueryAbilityBonuses() *AbilityBonusQuery

QueryAbilityBonuses queries the "ability_bonuses" edge of the Race entity.

func (*Race) QueryLanguages

func (r *Race) QueryLanguages() *LanguageQuery

QueryLanguages queries the "languages" edge of the Race entity.

func (*Race) QueryProficiencies

func (r *Race) QueryProficiencies() *ProficiencyQuery

QueryProficiencies queries the "proficiencies" edge of the Race entity.

func (*Race) QueryProficiencyChoice

func (r *Race) QueryProficiencyChoice() *ProficiencyChoiceQuery

QueryProficiencyChoice queries the "proficiency_choice" edge of the Race entity.

func (*Race) QuerySubrace

func (r *Race) QuerySubrace() *SubraceQuery

QuerySubrace queries the "subrace" edge of the Race entity.

func (*Race) QueryTraits

func (r *Race) QueryTraits() *TraitQuery

QueryTraits queries the "traits" edge of the Race entity.

func (*Race) String

func (r *Race) String() string

String implements the fmt.Stringer.

func (*Race) Subrace

func (r *Race) Subrace(ctx context.Context) (result []*Subrace, err error)

func (*Race) ToEdge

func (r *Race) ToEdge(order *RaceOrder) *RaceEdge

ToEdge converts Race into RaceEdge.

func (*Race) Traits

func (r *Race) Traits(ctx context.Context) (result []*Trait, err error)

func (*Race) UnmarshalJSON

func (r *Race) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*Race) Unwrap

func (r *Race) Unwrap() *Race

Unwrap unwraps the Race entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Race) Update

func (r *Race) Update() *RaceUpdateOne

Update returns a builder for updating this Race. Note that you need to call Race.Unwrap() before calling this method if this Race was returned from a transaction, and the transaction was committed or rolled back.

func (*Race) Value

func (r *Race) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Race. This includes values selected through modifiers, order, etc.

type RaceClient

type RaceClient struct {
	// contains filtered or unexported fields
}

RaceClient is a client for the Race schema.

func NewRaceClient

func NewRaceClient(c config) *RaceClient

NewRaceClient returns a client for the Race from the given config.

func (*RaceClient) Create

func (c *RaceClient) Create() *RaceCreate

Create returns a builder for creating a Race entity.

func (*RaceClient) CreateBulk

func (c *RaceClient) CreateBulk(builders ...*RaceCreate) *RaceCreateBulk

CreateBulk returns a builder for creating a bulk of Race entities.

func (*RaceClient) Delete

func (c *RaceClient) Delete() *RaceDelete

Delete returns a delete builder for Race.

func (*RaceClient) DeleteOne

func (c *RaceClient) DeleteOne(r *Race) *RaceDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*RaceClient) DeleteOneID

func (c *RaceClient) DeleteOneID(id int) *RaceDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*RaceClient) Get

func (c *RaceClient) Get(ctx context.Context, id int) (*Race, error)

Get returns a Race entity by its id.

func (*RaceClient) GetX

func (c *RaceClient) GetX(ctx context.Context, id int) *Race

GetX is like Get, but panics if an error occurs.

func (*RaceClient) Hooks

func (c *RaceClient) Hooks() []Hook

Hooks returns the client hooks.

func (*RaceClient) Intercept

func (c *RaceClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `race.Intercept(f(g(h())))`.

func (*RaceClient) Interceptors

func (c *RaceClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*RaceClient) Query

func (c *RaceClient) Query() *RaceQuery

Query returns a query builder for Race.

func (*RaceClient) QueryAbilityBonuses

func (c *RaceClient) QueryAbilityBonuses(r *Race) *AbilityBonusQuery

QueryAbilityBonuses queries the ability_bonuses edge of a Race.

func (*RaceClient) QueryLanguages

func (c *RaceClient) QueryLanguages(r *Race) *LanguageQuery

QueryLanguages queries the languages edge of a Race.

func (*RaceClient) QueryProficiencies

func (c *RaceClient) QueryProficiencies(r *Race) *ProficiencyQuery

QueryProficiencies queries the proficiencies edge of a Race.

func (*RaceClient) QueryProficiencyChoice

func (c *RaceClient) QueryProficiencyChoice(r *Race) *ProficiencyChoiceQuery

QueryProficiencyChoice queries the proficiency_choice edge of a Race.

func (*RaceClient) QuerySubrace

func (c *RaceClient) QuerySubrace(r *Race) *SubraceQuery

QuerySubrace queries the subrace edge of a Race.

func (*RaceClient) QueryTraits

func (c *RaceClient) QueryTraits(r *Race) *TraitQuery

QueryTraits queries the traits edge of a Race.

func (*RaceClient) Update

func (c *RaceClient) Update() *RaceUpdate

Update returns an update builder for Race.

func (*RaceClient) UpdateOne

func (c *RaceClient) UpdateOne(r *Race) *RaceUpdateOne

UpdateOne returns an update builder for the given entity.

func (*RaceClient) UpdateOneID

func (c *RaceClient) UpdateOneID(id int) *RaceUpdateOne

UpdateOneID returns an update builder for the given id.

func (*RaceClient) Use

func (c *RaceClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `race.Hooks(f(g(h())))`.

type RaceConnection

type RaceConnection struct {
	Edges      []*RaceEdge `json:"edges"`
	PageInfo   PageInfo    `json:"pageInfo"`
	TotalCount int         `json:"totalCount"`
}

RaceConnection is the connection containing edges to Race.

type RaceCreate

type RaceCreate struct {
	// contains filtered or unexported fields
}

RaceCreate is the builder for creating a Race entity.

func (*RaceCreate) AddAbilityBonuseIDs

func (rc *RaceCreate) AddAbilityBonuseIDs(ids ...int) *RaceCreate

AddAbilityBonuseIDs adds the "ability_bonuses" edge to the AbilityBonus entity by IDs.

func (*RaceCreate) AddAbilityBonuses

func (rc *RaceCreate) AddAbilityBonuses(a ...*AbilityBonus) *RaceCreate

AddAbilityBonuses adds the "ability_bonuses" edges to the AbilityBonus entity.

func (*RaceCreate) AddLanguageIDs

func (rc *RaceCreate) AddLanguageIDs(ids ...int) *RaceCreate

AddLanguageIDs adds the "languages" edge to the Language entity by IDs.

func (*RaceCreate) AddLanguages

func (rc *RaceCreate) AddLanguages(l ...*Language) *RaceCreate

AddLanguages adds the "languages" edges to the Language entity.

func (*RaceCreate) AddProficiencies

func (rc *RaceCreate) AddProficiencies(p ...*Proficiency) *RaceCreate

AddProficiencies adds the "proficiencies" edges to the Proficiency entity.

func (*RaceCreate) AddProficiencyChoice

func (rc *RaceCreate) AddProficiencyChoice(p ...*ProficiencyChoice) *RaceCreate

AddProficiencyChoice adds the "proficiency_choice" edges to the ProficiencyChoice entity.

func (*RaceCreate) AddProficiencyChoiceIDs

func (rc *RaceCreate) AddProficiencyChoiceIDs(ids ...int) *RaceCreate

AddProficiencyChoiceIDs adds the "proficiency_choice" edge to the ProficiencyChoice entity by IDs.

func (*RaceCreate) AddProficiencyIDs

func (rc *RaceCreate) AddProficiencyIDs(ids ...int) *RaceCreate

AddProficiencyIDs adds the "proficiencies" edge to the Proficiency entity by IDs.

func (*RaceCreate) AddSubrace

func (rc *RaceCreate) AddSubrace(s ...*Subrace) *RaceCreate

AddSubrace adds the "subrace" edges to the Subrace entity.

func (*RaceCreate) AddSubraceIDs

func (rc *RaceCreate) AddSubraceIDs(ids ...int) *RaceCreate

AddSubraceIDs adds the "subrace" edge to the Subrace entity by IDs.

func (*RaceCreate) AddTraitIDs

func (rc *RaceCreate) AddTraitIDs(ids ...int) *RaceCreate

AddTraitIDs adds the "traits" edge to the Trait entity by IDs.

func (*RaceCreate) AddTraits

func (rc *RaceCreate) AddTraits(t ...*Trait) *RaceCreate

AddTraits adds the "traits" edges to the Trait entity.

func (*RaceCreate) Exec

func (rc *RaceCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RaceCreate) ExecX

func (rc *RaceCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RaceCreate) Mutation

func (rc *RaceCreate) Mutation() *RaceMutation

Mutation returns the RaceMutation object of the builder.

func (*RaceCreate) Save

func (rc *RaceCreate) Save(ctx context.Context) (*Race, error)

Save creates the Race in the database.

func (*RaceCreate) SaveX

func (rc *RaceCreate) SaveX(ctx context.Context) *Race

SaveX calls Save and panics if Save returns an error.

func (*RaceCreate) SetAge

func (rc *RaceCreate) SetAge(s string) *RaceCreate

SetAge sets the "age" field.

func (*RaceCreate) SetAlignment

func (rc *RaceCreate) SetAlignment(s string) *RaceCreate

SetAlignment sets the "alignment" field.

func (*RaceCreate) SetIndx

func (rc *RaceCreate) SetIndx(s string) *RaceCreate

SetIndx sets the "indx" field.

func (*RaceCreate) SetLanguageDesc

func (rc *RaceCreate) SetLanguageDesc(s string) *RaceCreate

SetLanguageDesc sets the "language_desc" field.

func (*RaceCreate) SetName

func (rc *RaceCreate) SetName(s string) *RaceCreate

SetName sets the "name" field.

func (*RaceCreate) SetRace

func (rc *RaceCreate) SetRace(input *Race) *RaceCreate

func (*RaceCreate) SetSize

func (rc *RaceCreate) SetSize(s string) *RaceCreate

SetSize sets the "size" field.

func (*RaceCreate) SetSizeDescription

func (rc *RaceCreate) SetSizeDescription(s string) *RaceCreate

SetSizeDescription sets the "size_description" field.

func (*RaceCreate) SetSpeed

func (rc *RaceCreate) SetSpeed(i int) *RaceCreate

SetSpeed sets the "speed" field.

type RaceCreateBulk

type RaceCreateBulk struct {
	// contains filtered or unexported fields
}

RaceCreateBulk is the builder for creating many Race entities in bulk.

func (*RaceCreateBulk) Exec

func (rcb *RaceCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RaceCreateBulk) ExecX

func (rcb *RaceCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RaceCreateBulk) Save

func (rcb *RaceCreateBulk) Save(ctx context.Context) ([]*Race, error)

Save creates the Race entities in the database.

func (*RaceCreateBulk) SaveX

func (rcb *RaceCreateBulk) SaveX(ctx context.Context) []*Race

SaveX is like Save, but panics if an error occurs.

type RaceDelete

type RaceDelete struct {
	// contains filtered or unexported fields
}

RaceDelete is the builder for deleting a Race entity.

func (*RaceDelete) Exec

func (rd *RaceDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*RaceDelete) ExecX

func (rd *RaceDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*RaceDelete) Where

func (rd *RaceDelete) Where(ps ...predicate.Race) *RaceDelete

Where appends a list predicates to the RaceDelete builder.

type RaceDeleteOne

type RaceDeleteOne struct {
	// contains filtered or unexported fields
}

RaceDeleteOne is the builder for deleting a single Race entity.

func (*RaceDeleteOne) Exec

func (rdo *RaceDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RaceDeleteOne) ExecX

func (rdo *RaceDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RaceDeleteOne) Where

func (rdo *RaceDeleteOne) Where(ps ...predicate.Race) *RaceDeleteOne

Where appends a list predicates to the RaceDelete builder.

type RaceEdge

type RaceEdge struct {
	Node   *Race  `json:"node"`
	Cursor Cursor `json:"cursor"`
}

RaceEdge is the edge representation of Race.

type RaceEdges

type RaceEdges struct {
	// Proficiencies holds the value of the proficiencies edge.
	Proficiencies []*Proficiency `json:"proficiencies,omitempty"`
	// ProficiencyChoice holds the value of the proficiency_choice edge.
	ProficiencyChoice []*ProficiencyChoice `json:"proficiency_choice,omitempty"`
	// Languages holds the value of the languages edge.
	Languages []*Language `json:"languages,omitempty"`
	// Subrace holds the value of the subrace edge.
	Subrace []*Subrace `json:"subrace,omitempty"`
	// Traits holds the value of the traits edge.
	Traits []*Trait `json:"traits,omitempty"`
	// AbilityBonuses holds the value of the ability_bonuses edge.
	AbilityBonuses []*AbilityBonus `json:"ability_bonuses,omitempty"`
	// contains filtered or unexported fields
}

RaceEdges holds the relations/edges for other nodes in the graph.

func (RaceEdges) AbilityBonusesOrErr

func (e RaceEdges) AbilityBonusesOrErr() ([]*AbilityBonus, error)

AbilityBonusesOrErr returns the AbilityBonuses value or an error if the edge was not loaded in eager-loading.

func (RaceEdges) LanguagesOrErr

func (e RaceEdges) LanguagesOrErr() ([]*Language, error)

LanguagesOrErr returns the Languages value or an error if the edge was not loaded in eager-loading.

func (RaceEdges) ProficienciesOrErr

func (e RaceEdges) ProficienciesOrErr() ([]*Proficiency, error)

ProficienciesOrErr returns the Proficiencies value or an error if the edge was not loaded in eager-loading.

func (RaceEdges) ProficiencyChoiceOrErr

func (e RaceEdges) ProficiencyChoiceOrErr() ([]*ProficiencyChoice, error)

ProficiencyChoiceOrErr returns the ProficiencyChoice value or an error if the edge was not loaded in eager-loading.

func (RaceEdges) SubraceOrErr

func (e RaceEdges) SubraceOrErr() ([]*Subrace, error)

SubraceOrErr returns the Subrace value or an error if the edge was not loaded in eager-loading.

func (RaceEdges) TraitsOrErr

func (e RaceEdges) TraitsOrErr() ([]*Trait, error)

TraitsOrErr returns the Traits value or an error if the edge was not loaded in eager-loading.

type RaceGroupBy

type RaceGroupBy struct {
	// contains filtered or unexported fields
}

RaceGroupBy is the group-by builder for Race entities.

func (*RaceGroupBy) Aggregate

func (rgb *RaceGroupBy) Aggregate(fns ...AggregateFunc) *RaceGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*RaceGroupBy) Bool

func (s *RaceGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RaceGroupBy) BoolX

func (s *RaceGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RaceGroupBy) Bools

func (s *RaceGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RaceGroupBy) BoolsX

func (s *RaceGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RaceGroupBy) Float64

func (s *RaceGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RaceGroupBy) Float64X

func (s *RaceGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RaceGroupBy) Float64s

func (s *RaceGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RaceGroupBy) Float64sX

func (s *RaceGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RaceGroupBy) Int

func (s *RaceGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RaceGroupBy) IntX

func (s *RaceGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RaceGroupBy) Ints

func (s *RaceGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RaceGroupBy) IntsX

func (s *RaceGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RaceGroupBy) Scan

func (rgb *RaceGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RaceGroupBy) ScanX

func (s *RaceGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RaceGroupBy) String

func (s *RaceGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RaceGroupBy) StringX

func (s *RaceGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RaceGroupBy) Strings

func (s *RaceGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RaceGroupBy) StringsX

func (s *RaceGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RaceMutation

type RaceMutation struct {
	// contains filtered or unexported fields
}

RaceMutation represents an operation that mutates the Race nodes in the graph.

func (*RaceMutation) AbilityBonusesCleared

func (m *RaceMutation) AbilityBonusesCleared() bool

AbilityBonusesCleared reports if the "ability_bonuses" edge to the AbilityBonus entity was cleared.

func (*RaceMutation) AbilityBonusesIDs

func (m *RaceMutation) AbilityBonusesIDs() (ids []int)

AbilityBonusesIDs returns the "ability_bonuses" edge IDs in the mutation.

func (*RaceMutation) AddAbilityBonuseIDs

func (m *RaceMutation) AddAbilityBonuseIDs(ids ...int)

AddAbilityBonuseIDs adds the "ability_bonuses" edge to the AbilityBonus entity by ids.

func (*RaceMutation) AddField

func (m *RaceMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*RaceMutation) AddLanguageIDs

func (m *RaceMutation) AddLanguageIDs(ids ...int)

AddLanguageIDs adds the "languages" edge to the Language entity by ids.

func (*RaceMutation) AddProficiencyChoiceIDs

func (m *RaceMutation) AddProficiencyChoiceIDs(ids ...int)

AddProficiencyChoiceIDs adds the "proficiency_choice" edge to the ProficiencyChoice entity by ids.

func (*RaceMutation) AddProficiencyIDs

func (m *RaceMutation) AddProficiencyIDs(ids ...int)

AddProficiencyIDs adds the "proficiencies" edge to the Proficiency entity by ids.

func (*RaceMutation) AddSpeed

func (m *RaceMutation) AddSpeed(i int)

AddSpeed adds i to the "speed" field.

func (*RaceMutation) AddSubraceIDs

func (m *RaceMutation) AddSubraceIDs(ids ...int)

AddSubraceIDs adds the "subrace" edge to the Subrace entity by ids.

func (*RaceMutation) AddTraitIDs

func (m *RaceMutation) AddTraitIDs(ids ...int)

AddTraitIDs adds the "traits" edge to the Trait entity by ids.

func (*RaceMutation) AddedEdges

func (m *RaceMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*RaceMutation) AddedField

func (m *RaceMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*RaceMutation) AddedFields

func (m *RaceMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*RaceMutation) AddedIDs

func (m *RaceMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*RaceMutation) AddedSpeed

func (m *RaceMutation) AddedSpeed() (r int, exists bool)

AddedSpeed returns the value that was added to the "speed" field in this mutation.

func (*RaceMutation) Age

func (m *RaceMutation) Age() (r string, exists bool)

Age returns the value of the "age" field in the mutation.

func (*RaceMutation) Alignment

func (m *RaceMutation) Alignment() (r string, exists bool)

Alignment returns the value of the "alignment" field in the mutation.

func (*RaceMutation) ClearAbilityBonuses

func (m *RaceMutation) ClearAbilityBonuses()

ClearAbilityBonuses clears the "ability_bonuses" edge to the AbilityBonus entity.

func (*RaceMutation) ClearEdge

func (m *RaceMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*RaceMutation) ClearField

func (m *RaceMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*RaceMutation) ClearLanguages

func (m *RaceMutation) ClearLanguages()

ClearLanguages clears the "languages" edge to the Language entity.

func (*RaceMutation) ClearProficiencies

func (m *RaceMutation) ClearProficiencies()

ClearProficiencies clears the "proficiencies" edge to the Proficiency entity.

func (*RaceMutation) ClearProficiencyChoice

func (m *RaceMutation) ClearProficiencyChoice()

ClearProficiencyChoice clears the "proficiency_choice" edge to the ProficiencyChoice entity.

func (*RaceMutation) ClearSubrace

func (m *RaceMutation) ClearSubrace()

ClearSubrace clears the "subrace" edge to the Subrace entity.

func (*RaceMutation) ClearTraits

func (m *RaceMutation) ClearTraits()

ClearTraits clears the "traits" edge to the Trait entity.

func (*RaceMutation) ClearedEdges

func (m *RaceMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RaceMutation) ClearedFields

func (m *RaceMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RaceMutation) Client

func (m RaceMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*RaceMutation) EdgeCleared

func (m *RaceMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*RaceMutation) Field

func (m *RaceMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*RaceMutation) FieldCleared

func (m *RaceMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*RaceMutation) Fields

func (m *RaceMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*RaceMutation) ID

func (m *RaceMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*RaceMutation) IDs

func (m *RaceMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*RaceMutation) Indx

func (m *RaceMutation) Indx() (r string, exists bool)

Indx returns the value of the "indx" field in the mutation.

func (*RaceMutation) LanguageDesc

func (m *RaceMutation) LanguageDesc() (r string, exists bool)

LanguageDesc returns the value of the "language_desc" field in the mutation.

func (*RaceMutation) LanguagesCleared

func (m *RaceMutation) LanguagesCleared() bool

LanguagesCleared reports if the "languages" edge to the Language entity was cleared.

func (*RaceMutation) LanguagesIDs

func (m *RaceMutation) LanguagesIDs() (ids []int)

LanguagesIDs returns the "languages" edge IDs in the mutation.

func (*RaceMutation) Name

func (m *RaceMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*RaceMutation) OldAge

func (m *RaceMutation) OldAge(ctx context.Context) (v string, err error)

OldAge returns the old "age" field's value of the Race entity. If the Race object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RaceMutation) OldAlignment

func (m *RaceMutation) OldAlignment(ctx context.Context) (v string, err error)

OldAlignment returns the old "alignment" field's value of the Race entity. If the Race object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RaceMutation) OldField

func (m *RaceMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*RaceMutation) OldIndx

func (m *RaceMutation) OldIndx(ctx context.Context) (v string, err error)

OldIndx returns the old "indx" field's value of the Race entity. If the Race object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RaceMutation) OldLanguageDesc

func (m *RaceMutation) OldLanguageDesc(ctx context.Context) (v string, err error)

OldLanguageDesc returns the old "language_desc" field's value of the Race entity. If the Race object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RaceMutation) OldName

func (m *RaceMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Race entity. If the Race object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RaceMutation) OldSize

func (m *RaceMutation) OldSize(ctx context.Context) (v string, err error)

OldSize returns the old "size" field's value of the Race entity. If the Race object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RaceMutation) OldSizeDescription

func (m *RaceMutation) OldSizeDescription(ctx context.Context) (v string, err error)

OldSizeDescription returns the old "size_description" field's value of the Race entity. If the Race object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RaceMutation) OldSpeed

func (m *RaceMutation) OldSpeed(ctx context.Context) (v int, err error)

OldSpeed returns the old "speed" field's value of the Race entity. If the Race object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RaceMutation) Op

func (m *RaceMutation) Op() Op

Op returns the operation name.

func (*RaceMutation) ProficienciesCleared

func (m *RaceMutation) ProficienciesCleared() bool

ProficienciesCleared reports if the "proficiencies" edge to the Proficiency entity was cleared.

func (*RaceMutation) ProficienciesIDs

func (m *RaceMutation) ProficienciesIDs() (ids []int)

ProficienciesIDs returns the "proficiencies" edge IDs in the mutation.

func (*RaceMutation) ProficiencyChoiceCleared

func (m *RaceMutation) ProficiencyChoiceCleared() bool

ProficiencyChoiceCleared reports if the "proficiency_choice" edge to the ProficiencyChoice entity was cleared.

func (*RaceMutation) ProficiencyChoiceIDs

func (m *RaceMutation) ProficiencyChoiceIDs() (ids []int)

ProficiencyChoiceIDs returns the "proficiency_choice" edge IDs in the mutation.

func (*RaceMutation) RemoveAbilityBonuseIDs

func (m *RaceMutation) RemoveAbilityBonuseIDs(ids ...int)

RemoveAbilityBonuseIDs removes the "ability_bonuses" edge to the AbilityBonus entity by IDs.

func (*RaceMutation) RemoveLanguageIDs

func (m *RaceMutation) RemoveLanguageIDs(ids ...int)

RemoveLanguageIDs removes the "languages" edge to the Language entity by IDs.

func (*RaceMutation) RemoveProficiencyChoiceIDs

func (m *RaceMutation) RemoveProficiencyChoiceIDs(ids ...int)

RemoveProficiencyChoiceIDs removes the "proficiency_choice" edge to the ProficiencyChoice entity by IDs.

func (*RaceMutation) RemoveProficiencyIDs

func (m *RaceMutation) RemoveProficiencyIDs(ids ...int)

RemoveProficiencyIDs removes the "proficiencies" edge to the Proficiency entity by IDs.

func (*RaceMutation) RemoveSubraceIDs

func (m *RaceMutation) RemoveSubraceIDs(ids ...int)

RemoveSubraceIDs removes the "subrace" edge to the Subrace entity by IDs.

func (*RaceMutation) RemoveTraitIDs

func (m *RaceMutation) RemoveTraitIDs(ids ...int)

RemoveTraitIDs removes the "traits" edge to the Trait entity by IDs.

func (*RaceMutation) RemovedAbilityBonusesIDs

func (m *RaceMutation) RemovedAbilityBonusesIDs() (ids []int)

RemovedAbilityBonuses returns the removed IDs of the "ability_bonuses" edge to the AbilityBonus entity.

func (*RaceMutation) RemovedEdges

func (m *RaceMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RaceMutation) RemovedIDs

func (m *RaceMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*RaceMutation) RemovedLanguagesIDs

func (m *RaceMutation) RemovedLanguagesIDs() (ids []int)

RemovedLanguages returns the removed IDs of the "languages" edge to the Language entity.

func (*RaceMutation) RemovedProficienciesIDs

func (m *RaceMutation) RemovedProficienciesIDs() (ids []int)

RemovedProficiencies returns the removed IDs of the "proficiencies" edge to the Proficiency entity.

func (*RaceMutation) RemovedProficiencyChoiceIDs

func (m *RaceMutation) RemovedProficiencyChoiceIDs() (ids []int)

RemovedProficiencyChoice returns the removed IDs of the "proficiency_choice" edge to the ProficiencyChoice entity.

func (*RaceMutation) RemovedSubraceIDs

func (m *RaceMutation) RemovedSubraceIDs() (ids []int)

RemovedSubrace returns the removed IDs of the "subrace" edge to the Subrace entity.

func (*RaceMutation) RemovedTraitsIDs

func (m *RaceMutation) RemovedTraitsIDs() (ids []int)

RemovedTraits returns the removed IDs of the "traits" edge to the Trait entity.

func (*RaceMutation) ResetAbilityBonuses

func (m *RaceMutation) ResetAbilityBonuses()

ResetAbilityBonuses resets all changes to the "ability_bonuses" edge.

func (*RaceMutation) ResetAge

func (m *RaceMutation) ResetAge()

ResetAge resets all changes to the "age" field.

func (*RaceMutation) ResetAlignment

func (m *RaceMutation) ResetAlignment()

ResetAlignment resets all changes to the "alignment" field.

func (*RaceMutation) ResetEdge

func (m *RaceMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*RaceMutation) ResetField

func (m *RaceMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*RaceMutation) ResetIndx

func (m *RaceMutation) ResetIndx()

ResetIndx resets all changes to the "indx" field.

func (*RaceMutation) ResetLanguageDesc

func (m *RaceMutation) ResetLanguageDesc()

ResetLanguageDesc resets all changes to the "language_desc" field.

func (*RaceMutation) ResetLanguages

func (m *RaceMutation) ResetLanguages()

ResetLanguages resets all changes to the "languages" edge.

func (*RaceMutation) ResetName

func (m *RaceMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*RaceMutation) ResetProficiencies

func (m *RaceMutation) ResetProficiencies()

ResetProficiencies resets all changes to the "proficiencies" edge.

func (*RaceMutation) ResetProficiencyChoice

func (m *RaceMutation) ResetProficiencyChoice()

ResetProficiencyChoice resets all changes to the "proficiency_choice" edge.

func (*RaceMutation) ResetSize

func (m *RaceMutation) ResetSize()

ResetSize resets all changes to the "size" field.

func (*RaceMutation) ResetSizeDescription

func (m *RaceMutation) ResetSizeDescription()

ResetSizeDescription resets all changes to the "size_description" field.

func (*RaceMutation) ResetSpeed

func (m *RaceMutation) ResetSpeed()

ResetSpeed resets all changes to the "speed" field.

func (*RaceMutation) ResetSubrace

func (m *RaceMutation) ResetSubrace()

ResetSubrace resets all changes to the "subrace" edge.

func (*RaceMutation) ResetTraits

func (m *RaceMutation) ResetTraits()

ResetTraits resets all changes to the "traits" edge.

func (*RaceMutation) SetAge

func (m *RaceMutation) SetAge(s string)

SetAge sets the "age" field.

func (*RaceMutation) SetAlignment

func (m *RaceMutation) SetAlignment(s string)

SetAlignment sets the "alignment" field.

func (*RaceMutation) SetField

func (m *RaceMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*RaceMutation) SetIndx

func (m *RaceMutation) SetIndx(s string)

SetIndx sets the "indx" field.

func (*RaceMutation) SetLanguageDesc

func (m *RaceMutation) SetLanguageDesc(s string)

SetLanguageDesc sets the "language_desc" field.

func (*RaceMutation) SetName

func (m *RaceMutation) SetName(s string)

SetName sets the "name" field.

func (*RaceMutation) SetOp

func (m *RaceMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*RaceMutation) SetSize

func (m *RaceMutation) SetSize(s string)

SetSize sets the "size" field.

func (*RaceMutation) SetSizeDescription

func (m *RaceMutation) SetSizeDescription(s string)

SetSizeDescription sets the "size_description" field.

func (*RaceMutation) SetSpeed

func (m *RaceMutation) SetSpeed(i int)

SetSpeed sets the "speed" field.

func (*RaceMutation) Size

func (m *RaceMutation) Size() (r string, exists bool)

Size returns the value of the "size" field in the mutation.

func (*RaceMutation) SizeDescription

func (m *RaceMutation) SizeDescription() (r string, exists bool)

SizeDescription returns the value of the "size_description" field in the mutation.

func (*RaceMutation) Speed

func (m *RaceMutation) Speed() (r int, exists bool)

Speed returns the value of the "speed" field in the mutation.

func (*RaceMutation) SubraceCleared

func (m *RaceMutation) SubraceCleared() bool

SubraceCleared reports if the "subrace" edge to the Subrace entity was cleared.

func (*RaceMutation) SubraceIDs

func (m *RaceMutation) SubraceIDs() (ids []int)

SubraceIDs returns the "subrace" edge IDs in the mutation.

func (*RaceMutation) TraitsCleared

func (m *RaceMutation) TraitsCleared() bool

TraitsCleared reports if the "traits" edge to the Trait entity was cleared.

func (*RaceMutation) TraitsIDs

func (m *RaceMutation) TraitsIDs() (ids []int)

TraitsIDs returns the "traits" edge IDs in the mutation.

func (RaceMutation) Tx

func (m RaceMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RaceMutation) Type

func (m *RaceMutation) Type() string

Type returns the node type of this mutation (Race).

func (*RaceMutation) Where

func (m *RaceMutation) Where(ps ...predicate.Race)

Where appends a list predicates to the RaceMutation builder.

func (*RaceMutation) WhereP

func (m *RaceMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the RaceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type RaceOrder

type RaceOrder struct {
	Direction OrderDirection  `json:"direction"`
	Field     *RaceOrderField `json:"field"`
}

RaceOrder defines the ordering of Race.

type RaceOrderField

type RaceOrderField struct {
	// Value extracts the ordering value from the given Race.
	Value func(*Race) (ent.Value, error)
	// contains filtered or unexported fields
}

RaceOrderField defines the ordering field of Race.

func (RaceOrderField) MarshalGQL

func (f RaceOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (RaceOrderField) String

func (f RaceOrderField) String() string

String implement fmt.Stringer interface.

func (*RaceOrderField) UnmarshalGQL

func (f *RaceOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type RacePaginateOption

type RacePaginateOption func(*racePager) error

RacePaginateOption enables pagination customization.

func WithRaceFilter

func WithRaceFilter(filter func(*RaceQuery) (*RaceQuery, error)) RacePaginateOption

WithRaceFilter configures pagination filter.

func WithRaceOrder

func WithRaceOrder(order *RaceOrder) RacePaginateOption

WithRaceOrder configures pagination ordering.

type RaceQuery

type RaceQuery struct {
	// contains filtered or unexported fields
}

RaceQuery is the builder for querying Race entities.

func (*RaceQuery) Aggregate

func (rq *RaceQuery) Aggregate(fns ...AggregateFunc) *RaceSelect

Aggregate returns a RaceSelect configured with the given aggregations.

func (*RaceQuery) All

func (rq *RaceQuery) All(ctx context.Context) ([]*Race, error)

All executes the query and returns a list of Races.

func (*RaceQuery) AllX

func (rq *RaceQuery) AllX(ctx context.Context) []*Race

AllX is like All, but panics if an error occurs.

func (*RaceQuery) Clone

func (rq *RaceQuery) Clone() *RaceQuery

Clone returns a duplicate of the RaceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*RaceQuery) CollectFields

func (r *RaceQuery) CollectFields(ctx context.Context, satisfies ...string) (*RaceQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*RaceQuery) Count

func (rq *RaceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RaceQuery) CountX

func (rq *RaceQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RaceQuery) Exist

func (rq *RaceQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RaceQuery) ExistX

func (rq *RaceQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RaceQuery) First

func (rq *RaceQuery) First(ctx context.Context) (*Race, error)

First returns the first Race entity from the query. Returns a *NotFoundError when no Race was found.

func (*RaceQuery) FirstID

func (rq *RaceQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Race ID from the query. Returns a *NotFoundError when no Race ID was found.

func (*RaceQuery) FirstIDX

func (rq *RaceQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*RaceQuery) FirstX

func (rq *RaceQuery) FirstX(ctx context.Context) *Race

FirstX is like First, but panics if an error occurs.

func (*RaceQuery) GroupBy

func (rq *RaceQuery) GroupBy(field string, fields ...string) *RaceGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Indx string `json:"index"`
	Count int `json:"count,omitempty"`
}

client.Race.Query().
	GroupBy(race.FieldIndx).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RaceQuery) IDs

func (rq *RaceQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Race IDs.

func (*RaceQuery) IDsX

func (rq *RaceQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*RaceQuery) Limit

func (rq *RaceQuery) Limit(limit int) *RaceQuery

Limit the number of records to be returned by this query.

func (*RaceQuery) Offset

func (rq *RaceQuery) Offset(offset int) *RaceQuery

Offset to start from.

func (*RaceQuery) Only

func (rq *RaceQuery) Only(ctx context.Context) (*Race, error)

Only returns a single Race entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Race entity is found. Returns a *NotFoundError when no Race entities are found.

func (*RaceQuery) OnlyID

func (rq *RaceQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Race ID in the query. Returns a *NotSingularError when more than one Race ID is found. Returns a *NotFoundError when no entities are found.

func (*RaceQuery) OnlyIDX

func (rq *RaceQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RaceQuery) OnlyX

func (rq *RaceQuery) OnlyX(ctx context.Context) *Race

OnlyX is like Only, but panics if an error occurs.

func (*RaceQuery) Order

func (rq *RaceQuery) Order(o ...race.OrderOption) *RaceQuery

Order specifies how the records should be ordered.

func (*RaceQuery) Paginate

func (r *RaceQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...RacePaginateOption,
) (*RaceConnection, error)

Paginate executes the query and returns a relay based cursor connection to Race.

func (*RaceQuery) QueryAbilityBonuses

func (rq *RaceQuery) QueryAbilityBonuses() *AbilityBonusQuery

QueryAbilityBonuses chains the current query on the "ability_bonuses" edge.

func (*RaceQuery) QueryLanguages

func (rq *RaceQuery) QueryLanguages() *LanguageQuery

QueryLanguages chains the current query on the "languages" edge.

func (*RaceQuery) QueryProficiencies

func (rq *RaceQuery) QueryProficiencies() *ProficiencyQuery

QueryProficiencies chains the current query on the "proficiencies" edge.

func (*RaceQuery) QueryProficiencyChoice

func (rq *RaceQuery) QueryProficiencyChoice() *ProficiencyChoiceQuery

QueryProficiencyChoice chains the current query on the "proficiency_choice" edge.

func (*RaceQuery) QuerySubrace

func (rq *RaceQuery) QuerySubrace() *SubraceQuery

QuerySubrace chains the current query on the "subrace" edge.

func (*RaceQuery) QueryTraits

func (rq *RaceQuery) QueryTraits() *TraitQuery

QueryTraits chains the current query on the "traits" edge.

func (*RaceQuery) Select

func (rq *RaceQuery) Select(fields ...string) *RaceSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Indx string `json:"index"`
}

client.Race.Query().
	Select(race.FieldIndx).
	Scan(ctx, &v)

func (*RaceQuery) Unique

func (rq *RaceQuery) Unique(unique bool) *RaceQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*RaceQuery) Where

func (rq *RaceQuery) Where(ps ...predicate.Race) *RaceQuery

Where adds a new predicate for the RaceQuery builder.

func (*RaceQuery) WithAbilityBonuses

func (rq *RaceQuery) WithAbilityBonuses(opts ...func(*AbilityBonusQuery)) *RaceQuery

WithAbilityBonuses tells the query-builder to eager-load the nodes that are connected to the "ability_bonuses" edge. The optional arguments are used to configure the query builder of the edge.

func (*RaceQuery) WithLanguages

func (rq *RaceQuery) WithLanguages(opts ...func(*LanguageQuery)) *RaceQuery

WithLanguages tells the query-builder to eager-load the nodes that are connected to the "languages" edge. The optional arguments are used to configure the query builder of the edge.

func (*RaceQuery) WithNamedAbilityBonuses

func (rq *RaceQuery) WithNamedAbilityBonuses(name string, opts ...func(*AbilityBonusQuery)) *RaceQuery

WithNamedAbilityBonuses tells the query-builder to eager-load the nodes that are connected to the "ability_bonuses" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*RaceQuery) WithNamedLanguages

func (rq *RaceQuery) WithNamedLanguages(name string, opts ...func(*LanguageQuery)) *RaceQuery

WithNamedLanguages tells the query-builder to eager-load the nodes that are connected to the "languages" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*RaceQuery) WithNamedProficiencies

func (rq *RaceQuery) WithNamedProficiencies(name string, opts ...func(*ProficiencyQuery)) *RaceQuery

WithNamedProficiencies tells the query-builder to eager-load the nodes that are connected to the "proficiencies" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*RaceQuery) WithNamedProficiencyChoice

func (rq *RaceQuery) WithNamedProficiencyChoice(name string, opts ...func(*ProficiencyChoiceQuery)) *RaceQuery

WithNamedProficiencyChoice tells the query-builder to eager-load the nodes that are connected to the "proficiency_choice" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*RaceQuery) WithNamedSubrace

func (rq *RaceQuery) WithNamedSubrace(name string, opts ...func(*SubraceQuery)) *RaceQuery

WithNamedSubrace tells the query-builder to eager-load the nodes that are connected to the "subrace" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*RaceQuery) WithNamedTraits

func (rq *RaceQuery) WithNamedTraits(name string, opts ...func(*TraitQuery)) *RaceQuery

WithNamedTraits tells the query-builder to eager-load the nodes that are connected to the "traits" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*RaceQuery) WithProficiencies

func (rq *RaceQuery) WithProficiencies(opts ...func(*ProficiencyQuery)) *RaceQuery

WithProficiencies tells the query-builder to eager-load the nodes that are connected to the "proficiencies" edge. The optional arguments are used to configure the query builder of the edge.

func (*RaceQuery) WithProficiencyChoice

func (rq *RaceQuery) WithProficiencyChoice(opts ...func(*ProficiencyChoiceQuery)) *RaceQuery

WithProficiencyChoice tells the query-builder to eager-load the nodes that are connected to the "proficiency_choice" edge. The optional arguments are used to configure the query builder of the edge.

func (*RaceQuery) WithSubrace

func (rq *RaceQuery) WithSubrace(opts ...func(*SubraceQuery)) *RaceQuery

WithSubrace tells the query-builder to eager-load the nodes that are connected to the "subrace" edge. The optional arguments are used to configure the query builder of the edge.

func (*RaceQuery) WithTraits

func (rq *RaceQuery) WithTraits(opts ...func(*TraitQuery)) *RaceQuery

WithTraits tells the query-builder to eager-load the nodes that are connected to the "traits" edge. The optional arguments are used to configure the query builder of the edge.

type RaceSelect

type RaceSelect struct {
	*RaceQuery
	// contains filtered or unexported fields
}

RaceSelect is the builder for selecting fields of Race entities.

func (*RaceSelect) Aggregate

func (rs *RaceSelect) Aggregate(fns ...AggregateFunc) *RaceSelect

Aggregate adds the given aggregation functions to the selector query.

func (*RaceSelect) Bool

func (s *RaceSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RaceSelect) BoolX

func (s *RaceSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RaceSelect) Bools

func (s *RaceSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RaceSelect) BoolsX

func (s *RaceSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RaceSelect) Float64

func (s *RaceSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RaceSelect) Float64X

func (s *RaceSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RaceSelect) Float64s

func (s *RaceSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RaceSelect) Float64sX

func (s *RaceSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RaceSelect) Int

func (s *RaceSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RaceSelect) IntX

func (s *RaceSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RaceSelect) Ints

func (s *RaceSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RaceSelect) IntsX

func (s *RaceSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RaceSelect) Scan

func (rs *RaceSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RaceSelect) ScanX

func (s *RaceSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RaceSelect) String

func (s *RaceSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RaceSelect) StringX

func (s *RaceSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RaceSelect) Strings

func (s *RaceSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RaceSelect) StringsX

func (s *RaceSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RaceUpdate

type RaceUpdate struct {
	// contains filtered or unexported fields
}

RaceUpdate is the builder for updating Race entities.

func (*RaceUpdate) AddAbilityBonuseIDs

func (ru *RaceUpdate) AddAbilityBonuseIDs(ids ...int) *RaceUpdate

AddAbilityBonuseIDs adds the "ability_bonuses" edge to the AbilityBonus entity by IDs.

func (*RaceUpdate) AddAbilityBonuses

func (ru *RaceUpdate) AddAbilityBonuses(a ...*AbilityBonus) *RaceUpdate

AddAbilityBonuses adds the "ability_bonuses" edges to the AbilityBonus entity.

func (*RaceUpdate) AddLanguageIDs

func (ru *RaceUpdate) AddLanguageIDs(ids ...int) *RaceUpdate

AddLanguageIDs adds the "languages" edge to the Language entity by IDs.

func (*RaceUpdate) AddLanguages

func (ru *RaceUpdate) AddLanguages(l ...*Language) *RaceUpdate

AddLanguages adds the "languages" edges to the Language entity.

func (*RaceUpdate) AddProficiencies

func (ru *RaceUpdate) AddProficiencies(p ...*Proficiency) *RaceUpdate

AddProficiencies adds the "proficiencies" edges to the Proficiency entity.

func (*RaceUpdate) AddProficiencyChoice

func (ru *RaceUpdate) AddProficiencyChoice(p ...*ProficiencyChoice) *RaceUpdate

AddProficiencyChoice adds the "proficiency_choice" edges to the ProficiencyChoice entity.

func (*RaceUpdate) AddProficiencyChoiceIDs

func (ru *RaceUpdate) AddProficiencyChoiceIDs(ids ...int) *RaceUpdate

AddProficiencyChoiceIDs adds the "proficiency_choice" edge to the ProficiencyChoice entity by IDs.

func (*RaceUpdate) AddProficiencyIDs

func (ru *RaceUpdate) AddProficiencyIDs(ids ...int) *RaceUpdate

AddProficiencyIDs adds the "proficiencies" edge to the Proficiency entity by IDs.

func (*RaceUpdate) AddSpeed

func (ru *RaceUpdate) AddSpeed(i int) *RaceUpdate

AddSpeed adds i to the "speed" field.

func (*RaceUpdate) AddSubrace

func (ru *RaceUpdate) AddSubrace(s ...*Subrace) *RaceUpdate

AddSubrace adds the "subrace" edges to the Subrace entity.

func (*RaceUpdate) AddSubraceIDs

func (ru *RaceUpdate) AddSubraceIDs(ids ...int) *RaceUpdate

AddSubraceIDs adds the "subrace" edge to the Subrace entity by IDs.

func (*RaceUpdate) AddTraitIDs

func (ru *RaceUpdate) AddTraitIDs(ids ...int) *RaceUpdate

AddTraitIDs adds the "traits" edge to the Trait entity by IDs.

func (*RaceUpdate) AddTraits

func (ru *RaceUpdate) AddTraits(t ...*Trait) *RaceUpdate

AddTraits adds the "traits" edges to the Trait entity.

func (*RaceUpdate) ClearAbilityBonuses

func (ru *RaceUpdate) ClearAbilityBonuses() *RaceUpdate

ClearAbilityBonuses clears all "ability_bonuses" edges to the AbilityBonus entity.

func (*RaceUpdate) ClearLanguages

func (ru *RaceUpdate) ClearLanguages() *RaceUpdate

ClearLanguages clears all "languages" edges to the Language entity.

func (*RaceUpdate) ClearProficiencies

func (ru *RaceUpdate) ClearProficiencies() *RaceUpdate

ClearProficiencies clears all "proficiencies" edges to the Proficiency entity.

func (*RaceUpdate) ClearProficiencyChoice

func (ru *RaceUpdate) ClearProficiencyChoice() *RaceUpdate

ClearProficiencyChoice clears all "proficiency_choice" edges to the ProficiencyChoice entity.

func (*RaceUpdate) ClearSubrace

func (ru *RaceUpdate) ClearSubrace() *RaceUpdate

ClearSubrace clears all "subrace" edges to the Subrace entity.

func (*RaceUpdate) ClearTraits

func (ru *RaceUpdate) ClearTraits() *RaceUpdate

ClearTraits clears all "traits" edges to the Trait entity.

func (*RaceUpdate) Exec

func (ru *RaceUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RaceUpdate) ExecX

func (ru *RaceUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RaceUpdate) Mutation

func (ru *RaceUpdate) Mutation() *RaceMutation

Mutation returns the RaceMutation object of the builder.

func (*RaceUpdate) RemoveAbilityBonuseIDs

func (ru *RaceUpdate) RemoveAbilityBonuseIDs(ids ...int) *RaceUpdate

RemoveAbilityBonuseIDs removes the "ability_bonuses" edge to AbilityBonus entities by IDs.

func (*RaceUpdate) RemoveAbilityBonuses

func (ru *RaceUpdate) RemoveAbilityBonuses(a ...*AbilityBonus) *RaceUpdate

RemoveAbilityBonuses removes "ability_bonuses" edges to AbilityBonus entities.

func (*RaceUpdate) RemoveLanguageIDs

func (ru *RaceUpdate) RemoveLanguageIDs(ids ...int) *RaceUpdate

RemoveLanguageIDs removes the "languages" edge to Language entities by IDs.

func (*RaceUpdate) RemoveLanguages

func (ru *RaceUpdate) RemoveLanguages(l ...*Language) *RaceUpdate

RemoveLanguages removes "languages" edges to Language entities.

func (*RaceUpdate) RemoveProficiencies

func (ru *RaceUpdate) RemoveProficiencies(p ...*Proficiency) *RaceUpdate

RemoveProficiencies removes "proficiencies" edges to Proficiency entities.

func (*RaceUpdate) RemoveProficiencyChoice

func (ru *RaceUpdate) RemoveProficiencyChoice(p ...*ProficiencyChoice) *RaceUpdate

RemoveProficiencyChoice removes "proficiency_choice" edges to ProficiencyChoice entities.

func (*RaceUpdate) RemoveProficiencyChoiceIDs

func (ru *RaceUpdate) RemoveProficiencyChoiceIDs(ids ...int) *RaceUpdate

RemoveProficiencyChoiceIDs removes the "proficiency_choice" edge to ProficiencyChoice entities by IDs.

func (*RaceUpdate) RemoveProficiencyIDs

func (ru *RaceUpdate) RemoveProficiencyIDs(ids ...int) *RaceUpdate

RemoveProficiencyIDs removes the "proficiencies" edge to Proficiency entities by IDs.

func (*RaceUpdate) RemoveSubrace

func (ru *RaceUpdate) RemoveSubrace(s ...*Subrace) *RaceUpdate

RemoveSubrace removes "subrace" edges to Subrace entities.

func (*RaceUpdate) RemoveSubraceIDs

func (ru *RaceUpdate) RemoveSubraceIDs(ids ...int) *RaceUpdate

RemoveSubraceIDs removes the "subrace" edge to Subrace entities by IDs.

func (*RaceUpdate) RemoveTraitIDs

func (ru *RaceUpdate) RemoveTraitIDs(ids ...int) *RaceUpdate

RemoveTraitIDs removes the "traits" edge to Trait entities by IDs.

func (*RaceUpdate) RemoveTraits

func (ru *RaceUpdate) RemoveTraits(t ...*Trait) *RaceUpdate

RemoveTraits removes "traits" edges to Trait entities.

func (*RaceUpdate) Save

func (ru *RaceUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*RaceUpdate) SaveX

func (ru *RaceUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RaceUpdate) SetAge

func (ru *RaceUpdate) SetAge(s string) *RaceUpdate

SetAge sets the "age" field.

func (*RaceUpdate) SetAlignment

func (ru *RaceUpdate) SetAlignment(s string) *RaceUpdate

SetAlignment sets the "alignment" field.

func (*RaceUpdate) SetIndx

func (ru *RaceUpdate) SetIndx(s string) *RaceUpdate

SetIndx sets the "indx" field.

func (*RaceUpdate) SetLanguageDesc

func (ru *RaceUpdate) SetLanguageDesc(s string) *RaceUpdate

SetLanguageDesc sets the "language_desc" field.

func (*RaceUpdate) SetName

func (ru *RaceUpdate) SetName(s string) *RaceUpdate

SetName sets the "name" field.

func (*RaceUpdate) SetSize

func (ru *RaceUpdate) SetSize(s string) *RaceUpdate

SetSize sets the "size" field.

func (*RaceUpdate) SetSizeDescription

func (ru *RaceUpdate) SetSizeDescription(s string) *RaceUpdate

SetSizeDescription sets the "size_description" field.

func (*RaceUpdate) SetSpeed

func (ru *RaceUpdate) SetSpeed(i int) *RaceUpdate

SetSpeed sets the "speed" field.

func (*RaceUpdate) Where

func (ru *RaceUpdate) Where(ps ...predicate.Race) *RaceUpdate

Where appends a list predicates to the RaceUpdate builder.

type RaceUpdateOne

type RaceUpdateOne struct {
	// contains filtered or unexported fields
}

RaceUpdateOne is the builder for updating a single Race entity.

func (*RaceUpdateOne) AddAbilityBonuseIDs

func (ruo *RaceUpdateOne) AddAbilityBonuseIDs(ids ...int) *RaceUpdateOne

AddAbilityBonuseIDs adds the "ability_bonuses" edge to the AbilityBonus entity by IDs.

func (*RaceUpdateOne) AddAbilityBonuses

func (ruo *RaceUpdateOne) AddAbilityBonuses(a ...*AbilityBonus) *RaceUpdateOne

AddAbilityBonuses adds the "ability_bonuses" edges to the AbilityBonus entity.

func (*RaceUpdateOne) AddLanguageIDs

func (ruo *RaceUpdateOne) AddLanguageIDs(ids ...int) *RaceUpdateOne

AddLanguageIDs adds the "languages" edge to the Language entity by IDs.

func (*RaceUpdateOne) AddLanguages

func (ruo *RaceUpdateOne) AddLanguages(l ...*Language) *RaceUpdateOne

AddLanguages adds the "languages" edges to the Language entity.

func (*RaceUpdateOne) AddProficiencies

func (ruo *RaceUpdateOne) AddProficiencies(p ...*Proficiency) *RaceUpdateOne

AddProficiencies adds the "proficiencies" edges to the Proficiency entity.

func (*RaceUpdateOne) AddProficiencyChoice

func (ruo *RaceUpdateOne) AddProficiencyChoice(p ...*ProficiencyChoice) *RaceUpdateOne

AddProficiencyChoice adds the "proficiency_choice" edges to the ProficiencyChoice entity.

func (*RaceUpdateOne) AddProficiencyChoiceIDs

func (ruo *RaceUpdateOne) AddProficiencyChoiceIDs(ids ...int) *RaceUpdateOne

AddProficiencyChoiceIDs adds the "proficiency_choice" edge to the ProficiencyChoice entity by IDs.

func (*RaceUpdateOne) AddProficiencyIDs

func (ruo *RaceUpdateOne) AddProficiencyIDs(ids ...int) *RaceUpdateOne

AddProficiencyIDs adds the "proficiencies" edge to the Proficiency entity by IDs.

func (*RaceUpdateOne) AddSpeed

func (ruo *RaceUpdateOne) AddSpeed(i int) *RaceUpdateOne

AddSpeed adds i to the "speed" field.

func (*RaceUpdateOne) AddSubrace

func (ruo *RaceUpdateOne) AddSubrace(s ...*Subrace) *RaceUpdateOne

AddSubrace adds the "subrace" edges to the Subrace entity.

func (*RaceUpdateOne) AddSubraceIDs

func (ruo *RaceUpdateOne) AddSubraceIDs(ids ...int) *RaceUpdateOne

AddSubraceIDs adds the "subrace" edge to the Subrace entity by IDs.

func (*RaceUpdateOne) AddTraitIDs

func (ruo *RaceUpdateOne) AddTraitIDs(ids ...int) *RaceUpdateOne

AddTraitIDs adds the "traits" edge to the Trait entity by IDs.

func (*RaceUpdateOne) AddTraits

func (ruo *RaceUpdateOne) AddTraits(t ...*Trait) *RaceUpdateOne

AddTraits adds the "traits" edges to the Trait entity.

func (*RaceUpdateOne) ClearAbilityBonuses

func (ruo *RaceUpdateOne) ClearAbilityBonuses() *RaceUpdateOne

ClearAbilityBonuses clears all "ability_bonuses" edges to the AbilityBonus entity.

func (*RaceUpdateOne) ClearLanguages

func (ruo *RaceUpdateOne) ClearLanguages() *RaceUpdateOne

ClearLanguages clears all "languages" edges to the Language entity.

func (*RaceUpdateOne) ClearProficiencies

func (ruo *RaceUpdateOne) ClearProficiencies() *RaceUpdateOne

ClearProficiencies clears all "proficiencies" edges to the Proficiency entity.

func (*RaceUpdateOne) ClearProficiencyChoice

func (ruo *RaceUpdateOne) ClearProficiencyChoice() *RaceUpdateOne

ClearProficiencyChoice clears all "proficiency_choice" edges to the ProficiencyChoice entity.

func (*RaceUpdateOne) ClearSubrace

func (ruo *RaceUpdateOne) ClearSubrace() *RaceUpdateOne

ClearSubrace clears all "subrace" edges to the Subrace entity.

func (*RaceUpdateOne) ClearTraits

func (ruo *RaceUpdateOne) ClearTraits() *RaceUpdateOne

ClearTraits clears all "traits" edges to the Trait entity.

func (*RaceUpdateOne) Exec

func (ruo *RaceUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RaceUpdateOne) ExecX

func (ruo *RaceUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RaceUpdateOne) Mutation

func (ruo *RaceUpdateOne) Mutation() *RaceMutation

Mutation returns the RaceMutation object of the builder.

func (*RaceUpdateOne) RemoveAbilityBonuseIDs

func (ruo *RaceUpdateOne) RemoveAbilityBonuseIDs(ids ...int) *RaceUpdateOne

RemoveAbilityBonuseIDs removes the "ability_bonuses" edge to AbilityBonus entities by IDs.

func (*RaceUpdateOne) RemoveAbilityBonuses

func (ruo *RaceUpdateOne) RemoveAbilityBonuses(a ...*AbilityBonus) *RaceUpdateOne

RemoveAbilityBonuses removes "ability_bonuses" edges to AbilityBonus entities.

func (*RaceUpdateOne) RemoveLanguageIDs

func (ruo *RaceUpdateOne) RemoveLanguageIDs(ids ...int) *RaceUpdateOne

RemoveLanguageIDs removes the "languages" edge to Language entities by IDs.

func (*RaceUpdateOne) RemoveLanguages

func (ruo *RaceUpdateOne) RemoveLanguages(l ...*Language) *RaceUpdateOne

RemoveLanguages removes "languages" edges to Language entities.

func (*RaceUpdateOne) RemoveProficiencies

func (ruo *RaceUpdateOne) RemoveProficiencies(p ...*Proficiency) *RaceUpdateOne

RemoveProficiencies removes "proficiencies" edges to Proficiency entities.

func (*RaceUpdateOne) RemoveProficiencyChoice

func (ruo *RaceUpdateOne) RemoveProficiencyChoice(p ...*ProficiencyChoice) *RaceUpdateOne

RemoveProficiencyChoice removes "proficiency_choice" edges to ProficiencyChoice entities.

func (*RaceUpdateOne) RemoveProficiencyChoiceIDs

func (ruo *RaceUpdateOne) RemoveProficiencyChoiceIDs(ids ...int) *RaceUpdateOne

RemoveProficiencyChoiceIDs removes the "proficiency_choice" edge to ProficiencyChoice entities by IDs.

func (*RaceUpdateOne) RemoveProficiencyIDs

func (ruo *RaceUpdateOne) RemoveProficiencyIDs(ids ...int) *RaceUpdateOne

RemoveProficiencyIDs removes the "proficiencies" edge to Proficiency entities by IDs.

func (*RaceUpdateOne) RemoveSubrace

func (ruo *RaceUpdateOne) RemoveSubrace(s ...*Subrace) *RaceUpdateOne

RemoveSubrace removes "subrace" edges to Subrace entities.

func (*RaceUpdateOne) RemoveSubraceIDs

func (ruo *RaceUpdateOne) RemoveSubraceIDs(ids ...int) *RaceUpdateOne

RemoveSubraceIDs removes the "subrace" edge to Subrace entities by IDs.

func (*RaceUpdateOne) RemoveTraitIDs

func (ruo *RaceUpdateOne) RemoveTraitIDs(ids ...int) *RaceUpdateOne

RemoveTraitIDs removes the "traits" edge to Trait entities by IDs.

func (*RaceUpdateOne) RemoveTraits

func (ruo *RaceUpdateOne) RemoveTraits(t ...*Trait) *RaceUpdateOne

RemoveTraits removes "traits" edges to Trait entities.

func (*RaceUpdateOne) Save

func (ruo *RaceUpdateOne) Save(ctx context.Context) (*Race, error)

Save executes the query and returns the updated Race entity.

func (*RaceUpdateOne) SaveX

func (ruo *RaceUpdateOne) SaveX(ctx context.Context) *Race

SaveX is like Save, but panics if an error occurs.

func (*RaceUpdateOne) Select

func (ruo *RaceUpdateOne) Select(field string, fields ...string) *RaceUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*RaceUpdateOne) SetAge

func (ruo *RaceUpdateOne) SetAge(s string) *RaceUpdateOne

SetAge sets the "age" field.

func (*RaceUpdateOne) SetAlignment

func (ruo *RaceUpdateOne) SetAlignment(s string) *RaceUpdateOne

SetAlignment sets the "alignment" field.

func (*RaceUpdateOne) SetIndx

func (ruo *RaceUpdateOne) SetIndx(s string) *RaceUpdateOne

SetIndx sets the "indx" field.

func (*RaceUpdateOne) SetLanguageDesc

func (ruo *RaceUpdateOne) SetLanguageDesc(s string) *RaceUpdateOne

SetLanguageDesc sets the "language_desc" field.

func (*RaceUpdateOne) SetName

func (ruo *RaceUpdateOne) SetName(s string) *RaceUpdateOne

SetName sets the "name" field.

func (*RaceUpdateOne) SetSize

func (ruo *RaceUpdateOne) SetSize(s string) *RaceUpdateOne

SetSize sets the "size" field.

func (*RaceUpdateOne) SetSizeDescription

func (ruo *RaceUpdateOne) SetSizeDescription(s string) *RaceUpdateOne

SetSizeDescription sets the "size_description" field.

func (*RaceUpdateOne) SetSpeed

func (ruo *RaceUpdateOne) SetSpeed(i int) *RaceUpdateOne

SetSpeed sets the "speed" field.

func (*RaceUpdateOne) Where

func (ruo *RaceUpdateOne) Where(ps ...predicate.Race) *RaceUpdateOne

Where appends a list predicates to the RaceUpdate builder.

type RaceWhereInput

type RaceWhereInput struct {
	Predicates []predicate.Race  `json:"-"`
	Not        *RaceWhereInput   `json:"not,omitempty"`
	Or         []*RaceWhereInput `json:"or,omitempty"`
	And        []*RaceWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "indx" field predicates.
	Indx             *string  `json:"indx,omitempty"`
	IndxNEQ          *string  `json:"indxNEQ,omitempty"`
	IndxIn           []string `json:"indxIn,omitempty"`
	IndxNotIn        []string `json:"indxNotIn,omitempty"`
	IndxGT           *string  `json:"indxGT,omitempty"`
	IndxGTE          *string  `json:"indxGTE,omitempty"`
	IndxLT           *string  `json:"indxLT,omitempty"`
	IndxLTE          *string  `json:"indxLTE,omitempty"`
	IndxContains     *string  `json:"indxContains,omitempty"`
	IndxHasPrefix    *string  `json:"indxHasPrefix,omitempty"`
	IndxHasSuffix    *string  `json:"indxHasSuffix,omitempty"`
	IndxEqualFold    *string  `json:"indxEqualFold,omitempty"`
	IndxContainsFold *string  `json:"indxContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "alignment" field predicates.
	Alignment             *string  `json:"alignment,omitempty"`
	AlignmentNEQ          *string  `json:"alignmentNEQ,omitempty"`
	AlignmentIn           []string `json:"alignmentIn,omitempty"`
	AlignmentNotIn        []string `json:"alignmentNotIn,omitempty"`
	AlignmentGT           *string  `json:"alignmentGT,omitempty"`
	AlignmentGTE          *string  `json:"alignmentGTE,omitempty"`
	AlignmentLT           *string  `json:"alignmentLT,omitempty"`
	AlignmentLTE          *string  `json:"alignmentLTE,omitempty"`
	AlignmentContains     *string  `json:"alignmentContains,omitempty"`
	AlignmentHasPrefix    *string  `json:"alignmentHasPrefix,omitempty"`
	AlignmentHasSuffix    *string  `json:"alignmentHasSuffix,omitempty"`
	AlignmentEqualFold    *string  `json:"alignmentEqualFold,omitempty"`
	AlignmentContainsFold *string  `json:"alignmentContainsFold,omitempty"`

	// "age" field predicates.
	Age             *string  `json:"age,omitempty"`
	AgeNEQ          *string  `json:"ageNEQ,omitempty"`
	AgeIn           []string `json:"ageIn,omitempty"`
	AgeNotIn        []string `json:"ageNotIn,omitempty"`
	AgeGT           *string  `json:"ageGT,omitempty"`
	AgeGTE          *string  `json:"ageGTE,omitempty"`
	AgeLT           *string  `json:"ageLT,omitempty"`
	AgeLTE          *string  `json:"ageLTE,omitempty"`
	AgeContains     *string  `json:"ageContains,omitempty"`
	AgeHasPrefix    *string  `json:"ageHasPrefix,omitempty"`
	AgeHasSuffix    *string  `json:"ageHasSuffix,omitempty"`
	AgeEqualFold    *string  `json:"ageEqualFold,omitempty"`
	AgeContainsFold *string  `json:"ageContainsFold,omitempty"`

	// "size" field predicates.
	Size             *string  `json:"size,omitempty"`
	SizeNEQ          *string  `json:"sizeNEQ,omitempty"`
	SizeIn           []string `json:"sizeIn,omitempty"`
	SizeNotIn        []string `json:"sizeNotIn,omitempty"`
	SizeGT           *string  `json:"sizeGT,omitempty"`
	SizeGTE          *string  `json:"sizeGTE,omitempty"`
	SizeLT           *string  `json:"sizeLT,omitempty"`
	SizeLTE          *string  `json:"sizeLTE,omitempty"`
	SizeContains     *string  `json:"sizeContains,omitempty"`
	SizeHasPrefix    *string  `json:"sizeHasPrefix,omitempty"`
	SizeHasSuffix    *string  `json:"sizeHasSuffix,omitempty"`
	SizeEqualFold    *string  `json:"sizeEqualFold,omitempty"`
	SizeContainsFold *string  `json:"sizeContainsFold,omitempty"`

	// "size_description" field predicates.
	SizeDescription             *string  `json:"sizeDescription,omitempty"`
	SizeDescriptionNEQ          *string  `json:"sizeDescriptionNEQ,omitempty"`
	SizeDescriptionIn           []string `json:"sizeDescriptionIn,omitempty"`
	SizeDescriptionNotIn        []string `json:"sizeDescriptionNotIn,omitempty"`
	SizeDescriptionGT           *string  `json:"sizeDescriptionGT,omitempty"`
	SizeDescriptionGTE          *string  `json:"sizeDescriptionGTE,omitempty"`
	SizeDescriptionLT           *string  `json:"sizeDescriptionLT,omitempty"`
	SizeDescriptionLTE          *string  `json:"sizeDescriptionLTE,omitempty"`
	SizeDescriptionContains     *string  `json:"sizeDescriptionContains,omitempty"`
	SizeDescriptionHasPrefix    *string  `json:"sizeDescriptionHasPrefix,omitempty"`
	SizeDescriptionHasSuffix    *string  `json:"sizeDescriptionHasSuffix,omitempty"`
	SizeDescriptionEqualFold    *string  `json:"sizeDescriptionEqualFold,omitempty"`
	SizeDescriptionContainsFold *string  `json:"sizeDescriptionContainsFold,omitempty"`

	// "language_desc" field predicates.
	LanguageDesc             *string  `json:"languageDesc,omitempty"`
	LanguageDescNEQ          *string  `json:"languageDescNEQ,omitempty"`
	LanguageDescIn           []string `json:"languageDescIn,omitempty"`
	LanguageDescNotIn        []string `json:"languageDescNotIn,omitempty"`
	LanguageDescGT           *string  `json:"languageDescGT,omitempty"`
	LanguageDescGTE          *string  `json:"languageDescGTE,omitempty"`
	LanguageDescLT           *string  `json:"languageDescLT,omitempty"`
	LanguageDescLTE          *string  `json:"languageDescLTE,omitempty"`
	LanguageDescContains     *string  `json:"languageDescContains,omitempty"`
	LanguageDescHasPrefix    *string  `json:"languageDescHasPrefix,omitempty"`
	LanguageDescHasSuffix    *string  `json:"languageDescHasSuffix,omitempty"`
	LanguageDescEqualFold    *string  `json:"languageDescEqualFold,omitempty"`
	LanguageDescContainsFold *string  `json:"languageDescContainsFold,omitempty"`

	// "speed" field predicates.
	Speed      *int  `json:"speed,omitempty"`
	SpeedNEQ   *int  `json:"speedNEQ,omitempty"`
	SpeedIn    []int `json:"speedIn,omitempty"`
	SpeedNotIn []int `json:"speedNotIn,omitempty"`
	SpeedGT    *int  `json:"speedGT,omitempty"`
	SpeedGTE   *int  `json:"speedGTE,omitempty"`
	SpeedLT    *int  `json:"speedLT,omitempty"`
	SpeedLTE   *int  `json:"speedLTE,omitempty"`

	// "proficiencies" edge predicates.
	HasProficiencies     *bool                    `json:"hasProficiencies,omitempty"`
	HasProficienciesWith []*ProficiencyWhereInput `json:"hasProficienciesWith,omitempty"`

	// "proficiency_choice" edge predicates.
	HasProficiencyChoice     *bool                          `json:"hasProficiencyChoice,omitempty"`
	HasProficiencyChoiceWith []*ProficiencyChoiceWhereInput `json:"hasProficiencyChoiceWith,omitempty"`

	// "languages" edge predicates.
	HasLanguages     *bool                 `json:"hasLanguages,omitempty"`
	HasLanguagesWith []*LanguageWhereInput `json:"hasLanguagesWith,omitempty"`

	// "subrace" edge predicates.
	HasSubrace     *bool                `json:"hasSubrace,omitempty"`
	HasSubraceWith []*SubraceWhereInput `json:"hasSubraceWith,omitempty"`

	// "traits" edge predicates.
	HasTraits     *bool              `json:"hasTraits,omitempty"`
	HasTraitsWith []*TraitWhereInput `json:"hasTraitsWith,omitempty"`

	// "ability_bonuses" edge predicates.
	HasAbilityBonuses     *bool                     `json:"hasAbilityBonuses,omitempty"`
	HasAbilityBonusesWith []*AbilityBonusWhereInput `json:"hasAbilityBonusesWith,omitempty"`
}

RaceWhereInput represents a where input for filtering Race queries.

func (*RaceWhereInput) AddPredicates

func (i *RaceWhereInput) AddPredicates(predicates ...predicate.Race)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*RaceWhereInput) Filter

func (i *RaceWhereInput) Filter(q *RaceQuery) (*RaceQuery, error)

Filter applies the RaceWhereInput filter on the RaceQuery builder.

func (*RaceWhereInput) P

func (i *RaceWhereInput) P() (predicate.Race, error)

P returns a predicate for filtering races. An error is returned if the input is empty or invalid.

type Races

type Races []*Race

Races is a parsable slice of Race.

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type Rule

type Rule struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Indx holds the value of the "indx" field.
	Indx string `json:"index"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Desc holds the value of the "desc" field.
	Desc string `json:"desc,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the RuleQuery when eager-loading is set.
	Edges RuleEdges `json:"-"`
	// contains filtered or unexported fields
}

Rule is the model entity for the Rule schema.

func (*Rule) IsNode

func (n *Rule) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Rule) MarshalJSON

func (r *Rule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Rule) NamedRuleSections

func (r *Rule) NamedRuleSections(name string) ([]*RuleSection, error)

NamedRuleSections returns the RuleSections named value or an error if the edge was not loaded in eager-loading with this name.

func (*Rule) Node

func (r *Rule) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*Rule) QueryRuleSections

func (r *Rule) QueryRuleSections() *RuleSectionQuery

QueryRuleSections queries the "rule_sections" edge of the Rule entity.

func (*Rule) RuleSections

func (r *Rule) RuleSections(ctx context.Context) (result []*RuleSection, err error)

func (*Rule) String

func (r *Rule) String() string

String implements the fmt.Stringer.

func (*Rule) ToEdge

func (r *Rule) ToEdge(order *RuleOrder) *RuleEdge

ToEdge converts Rule into RuleEdge.

func (*Rule) UnmarshalJSON

func (r *Rule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*Rule) Unwrap

func (r *Rule) Unwrap() *Rule

Unwrap unwraps the Rule entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Rule) Update

func (r *Rule) Update() *RuleUpdateOne

Update returns a builder for updating this Rule. Note that you need to call Rule.Unwrap() before calling this method if this Rule was returned from a transaction, and the transaction was committed or rolled back.

func (*Rule) Value

func (r *Rule) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Rule. This includes values selected through modifiers, order, etc.

type RuleClient

type RuleClient struct {
	// contains filtered or unexported fields
}

RuleClient is a client for the Rule schema.

func NewRuleClient

func NewRuleClient(c config) *RuleClient

NewRuleClient returns a client for the Rule from the given config.

func (*RuleClient) Create

func (c *RuleClient) Create() *RuleCreate

Create returns a builder for creating a Rule entity.

func (*RuleClient) CreateBulk

func (c *RuleClient) CreateBulk(builders ...*RuleCreate) *RuleCreateBulk

CreateBulk returns a builder for creating a bulk of Rule entities.

func (*RuleClient) Delete

func (c *RuleClient) Delete() *RuleDelete

Delete returns a delete builder for Rule.

func (*RuleClient) DeleteOne

func (c *RuleClient) DeleteOne(r *Rule) *RuleDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*RuleClient) DeleteOneID

func (c *RuleClient) DeleteOneID(id int) *RuleDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*RuleClient) Get

func (c *RuleClient) Get(ctx context.Context, id int) (*Rule, error)

Get returns a Rule entity by its id.

func (*RuleClient) GetX

func (c *RuleClient) GetX(ctx context.Context, id int) *Rule

GetX is like Get, but panics if an error occurs.

func (*RuleClient) Hooks

func (c *RuleClient) Hooks() []Hook

Hooks returns the client hooks.

func (*RuleClient) Intercept

func (c *RuleClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `rule.Intercept(f(g(h())))`.

func (*RuleClient) Interceptors

func (c *RuleClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*RuleClient) Query

func (c *RuleClient) Query() *RuleQuery

Query returns a query builder for Rule.

func (*RuleClient) QueryRuleSections

func (c *RuleClient) QueryRuleSections(r *Rule) *RuleSectionQuery

QueryRuleSections queries the rule_sections edge of a Rule.

func (*RuleClient) Update

func (c *RuleClient) Update() *RuleUpdate

Update returns an update builder for Rule.

func (*RuleClient) UpdateOne

func (c *RuleClient) UpdateOne(r *Rule) *RuleUpdateOne

UpdateOne returns an update builder for the given entity.

func (*RuleClient) UpdateOneID

func (c *RuleClient) UpdateOneID(id int) *RuleUpdateOne

UpdateOneID returns an update builder for the given id.

func (*RuleClient) Use

func (c *RuleClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `rule.Hooks(f(g(h())))`.

type RuleConnection

type RuleConnection struct {
	Edges      []*RuleEdge `json:"edges"`
	PageInfo   PageInfo    `json:"pageInfo"`
	TotalCount int         `json:"totalCount"`
}

RuleConnection is the connection containing edges to Rule.

type RuleCreate

type RuleCreate struct {
	// contains filtered or unexported fields
}

RuleCreate is the builder for creating a Rule entity.

func (*RuleCreate) AddRuleSectionIDs

func (rc *RuleCreate) AddRuleSectionIDs(ids ...int) *RuleCreate

AddRuleSectionIDs adds the "rule_sections" edge to the RuleSection entity by IDs.

func (*RuleCreate) AddRuleSections

func (rc *RuleCreate) AddRuleSections(r ...*RuleSection) *RuleCreate

AddRuleSections adds the "rule_sections" edges to the RuleSection entity.

func (*RuleCreate) Exec

func (rc *RuleCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RuleCreate) ExecX

func (rc *RuleCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RuleCreate) Mutation

func (rc *RuleCreate) Mutation() *RuleMutation

Mutation returns the RuleMutation object of the builder.

func (*RuleCreate) Save

func (rc *RuleCreate) Save(ctx context.Context) (*Rule, error)

Save creates the Rule in the database.

func (*RuleCreate) SaveX

func (rc *RuleCreate) SaveX(ctx context.Context) *Rule

SaveX calls Save and panics if Save returns an error.

func (*RuleCreate) SetDesc

func (rc *RuleCreate) SetDesc(s string) *RuleCreate

SetDesc sets the "desc" field.

func (*RuleCreate) SetIndx

func (rc *RuleCreate) SetIndx(s string) *RuleCreate

SetIndx sets the "indx" field.

func (*RuleCreate) SetName

func (rc *RuleCreate) SetName(s string) *RuleCreate

SetName sets the "name" field.

func (*RuleCreate) SetRule

func (rc *RuleCreate) SetRule(input *Rule) *RuleCreate

type RuleCreateBulk

type RuleCreateBulk struct {
	// contains filtered or unexported fields
}

RuleCreateBulk is the builder for creating many Rule entities in bulk.

func (*RuleCreateBulk) Exec

func (rcb *RuleCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RuleCreateBulk) ExecX

func (rcb *RuleCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RuleCreateBulk) Save

func (rcb *RuleCreateBulk) Save(ctx context.Context) ([]*Rule, error)

Save creates the Rule entities in the database.

func (*RuleCreateBulk) SaveX

func (rcb *RuleCreateBulk) SaveX(ctx context.Context) []*Rule

SaveX is like Save, but panics if an error occurs.

type RuleDelete

type RuleDelete struct {
	// contains filtered or unexported fields
}

RuleDelete is the builder for deleting a Rule entity.

func (*RuleDelete) Exec

func (rd *RuleDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*RuleDelete) ExecX

func (rd *RuleDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*RuleDelete) Where

func (rd *RuleDelete) Where(ps ...predicate.Rule) *RuleDelete

Where appends a list predicates to the RuleDelete builder.

type RuleDeleteOne

type RuleDeleteOne struct {
	// contains filtered or unexported fields
}

RuleDeleteOne is the builder for deleting a single Rule entity.

func (*RuleDeleteOne) Exec

func (rdo *RuleDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RuleDeleteOne) ExecX

func (rdo *RuleDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RuleDeleteOne) Where

func (rdo *RuleDeleteOne) Where(ps ...predicate.Rule) *RuleDeleteOne

Where appends a list predicates to the RuleDelete builder.

type RuleEdge

type RuleEdge struct {
	Node   *Rule  `json:"node"`
	Cursor Cursor `json:"cursor"`
}

RuleEdge is the edge representation of Rule.

type RuleEdges

type RuleEdges struct {
	// RuleSections holds the value of the rule_sections edge.
	RuleSections []*RuleSection `json:"subsections,omitempty"`
	// contains filtered or unexported fields
}

RuleEdges holds the relations/edges for other nodes in the graph.

func (RuleEdges) RuleSectionsOrErr

func (e RuleEdges) RuleSectionsOrErr() ([]*RuleSection, error)

RuleSectionsOrErr returns the RuleSections value or an error if the edge was not loaded in eager-loading.

type RuleGroupBy

type RuleGroupBy struct {
	// contains filtered or unexported fields
}

RuleGroupBy is the group-by builder for Rule entities.

func (*RuleGroupBy) Aggregate

func (rgb *RuleGroupBy) Aggregate(fns ...AggregateFunc) *RuleGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*RuleGroupBy) Bool

func (s *RuleGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RuleGroupBy) BoolX

func (s *RuleGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RuleGroupBy) Bools

func (s *RuleGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RuleGroupBy) BoolsX

func (s *RuleGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RuleGroupBy) Float64

func (s *RuleGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RuleGroupBy) Float64X

func (s *RuleGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RuleGroupBy) Float64s

func (s *RuleGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RuleGroupBy) Float64sX

func (s *RuleGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RuleGroupBy) Int

func (s *RuleGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RuleGroupBy) IntX

func (s *RuleGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RuleGroupBy) Ints

func (s *RuleGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RuleGroupBy) IntsX

func (s *RuleGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RuleGroupBy) Scan

func (rgb *RuleGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RuleGroupBy) ScanX

func (s *RuleGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RuleGroupBy) String

func (s *RuleGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RuleGroupBy) StringX

func (s *RuleGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RuleGroupBy) Strings

func (s *RuleGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RuleGroupBy) StringsX

func (s *RuleGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RuleMutation

type RuleMutation struct {
	// contains filtered or unexported fields
}

RuleMutation represents an operation that mutates the Rule nodes in the graph.

func (*RuleMutation) AddField

func (m *RuleMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*RuleMutation) AddRuleSectionIDs

func (m *RuleMutation) AddRuleSectionIDs(ids ...int)

AddRuleSectionIDs adds the "rule_sections" edge to the RuleSection entity by ids.

func (*RuleMutation) AddedEdges

func (m *RuleMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*RuleMutation) AddedField

func (m *RuleMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*RuleMutation) AddedFields

func (m *RuleMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*RuleMutation) AddedIDs

func (m *RuleMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*RuleMutation) ClearEdge

func (m *RuleMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*RuleMutation) ClearField

func (m *RuleMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*RuleMutation) ClearRuleSections

func (m *RuleMutation) ClearRuleSections()

ClearRuleSections clears the "rule_sections" edge to the RuleSection entity.

func (*RuleMutation) ClearedEdges

func (m *RuleMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RuleMutation) ClearedFields

func (m *RuleMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RuleMutation) Client

func (m RuleMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*RuleMutation) Desc

func (m *RuleMutation) Desc() (r string, exists bool)

Desc returns the value of the "desc" field in the mutation.

func (*RuleMutation) EdgeCleared

func (m *RuleMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*RuleMutation) Field

func (m *RuleMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*RuleMutation) FieldCleared

func (m *RuleMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*RuleMutation) Fields

func (m *RuleMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*RuleMutation) ID

func (m *RuleMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*RuleMutation) IDs

func (m *RuleMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*RuleMutation) Indx

func (m *RuleMutation) Indx() (r string, exists bool)

Indx returns the value of the "indx" field in the mutation.

func (*RuleMutation) Name

func (m *RuleMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*RuleMutation) OldDesc

func (m *RuleMutation) OldDesc(ctx context.Context) (v string, err error)

OldDesc returns the old "desc" field's value of the Rule entity. If the Rule object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RuleMutation) OldField

func (m *RuleMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*RuleMutation) OldIndx

func (m *RuleMutation) OldIndx(ctx context.Context) (v string, err error)

OldIndx returns the old "indx" field's value of the Rule entity. If the Rule object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RuleMutation) OldName

func (m *RuleMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Rule entity. If the Rule object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RuleMutation) Op

func (m *RuleMutation) Op() Op

Op returns the operation name.

func (*RuleMutation) RemoveRuleSectionIDs

func (m *RuleMutation) RemoveRuleSectionIDs(ids ...int)

RemoveRuleSectionIDs removes the "rule_sections" edge to the RuleSection entity by IDs.

func (*RuleMutation) RemovedEdges

func (m *RuleMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RuleMutation) RemovedIDs

func (m *RuleMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*RuleMutation) RemovedRuleSectionsIDs

func (m *RuleMutation) RemovedRuleSectionsIDs() (ids []int)

RemovedRuleSections returns the removed IDs of the "rule_sections" edge to the RuleSection entity.

func (*RuleMutation) ResetDesc

func (m *RuleMutation) ResetDesc()

ResetDesc resets all changes to the "desc" field.

func (*RuleMutation) ResetEdge

func (m *RuleMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*RuleMutation) ResetField

func (m *RuleMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*RuleMutation) ResetIndx

func (m *RuleMutation) ResetIndx()

ResetIndx resets all changes to the "indx" field.

func (*RuleMutation) ResetName

func (m *RuleMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*RuleMutation) ResetRuleSections

func (m *RuleMutation) ResetRuleSections()

ResetRuleSections resets all changes to the "rule_sections" edge.

func (*RuleMutation) RuleSectionsCleared

func (m *RuleMutation) RuleSectionsCleared() bool

RuleSectionsCleared reports if the "rule_sections" edge to the RuleSection entity was cleared.

func (*RuleMutation) RuleSectionsIDs

func (m *RuleMutation) RuleSectionsIDs() (ids []int)

RuleSectionsIDs returns the "rule_sections" edge IDs in the mutation.

func (*RuleMutation) SetDesc

func (m *RuleMutation) SetDesc(s string)

SetDesc sets the "desc" field.

func (*RuleMutation) SetField

func (m *RuleMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*RuleMutation) SetIndx

func (m *RuleMutation) SetIndx(s string)

SetIndx sets the "indx" field.

func (*RuleMutation) SetName

func (m *RuleMutation) SetName(s string)

SetName sets the "name" field.

func (*RuleMutation) SetOp

func (m *RuleMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (RuleMutation) Tx

func (m RuleMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RuleMutation) Type

func (m *RuleMutation) Type() string

Type returns the node type of this mutation (Rule).

func (*RuleMutation) Where

func (m *RuleMutation) Where(ps ...predicate.Rule)

Where appends a list predicates to the RuleMutation builder.

func (*RuleMutation) WhereP

func (m *RuleMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the RuleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type RuleOrder

type RuleOrder struct {
	Direction OrderDirection  `json:"direction"`
	Field     *RuleOrderField `json:"field"`
}

RuleOrder defines the ordering of Rule.

type RuleOrderField

type RuleOrderField struct {
	// Value extracts the ordering value from the given Rule.
	Value func(*Rule) (ent.Value, error)
	// contains filtered or unexported fields
}

RuleOrderField defines the ordering field of Rule.

func (RuleOrderField) MarshalGQL

func (f RuleOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (RuleOrderField) String

func (f RuleOrderField) String() string

String implement fmt.Stringer interface.

func (*RuleOrderField) UnmarshalGQL

func (f *RuleOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type RulePaginateOption

type RulePaginateOption func(*rulePager) error

RulePaginateOption enables pagination customization.

func WithRuleFilter

func WithRuleFilter(filter func(*RuleQuery) (*RuleQuery, error)) RulePaginateOption

WithRuleFilter configures pagination filter.

func WithRuleOrder

func WithRuleOrder(order *RuleOrder) RulePaginateOption

WithRuleOrder configures pagination ordering.

type RuleQuery

type RuleQuery struct {
	// contains filtered or unexported fields
}

RuleQuery is the builder for querying Rule entities.

func (*RuleQuery) Aggregate

func (rq *RuleQuery) Aggregate(fns ...AggregateFunc) *RuleSelect

Aggregate returns a RuleSelect configured with the given aggregations.

func (*RuleQuery) All

func (rq *RuleQuery) All(ctx context.Context) ([]*Rule, error)

All executes the query and returns a list of Rules.

func (*RuleQuery) AllX

func (rq *RuleQuery) AllX(ctx context.Context) []*Rule

AllX is like All, but panics if an error occurs.

func (*RuleQuery) Clone

func (rq *RuleQuery) Clone() *RuleQuery

Clone returns a duplicate of the RuleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*RuleQuery) CollectFields

func (r *RuleQuery) CollectFields(ctx context.Context, satisfies ...string) (*RuleQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*RuleQuery) Count

func (rq *RuleQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RuleQuery) CountX

func (rq *RuleQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RuleQuery) Exist

func (rq *RuleQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RuleQuery) ExistX

func (rq *RuleQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RuleQuery) First

func (rq *RuleQuery) First(ctx context.Context) (*Rule, error)

First returns the first Rule entity from the query. Returns a *NotFoundError when no Rule was found.

func (*RuleQuery) FirstID

func (rq *RuleQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Rule ID from the query. Returns a *NotFoundError when no Rule ID was found.

func (*RuleQuery) FirstIDX

func (rq *RuleQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*RuleQuery) FirstX

func (rq *RuleQuery) FirstX(ctx context.Context) *Rule

FirstX is like First, but panics if an error occurs.

func (*RuleQuery) GroupBy

func (rq *RuleQuery) GroupBy(field string, fields ...string) *RuleGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Indx string `json:"index"`
	Count int `json:"count,omitempty"`
}

client.Rule.Query().
	GroupBy(rule.FieldIndx).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RuleQuery) IDs

func (rq *RuleQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Rule IDs.

func (*RuleQuery) IDsX

func (rq *RuleQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*RuleQuery) Limit

func (rq *RuleQuery) Limit(limit int) *RuleQuery

Limit the number of records to be returned by this query.

func (*RuleQuery) Offset

func (rq *RuleQuery) Offset(offset int) *RuleQuery

Offset to start from.

func (*RuleQuery) Only

func (rq *RuleQuery) Only(ctx context.Context) (*Rule, error)

Only returns a single Rule entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Rule entity is found. Returns a *NotFoundError when no Rule entities are found.

func (*RuleQuery) OnlyID

func (rq *RuleQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Rule ID in the query. Returns a *NotSingularError when more than one Rule ID is found. Returns a *NotFoundError when no entities are found.

func (*RuleQuery) OnlyIDX

func (rq *RuleQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RuleQuery) OnlyX

func (rq *RuleQuery) OnlyX(ctx context.Context) *Rule

OnlyX is like Only, but panics if an error occurs.

func (*RuleQuery) Order

func (rq *RuleQuery) Order(o ...rule.OrderOption) *RuleQuery

Order specifies how the records should be ordered.

func (*RuleQuery) Paginate

func (r *RuleQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...RulePaginateOption,
) (*RuleConnection, error)

Paginate executes the query and returns a relay based cursor connection to Rule.

func (*RuleQuery) QueryRuleSections

func (rq *RuleQuery) QueryRuleSections() *RuleSectionQuery

QueryRuleSections chains the current query on the "rule_sections" edge.

func (*RuleQuery) Select

func (rq *RuleQuery) Select(fields ...string) *RuleSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Indx string `json:"index"`
}

client.Rule.Query().
	Select(rule.FieldIndx).
	Scan(ctx, &v)

func (*RuleQuery) Unique

func (rq *RuleQuery) Unique(unique bool) *RuleQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*RuleQuery) Where

func (rq *RuleQuery) Where(ps ...predicate.Rule) *RuleQuery

Where adds a new predicate for the RuleQuery builder.

func (*RuleQuery) WithNamedRuleSections

func (rq *RuleQuery) WithNamedRuleSections(name string, opts ...func(*RuleSectionQuery)) *RuleQuery

WithNamedRuleSections tells the query-builder to eager-load the nodes that are connected to the "rule_sections" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*RuleQuery) WithRuleSections

func (rq *RuleQuery) WithRuleSections(opts ...func(*RuleSectionQuery)) *RuleQuery

WithRuleSections tells the query-builder to eager-load the nodes that are connected to the "rule_sections" edge. The optional arguments are used to configure the query builder of the edge.

type RuleSection

type RuleSection struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Indx holds the value of the "indx" field.
	Indx string `json:"index"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Desc holds the value of the "desc" field.
	Desc string `json:"desc,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the RuleSectionQuery when eager-loading is set.
	Edges RuleSectionEdges `json:"-"`
	// contains filtered or unexported fields
}

RuleSection is the model entity for the RuleSection schema.

func (*RuleSection) IsNode

func (n *RuleSection) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*RuleSection) MarshalJSON

func (rs *RuleSection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*RuleSection) NamedRules

func (rs *RuleSection) NamedRules(name string) ([]*Rule, error)

NamedRules returns the Rules named value or an error if the edge was not loaded in eager-loading with this name.

func (*RuleSection) Node

func (rs *RuleSection) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*RuleSection) QueryRules

func (rs *RuleSection) QueryRules() *RuleQuery

QueryRules queries the "rules" edge of the RuleSection entity.

func (*RuleSection) Rules

func (rs *RuleSection) Rules(ctx context.Context) (result []*Rule, err error)

func (*RuleSection) String

func (rs *RuleSection) String() string

String implements the fmt.Stringer.

func (*RuleSection) ToEdge

func (rs *RuleSection) ToEdge(order *RuleSectionOrder) *RuleSectionEdge

ToEdge converts RuleSection into RuleSectionEdge.

func (*RuleSection) UnmarshalJSON

func (rs *RuleSection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*RuleSection) Unwrap

func (rs *RuleSection) Unwrap() *RuleSection

Unwrap unwraps the RuleSection entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*RuleSection) Update

func (rs *RuleSection) Update() *RuleSectionUpdateOne

Update returns a builder for updating this RuleSection. Note that you need to call RuleSection.Unwrap() before calling this method if this RuleSection was returned from a transaction, and the transaction was committed or rolled back.

func (*RuleSection) Value

func (rs *RuleSection) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the RuleSection. This includes values selected through modifiers, order, etc.

type RuleSectionClient

type RuleSectionClient struct {
	// contains filtered or unexported fields
}

RuleSectionClient is a client for the RuleSection schema.

func NewRuleSectionClient

func NewRuleSectionClient(c config) *RuleSectionClient

NewRuleSectionClient returns a client for the RuleSection from the given config.

func (*RuleSectionClient) Create

func (c *RuleSectionClient) Create() *RuleSectionCreate

Create returns a builder for creating a RuleSection entity.

func (*RuleSectionClient) CreateBulk

func (c *RuleSectionClient) CreateBulk(builders ...*RuleSectionCreate) *RuleSectionCreateBulk

CreateBulk returns a builder for creating a bulk of RuleSection entities.

func (*RuleSectionClient) Delete

func (c *RuleSectionClient) Delete() *RuleSectionDelete

Delete returns a delete builder for RuleSection.

func (*RuleSectionClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*RuleSectionClient) DeleteOneID

func (c *RuleSectionClient) DeleteOneID(id int) *RuleSectionDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*RuleSectionClient) Get

func (c *RuleSectionClient) Get(ctx context.Context, id int) (*RuleSection, error)

Get returns a RuleSection entity by its id.

func (*RuleSectionClient) GetX

func (c *RuleSectionClient) GetX(ctx context.Context, id int) *RuleSection

GetX is like Get, but panics if an error occurs.

func (*RuleSectionClient) Hooks

func (c *RuleSectionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*RuleSectionClient) Intercept

func (c *RuleSectionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `rulesection.Intercept(f(g(h())))`.

func (*RuleSectionClient) Interceptors

func (c *RuleSectionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*RuleSectionClient) Query

func (c *RuleSectionClient) Query() *RuleSectionQuery

Query returns a query builder for RuleSection.

func (*RuleSectionClient) QueryRules

func (c *RuleSectionClient) QueryRules(rs *RuleSection) *RuleQuery

QueryRules queries the rules edge of a RuleSection.

func (*RuleSectionClient) Update

func (c *RuleSectionClient) Update() *RuleSectionUpdate

Update returns an update builder for RuleSection.

func (*RuleSectionClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*RuleSectionClient) UpdateOneID

func (c *RuleSectionClient) UpdateOneID(id int) *RuleSectionUpdateOne

UpdateOneID returns an update builder for the given id.

func (*RuleSectionClient) Use

func (c *RuleSectionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `rulesection.Hooks(f(g(h())))`.

type RuleSectionConnection

type RuleSectionConnection struct {
	Edges      []*RuleSectionEdge `json:"edges"`
	PageInfo   PageInfo           `json:"pageInfo"`
	TotalCount int                `json:"totalCount"`
}

RuleSectionConnection is the connection containing edges to RuleSection.

type RuleSectionCreate

type RuleSectionCreate struct {
	// contains filtered or unexported fields
}

RuleSectionCreate is the builder for creating a RuleSection entity.

func (*RuleSectionCreate) AddRuleIDs

func (rsc *RuleSectionCreate) AddRuleIDs(ids ...int) *RuleSectionCreate

AddRuleIDs adds the "rules" edge to the Rule entity by IDs.

func (*RuleSectionCreate) AddRules

func (rsc *RuleSectionCreate) AddRules(r ...*Rule) *RuleSectionCreate

AddRules adds the "rules" edges to the Rule entity.

func (*RuleSectionCreate) Exec

func (rsc *RuleSectionCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RuleSectionCreate) ExecX

func (rsc *RuleSectionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RuleSectionCreate) Mutation

func (rsc *RuleSectionCreate) Mutation() *RuleSectionMutation

Mutation returns the RuleSectionMutation object of the builder.

func (*RuleSectionCreate) Save

func (rsc *RuleSectionCreate) Save(ctx context.Context) (*RuleSection, error)

Save creates the RuleSection in the database.

func (*RuleSectionCreate) SaveX

func (rsc *RuleSectionCreate) SaveX(ctx context.Context) *RuleSection

SaveX calls Save and panics if Save returns an error.

func (*RuleSectionCreate) SetDesc

func (rsc *RuleSectionCreate) SetDesc(s string) *RuleSectionCreate

SetDesc sets the "desc" field.

func (*RuleSectionCreate) SetIndx

func (rsc *RuleSectionCreate) SetIndx(s string) *RuleSectionCreate

SetIndx sets the "indx" field.

func (*RuleSectionCreate) SetName

func (rsc *RuleSectionCreate) SetName(s string) *RuleSectionCreate

SetName sets the "name" field.

func (*RuleSectionCreate) SetRuleSection

func (rsc *RuleSectionCreate) SetRuleSection(input *RuleSection) *RuleSectionCreate

type RuleSectionCreateBulk

type RuleSectionCreateBulk struct {
	// contains filtered or unexported fields
}

RuleSectionCreateBulk is the builder for creating many RuleSection entities in bulk.

func (*RuleSectionCreateBulk) Exec

func (rscb *RuleSectionCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RuleSectionCreateBulk) ExecX

func (rscb *RuleSectionCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RuleSectionCreateBulk) Save

func (rscb *RuleSectionCreateBulk) Save(ctx context.Context) ([]*RuleSection, error)

Save creates the RuleSection entities in the database.

func (*RuleSectionCreateBulk) SaveX

func (rscb *RuleSectionCreateBulk) SaveX(ctx context.Context) []*RuleSection

SaveX is like Save, but panics if an error occurs.

type RuleSectionDelete

type RuleSectionDelete struct {
	// contains filtered or unexported fields
}

RuleSectionDelete is the builder for deleting a RuleSection entity.

func (*RuleSectionDelete) Exec

func (rsd *RuleSectionDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*RuleSectionDelete) ExecX

func (rsd *RuleSectionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*RuleSectionDelete) Where

Where appends a list predicates to the RuleSectionDelete builder.

type RuleSectionDeleteOne

type RuleSectionDeleteOne struct {
	// contains filtered or unexported fields
}

RuleSectionDeleteOne is the builder for deleting a single RuleSection entity.

func (*RuleSectionDeleteOne) Exec

func (rsdo *RuleSectionDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RuleSectionDeleteOne) ExecX

func (rsdo *RuleSectionDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RuleSectionDeleteOne) Where

Where appends a list predicates to the RuleSectionDelete builder.

type RuleSectionEdge

type RuleSectionEdge struct {
	Node   *RuleSection `json:"node"`
	Cursor Cursor       `json:"cursor"`
}

RuleSectionEdge is the edge representation of RuleSection.

type RuleSectionEdges

type RuleSectionEdges struct {
	// Rules holds the value of the rules edge.
	Rules []*Rule `json:"rules,omitempty"`
	// contains filtered or unexported fields
}

RuleSectionEdges holds the relations/edges for other nodes in the graph.

func (RuleSectionEdges) RulesOrErr

func (e RuleSectionEdges) RulesOrErr() ([]*Rule, error)

RulesOrErr returns the Rules value or an error if the edge was not loaded in eager-loading.

type RuleSectionGroupBy

type RuleSectionGroupBy struct {
	// contains filtered or unexported fields
}

RuleSectionGroupBy is the group-by builder for RuleSection entities.

func (*RuleSectionGroupBy) Aggregate

func (rsgb *RuleSectionGroupBy) Aggregate(fns ...AggregateFunc) *RuleSectionGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*RuleSectionGroupBy) Bool

func (s *RuleSectionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RuleSectionGroupBy) BoolX

func (s *RuleSectionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RuleSectionGroupBy) Bools

func (s *RuleSectionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RuleSectionGroupBy) BoolsX

func (s *RuleSectionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RuleSectionGroupBy) Float64

func (s *RuleSectionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RuleSectionGroupBy) Float64X

func (s *RuleSectionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RuleSectionGroupBy) Float64s

func (s *RuleSectionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RuleSectionGroupBy) Float64sX

func (s *RuleSectionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RuleSectionGroupBy) Int

func (s *RuleSectionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RuleSectionGroupBy) IntX

func (s *RuleSectionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RuleSectionGroupBy) Ints

func (s *RuleSectionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RuleSectionGroupBy) IntsX

func (s *RuleSectionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RuleSectionGroupBy) Scan

func (rsgb *RuleSectionGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RuleSectionGroupBy) ScanX

func (s *RuleSectionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RuleSectionGroupBy) String

func (s *RuleSectionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RuleSectionGroupBy) StringX

func (s *RuleSectionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RuleSectionGroupBy) Strings

func (s *RuleSectionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RuleSectionGroupBy) StringsX

func (s *RuleSectionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RuleSectionMutation

type RuleSectionMutation struct {
	// contains filtered or unexported fields
}

RuleSectionMutation represents an operation that mutates the RuleSection nodes in the graph.

func (*RuleSectionMutation) AddField

func (m *RuleSectionMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*RuleSectionMutation) AddRuleIDs

func (m *RuleSectionMutation) AddRuleIDs(ids ...int)

AddRuleIDs adds the "rules" edge to the Rule entity by ids.

func (*RuleSectionMutation) AddedEdges

func (m *RuleSectionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*RuleSectionMutation) AddedField

func (m *RuleSectionMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*RuleSectionMutation) AddedFields

func (m *RuleSectionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*RuleSectionMutation) AddedIDs

func (m *RuleSectionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*RuleSectionMutation) ClearEdge

func (m *RuleSectionMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*RuleSectionMutation) ClearField

func (m *RuleSectionMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*RuleSectionMutation) ClearRules

func (m *RuleSectionMutation) ClearRules()

ClearRules clears the "rules" edge to the Rule entity.

func (*RuleSectionMutation) ClearedEdges

func (m *RuleSectionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RuleSectionMutation) ClearedFields

func (m *RuleSectionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RuleSectionMutation) Client

func (m RuleSectionMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*RuleSectionMutation) Desc

func (m *RuleSectionMutation) Desc() (r string, exists bool)

Desc returns the value of the "desc" field in the mutation.

func (*RuleSectionMutation) EdgeCleared

func (m *RuleSectionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*RuleSectionMutation) Field

func (m *RuleSectionMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*RuleSectionMutation) FieldCleared

func (m *RuleSectionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*RuleSectionMutation) Fields

func (m *RuleSectionMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*RuleSectionMutation) ID

func (m *RuleSectionMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*RuleSectionMutation) IDs

func (m *RuleSectionMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*RuleSectionMutation) Indx

func (m *RuleSectionMutation) Indx() (r string, exists bool)

Indx returns the value of the "indx" field in the mutation.

func (*RuleSectionMutation) Name

func (m *RuleSectionMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*RuleSectionMutation) OldDesc

func (m *RuleSectionMutation) OldDesc(ctx context.Context) (v string, err error)

OldDesc returns the old "desc" field's value of the RuleSection entity. If the RuleSection object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RuleSectionMutation) OldField

func (m *RuleSectionMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*RuleSectionMutation) OldIndx

func (m *RuleSectionMutation) OldIndx(ctx context.Context) (v string, err error)

OldIndx returns the old "indx" field's value of the RuleSection entity. If the RuleSection object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RuleSectionMutation) OldName

func (m *RuleSectionMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the RuleSection entity. If the RuleSection object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RuleSectionMutation) Op

func (m *RuleSectionMutation) Op() Op

Op returns the operation name.

func (*RuleSectionMutation) RemoveRuleIDs

func (m *RuleSectionMutation) RemoveRuleIDs(ids ...int)

RemoveRuleIDs removes the "rules" edge to the Rule entity by IDs.

func (*RuleSectionMutation) RemovedEdges

func (m *RuleSectionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RuleSectionMutation) RemovedIDs

func (m *RuleSectionMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*RuleSectionMutation) RemovedRulesIDs

func (m *RuleSectionMutation) RemovedRulesIDs() (ids []int)

RemovedRules returns the removed IDs of the "rules" edge to the Rule entity.

func (*RuleSectionMutation) ResetDesc

func (m *RuleSectionMutation) ResetDesc()

ResetDesc resets all changes to the "desc" field.

func (*RuleSectionMutation) ResetEdge

func (m *RuleSectionMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*RuleSectionMutation) ResetField

func (m *RuleSectionMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*RuleSectionMutation) ResetIndx

func (m *RuleSectionMutation) ResetIndx()

ResetIndx resets all changes to the "indx" field.

func (*RuleSectionMutation) ResetName

func (m *RuleSectionMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*RuleSectionMutation) ResetRules

func (m *RuleSectionMutation) ResetRules()

ResetRules resets all changes to the "rules" edge.

func (*RuleSectionMutation) RulesCleared

func (m *RuleSectionMutation) RulesCleared() bool

RulesCleared reports if the "rules" edge to the Rule entity was cleared.

func (*RuleSectionMutation) RulesIDs

func (m *RuleSectionMutation) RulesIDs() (ids []int)

RulesIDs returns the "rules" edge IDs in the mutation.

func (*RuleSectionMutation) SetDesc

func (m *RuleSectionMutation) SetDesc(s string)

SetDesc sets the "desc" field.

func (*RuleSectionMutation) SetField

func (m *RuleSectionMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*RuleSectionMutation) SetIndx

func (m *RuleSectionMutation) SetIndx(s string)

SetIndx sets the "indx" field.

func (*RuleSectionMutation) SetName

func (m *RuleSectionMutation) SetName(s string)

SetName sets the "name" field.

func (*RuleSectionMutation) SetOp

func (m *RuleSectionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (RuleSectionMutation) Tx

func (m RuleSectionMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RuleSectionMutation) Type

func (m *RuleSectionMutation) Type() string

Type returns the node type of this mutation (RuleSection).

func (*RuleSectionMutation) Where

func (m *RuleSectionMutation) Where(ps ...predicate.RuleSection)

Where appends a list predicates to the RuleSectionMutation builder.

func (*RuleSectionMutation) WhereP

func (m *RuleSectionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the RuleSectionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type RuleSectionOrder

type RuleSectionOrder struct {
	Direction OrderDirection         `json:"direction"`
	Field     *RuleSectionOrderField `json:"field"`
}

RuleSectionOrder defines the ordering of RuleSection.

type RuleSectionOrderField

type RuleSectionOrderField struct {
	// Value extracts the ordering value from the given RuleSection.
	Value func(*RuleSection) (ent.Value, error)
	// contains filtered or unexported fields
}

RuleSectionOrderField defines the ordering field of RuleSection.

func (RuleSectionOrderField) MarshalGQL

func (f RuleSectionOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (RuleSectionOrderField) String

func (f RuleSectionOrderField) String() string

String implement fmt.Stringer interface.

func (*RuleSectionOrderField) UnmarshalGQL

func (f *RuleSectionOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type RuleSectionPaginateOption

type RuleSectionPaginateOption func(*rulesectionPager) error

RuleSectionPaginateOption enables pagination customization.

func WithRuleSectionFilter

func WithRuleSectionFilter(filter func(*RuleSectionQuery) (*RuleSectionQuery, error)) RuleSectionPaginateOption

WithRuleSectionFilter configures pagination filter.

func WithRuleSectionOrder

func WithRuleSectionOrder(order *RuleSectionOrder) RuleSectionPaginateOption

WithRuleSectionOrder configures pagination ordering.

type RuleSectionQuery

type RuleSectionQuery struct {
	// contains filtered or unexported fields
}

RuleSectionQuery is the builder for querying RuleSection entities.

func (*RuleSectionQuery) Aggregate

func (rsq *RuleSectionQuery) Aggregate(fns ...AggregateFunc) *RuleSectionSelect

Aggregate returns a RuleSectionSelect configured with the given aggregations.

func (*RuleSectionQuery) All

func (rsq *RuleSectionQuery) All(ctx context.Context) ([]*RuleSection, error)

All executes the query and returns a list of RuleSections.

func (*RuleSectionQuery) AllX

func (rsq *RuleSectionQuery) AllX(ctx context.Context) []*RuleSection

AllX is like All, but panics if an error occurs.

func (*RuleSectionQuery) Clone

func (rsq *RuleSectionQuery) Clone() *RuleSectionQuery

Clone returns a duplicate of the RuleSectionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*RuleSectionQuery) CollectFields

func (rs *RuleSectionQuery) CollectFields(ctx context.Context, satisfies ...string) (*RuleSectionQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*RuleSectionQuery) Count

func (rsq *RuleSectionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RuleSectionQuery) CountX

func (rsq *RuleSectionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RuleSectionQuery) Exist

func (rsq *RuleSectionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RuleSectionQuery) ExistX

func (rsq *RuleSectionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RuleSectionQuery) First

func (rsq *RuleSectionQuery) First(ctx context.Context) (*RuleSection, error)

First returns the first RuleSection entity from the query. Returns a *NotFoundError when no RuleSection was found.

func (*RuleSectionQuery) FirstID

func (rsq *RuleSectionQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first RuleSection ID from the query. Returns a *NotFoundError when no RuleSection ID was found.

func (*RuleSectionQuery) FirstIDX

func (rsq *RuleSectionQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*RuleSectionQuery) FirstX

func (rsq *RuleSectionQuery) FirstX(ctx context.Context) *RuleSection

FirstX is like First, but panics if an error occurs.

func (*RuleSectionQuery) GroupBy

func (rsq *RuleSectionQuery) GroupBy(field string, fields ...string) *RuleSectionGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Indx string `json:"index"`
	Count int `json:"count,omitempty"`
}

client.RuleSection.Query().
	GroupBy(rulesection.FieldIndx).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RuleSectionQuery) IDs

func (rsq *RuleSectionQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of RuleSection IDs.

func (*RuleSectionQuery) IDsX

func (rsq *RuleSectionQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*RuleSectionQuery) Limit

func (rsq *RuleSectionQuery) Limit(limit int) *RuleSectionQuery

Limit the number of records to be returned by this query.

func (*RuleSectionQuery) Offset

func (rsq *RuleSectionQuery) Offset(offset int) *RuleSectionQuery

Offset to start from.

func (*RuleSectionQuery) Only

func (rsq *RuleSectionQuery) Only(ctx context.Context) (*RuleSection, error)

Only returns a single RuleSection entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one RuleSection entity is found. Returns a *NotFoundError when no RuleSection entities are found.

func (*RuleSectionQuery) OnlyID

func (rsq *RuleSectionQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only RuleSection ID in the query. Returns a *NotSingularError when more than one RuleSection ID is found. Returns a *NotFoundError when no entities are found.

func (*RuleSectionQuery) OnlyIDX

func (rsq *RuleSectionQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RuleSectionQuery) OnlyX

func (rsq *RuleSectionQuery) OnlyX(ctx context.Context) *RuleSection

OnlyX is like Only, but panics if an error occurs.

func (*RuleSectionQuery) Order

Order specifies how the records should be ordered.

func (*RuleSectionQuery) Paginate

func (rs *RuleSectionQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...RuleSectionPaginateOption,
) (*RuleSectionConnection, error)

Paginate executes the query and returns a relay based cursor connection to RuleSection.

func (*RuleSectionQuery) QueryRules

func (rsq *RuleSectionQuery) QueryRules() *RuleQuery

QueryRules chains the current query on the "rules" edge.

func (*RuleSectionQuery) Select

func (rsq *RuleSectionQuery) Select(fields ...string) *RuleSectionSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Indx string `json:"index"`
}

client.RuleSection.Query().
	Select(rulesection.FieldIndx).
	Scan(ctx, &v)

func (*RuleSectionQuery) Unique

func (rsq *RuleSectionQuery) Unique(unique bool) *RuleSectionQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*RuleSectionQuery) Where

Where adds a new predicate for the RuleSectionQuery builder.

func (*RuleSectionQuery) WithNamedRules

func (rsq *RuleSectionQuery) WithNamedRules(name string, opts ...func(*RuleQuery)) *RuleSectionQuery

WithNamedRules tells the query-builder to eager-load the nodes that are connected to the "rules" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*RuleSectionQuery) WithRules

func (rsq *RuleSectionQuery) WithRules(opts ...func(*RuleQuery)) *RuleSectionQuery

WithRules tells the query-builder to eager-load the nodes that are connected to the "rules" edge. The optional arguments are used to configure the query builder of the edge.

type RuleSectionSelect

type RuleSectionSelect struct {
	*RuleSectionQuery
	// contains filtered or unexported fields
}

RuleSectionSelect is the builder for selecting fields of RuleSection entities.

func (*RuleSectionSelect) Aggregate

func (rss *RuleSectionSelect) Aggregate(fns ...AggregateFunc) *RuleSectionSelect

Aggregate adds the given aggregation functions to the selector query.

func (*RuleSectionSelect) Bool

func (s *RuleSectionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RuleSectionSelect) BoolX

func (s *RuleSectionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RuleSectionSelect) Bools

func (s *RuleSectionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RuleSectionSelect) BoolsX

func (s *RuleSectionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RuleSectionSelect) Float64

func (s *RuleSectionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RuleSectionSelect) Float64X

func (s *RuleSectionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RuleSectionSelect) Float64s

func (s *RuleSectionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RuleSectionSelect) Float64sX

func (s *RuleSectionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RuleSectionSelect) Int

func (s *RuleSectionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RuleSectionSelect) IntX

func (s *RuleSectionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RuleSectionSelect) Ints

func (s *RuleSectionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RuleSectionSelect) IntsX

func (s *RuleSectionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RuleSectionSelect) Scan

func (rss *RuleSectionSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RuleSectionSelect) ScanX

func (s *RuleSectionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RuleSectionSelect) String

func (s *RuleSectionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RuleSectionSelect) StringX

func (s *RuleSectionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RuleSectionSelect) Strings

func (s *RuleSectionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RuleSectionSelect) StringsX

func (s *RuleSectionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RuleSectionUpdate

type RuleSectionUpdate struct {
	// contains filtered or unexported fields
}

RuleSectionUpdate is the builder for updating RuleSection entities.

func (*RuleSectionUpdate) AddRuleIDs

func (rsu *RuleSectionUpdate) AddRuleIDs(ids ...int) *RuleSectionUpdate

AddRuleIDs adds the "rules" edge to the Rule entity by IDs.

func (*RuleSectionUpdate) AddRules

func (rsu *RuleSectionUpdate) AddRules(r ...*Rule) *RuleSectionUpdate

AddRules adds the "rules" edges to the Rule entity.

func (*RuleSectionUpdate) ClearRules

func (rsu *RuleSectionUpdate) ClearRules() *RuleSectionUpdate

ClearRules clears all "rules" edges to the Rule entity.

func (*RuleSectionUpdate) Exec

func (rsu *RuleSectionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RuleSectionUpdate) ExecX

func (rsu *RuleSectionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RuleSectionUpdate) Mutation

func (rsu *RuleSectionUpdate) Mutation() *RuleSectionMutation

Mutation returns the RuleSectionMutation object of the builder.

func (*RuleSectionUpdate) RemoveRuleIDs

func (rsu *RuleSectionUpdate) RemoveRuleIDs(ids ...int) *RuleSectionUpdate

RemoveRuleIDs removes the "rules" edge to Rule entities by IDs.

func (*RuleSectionUpdate) RemoveRules

func (rsu *RuleSectionUpdate) RemoveRules(r ...*Rule) *RuleSectionUpdate

RemoveRules removes "rules" edges to Rule entities.

func (*RuleSectionUpdate) Save

func (rsu *RuleSectionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*RuleSectionUpdate) SaveX

func (rsu *RuleSectionUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RuleSectionUpdate) SetDesc

func (rsu *RuleSectionUpdate) SetDesc(s string) *RuleSectionUpdate

SetDesc sets the "desc" field.

func (*RuleSectionUpdate) SetIndx

func (rsu *RuleSectionUpdate) SetIndx(s string) *RuleSectionUpdate

SetIndx sets the "indx" field.

func (*RuleSectionUpdate) SetName

func (rsu *RuleSectionUpdate) SetName(s string) *RuleSectionUpdate

SetName sets the "name" field.

func (*RuleSectionUpdate) Where

Where appends a list predicates to the RuleSectionUpdate builder.

type RuleSectionUpdateOne

type RuleSectionUpdateOne struct {
	// contains filtered or unexported fields
}

RuleSectionUpdateOne is the builder for updating a single RuleSection entity.

func (*RuleSectionUpdateOne) AddRuleIDs

func (rsuo *RuleSectionUpdateOne) AddRuleIDs(ids ...int) *RuleSectionUpdateOne

AddRuleIDs adds the "rules" edge to the Rule entity by IDs.

func (*RuleSectionUpdateOne) AddRules

func (rsuo *RuleSectionUpdateOne) AddRules(r ...*Rule) *RuleSectionUpdateOne

AddRules adds the "rules" edges to the Rule entity.

func (*RuleSectionUpdateOne) ClearRules

func (rsuo *RuleSectionUpdateOne) ClearRules() *RuleSectionUpdateOne

ClearRules clears all "rules" edges to the Rule entity.

func (*RuleSectionUpdateOne) Exec

func (rsuo *RuleSectionUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RuleSectionUpdateOne) ExecX

func (rsuo *RuleSectionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RuleSectionUpdateOne) Mutation

func (rsuo *RuleSectionUpdateOne) Mutation() *RuleSectionMutation

Mutation returns the RuleSectionMutation object of the builder.

func (*RuleSectionUpdateOne) RemoveRuleIDs

func (rsuo *RuleSectionUpdateOne) RemoveRuleIDs(ids ...int) *RuleSectionUpdateOne

RemoveRuleIDs removes the "rules" edge to Rule entities by IDs.

func (*RuleSectionUpdateOne) RemoveRules

func (rsuo *RuleSectionUpdateOne) RemoveRules(r ...*Rule) *RuleSectionUpdateOne

RemoveRules removes "rules" edges to Rule entities.

func (*RuleSectionUpdateOne) Save

Save executes the query and returns the updated RuleSection entity.

func (*RuleSectionUpdateOne) SaveX

func (rsuo *RuleSectionUpdateOne) SaveX(ctx context.Context) *RuleSection

SaveX is like Save, but panics if an error occurs.

func (*RuleSectionUpdateOne) Select

func (rsuo *RuleSectionUpdateOne) Select(field string, fields ...string) *RuleSectionUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*RuleSectionUpdateOne) SetDesc

SetDesc sets the "desc" field.

func (*RuleSectionUpdateOne) SetIndx

SetIndx sets the "indx" field.

func (*RuleSectionUpdateOne) SetName

SetName sets the "name" field.

func (*RuleSectionUpdateOne) Where

Where appends a list predicates to the RuleSectionUpdate builder.

type RuleSectionWhereInput

type RuleSectionWhereInput struct {
	Predicates []predicate.RuleSection  `json:"-"`
	Not        *RuleSectionWhereInput   `json:"not,omitempty"`
	Or         []*RuleSectionWhereInput `json:"or,omitempty"`
	And        []*RuleSectionWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "indx" field predicates.
	Indx             *string  `json:"indx,omitempty"`
	IndxNEQ          *string  `json:"indxNEQ,omitempty"`
	IndxIn           []string `json:"indxIn,omitempty"`
	IndxNotIn        []string `json:"indxNotIn,omitempty"`
	IndxGT           *string  `json:"indxGT,omitempty"`
	IndxGTE          *string  `json:"indxGTE,omitempty"`
	IndxLT           *string  `json:"indxLT,omitempty"`
	IndxLTE          *string  `json:"indxLTE,omitempty"`
	IndxContains     *string  `json:"indxContains,omitempty"`
	IndxHasPrefix    *string  `json:"indxHasPrefix,omitempty"`
	IndxHasSuffix    *string  `json:"indxHasSuffix,omitempty"`
	IndxEqualFold    *string  `json:"indxEqualFold,omitempty"`
	IndxContainsFold *string  `json:"indxContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "desc" field predicates.
	Desc             *string  `json:"desc,omitempty"`
	DescNEQ          *string  `json:"descNEQ,omitempty"`
	DescIn           []string `json:"descIn,omitempty"`
	DescNotIn        []string `json:"descNotIn,omitempty"`
	DescGT           *string  `json:"descGT,omitempty"`
	DescGTE          *string  `json:"descGTE,omitempty"`
	DescLT           *string  `json:"descLT,omitempty"`
	DescLTE          *string  `json:"descLTE,omitempty"`
	DescContains     *string  `json:"descContains,omitempty"`
	DescHasPrefix    *string  `json:"descHasPrefix,omitempty"`
	DescHasSuffix    *string  `json:"descHasSuffix,omitempty"`
	DescEqualFold    *string  `json:"descEqualFold,omitempty"`
	DescContainsFold *string  `json:"descContainsFold,omitempty"`

	// "rules" edge predicates.
	HasRules     *bool             `json:"hasRules,omitempty"`
	HasRulesWith []*RuleWhereInput `json:"hasRulesWith,omitempty"`
}

RuleSectionWhereInput represents a where input for filtering RuleSection queries.

func (*RuleSectionWhereInput) AddPredicates

func (i *RuleSectionWhereInput) AddPredicates(predicates ...predicate.RuleSection)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*RuleSectionWhereInput) Filter

Filter applies the RuleSectionWhereInput filter on the RuleSectionQuery builder.

func (*RuleSectionWhereInput) P

P returns a predicate for filtering rulesections. An error is returned if the input is empty or invalid.

type RuleSections

type RuleSections []*RuleSection

RuleSections is a parsable slice of RuleSection.

type RuleSelect

type RuleSelect struct {
	*RuleQuery
	// contains filtered or unexported fields
}

RuleSelect is the builder for selecting fields of Rule entities.

func (*RuleSelect) Aggregate

func (rs *RuleSelect) Aggregate(fns ...AggregateFunc) *RuleSelect

Aggregate adds the given aggregation functions to the selector query.

func (*RuleSelect) Bool

func (s *RuleSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RuleSelect) BoolX

func (s *RuleSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RuleSelect) Bools

func (s *RuleSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RuleSelect) BoolsX

func (s *RuleSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RuleSelect) Float64

func (s *RuleSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RuleSelect) Float64X

func (s *RuleSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RuleSelect) Float64s

func (s *RuleSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RuleSelect) Float64sX

func (s *RuleSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RuleSelect) Int

func (s *RuleSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RuleSelect) IntX

func (s *RuleSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RuleSelect) Ints

func (s *RuleSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RuleSelect) IntsX

func (s *RuleSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RuleSelect) Scan

func (rs *RuleSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RuleSelect) ScanX

func (s *RuleSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RuleSelect) String

func (s *RuleSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RuleSelect) StringX

func (s *RuleSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RuleSelect) Strings

func (s *RuleSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RuleSelect) StringsX

func (s *RuleSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RuleUpdate

type RuleUpdate struct {
	// contains filtered or unexported fields
}

RuleUpdate is the builder for updating Rule entities.

func (*RuleUpdate) AddRuleSectionIDs

func (ru *RuleUpdate) AddRuleSectionIDs(ids ...int) *RuleUpdate

AddRuleSectionIDs adds the "rule_sections" edge to the RuleSection entity by IDs.

func (*RuleUpdate) AddRuleSections

func (ru *RuleUpdate) AddRuleSections(r ...*RuleSection) *RuleUpdate

AddRuleSections adds the "rule_sections" edges to the RuleSection entity.

func (*RuleUpdate) ClearRuleSections

func (ru *RuleUpdate) ClearRuleSections() *RuleUpdate

ClearRuleSections clears all "rule_sections" edges to the RuleSection entity.

func (*RuleUpdate) Exec

func (ru *RuleUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RuleUpdate) ExecX

func (ru *RuleUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RuleUpdate) Mutation

func (ru *RuleUpdate) Mutation() *RuleMutation

Mutation returns the RuleMutation object of the builder.

func (*RuleUpdate) RemoveRuleSectionIDs

func (ru *RuleUpdate) RemoveRuleSectionIDs(ids ...int) *RuleUpdate

RemoveRuleSectionIDs removes the "rule_sections" edge to RuleSection entities by IDs.

func (*RuleUpdate) RemoveRuleSections

func (ru *RuleUpdate) RemoveRuleSections(r ...*RuleSection) *RuleUpdate

RemoveRuleSections removes "rule_sections" edges to RuleSection entities.

func (*RuleUpdate) Save

func (ru *RuleUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*RuleUpdate) SaveX

func (ru *RuleUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RuleUpdate) SetDesc

func (ru *RuleUpdate) SetDesc(s string) *RuleUpdate

SetDesc sets the "desc" field.

func (*RuleUpdate) SetIndx

func (ru *RuleUpdate) SetIndx(s string) *RuleUpdate

SetIndx sets the "indx" field.

func (*RuleUpdate) SetName

func (ru *RuleUpdate) SetName(s string) *RuleUpdate

SetName sets the "name" field.

func (*RuleUpdate) Where

func (ru *RuleUpdate) Where(ps ...predicate.Rule) *RuleUpdate

Where appends a list predicates to the RuleUpdate builder.

type RuleUpdateOne

type RuleUpdateOne struct {
	// contains filtered or unexported fields
}

RuleUpdateOne is the builder for updating a single Rule entity.

func (*RuleUpdateOne) AddRuleSectionIDs

func (ruo *RuleUpdateOne) AddRuleSectionIDs(ids ...int) *RuleUpdateOne

AddRuleSectionIDs adds the "rule_sections" edge to the RuleSection entity by IDs.

func (*RuleUpdateOne) AddRuleSections

func (ruo *RuleUpdateOne) AddRuleSections(r ...*RuleSection) *RuleUpdateOne

AddRuleSections adds the "rule_sections" edges to the RuleSection entity.

func (*RuleUpdateOne) ClearRuleSections

func (ruo *RuleUpdateOne) ClearRuleSections() *RuleUpdateOne

ClearRuleSections clears all "rule_sections" edges to the RuleSection entity.

func (*RuleUpdateOne) Exec

func (ruo *RuleUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RuleUpdateOne) ExecX

func (ruo *RuleUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RuleUpdateOne) Mutation

func (ruo *RuleUpdateOne) Mutation() *RuleMutation

Mutation returns the RuleMutation object of the builder.

func (*RuleUpdateOne) RemoveRuleSectionIDs

func (ruo *RuleUpdateOne) RemoveRuleSectionIDs(ids ...int) *RuleUpdateOne

RemoveRuleSectionIDs removes the "rule_sections" edge to RuleSection entities by IDs.

func (*RuleUpdateOne) RemoveRuleSections

func (ruo *RuleUpdateOne) RemoveRuleSections(r ...*RuleSection) *RuleUpdateOne

RemoveRuleSections removes "rule_sections" edges to RuleSection entities.

func (*RuleUpdateOne) Save

func (ruo *RuleUpdateOne) Save(ctx context.Context) (*Rule, error)

Save executes the query and returns the updated Rule entity.

func (*RuleUpdateOne) SaveX

func (ruo *RuleUpdateOne) SaveX(ctx context.Context) *Rule

SaveX is like Save, but panics if an error occurs.

func (*RuleUpdateOne) Select

func (ruo *RuleUpdateOne) Select(field string, fields ...string) *RuleUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*RuleUpdateOne) SetDesc

func (ruo *RuleUpdateOne) SetDesc(s string) *RuleUpdateOne

SetDesc sets the "desc" field.

func (*RuleUpdateOne) SetIndx

func (ruo *RuleUpdateOne) SetIndx(s string) *RuleUpdateOne

SetIndx sets the "indx" field.

func (*RuleUpdateOne) SetName

func (ruo *RuleUpdateOne) SetName(s string) *RuleUpdateOne

SetName sets the "name" field.

func (*RuleUpdateOne) Where

func (ruo *RuleUpdateOne) Where(ps ...predicate.Rule) *RuleUpdateOne

Where appends a list predicates to the RuleUpdate builder.

type RuleWhereInput

type RuleWhereInput struct {
	Predicates []predicate.Rule  `json:"-"`
	Not        *RuleWhereInput   `json:"not,omitempty"`
	Or         []*RuleWhereInput `json:"or,omitempty"`
	And        []*RuleWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "indx" field predicates.
	Indx             *string  `json:"indx,omitempty"`
	IndxNEQ          *string  `json:"indxNEQ,omitempty"`
	IndxIn           []string `json:"indxIn,omitempty"`
	IndxNotIn        []string `json:"indxNotIn,omitempty"`
	IndxGT           *string  `json:"indxGT,omitempty"`
	IndxGTE          *string  `json:"indxGTE,omitempty"`
	IndxLT           *string  `json:"indxLT,omitempty"`
	IndxLTE          *string  `json:"indxLTE,omitempty"`
	IndxContains     *string  `json:"indxContains,omitempty"`
	IndxHasPrefix    *string  `json:"indxHasPrefix,omitempty"`
	IndxHasSuffix    *string  `json:"indxHasSuffix,omitempty"`
	IndxEqualFold    *string  `json:"indxEqualFold,omitempty"`
	IndxContainsFold *string  `json:"indxContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "desc" field predicates.
	Desc             *string  `json:"desc,omitempty"`
	DescNEQ          *string  `json:"descNEQ,omitempty"`
	DescIn           []string `json:"descIn,omitempty"`
	DescNotIn        []string `json:"descNotIn,omitempty"`
	DescGT           *string  `json:"descGT,omitempty"`
	DescGTE          *string  `json:"descGTE,omitempty"`
	DescLT           *string  `json:"descLT,omitempty"`
	DescLTE          *string  `json:"descLTE,omitempty"`
	DescContains     *string  `json:"descContains,omitempty"`
	DescHasPrefix    *string  `json:"descHasPrefix,omitempty"`
	DescHasSuffix    *string  `json:"descHasSuffix,omitempty"`
	DescEqualFold    *string  `json:"descEqualFold,omitempty"`
	DescContainsFold *string  `json:"descContainsFold,omitempty"`

	// "rule_sections" edge predicates.
	HasRuleSections     *bool                    `json:"hasRuleSections,omitempty"`
	HasRuleSectionsWith []*RuleSectionWhereInput `json:"hasRuleSectionsWith,omitempty"`
}

RuleWhereInput represents a where input for filtering Rule queries.

func (*RuleWhereInput) AddPredicates

func (i *RuleWhereInput) AddPredicates(predicates ...predicate.Rule)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*RuleWhereInput) Filter

func (i *RuleWhereInput) Filter(q *RuleQuery) (*RuleQuery, error)

Filter applies the RuleWhereInput filter on the RuleQuery builder.

func (*RuleWhereInput) P

func (i *RuleWhereInput) P() (predicate.Rule, error)

P returns a predicate for filtering rules. An error is returned if the input is empty or invalid.

type Rules

type Rules []*Rule

Rules is a parsable slice of Rule.

type Skill

type Skill struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Indx holds the value of the "indx" field.
	Indx string `json:"index"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Desc holds the value of the "desc" field.
	Desc []string `json:"desc,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SkillQuery when eager-loading is set.
	Edges SkillEdges `json:"-"`
	// contains filtered or unexported fields
}

Skill is the model entity for the Skill schema.

func (*Skill) AbilityScore

func (s *Skill) AbilityScore(ctx context.Context) (*AbilityScore, error)

func (*Skill) IsNode

func (n *Skill) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Skill) MarshalJSON

func (s *Skill) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Skill) Node

func (s *Skill) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*Skill) QueryAbilityScore

func (s *Skill) QueryAbilityScore() *AbilityScoreQuery

QueryAbilityScore queries the "ability_score" edge of the Skill entity.

func (*Skill) String

func (s *Skill) String() string

String implements the fmt.Stringer.

func (*Skill) ToEdge

func (s *Skill) ToEdge(order *SkillOrder) *SkillEdge

ToEdge converts Skill into SkillEdge.

func (*Skill) UnmarshalJSON

func (s *Skill) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*Skill) Unwrap

func (s *Skill) Unwrap() *Skill

Unwrap unwraps the Skill entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Skill) Update

func (s *Skill) Update() *SkillUpdateOne

Update returns a builder for updating this Skill. Note that you need to call Skill.Unwrap() before calling this method if this Skill was returned from a transaction, and the transaction was committed or rolled back.

func (*Skill) Value

func (s *Skill) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Skill. This includes values selected through modifiers, order, etc.

type SkillClient

type SkillClient struct {
	// contains filtered or unexported fields
}

SkillClient is a client for the Skill schema.

func NewSkillClient

func NewSkillClient(c config) *SkillClient

NewSkillClient returns a client for the Skill from the given config.

func (*SkillClient) Create

func (c *SkillClient) Create() *SkillCreate

Create returns a builder for creating a Skill entity.

func (*SkillClient) CreateBulk

func (c *SkillClient) CreateBulk(builders ...*SkillCreate) *SkillCreateBulk

CreateBulk returns a builder for creating a bulk of Skill entities.

func (*SkillClient) Delete

func (c *SkillClient) Delete() *SkillDelete

Delete returns a delete builder for Skill.

func (*SkillClient) DeleteOne

func (c *SkillClient) DeleteOne(s *Skill) *SkillDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SkillClient) DeleteOneID

func (c *SkillClient) DeleteOneID(id int) *SkillDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SkillClient) Get

func (c *SkillClient) Get(ctx context.Context, id int) (*Skill, error)

Get returns a Skill entity by its id.

func (*SkillClient) GetX

func (c *SkillClient) GetX(ctx context.Context, id int) *Skill

GetX is like Get, but panics if an error occurs.

func (*SkillClient) Hooks

func (c *SkillClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SkillClient) Intercept

func (c *SkillClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `skill.Intercept(f(g(h())))`.

func (*SkillClient) Interceptors

func (c *SkillClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SkillClient) Query

func (c *SkillClient) Query() *SkillQuery

Query returns a query builder for Skill.

func (*SkillClient) QueryAbilityScore

func (c *SkillClient) QueryAbilityScore(s *Skill) *AbilityScoreQuery

QueryAbilityScore queries the ability_score edge of a Skill.

func (*SkillClient) Update

func (c *SkillClient) Update() *SkillUpdate

Update returns an update builder for Skill.

func (*SkillClient) UpdateOne

func (c *SkillClient) UpdateOne(s *Skill) *SkillUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SkillClient) UpdateOneID

func (c *SkillClient) UpdateOneID(id int) *SkillUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SkillClient) Use

func (c *SkillClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `skill.Hooks(f(g(h())))`.

type SkillConnection

type SkillConnection struct {
	Edges      []*SkillEdge `json:"edges"`
	PageInfo   PageInfo     `json:"pageInfo"`
	TotalCount int          `json:"totalCount"`
}

SkillConnection is the connection containing edges to Skill.

type SkillCreate

type SkillCreate struct {
	// contains filtered or unexported fields
}

SkillCreate is the builder for creating a Skill entity.

func (*SkillCreate) Exec

func (sc *SkillCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SkillCreate) ExecX

func (sc *SkillCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkillCreate) Mutation

func (sc *SkillCreate) Mutation() *SkillMutation

Mutation returns the SkillMutation object of the builder.

func (*SkillCreate) Save

func (sc *SkillCreate) Save(ctx context.Context) (*Skill, error)

Save creates the Skill in the database.

func (*SkillCreate) SaveX

func (sc *SkillCreate) SaveX(ctx context.Context) *Skill

SaveX calls Save and panics if Save returns an error.

func (*SkillCreate) SetAbilityScore

func (sc *SkillCreate) SetAbilityScore(a *AbilityScore) *SkillCreate

SetAbilityScore sets the "ability_score" edge to the AbilityScore entity.

func (*SkillCreate) SetAbilityScoreID

func (sc *SkillCreate) SetAbilityScoreID(id int) *SkillCreate

SetAbilityScoreID sets the "ability_score" edge to the AbilityScore entity by ID.

func (*SkillCreate) SetDesc

func (sc *SkillCreate) SetDesc(s []string) *SkillCreate

SetDesc sets the "desc" field.

func (*SkillCreate) SetIndx

func (sc *SkillCreate) SetIndx(s string) *SkillCreate

SetIndx sets the "indx" field.

func (*SkillCreate) SetName

func (sc *SkillCreate) SetName(s string) *SkillCreate

SetName sets the "name" field.

func (*SkillCreate) SetNillableAbilityScoreID

func (sc *SkillCreate) SetNillableAbilityScoreID(id *int) *SkillCreate

SetNillableAbilityScoreID sets the "ability_score" edge to the AbilityScore entity by ID if the given value is not nil.

func (*SkillCreate) SetSkill

func (sc *SkillCreate) SetSkill(input *Skill) *SkillCreate

type SkillCreateBulk

type SkillCreateBulk struct {
	// contains filtered or unexported fields
}

SkillCreateBulk is the builder for creating many Skill entities in bulk.

func (*SkillCreateBulk) Exec

func (scb *SkillCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SkillCreateBulk) ExecX

func (scb *SkillCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkillCreateBulk) Save

func (scb *SkillCreateBulk) Save(ctx context.Context) ([]*Skill, error)

Save creates the Skill entities in the database.

func (*SkillCreateBulk) SaveX

func (scb *SkillCreateBulk) SaveX(ctx context.Context) []*Skill

SaveX is like Save, but panics if an error occurs.

type SkillDelete

type SkillDelete struct {
	// contains filtered or unexported fields
}

SkillDelete is the builder for deleting a Skill entity.

func (*SkillDelete) Exec

func (sd *SkillDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SkillDelete) ExecX

func (sd *SkillDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SkillDelete) Where

func (sd *SkillDelete) Where(ps ...predicate.Skill) *SkillDelete

Where appends a list predicates to the SkillDelete builder.

type SkillDeleteOne

type SkillDeleteOne struct {
	// contains filtered or unexported fields
}

SkillDeleteOne is the builder for deleting a single Skill entity.

func (*SkillDeleteOne) Exec

func (sdo *SkillDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SkillDeleteOne) ExecX

func (sdo *SkillDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkillDeleteOne) Where

func (sdo *SkillDeleteOne) Where(ps ...predicate.Skill) *SkillDeleteOne

Where appends a list predicates to the SkillDelete builder.

type SkillEdge

type SkillEdge struct {
	Node   *Skill `json:"node"`
	Cursor Cursor `json:"cursor"`
}

SkillEdge is the edge representation of Skill.

type SkillEdges

type SkillEdges struct {
	// AbilityScore holds the value of the ability_score edge.
	AbilityScore *AbilityScore `json:"ability_score,omitempty"`
	// contains filtered or unexported fields
}

SkillEdges holds the relations/edges for other nodes in the graph.

func (SkillEdges) AbilityScoreOrErr

func (e SkillEdges) AbilityScoreOrErr() (*AbilityScore, error)

AbilityScoreOrErr returns the AbilityScore value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type SkillGroupBy

type SkillGroupBy struct {
	// contains filtered or unexported fields
}

SkillGroupBy is the group-by builder for Skill entities.

func (*SkillGroupBy) Aggregate

func (sgb *SkillGroupBy) Aggregate(fns ...AggregateFunc) *SkillGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SkillGroupBy) Bool

func (s *SkillGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SkillGroupBy) BoolX

func (s *SkillGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SkillGroupBy) Bools

func (s *SkillGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SkillGroupBy) BoolsX

func (s *SkillGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SkillGroupBy) Float64

func (s *SkillGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SkillGroupBy) Float64X

func (s *SkillGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SkillGroupBy) Float64s

func (s *SkillGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SkillGroupBy) Float64sX

func (s *SkillGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SkillGroupBy) Int

func (s *SkillGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SkillGroupBy) IntX

func (s *SkillGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SkillGroupBy) Ints

func (s *SkillGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SkillGroupBy) IntsX

func (s *SkillGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SkillGroupBy) Scan

func (sgb *SkillGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SkillGroupBy) ScanX

func (s *SkillGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SkillGroupBy) String

func (s *SkillGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SkillGroupBy) StringX

func (s *SkillGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SkillGroupBy) Strings

func (s *SkillGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SkillGroupBy) StringsX

func (s *SkillGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SkillMutation

type SkillMutation struct {
	// contains filtered or unexported fields
}

SkillMutation represents an operation that mutates the Skill nodes in the graph.

func (*SkillMutation) AbilityScoreCleared

func (m *SkillMutation) AbilityScoreCleared() bool

AbilityScoreCleared reports if the "ability_score" edge to the AbilityScore entity was cleared.

func (*SkillMutation) AbilityScoreID

func (m *SkillMutation) AbilityScoreID() (id int, exists bool)

AbilityScoreID returns the "ability_score" edge ID in the mutation.

func (*SkillMutation) AbilityScoreIDs

func (m *SkillMutation) AbilityScoreIDs() (ids []int)

AbilityScoreIDs returns the "ability_score" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AbilityScoreID instead. It exists only for internal usage by the builders.

func (*SkillMutation) AddField

func (m *SkillMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*SkillMutation) AddedEdges

func (m *SkillMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SkillMutation) AddedField

func (m *SkillMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*SkillMutation) AddedFields

func (m *SkillMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SkillMutation) AddedIDs

func (m *SkillMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SkillMutation) AppendDesc

func (m *SkillMutation) AppendDesc(s []string)

AppendDesc adds s to the "desc" field.

func (*SkillMutation) AppendedDesc

func (m *SkillMutation) AppendedDesc() ([]string, bool)

AppendedDesc returns the list of values that were appended to the "desc" field in this mutation.

func (*SkillMutation) ClearAbilityScore

func (m *SkillMutation) ClearAbilityScore()

ClearAbilityScore clears the "ability_score" edge to the AbilityScore entity.

func (*SkillMutation) ClearEdge

func (m *SkillMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*SkillMutation) ClearField

func (m *SkillMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*SkillMutation) ClearedEdges

func (m *SkillMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SkillMutation) ClearedFields

func (m *SkillMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SkillMutation) Client

func (m SkillMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*SkillMutation) Desc

func (m *SkillMutation) Desc() (r []string, exists bool)

Desc returns the value of the "desc" field in the mutation.

func (*SkillMutation) EdgeCleared

func (m *SkillMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SkillMutation) Field

func (m *SkillMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*SkillMutation) FieldCleared

func (m *SkillMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SkillMutation) Fields

func (m *SkillMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*SkillMutation) ID

func (m *SkillMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*SkillMutation) IDs

func (m *SkillMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*SkillMutation) Indx

func (m *SkillMutation) Indx() (r string, exists bool)

Indx returns the value of the "indx" field in the mutation.

func (*SkillMutation) Name

func (m *SkillMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*SkillMutation) OldDesc

func (m *SkillMutation) OldDesc(ctx context.Context) (v []string, err error)

OldDesc returns the old "desc" field's value of the Skill entity. If the Skill object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SkillMutation) OldField

func (m *SkillMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*SkillMutation) OldIndx

func (m *SkillMutation) OldIndx(ctx context.Context) (v string, err error)

OldIndx returns the old "indx" field's value of the Skill entity. If the Skill object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SkillMutation) OldName

func (m *SkillMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Skill entity. If the Skill object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SkillMutation) Op

func (m *SkillMutation) Op() Op

Op returns the operation name.

func (*SkillMutation) RemovedEdges

func (m *SkillMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SkillMutation) RemovedIDs

func (m *SkillMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*SkillMutation) ResetAbilityScore

func (m *SkillMutation) ResetAbilityScore()

ResetAbilityScore resets all changes to the "ability_score" edge.

func (*SkillMutation) ResetDesc

func (m *SkillMutation) ResetDesc()

ResetDesc resets all changes to the "desc" field.

func (*SkillMutation) ResetEdge

func (m *SkillMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*SkillMutation) ResetField

func (m *SkillMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*SkillMutation) ResetIndx

func (m *SkillMutation) ResetIndx()

ResetIndx resets all changes to the "indx" field.

func (*SkillMutation) ResetName

func (m *SkillMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*SkillMutation) SetAbilityScoreID

func (m *SkillMutation) SetAbilityScoreID(id int)

SetAbilityScoreID sets the "ability_score" edge to the AbilityScore entity by id.

func (*SkillMutation) SetDesc

func (m *SkillMutation) SetDesc(s []string)

SetDesc sets the "desc" field.

func (*SkillMutation) SetField

func (m *SkillMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*SkillMutation) SetIndx

func (m *SkillMutation) SetIndx(s string)

SetIndx sets the "indx" field.

func (*SkillMutation) SetName

func (m *SkillMutation) SetName(s string)

SetName sets the "name" field.

func (*SkillMutation) SetOp

func (m *SkillMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (SkillMutation) Tx

func (m SkillMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SkillMutation) Type

func (m *SkillMutation) Type() string

Type returns the node type of this mutation (Skill).

func (*SkillMutation) Where

func (m *SkillMutation) Where(ps ...predicate.Skill)

Where appends a list predicates to the SkillMutation builder.

func (*SkillMutation) WhereP

func (m *SkillMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SkillMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SkillOrder

type SkillOrder struct {
	Direction OrderDirection   `json:"direction"`
	Field     *SkillOrderField `json:"field"`
}

SkillOrder defines the ordering of Skill.

type SkillOrderField

type SkillOrderField struct {
	// Value extracts the ordering value from the given Skill.
	Value func(*Skill) (ent.Value, error)
	// contains filtered or unexported fields
}

SkillOrderField defines the ordering field of Skill.

func (SkillOrderField) MarshalGQL

func (f SkillOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (SkillOrderField) String

func (f SkillOrderField) String() string

String implement fmt.Stringer interface.

func (*SkillOrderField) UnmarshalGQL

func (f *SkillOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type SkillPaginateOption

type SkillPaginateOption func(*skillPager) error

SkillPaginateOption enables pagination customization.

func WithSkillFilter

func WithSkillFilter(filter func(*SkillQuery) (*SkillQuery, error)) SkillPaginateOption

WithSkillFilter configures pagination filter.

func WithSkillOrder

func WithSkillOrder(order *SkillOrder) SkillPaginateOption

WithSkillOrder configures pagination ordering.

type SkillQuery

type SkillQuery struct {
	// contains filtered or unexported fields
}

SkillQuery is the builder for querying Skill entities.

func (*SkillQuery) Aggregate

func (sq *SkillQuery) Aggregate(fns ...AggregateFunc) *SkillSelect

Aggregate returns a SkillSelect configured with the given aggregations.

func (*SkillQuery) All

func (sq *SkillQuery) All(ctx context.Context) ([]*Skill, error)

All executes the query and returns a list of Skills.

func (*SkillQuery) AllX

func (sq *SkillQuery) AllX(ctx context.Context) []*Skill

AllX is like All, but panics if an error occurs.

func (*SkillQuery) Clone

func (sq *SkillQuery) Clone() *SkillQuery

Clone returns a duplicate of the SkillQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SkillQuery) CollectFields

func (s *SkillQuery) CollectFields(ctx context.Context, satisfies ...string) (*SkillQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*SkillQuery) Count

func (sq *SkillQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SkillQuery) CountX

func (sq *SkillQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SkillQuery) Exist

func (sq *SkillQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SkillQuery) ExistX

func (sq *SkillQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SkillQuery) First

func (sq *SkillQuery) First(ctx context.Context) (*Skill, error)

First returns the first Skill entity from the query. Returns a *NotFoundError when no Skill was found.

func (*SkillQuery) FirstID

func (sq *SkillQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Skill ID from the query. Returns a *NotFoundError when no Skill ID was found.

func (*SkillQuery) FirstIDX

func (sq *SkillQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*SkillQuery) FirstX

func (sq *SkillQuery) FirstX(ctx context.Context) *Skill

FirstX is like First, but panics if an error occurs.

func (*SkillQuery) GroupBy

func (sq *SkillQuery) GroupBy(field string, fields ...string) *SkillGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Indx string `json:"index"`
	Count int `json:"count,omitempty"`
}

client.Skill.Query().
	GroupBy(skill.FieldIndx).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SkillQuery) IDs

func (sq *SkillQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Skill IDs.

func (*SkillQuery) IDsX

func (sq *SkillQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*SkillQuery) Limit

func (sq *SkillQuery) Limit(limit int) *SkillQuery

Limit the number of records to be returned by this query.

func (*SkillQuery) Offset

func (sq *SkillQuery) Offset(offset int) *SkillQuery

Offset to start from.

func (*SkillQuery) Only

func (sq *SkillQuery) Only(ctx context.Context) (*Skill, error)

Only returns a single Skill entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Skill entity is found. Returns a *NotFoundError when no Skill entities are found.

func (*SkillQuery) OnlyID

func (sq *SkillQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Skill ID in the query. Returns a *NotSingularError when more than one Skill ID is found. Returns a *NotFoundError when no entities are found.

func (*SkillQuery) OnlyIDX

func (sq *SkillQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SkillQuery) OnlyX

func (sq *SkillQuery) OnlyX(ctx context.Context) *Skill

OnlyX is like Only, but panics if an error occurs.

func (*SkillQuery) Order

func (sq *SkillQuery) Order(o ...skill.OrderOption) *SkillQuery

Order specifies how the records should be ordered.

func (*SkillQuery) Paginate

func (s *SkillQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...SkillPaginateOption,
) (*SkillConnection, error)

Paginate executes the query and returns a relay based cursor connection to Skill.

func (*SkillQuery) QueryAbilityScore

func (sq *SkillQuery) QueryAbilityScore() *AbilityScoreQuery

QueryAbilityScore chains the current query on the "ability_score" edge.

func (*SkillQuery) Select

func (sq *SkillQuery) Select(fields ...string) *SkillSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Indx string `json:"index"`
}

client.Skill.Query().
	Select(skill.FieldIndx).
	Scan(ctx, &v)

func (*SkillQuery) Unique

func (sq *SkillQuery) Unique(unique bool) *SkillQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*SkillQuery) Where

func (sq *SkillQuery) Where(ps ...predicate.Skill) *SkillQuery

Where adds a new predicate for the SkillQuery builder.

func (*SkillQuery) WithAbilityScore

func (sq *SkillQuery) WithAbilityScore(opts ...func(*AbilityScoreQuery)) *SkillQuery

WithAbilityScore tells the query-builder to eager-load the nodes that are connected to the "ability_score" edge. The optional arguments are used to configure the query builder of the edge.

type SkillSelect

type SkillSelect struct {
	*SkillQuery
	// contains filtered or unexported fields
}

SkillSelect is the builder for selecting fields of Skill entities.

func (*SkillSelect) Aggregate

func (ss *SkillSelect) Aggregate(fns ...AggregateFunc) *SkillSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SkillSelect) Bool

func (s *SkillSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SkillSelect) BoolX

func (s *SkillSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SkillSelect) Bools

func (s *SkillSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SkillSelect) BoolsX

func (s *SkillSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SkillSelect) Float64

func (s *SkillSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SkillSelect) Float64X

func (s *SkillSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SkillSelect) Float64s

func (s *SkillSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SkillSelect) Float64sX

func (s *SkillSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SkillSelect) Int

func (s *SkillSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SkillSelect) IntX

func (s *SkillSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SkillSelect) Ints

func (s *SkillSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SkillSelect) IntsX

func (s *SkillSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SkillSelect) Scan

func (ss *SkillSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SkillSelect) ScanX

func (s *SkillSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SkillSelect) String

func (s *SkillSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SkillSelect) StringX

func (s *SkillSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SkillSelect) Strings

func (s *SkillSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SkillSelect) StringsX

func (s *SkillSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SkillUpdate

type SkillUpdate struct {
	// contains filtered or unexported fields
}

SkillUpdate is the builder for updating Skill entities.

func (*SkillUpdate) AppendDesc

func (su *SkillUpdate) AppendDesc(s []string) *SkillUpdate

AppendDesc appends s to the "desc" field.

func (*SkillUpdate) ClearAbilityScore

func (su *SkillUpdate) ClearAbilityScore() *SkillUpdate

ClearAbilityScore clears the "ability_score" edge to the AbilityScore entity.

func (*SkillUpdate) Exec

func (su *SkillUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SkillUpdate) ExecX

func (su *SkillUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkillUpdate) Mutation

func (su *SkillUpdate) Mutation() *SkillMutation

Mutation returns the SkillMutation object of the builder.

func (*SkillUpdate) Save

func (su *SkillUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SkillUpdate) SaveX

func (su *SkillUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SkillUpdate) SetAbilityScore

func (su *SkillUpdate) SetAbilityScore(a *AbilityScore) *SkillUpdate

SetAbilityScore sets the "ability_score" edge to the AbilityScore entity.

func (*SkillUpdate) SetAbilityScoreID

func (su *SkillUpdate) SetAbilityScoreID(id int) *SkillUpdate

SetAbilityScoreID sets the "ability_score" edge to the AbilityScore entity by ID.

func (*SkillUpdate) SetDesc

func (su *SkillUpdate) SetDesc(s []string) *SkillUpdate

SetDesc sets the "desc" field.

func (*SkillUpdate) SetIndx

func (su *SkillUpdate) SetIndx(s string) *SkillUpdate

SetIndx sets the "indx" field.

func (*SkillUpdate) SetName

func (su *SkillUpdate) SetName(s string) *SkillUpdate

SetName sets the "name" field.

func (*SkillUpdate) SetNillableAbilityScoreID

func (su *SkillUpdate) SetNillableAbilityScoreID(id *int) *SkillUpdate

SetNillableAbilityScoreID sets the "ability_score" edge to the AbilityScore entity by ID if the given value is not nil.

func (*SkillUpdate) Where

func (su *SkillUpdate) Where(ps ...predicate.Skill) *SkillUpdate

Where appends a list predicates to the SkillUpdate builder.

type SkillUpdateOne

type SkillUpdateOne struct {
	// contains filtered or unexported fields
}

SkillUpdateOne is the builder for updating a single Skill entity.

func (*SkillUpdateOne) AppendDesc

func (suo *SkillUpdateOne) AppendDesc(s []string) *SkillUpdateOne

AppendDesc appends s to the "desc" field.

func (*SkillUpdateOne) ClearAbilityScore

func (suo *SkillUpdateOne) ClearAbilityScore() *SkillUpdateOne

ClearAbilityScore clears the "ability_score" edge to the AbilityScore entity.

func (*SkillUpdateOne) Exec

func (suo *SkillUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SkillUpdateOne) ExecX

func (suo *SkillUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkillUpdateOne) Mutation

func (suo *SkillUpdateOne) Mutation() *SkillMutation

Mutation returns the SkillMutation object of the builder.

func (*SkillUpdateOne) Save

func (suo *SkillUpdateOne) Save(ctx context.Context) (*Skill, error)

Save executes the query and returns the updated Skill entity.

func (*SkillUpdateOne) SaveX

func (suo *SkillUpdateOne) SaveX(ctx context.Context) *Skill

SaveX is like Save, but panics if an error occurs.

func (*SkillUpdateOne) Select

func (suo *SkillUpdateOne) Select(field string, fields ...string) *SkillUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SkillUpdateOne) SetAbilityScore

func (suo *SkillUpdateOne) SetAbilityScore(a *AbilityScore) *SkillUpdateOne

SetAbilityScore sets the "ability_score" edge to the AbilityScore entity.

func (*SkillUpdateOne) SetAbilityScoreID

func (suo *SkillUpdateOne) SetAbilityScoreID(id int) *SkillUpdateOne

SetAbilityScoreID sets the "ability_score" edge to the AbilityScore entity by ID.

func (*SkillUpdateOne) SetDesc

func (suo *SkillUpdateOne) SetDesc(s []string) *SkillUpdateOne

SetDesc sets the "desc" field.

func (*SkillUpdateOne) SetIndx

func (suo *SkillUpdateOne) SetIndx(s string) *SkillUpdateOne

SetIndx sets the "indx" field.

func (*SkillUpdateOne) SetName

func (suo *SkillUpdateOne) SetName(s string) *SkillUpdateOne

SetName sets the "name" field.

func (*SkillUpdateOne) SetNillableAbilityScoreID

func (suo *SkillUpdateOne) SetNillableAbilityScoreID(id *int) *SkillUpdateOne

SetNillableAbilityScoreID sets the "ability_score" edge to the AbilityScore entity by ID if the given value is not nil.

func (*SkillUpdateOne) Where

func (suo *SkillUpdateOne) Where(ps ...predicate.Skill) *SkillUpdateOne

Where appends a list predicates to the SkillUpdate builder.

type SkillWhereInput

type SkillWhereInput struct {
	Predicates []predicate.Skill  `json:"-"`
	Not        *SkillWhereInput   `json:"not,omitempty"`
	Or         []*SkillWhereInput `json:"or,omitempty"`
	And        []*SkillWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "indx" field predicates.
	Indx             *string  `json:"indx,omitempty"`
	IndxNEQ          *string  `json:"indxNEQ,omitempty"`
	IndxIn           []string `json:"indxIn,omitempty"`
	IndxNotIn        []string `json:"indxNotIn,omitempty"`
	IndxGT           *string  `json:"indxGT,omitempty"`
	IndxGTE          *string  `json:"indxGTE,omitempty"`
	IndxLT           *string  `json:"indxLT,omitempty"`
	IndxLTE          *string  `json:"indxLTE,omitempty"`
	IndxContains     *string  `json:"indxContains,omitempty"`
	IndxHasPrefix    *string  `json:"indxHasPrefix,omitempty"`
	IndxHasSuffix    *string  `json:"indxHasSuffix,omitempty"`
	IndxEqualFold    *string  `json:"indxEqualFold,omitempty"`
	IndxContainsFold *string  `json:"indxContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "ability_score" edge predicates.
	HasAbilityScore     *bool                     `json:"hasAbilityScore,omitempty"`
	HasAbilityScoreWith []*AbilityScoreWhereInput `json:"hasAbilityScoreWith,omitempty"`
}

SkillWhereInput represents a where input for filtering Skill queries.

func (*SkillWhereInput) AddPredicates

func (i *SkillWhereInput) AddPredicates(predicates ...predicate.Skill)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*SkillWhereInput) Filter

func (i *SkillWhereInput) Filter(q *SkillQuery) (*SkillQuery, error)

Filter applies the SkillWhereInput filter on the SkillQuery builder.

func (*SkillWhereInput) P

P returns a predicate for filtering skills. An error is returned if the input is empty or invalid.

type Skills

type Skills []*Skill

Skills is a parsable slice of Skill.

type Subrace

type Subrace struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Indx holds the value of the "indx" field.
	Indx string `json:"index"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Desc holds the value of the "desc" field.
	Desc string `json:"desc,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SubraceQuery when eager-loading is set.
	Edges SubraceEdges `json:"-"`
	// contains filtered or unexported fields
}

Subrace is the model entity for the Subrace schema.

func (*Subrace) AbilityBonuses

func (s *Subrace) AbilityBonuses(ctx context.Context) (result []*AbilityBonus, err error)

func (*Subrace) IsNode

func (n *Subrace) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Subrace) MarshalJSON

func (s *Subrace) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Subrace) NamedAbilityBonuses

func (s *Subrace) NamedAbilityBonuses(name string) ([]*AbilityBonus, error)

NamedAbilityBonuses returns the AbilityBonuses named value or an error if the edge was not loaded in eager-loading with this name.

func (*Subrace) NamedProficiencies

func (s *Subrace) NamedProficiencies(name string) ([]*Proficiency, error)

NamedProficiencies returns the Proficiencies named value or an error if the edge was not loaded in eager-loading with this name.

func (*Subrace) NamedTraits

func (s *Subrace) NamedTraits(name string) ([]*Trait, error)

NamedTraits returns the Traits named value or an error if the edge was not loaded in eager-loading with this name.

func (*Subrace) Node

func (s *Subrace) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*Subrace) Proficiencies

func (s *Subrace) Proficiencies(ctx context.Context) (result []*Proficiency, err error)

func (*Subrace) QueryAbilityBonuses

func (s *Subrace) QueryAbilityBonuses() *AbilityBonusQuery

QueryAbilityBonuses queries the "ability_bonuses" edge of the Subrace entity.

func (*Subrace) QueryProficiencies

func (s *Subrace) QueryProficiencies() *ProficiencyQuery

QueryProficiencies queries the "proficiencies" edge of the Subrace entity.

func (*Subrace) QueryRace

func (s *Subrace) QueryRace() *RaceQuery

QueryRace queries the "race" edge of the Subrace entity.

func (*Subrace) QueryTraits

func (s *Subrace) QueryTraits() *TraitQuery

QueryTraits queries the "traits" edge of the Subrace entity.

func (*Subrace) Race

func (s *Subrace) Race(ctx context.Context) (*Race, error)

func (*Subrace) String

func (s *Subrace) String() string

String implements the fmt.Stringer.

func (*Subrace) ToEdge

func (s *Subrace) ToEdge(order *SubraceOrder) *SubraceEdge

ToEdge converts Subrace into SubraceEdge.

func (*Subrace) Traits

func (s *Subrace) Traits(ctx context.Context) (result []*Trait, err error)

func (*Subrace) UnmarshalJSON

func (s *Subrace) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*Subrace) Unwrap

func (s *Subrace) Unwrap() *Subrace

Unwrap unwraps the Subrace entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Subrace) Update

func (s *Subrace) Update() *SubraceUpdateOne

Update returns a builder for updating this Subrace. Note that you need to call Subrace.Unwrap() before calling this method if this Subrace was returned from a transaction, and the transaction was committed or rolled back.

func (*Subrace) Value

func (s *Subrace) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Subrace. This includes values selected through modifiers, order, etc.

type SubraceClient

type SubraceClient struct {
	// contains filtered or unexported fields
}

SubraceClient is a client for the Subrace schema.

func NewSubraceClient

func NewSubraceClient(c config) *SubraceClient

NewSubraceClient returns a client for the Subrace from the given config.

func (*SubraceClient) Create

func (c *SubraceClient) Create() *SubraceCreate

Create returns a builder for creating a Subrace entity.

func (*SubraceClient) CreateBulk

func (c *SubraceClient) CreateBulk(builders ...*SubraceCreate) *SubraceCreateBulk

CreateBulk returns a builder for creating a bulk of Subrace entities.

func (*SubraceClient) Delete

func (c *SubraceClient) Delete() *SubraceDelete

Delete returns a delete builder for Subrace.

func (*SubraceClient) DeleteOne

func (c *SubraceClient) DeleteOne(s *Subrace) *SubraceDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SubraceClient) DeleteOneID

func (c *SubraceClient) DeleteOneID(id int) *SubraceDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SubraceClient) Get

func (c *SubraceClient) Get(ctx context.Context, id int) (*Subrace, error)

Get returns a Subrace entity by its id.

func (*SubraceClient) GetX

func (c *SubraceClient) GetX(ctx context.Context, id int) *Subrace

GetX is like Get, but panics if an error occurs.

func (*SubraceClient) Hooks

func (c *SubraceClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SubraceClient) Intercept

func (c *SubraceClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `subrace.Intercept(f(g(h())))`.

func (*SubraceClient) Interceptors

func (c *SubraceClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SubraceClient) Query

func (c *SubraceClient) Query() *SubraceQuery

Query returns a query builder for Subrace.

func (*SubraceClient) QueryAbilityBonuses

func (c *SubraceClient) QueryAbilityBonuses(s *Subrace) *AbilityBonusQuery

QueryAbilityBonuses queries the ability_bonuses edge of a Subrace.

func (*SubraceClient) QueryProficiencies

func (c *SubraceClient) QueryProficiencies(s *Subrace) *ProficiencyQuery

QueryProficiencies queries the proficiencies edge of a Subrace.

func (*SubraceClient) QueryRace

func (c *SubraceClient) QueryRace(s *Subrace) *RaceQuery

QueryRace queries the race edge of a Subrace.

func (*SubraceClient) QueryTraits

func (c *SubraceClient) QueryTraits(s *Subrace) *TraitQuery

QueryTraits queries the traits edge of a Subrace.

func (*SubraceClient) Update

func (c *SubraceClient) Update() *SubraceUpdate

Update returns an update builder for Subrace.

func (*SubraceClient) UpdateOne

func (c *SubraceClient) UpdateOne(s *Subrace) *SubraceUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SubraceClient) UpdateOneID

func (c *SubraceClient) UpdateOneID(id int) *SubraceUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SubraceClient) Use

func (c *SubraceClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `subrace.Hooks(f(g(h())))`.

type SubraceConnection

type SubraceConnection struct {
	Edges      []*SubraceEdge `json:"edges"`
	PageInfo   PageInfo       `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

SubraceConnection is the connection containing edges to Subrace.

type SubraceCreate

type SubraceCreate struct {
	// contains filtered or unexported fields
}

SubraceCreate is the builder for creating a Subrace entity.

func (*SubraceCreate) AddAbilityBonuseIDs

func (sc *SubraceCreate) AddAbilityBonuseIDs(ids ...int) *SubraceCreate

AddAbilityBonuseIDs adds the "ability_bonuses" edge to the AbilityBonus entity by IDs.

func (*SubraceCreate) AddAbilityBonuses

func (sc *SubraceCreate) AddAbilityBonuses(a ...*AbilityBonus) *SubraceCreate

AddAbilityBonuses adds the "ability_bonuses" edges to the AbilityBonus entity.

func (*SubraceCreate) AddProficiencies

func (sc *SubraceCreate) AddProficiencies(p ...*Proficiency) *SubraceCreate

AddProficiencies adds the "proficiencies" edges to the Proficiency entity.

func (*SubraceCreate) AddProficiencyIDs

func (sc *SubraceCreate) AddProficiencyIDs(ids ...int) *SubraceCreate

AddProficiencyIDs adds the "proficiencies" edge to the Proficiency entity by IDs.

func (*SubraceCreate) AddTraitIDs

func (sc *SubraceCreate) AddTraitIDs(ids ...int) *SubraceCreate

AddTraitIDs adds the "traits" edge to the Trait entity by IDs.

func (*SubraceCreate) AddTraits

func (sc *SubraceCreate) AddTraits(t ...*Trait) *SubraceCreate

AddTraits adds the "traits" edges to the Trait entity.

func (*SubraceCreate) Exec

func (sc *SubraceCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SubraceCreate) ExecX

func (sc *SubraceCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubraceCreate) Mutation

func (sc *SubraceCreate) Mutation() *SubraceMutation

Mutation returns the SubraceMutation object of the builder.

func (*SubraceCreate) Save

func (sc *SubraceCreate) Save(ctx context.Context) (*Subrace, error)

Save creates the Subrace in the database.

func (*SubraceCreate) SaveX

func (sc *SubraceCreate) SaveX(ctx context.Context) *Subrace

SaveX calls Save and panics if Save returns an error.

func (*SubraceCreate) SetDesc

func (sc *SubraceCreate) SetDesc(s string) *SubraceCreate

SetDesc sets the "desc" field.

func (*SubraceCreate) SetIndx

func (sc *SubraceCreate) SetIndx(s string) *SubraceCreate

SetIndx sets the "indx" field.

func (*SubraceCreate) SetName

func (sc *SubraceCreate) SetName(s string) *SubraceCreate

SetName sets the "name" field.

func (*SubraceCreate) SetNillableRaceID

func (sc *SubraceCreate) SetNillableRaceID(id *int) *SubraceCreate

SetNillableRaceID sets the "race" edge to the Race entity by ID if the given value is not nil.

func (*SubraceCreate) SetRace

func (sc *SubraceCreate) SetRace(r *Race) *SubraceCreate

SetRace sets the "race" edge to the Race entity.

func (*SubraceCreate) SetRaceID

func (sc *SubraceCreate) SetRaceID(id int) *SubraceCreate

SetRaceID sets the "race" edge to the Race entity by ID.

func (*SubraceCreate) SetSubrace

func (sc *SubraceCreate) SetSubrace(input *Subrace) *SubraceCreate

type SubraceCreateBulk

type SubraceCreateBulk struct {
	// contains filtered or unexported fields
}

SubraceCreateBulk is the builder for creating many Subrace entities in bulk.

func (*SubraceCreateBulk) Exec

func (scb *SubraceCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SubraceCreateBulk) ExecX

func (scb *SubraceCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubraceCreateBulk) Save

func (scb *SubraceCreateBulk) Save(ctx context.Context) ([]*Subrace, error)

Save creates the Subrace entities in the database.

func (*SubraceCreateBulk) SaveX

func (scb *SubraceCreateBulk) SaveX(ctx context.Context) []*Subrace

SaveX is like Save, but panics if an error occurs.

type SubraceDelete

type SubraceDelete struct {
	// contains filtered or unexported fields
}

SubraceDelete is the builder for deleting a Subrace entity.

func (*SubraceDelete) Exec

func (sd *SubraceDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SubraceDelete) ExecX

func (sd *SubraceDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SubraceDelete) Where

func (sd *SubraceDelete) Where(ps ...predicate.Subrace) *SubraceDelete

Where appends a list predicates to the SubraceDelete builder.

type SubraceDeleteOne

type SubraceDeleteOne struct {
	// contains filtered or unexported fields
}

SubraceDeleteOne is the builder for deleting a single Subrace entity.

func (*SubraceDeleteOne) Exec

func (sdo *SubraceDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SubraceDeleteOne) ExecX

func (sdo *SubraceDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubraceDeleteOne) Where

Where appends a list predicates to the SubraceDelete builder.

type SubraceEdge

type SubraceEdge struct {
	Node   *Subrace `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

SubraceEdge is the edge representation of Subrace.

type SubraceEdges

type SubraceEdges struct {
	// Race holds the value of the race edge.
	Race *Race `json:"race,omitempty"`
	// Proficiencies holds the value of the proficiencies edge.
	Proficiencies []*Proficiency `json:"proficiencies,omitempty"`
	// Traits holds the value of the traits edge.
	Traits []*Trait `json:"traits,omitempty"`
	// AbilityBonuses holds the value of the ability_bonuses edge.
	AbilityBonuses []*AbilityBonus `json:"ability_bonuses,omitempty"`
	// contains filtered or unexported fields
}

SubraceEdges holds the relations/edges for other nodes in the graph.

func (SubraceEdges) AbilityBonusesOrErr

func (e SubraceEdges) AbilityBonusesOrErr() ([]*AbilityBonus, error)

AbilityBonusesOrErr returns the AbilityBonuses value or an error if the edge was not loaded in eager-loading.

func (SubraceEdges) ProficienciesOrErr

func (e SubraceEdges) ProficienciesOrErr() ([]*Proficiency, error)

ProficienciesOrErr returns the Proficiencies value or an error if the edge was not loaded in eager-loading.

func (SubraceEdges) RaceOrErr

func (e SubraceEdges) RaceOrErr() (*Race, error)

RaceOrErr returns the Race value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (SubraceEdges) TraitsOrErr

func (e SubraceEdges) TraitsOrErr() ([]*Trait, error)

TraitsOrErr returns the Traits value or an error if the edge was not loaded in eager-loading.

type SubraceGroupBy

type SubraceGroupBy struct {
	// contains filtered or unexported fields
}

SubraceGroupBy is the group-by builder for Subrace entities.

func (*SubraceGroupBy) Aggregate

func (sgb *SubraceGroupBy) Aggregate(fns ...AggregateFunc) *SubraceGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SubraceGroupBy) Bool

func (s *SubraceGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SubraceGroupBy) BoolX

func (s *SubraceGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SubraceGroupBy) Bools

func (s *SubraceGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SubraceGroupBy) BoolsX

func (s *SubraceGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SubraceGroupBy) Float64

func (s *SubraceGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SubraceGroupBy) Float64X

func (s *SubraceGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SubraceGroupBy) Float64s

func (s *SubraceGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SubraceGroupBy) Float64sX

func (s *SubraceGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SubraceGroupBy) Int

func (s *SubraceGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SubraceGroupBy) IntX

func (s *SubraceGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SubraceGroupBy) Ints

func (s *SubraceGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SubraceGroupBy) IntsX

func (s *SubraceGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SubraceGroupBy) Scan

func (sgb *SubraceGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SubraceGroupBy) ScanX

func (s *SubraceGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SubraceGroupBy) String

func (s *SubraceGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SubraceGroupBy) StringX

func (s *SubraceGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SubraceGroupBy) Strings

func (s *SubraceGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SubraceGroupBy) StringsX

func (s *SubraceGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SubraceMutation

type SubraceMutation struct {
	// contains filtered or unexported fields
}

SubraceMutation represents an operation that mutates the Subrace nodes in the graph.

func (*SubraceMutation) AbilityBonusesCleared

func (m *SubraceMutation) AbilityBonusesCleared() bool

AbilityBonusesCleared reports if the "ability_bonuses" edge to the AbilityBonus entity was cleared.

func (*SubraceMutation) AbilityBonusesIDs

func (m *SubraceMutation) AbilityBonusesIDs() (ids []int)

AbilityBonusesIDs returns the "ability_bonuses" edge IDs in the mutation.

func (*SubraceMutation) AddAbilityBonuseIDs

func (m *SubraceMutation) AddAbilityBonuseIDs(ids ...int)

AddAbilityBonuseIDs adds the "ability_bonuses" edge to the AbilityBonus entity by ids.

func (*SubraceMutation) AddField

func (m *SubraceMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*SubraceMutation) AddProficiencyIDs

func (m *SubraceMutation) AddProficiencyIDs(ids ...int)

AddProficiencyIDs adds the "proficiencies" edge to the Proficiency entity by ids.

func (*SubraceMutation) AddTraitIDs

func (m *SubraceMutation) AddTraitIDs(ids ...int)

AddTraitIDs adds the "traits" edge to the Trait entity by ids.

func (*SubraceMutation) AddedEdges

func (m *SubraceMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SubraceMutation) AddedField

func (m *SubraceMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*SubraceMutation) AddedFields

func (m *SubraceMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SubraceMutation) AddedIDs

func (m *SubraceMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SubraceMutation) ClearAbilityBonuses

func (m *SubraceMutation) ClearAbilityBonuses()

ClearAbilityBonuses clears the "ability_bonuses" edge to the AbilityBonus entity.

func (*SubraceMutation) ClearEdge

func (m *SubraceMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*SubraceMutation) ClearField

func (m *SubraceMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*SubraceMutation) ClearProficiencies

func (m *SubraceMutation) ClearProficiencies()

ClearProficiencies clears the "proficiencies" edge to the Proficiency entity.

func (*SubraceMutation) ClearRace

func (m *SubraceMutation) ClearRace()

ClearRace clears the "race" edge to the Race entity.

func (*SubraceMutation) ClearTraits

func (m *SubraceMutation) ClearTraits()

ClearTraits clears the "traits" edge to the Trait entity.

func (*SubraceMutation) ClearedEdges

func (m *SubraceMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SubraceMutation) ClearedFields

func (m *SubraceMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SubraceMutation) Client

func (m SubraceMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*SubraceMutation) Desc

func (m *SubraceMutation) Desc() (r string, exists bool)

Desc returns the value of the "desc" field in the mutation.

func (*SubraceMutation) EdgeCleared

func (m *SubraceMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SubraceMutation) Field

func (m *SubraceMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*SubraceMutation) FieldCleared

func (m *SubraceMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SubraceMutation) Fields

func (m *SubraceMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*SubraceMutation) ID

func (m *SubraceMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*SubraceMutation) IDs

func (m *SubraceMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*SubraceMutation) Indx

func (m *SubraceMutation) Indx() (r string, exists bool)

Indx returns the value of the "indx" field in the mutation.

func (*SubraceMutation) Name

func (m *SubraceMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*SubraceMutation) OldDesc

func (m *SubraceMutation) OldDesc(ctx context.Context) (v string, err error)

OldDesc returns the old "desc" field's value of the Subrace entity. If the Subrace object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SubraceMutation) OldField

func (m *SubraceMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*SubraceMutation) OldIndx

func (m *SubraceMutation) OldIndx(ctx context.Context) (v string, err error)

OldIndx returns the old "indx" field's value of the Subrace entity. If the Subrace object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SubraceMutation) OldName

func (m *SubraceMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Subrace entity. If the Subrace object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SubraceMutation) Op

func (m *SubraceMutation) Op() Op

Op returns the operation name.

func (*SubraceMutation) ProficienciesCleared

func (m *SubraceMutation) ProficienciesCleared() bool

ProficienciesCleared reports if the "proficiencies" edge to the Proficiency entity was cleared.

func (*SubraceMutation) ProficienciesIDs

func (m *SubraceMutation) ProficienciesIDs() (ids []int)

ProficienciesIDs returns the "proficiencies" edge IDs in the mutation.

func (*SubraceMutation) RaceCleared

func (m *SubraceMutation) RaceCleared() bool

RaceCleared reports if the "race" edge to the Race entity was cleared.

func (*SubraceMutation) RaceID

func (m *SubraceMutation) RaceID() (id int, exists bool)

RaceID returns the "race" edge ID in the mutation.

func (*SubraceMutation) RaceIDs

func (m *SubraceMutation) RaceIDs() (ids []int)

RaceIDs returns the "race" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RaceID instead. It exists only for internal usage by the builders.

func (*SubraceMutation) RemoveAbilityBonuseIDs

func (m *SubraceMutation) RemoveAbilityBonuseIDs(ids ...int)

RemoveAbilityBonuseIDs removes the "ability_bonuses" edge to the AbilityBonus entity by IDs.

func (*SubraceMutation) RemoveProficiencyIDs

func (m *SubraceMutation) RemoveProficiencyIDs(ids ...int)

RemoveProficiencyIDs removes the "proficiencies" edge to the Proficiency entity by IDs.

func (*SubraceMutation) RemoveTraitIDs

func (m *SubraceMutation) RemoveTraitIDs(ids ...int)

RemoveTraitIDs removes the "traits" edge to the Trait entity by IDs.

func (*SubraceMutation) RemovedAbilityBonusesIDs

func (m *SubraceMutation) RemovedAbilityBonusesIDs() (ids []int)

RemovedAbilityBonuses returns the removed IDs of the "ability_bonuses" edge to the AbilityBonus entity.

func (*SubraceMutation) RemovedEdges

func (m *SubraceMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SubraceMutation) RemovedIDs

func (m *SubraceMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*SubraceMutation) RemovedProficienciesIDs

func (m *SubraceMutation) RemovedProficienciesIDs() (ids []int)

RemovedProficiencies returns the removed IDs of the "proficiencies" edge to the Proficiency entity.

func (*SubraceMutation) RemovedTraitsIDs

func (m *SubraceMutation) RemovedTraitsIDs() (ids []int)

RemovedTraits returns the removed IDs of the "traits" edge to the Trait entity.

func (*SubraceMutation) ResetAbilityBonuses

func (m *SubraceMutation) ResetAbilityBonuses()

ResetAbilityBonuses resets all changes to the "ability_bonuses" edge.

func (*SubraceMutation) ResetDesc

func (m *SubraceMutation) ResetDesc()

ResetDesc resets all changes to the "desc" field.

func (*SubraceMutation) ResetEdge

func (m *SubraceMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*SubraceMutation) ResetField

func (m *SubraceMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*SubraceMutation) ResetIndx

func (m *SubraceMutation) ResetIndx()

ResetIndx resets all changes to the "indx" field.

func (*SubraceMutation) ResetName

func (m *SubraceMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*SubraceMutation) ResetProficiencies

func (m *SubraceMutation) ResetProficiencies()

ResetProficiencies resets all changes to the "proficiencies" edge.

func (*SubraceMutation) ResetRace

func (m *SubraceMutation) ResetRace()

ResetRace resets all changes to the "race" edge.

func (*SubraceMutation) ResetTraits

func (m *SubraceMutation) ResetTraits()

ResetTraits resets all changes to the "traits" edge.

func (*SubraceMutation) SetDesc

func (m *SubraceMutation) SetDesc(s string)

SetDesc sets the "desc" field.

func (*SubraceMutation) SetField

func (m *SubraceMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*SubraceMutation) SetIndx

func (m *SubraceMutation) SetIndx(s string)

SetIndx sets the "indx" field.

func (*SubraceMutation) SetName

func (m *SubraceMutation) SetName(s string)

SetName sets the "name" field.

func (*SubraceMutation) SetOp

func (m *SubraceMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SubraceMutation) SetRaceID

func (m *SubraceMutation) SetRaceID(id int)

SetRaceID sets the "race" edge to the Race entity by id.

func (*SubraceMutation) TraitsCleared

func (m *SubraceMutation) TraitsCleared() bool

TraitsCleared reports if the "traits" edge to the Trait entity was cleared.

func (*SubraceMutation) TraitsIDs

func (m *SubraceMutation) TraitsIDs() (ids []int)

TraitsIDs returns the "traits" edge IDs in the mutation.

func (SubraceMutation) Tx

func (m SubraceMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SubraceMutation) Type

func (m *SubraceMutation) Type() string

Type returns the node type of this mutation (Subrace).

func (*SubraceMutation) Where

func (m *SubraceMutation) Where(ps ...predicate.Subrace)

Where appends a list predicates to the SubraceMutation builder.

func (*SubraceMutation) WhereP

func (m *SubraceMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SubraceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SubraceOrder

type SubraceOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *SubraceOrderField `json:"field"`
}

SubraceOrder defines the ordering of Subrace.

type SubraceOrderField

type SubraceOrderField struct {
	// Value extracts the ordering value from the given Subrace.
	Value func(*Subrace) (ent.Value, error)
	// contains filtered or unexported fields
}

SubraceOrderField defines the ordering field of Subrace.

func (SubraceOrderField) MarshalGQL

func (f SubraceOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (SubraceOrderField) String

func (f SubraceOrderField) String() string

String implement fmt.Stringer interface.

func (*SubraceOrderField) UnmarshalGQL

func (f *SubraceOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type SubracePaginateOption

type SubracePaginateOption func(*subracePager) error

SubracePaginateOption enables pagination customization.

func WithSubraceFilter

func WithSubraceFilter(filter func(*SubraceQuery) (*SubraceQuery, error)) SubracePaginateOption

WithSubraceFilter configures pagination filter.

func WithSubraceOrder

func WithSubraceOrder(order *SubraceOrder) SubracePaginateOption

WithSubraceOrder configures pagination ordering.

type SubraceQuery

type SubraceQuery struct {
	// contains filtered or unexported fields
}

SubraceQuery is the builder for querying Subrace entities.

func (*SubraceQuery) Aggregate

func (sq *SubraceQuery) Aggregate(fns ...AggregateFunc) *SubraceSelect

Aggregate returns a SubraceSelect configured with the given aggregations.

func (*SubraceQuery) All

func (sq *SubraceQuery) All(ctx context.Context) ([]*Subrace, error)

All executes the query and returns a list of Subraces.

func (*SubraceQuery) AllX

func (sq *SubraceQuery) AllX(ctx context.Context) []*Subrace

AllX is like All, but panics if an error occurs.

func (*SubraceQuery) Clone

func (sq *SubraceQuery) Clone() *SubraceQuery

Clone returns a duplicate of the SubraceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SubraceQuery) CollectFields

func (s *SubraceQuery) CollectFields(ctx context.Context, satisfies ...string) (*SubraceQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*SubraceQuery) Count

func (sq *SubraceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SubraceQuery) CountX

func (sq *SubraceQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SubraceQuery) Exist

func (sq *SubraceQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SubraceQuery) ExistX

func (sq *SubraceQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SubraceQuery) First

func (sq *SubraceQuery) First(ctx context.Context) (*Subrace, error)

First returns the first Subrace entity from the query. Returns a *NotFoundError when no Subrace was found.

func (*SubraceQuery) FirstID

func (sq *SubraceQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Subrace ID from the query. Returns a *NotFoundError when no Subrace ID was found.

func (*SubraceQuery) FirstIDX

func (sq *SubraceQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*SubraceQuery) FirstX

func (sq *SubraceQuery) FirstX(ctx context.Context) *Subrace

FirstX is like First, but panics if an error occurs.

func (*SubraceQuery) GroupBy

func (sq *SubraceQuery) GroupBy(field string, fields ...string) *SubraceGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Indx string `json:"index"`
	Count int `json:"count,omitempty"`
}

client.Subrace.Query().
	GroupBy(subrace.FieldIndx).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SubraceQuery) IDs

func (sq *SubraceQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Subrace IDs.

func (*SubraceQuery) IDsX

func (sq *SubraceQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*SubraceQuery) Limit

func (sq *SubraceQuery) Limit(limit int) *SubraceQuery

Limit the number of records to be returned by this query.

func (*SubraceQuery) Offset

func (sq *SubraceQuery) Offset(offset int) *SubraceQuery

Offset to start from.

func (*SubraceQuery) Only

func (sq *SubraceQuery) Only(ctx context.Context) (*Subrace, error)

Only returns a single Subrace entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Subrace entity is found. Returns a *NotFoundError when no Subrace entities are found.

func (*SubraceQuery) OnlyID

func (sq *SubraceQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Subrace ID in the query. Returns a *NotSingularError when more than one Subrace ID is found. Returns a *NotFoundError when no entities are found.

func (*SubraceQuery) OnlyIDX

func (sq *SubraceQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SubraceQuery) OnlyX

func (sq *SubraceQuery) OnlyX(ctx context.Context) *Subrace

OnlyX is like Only, but panics if an error occurs.

func (*SubraceQuery) Order

func (sq *SubraceQuery) Order(o ...subrace.OrderOption) *SubraceQuery

Order specifies how the records should be ordered.

func (*SubraceQuery) Paginate

func (s *SubraceQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...SubracePaginateOption,
) (*SubraceConnection, error)

Paginate executes the query and returns a relay based cursor connection to Subrace.

func (*SubraceQuery) QueryAbilityBonuses

func (sq *SubraceQuery) QueryAbilityBonuses() *AbilityBonusQuery

QueryAbilityBonuses chains the current query on the "ability_bonuses" edge.

func (*SubraceQuery) QueryProficiencies

func (sq *SubraceQuery) QueryProficiencies() *ProficiencyQuery

QueryProficiencies chains the current query on the "proficiencies" edge.

func (*SubraceQuery) QueryRace

func (sq *SubraceQuery) QueryRace() *RaceQuery

QueryRace chains the current query on the "race" edge.

func (*SubraceQuery) QueryTraits

func (sq *SubraceQuery) QueryTraits() *TraitQuery

QueryTraits chains the current query on the "traits" edge.

func (*SubraceQuery) Select

func (sq *SubraceQuery) Select(fields ...string) *SubraceSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Indx string `json:"index"`
}

client.Subrace.Query().
	Select(subrace.FieldIndx).
	Scan(ctx, &v)

func (*SubraceQuery) Unique

func (sq *SubraceQuery) Unique(unique bool) *SubraceQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*SubraceQuery) Where

func (sq *SubraceQuery) Where(ps ...predicate.Subrace) *SubraceQuery

Where adds a new predicate for the SubraceQuery builder.

func (*SubraceQuery) WithAbilityBonuses

func (sq *SubraceQuery) WithAbilityBonuses(opts ...func(*AbilityBonusQuery)) *SubraceQuery

WithAbilityBonuses tells the query-builder to eager-load the nodes that are connected to the "ability_bonuses" edge. The optional arguments are used to configure the query builder of the edge.

func (*SubraceQuery) WithNamedAbilityBonuses

func (sq *SubraceQuery) WithNamedAbilityBonuses(name string, opts ...func(*AbilityBonusQuery)) *SubraceQuery

WithNamedAbilityBonuses tells the query-builder to eager-load the nodes that are connected to the "ability_bonuses" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*SubraceQuery) WithNamedProficiencies

func (sq *SubraceQuery) WithNamedProficiencies(name string, opts ...func(*ProficiencyQuery)) *SubraceQuery

WithNamedProficiencies tells the query-builder to eager-load the nodes that are connected to the "proficiencies" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*SubraceQuery) WithNamedTraits

func (sq *SubraceQuery) WithNamedTraits(name string, opts ...func(*TraitQuery)) *SubraceQuery

WithNamedTraits tells the query-builder to eager-load the nodes that are connected to the "traits" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*SubraceQuery) WithProficiencies

func (sq *SubraceQuery) WithProficiencies(opts ...func(*ProficiencyQuery)) *SubraceQuery

WithProficiencies tells the query-builder to eager-load the nodes that are connected to the "proficiencies" edge. The optional arguments are used to configure the query builder of the edge.

func (*SubraceQuery) WithRace

func (sq *SubraceQuery) WithRace(opts ...func(*RaceQuery)) *SubraceQuery

WithRace tells the query-builder to eager-load the nodes that are connected to the "race" edge. The optional arguments are used to configure the query builder of the edge.

func (*SubraceQuery) WithTraits

func (sq *SubraceQuery) WithTraits(opts ...func(*TraitQuery)) *SubraceQuery

WithTraits tells the query-builder to eager-load the nodes that are connected to the "traits" edge. The optional arguments are used to configure the query builder of the edge.

type SubraceSelect

type SubraceSelect struct {
	*SubraceQuery
	// contains filtered or unexported fields
}

SubraceSelect is the builder for selecting fields of Subrace entities.

func (*SubraceSelect) Aggregate

func (ss *SubraceSelect) Aggregate(fns ...AggregateFunc) *SubraceSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SubraceSelect) Bool

func (s *SubraceSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SubraceSelect) BoolX

func (s *SubraceSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SubraceSelect) Bools

func (s *SubraceSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SubraceSelect) BoolsX

func (s *SubraceSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SubraceSelect) Float64

func (s *SubraceSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SubraceSelect) Float64X

func (s *SubraceSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SubraceSelect) Float64s

func (s *SubraceSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SubraceSelect) Float64sX

func (s *SubraceSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SubraceSelect) Int

func (s *SubraceSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SubraceSelect) IntX

func (s *SubraceSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SubraceSelect) Ints

func (s *SubraceSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SubraceSelect) IntsX

func (s *SubraceSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SubraceSelect) Scan

func (ss *SubraceSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SubraceSelect) ScanX

func (s *SubraceSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SubraceSelect) String

func (s *SubraceSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SubraceSelect) StringX

func (s *SubraceSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SubraceSelect) Strings

func (s *SubraceSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SubraceSelect) StringsX

func (s *SubraceSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SubraceUpdate

type SubraceUpdate struct {
	// contains filtered or unexported fields
}

SubraceUpdate is the builder for updating Subrace entities.

func (*SubraceUpdate) AddAbilityBonuseIDs

func (su *SubraceUpdate) AddAbilityBonuseIDs(ids ...int) *SubraceUpdate

AddAbilityBonuseIDs adds the "ability_bonuses" edge to the AbilityBonus entity by IDs.

func (*SubraceUpdate) AddAbilityBonuses

func (su *SubraceUpdate) AddAbilityBonuses(a ...*AbilityBonus) *SubraceUpdate

AddAbilityBonuses adds the "ability_bonuses" edges to the AbilityBonus entity.

func (*SubraceUpdate) AddProficiencies

func (su *SubraceUpdate) AddProficiencies(p ...*Proficiency) *SubraceUpdate

AddProficiencies adds the "proficiencies" edges to the Proficiency entity.

func (*SubraceUpdate) AddProficiencyIDs

func (su *SubraceUpdate) AddProficiencyIDs(ids ...int) *SubraceUpdate

AddProficiencyIDs adds the "proficiencies" edge to the Proficiency entity by IDs.

func (*SubraceUpdate) AddTraitIDs

func (su *SubraceUpdate) AddTraitIDs(ids ...int) *SubraceUpdate

AddTraitIDs adds the "traits" edge to the Trait entity by IDs.

func (*SubraceUpdate) AddTraits

func (su *SubraceUpdate) AddTraits(t ...*Trait) *SubraceUpdate

AddTraits adds the "traits" edges to the Trait entity.

func (*SubraceUpdate) ClearAbilityBonuses

func (su *SubraceUpdate) ClearAbilityBonuses() *SubraceUpdate

ClearAbilityBonuses clears all "ability_bonuses" edges to the AbilityBonus entity.

func (*SubraceUpdate) ClearProficiencies

func (su *SubraceUpdate) ClearProficiencies() *SubraceUpdate

ClearProficiencies clears all "proficiencies" edges to the Proficiency entity.

func (*SubraceUpdate) ClearRace

func (su *SubraceUpdate) ClearRace() *SubraceUpdate

ClearRace clears the "race" edge to the Race entity.

func (*SubraceUpdate) ClearTraits

func (su *SubraceUpdate) ClearTraits() *SubraceUpdate

ClearTraits clears all "traits" edges to the Trait entity.

func (*SubraceUpdate) Exec

func (su *SubraceUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SubraceUpdate) ExecX

func (su *SubraceUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubraceUpdate) Mutation

func (su *SubraceUpdate) Mutation() *SubraceMutation

Mutation returns the SubraceMutation object of the builder.

func (*SubraceUpdate) RemoveAbilityBonuseIDs

func (su *SubraceUpdate) RemoveAbilityBonuseIDs(ids ...int) *SubraceUpdate

RemoveAbilityBonuseIDs removes the "ability_bonuses" edge to AbilityBonus entities by IDs.

func (*SubraceUpdate) RemoveAbilityBonuses

func (su *SubraceUpdate) RemoveAbilityBonuses(a ...*AbilityBonus) *SubraceUpdate

RemoveAbilityBonuses removes "ability_bonuses" edges to AbilityBonus entities.

func (*SubraceUpdate) RemoveProficiencies

func (su *SubraceUpdate) RemoveProficiencies(p ...*Proficiency) *SubraceUpdate

RemoveProficiencies removes "proficiencies" edges to Proficiency entities.

func (*SubraceUpdate) RemoveProficiencyIDs

func (su *SubraceUpdate) RemoveProficiencyIDs(ids ...int) *SubraceUpdate

RemoveProficiencyIDs removes the "proficiencies" edge to Proficiency entities by IDs.

func (*SubraceUpdate) RemoveTraitIDs

func (su *SubraceUpdate) RemoveTraitIDs(ids ...int) *SubraceUpdate

RemoveTraitIDs removes the "traits" edge to Trait entities by IDs.

func (*SubraceUpdate) RemoveTraits

func (su *SubraceUpdate) RemoveTraits(t ...*Trait) *SubraceUpdate

RemoveTraits removes "traits" edges to Trait entities.

func (*SubraceUpdate) Save

func (su *SubraceUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SubraceUpdate) SaveX

func (su *SubraceUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SubraceUpdate) SetDesc

func (su *SubraceUpdate) SetDesc(s string) *SubraceUpdate

SetDesc sets the "desc" field.

func (*SubraceUpdate) SetIndx

func (su *SubraceUpdate) SetIndx(s string) *SubraceUpdate

SetIndx sets the "indx" field.

func (*SubraceUpdate) SetName

func (su *SubraceUpdate) SetName(s string) *SubraceUpdate

SetName sets the "name" field.

func (*SubraceUpdate) SetNillableRaceID

func (su *SubraceUpdate) SetNillableRaceID(id *int) *SubraceUpdate

SetNillableRaceID sets the "race" edge to the Race entity by ID if the given value is not nil.

func (*SubraceUpdate) SetRace

func (su *SubraceUpdate) SetRace(r *Race) *SubraceUpdate

SetRace sets the "race" edge to the Race entity.

func (*SubraceUpdate) SetRaceID

func (su *SubraceUpdate) SetRaceID(id int) *SubraceUpdate

SetRaceID sets the "race" edge to the Race entity by ID.

func (*SubraceUpdate) Where

func (su *SubraceUpdate) Where(ps ...predicate.Subrace) *SubraceUpdate

Where appends a list predicates to the SubraceUpdate builder.

type SubraceUpdateOne

type SubraceUpdateOne struct {
	// contains filtered or unexported fields
}

SubraceUpdateOne is the builder for updating a single Subrace entity.

func (*SubraceUpdateOne) AddAbilityBonuseIDs

func (suo *SubraceUpdateOne) AddAbilityBonuseIDs(ids ...int) *SubraceUpdateOne

AddAbilityBonuseIDs adds the "ability_bonuses" edge to the AbilityBonus entity by IDs.

func (*SubraceUpdateOne) AddAbilityBonuses

func (suo *SubraceUpdateOne) AddAbilityBonuses(a ...*AbilityBonus) *SubraceUpdateOne

AddAbilityBonuses adds the "ability_bonuses" edges to the AbilityBonus entity.

func (*SubraceUpdateOne) AddProficiencies

func (suo *SubraceUpdateOne) AddProficiencies(p ...*Proficiency) *SubraceUpdateOne

AddProficiencies adds the "proficiencies" edges to the Proficiency entity.

func (*SubraceUpdateOne) AddProficiencyIDs

func (suo *SubraceUpdateOne) AddProficiencyIDs(ids ...int) *SubraceUpdateOne

AddProficiencyIDs adds the "proficiencies" edge to the Proficiency entity by IDs.

func (*SubraceUpdateOne) AddTraitIDs

func (suo *SubraceUpdateOne) AddTraitIDs(ids ...int) *SubraceUpdateOne

AddTraitIDs adds the "traits" edge to the Trait entity by IDs.

func (*SubraceUpdateOne) AddTraits

func (suo *SubraceUpdateOne) AddTraits(t ...*Trait) *SubraceUpdateOne

AddTraits adds the "traits" edges to the Trait entity.

func (*SubraceUpdateOne) ClearAbilityBonuses

func (suo *SubraceUpdateOne) ClearAbilityBonuses() *SubraceUpdateOne

ClearAbilityBonuses clears all "ability_bonuses" edges to the AbilityBonus entity.

func (*SubraceUpdateOne) ClearProficiencies

func (suo *SubraceUpdateOne) ClearProficiencies() *SubraceUpdateOne

ClearProficiencies clears all "proficiencies" edges to the Proficiency entity.

func (*SubraceUpdateOne) ClearRace

func (suo *SubraceUpdateOne) ClearRace() *SubraceUpdateOne

ClearRace clears the "race" edge to the Race entity.

func (*SubraceUpdateOne) ClearTraits

func (suo *SubraceUpdateOne) ClearTraits() *SubraceUpdateOne

ClearTraits clears all "traits" edges to the Trait entity.

func (*SubraceUpdateOne) Exec

func (suo *SubraceUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SubraceUpdateOne) ExecX

func (suo *SubraceUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SubraceUpdateOne) Mutation

func (suo *SubraceUpdateOne) Mutation() *SubraceMutation

Mutation returns the SubraceMutation object of the builder.

func (*SubraceUpdateOne) RemoveAbilityBonuseIDs

func (suo *SubraceUpdateOne) RemoveAbilityBonuseIDs(ids ...int) *SubraceUpdateOne

RemoveAbilityBonuseIDs removes the "ability_bonuses" edge to AbilityBonus entities by IDs.

func (*SubraceUpdateOne) RemoveAbilityBonuses

func (suo *SubraceUpdateOne) RemoveAbilityBonuses(a ...*AbilityBonus) *SubraceUpdateOne

RemoveAbilityBonuses removes "ability_bonuses" edges to AbilityBonus entities.

func (*SubraceUpdateOne) RemoveProficiencies

func (suo *SubraceUpdateOne) RemoveProficiencies(p ...*Proficiency) *SubraceUpdateOne

RemoveProficiencies removes "proficiencies" edges to Proficiency entities.

func (*SubraceUpdateOne) RemoveProficiencyIDs

func (suo *SubraceUpdateOne) RemoveProficiencyIDs(ids ...int) *SubraceUpdateOne

RemoveProficiencyIDs removes the "proficiencies" edge to Proficiency entities by IDs.

func (*SubraceUpdateOne) RemoveTraitIDs

func (suo *SubraceUpdateOne) RemoveTraitIDs(ids ...int) *SubraceUpdateOne

RemoveTraitIDs removes the "traits" edge to Trait entities by IDs.

func (*SubraceUpdateOne) RemoveTraits

func (suo *SubraceUpdateOne) RemoveTraits(t ...*Trait) *SubraceUpdateOne

RemoveTraits removes "traits" edges to Trait entities.

func (*SubraceUpdateOne) Save

func (suo *SubraceUpdateOne) Save(ctx context.Context) (*Subrace, error)

Save executes the query and returns the updated Subrace entity.

func (*SubraceUpdateOne) SaveX

func (suo *SubraceUpdateOne) SaveX(ctx context.Context) *Subrace

SaveX is like Save, but panics if an error occurs.

func (*SubraceUpdateOne) Select

func (suo *SubraceUpdateOne) Select(field string, fields ...string) *SubraceUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SubraceUpdateOne) SetDesc

func (suo *SubraceUpdateOne) SetDesc(s string) *SubraceUpdateOne

SetDesc sets the "desc" field.

func (*SubraceUpdateOne) SetIndx

func (suo *SubraceUpdateOne) SetIndx(s string) *SubraceUpdateOne

SetIndx sets the "indx" field.

func (*SubraceUpdateOne) SetName

func (suo *SubraceUpdateOne) SetName(s string) *SubraceUpdateOne

SetName sets the "name" field.

func (*SubraceUpdateOne) SetNillableRaceID

func (suo *SubraceUpdateOne) SetNillableRaceID(id *int) *SubraceUpdateOne

SetNillableRaceID sets the "race" edge to the Race entity by ID if the given value is not nil.

func (*SubraceUpdateOne) SetRace

func (suo *SubraceUpdateOne) SetRace(r *Race) *SubraceUpdateOne

SetRace sets the "race" edge to the Race entity.

func (*SubraceUpdateOne) SetRaceID

func (suo *SubraceUpdateOne) SetRaceID(id int) *SubraceUpdateOne

SetRaceID sets the "race" edge to the Race entity by ID.

func (*SubraceUpdateOne) Where

Where appends a list predicates to the SubraceUpdate builder.

type SubraceWhereInput

type SubraceWhereInput struct {
	Predicates []predicate.Subrace  `json:"-"`
	Not        *SubraceWhereInput   `json:"not,omitempty"`
	Or         []*SubraceWhereInput `json:"or,omitempty"`
	And        []*SubraceWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "indx" field predicates.
	Indx             *string  `json:"indx,omitempty"`
	IndxNEQ          *string  `json:"indxNEQ,omitempty"`
	IndxIn           []string `json:"indxIn,omitempty"`
	IndxNotIn        []string `json:"indxNotIn,omitempty"`
	IndxGT           *string  `json:"indxGT,omitempty"`
	IndxGTE          *string  `json:"indxGTE,omitempty"`
	IndxLT           *string  `json:"indxLT,omitempty"`
	IndxLTE          *string  `json:"indxLTE,omitempty"`
	IndxContains     *string  `json:"indxContains,omitempty"`
	IndxHasPrefix    *string  `json:"indxHasPrefix,omitempty"`
	IndxHasSuffix    *string  `json:"indxHasSuffix,omitempty"`
	IndxEqualFold    *string  `json:"indxEqualFold,omitempty"`
	IndxContainsFold *string  `json:"indxContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "desc" field predicates.
	Desc             *string  `json:"desc,omitempty"`
	DescNEQ          *string  `json:"descNEQ,omitempty"`
	DescIn           []string `json:"descIn,omitempty"`
	DescNotIn        []string `json:"descNotIn,omitempty"`
	DescGT           *string  `json:"descGT,omitempty"`
	DescGTE          *string  `json:"descGTE,omitempty"`
	DescLT           *string  `json:"descLT,omitempty"`
	DescLTE          *string  `json:"descLTE,omitempty"`
	DescContains     *string  `json:"descContains,omitempty"`
	DescHasPrefix    *string  `json:"descHasPrefix,omitempty"`
	DescHasSuffix    *string  `json:"descHasSuffix,omitempty"`
	DescEqualFold    *string  `json:"descEqualFold,omitempty"`
	DescContainsFold *string  `json:"descContainsFold,omitempty"`

	// "race" edge predicates.
	HasRace     *bool             `json:"hasRace,omitempty"`
	HasRaceWith []*RaceWhereInput `json:"hasRaceWith,omitempty"`

	// "proficiencies" edge predicates.
	HasProficiencies     *bool                    `json:"hasProficiencies,omitempty"`
	HasProficienciesWith []*ProficiencyWhereInput `json:"hasProficienciesWith,omitempty"`

	// "traits" edge predicates.
	HasTraits     *bool              `json:"hasTraits,omitempty"`
	HasTraitsWith []*TraitWhereInput `json:"hasTraitsWith,omitempty"`

	// "ability_bonuses" edge predicates.
	HasAbilityBonuses     *bool                     `json:"hasAbilityBonuses,omitempty"`
	HasAbilityBonusesWith []*AbilityBonusWhereInput `json:"hasAbilityBonusesWith,omitempty"`
}

SubraceWhereInput represents a where input for filtering Subrace queries.

func (*SubraceWhereInput) AddPredicates

func (i *SubraceWhereInput) AddPredicates(predicates ...predicate.Subrace)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*SubraceWhereInput) Filter

Filter applies the SubraceWhereInput filter on the SubraceQuery builder.

func (*SubraceWhereInput) P

P returns a predicate for filtering subraces. An error is returned if the input is empty or invalid.

type Subraces

type Subraces []*Subrace

Subraces is a parsable slice of Subrace.

type Tool

type Tool struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Indx holds the value of the "indx" field.
	Indx string `json:"index"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// ToolCategory holds the value of the "tool_category" field.
	ToolCategory string `json:"tool_category,omitempty"`
	// EquipmentID holds the value of the "equipment_id" field.
	EquipmentID int `json:"equipment_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ToolQuery when eager-loading is set.
	Edges ToolEdges `json:"-"`
	// contains filtered or unexported fields
}

Tool is the model entity for the Tool schema.

func (*Tool) Equipment

func (t *Tool) Equipment(ctx context.Context) (*Equipment, error)

func (*Tool) IsNode

func (n *Tool) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Tool) MarshalJSON

func (t *Tool) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Tool) Node

func (t *Tool) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*Tool) QueryEquipment

func (t *Tool) QueryEquipment() *EquipmentQuery

QueryEquipment queries the "equipment" edge of the Tool entity.

func (*Tool) String

func (t *Tool) String() string

String implements the fmt.Stringer.

func (*Tool) ToEdge

func (t *Tool) ToEdge(order *ToolOrder) *ToolEdge

ToEdge converts Tool into ToolEdge.

func (*Tool) UnmarshalJSON

func (t *Tool) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*Tool) Unwrap

func (t *Tool) Unwrap() *Tool

Unwrap unwraps the Tool entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Tool) Update

func (t *Tool) Update() *ToolUpdateOne

Update returns a builder for updating this Tool. Note that you need to call Tool.Unwrap() before calling this method if this Tool was returned from a transaction, and the transaction was committed or rolled back.

func (*Tool) Value

func (t *Tool) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Tool. This includes values selected through modifiers, order, etc.

type ToolClient

type ToolClient struct {
	// contains filtered or unexported fields
}

ToolClient is a client for the Tool schema.

func NewToolClient

func NewToolClient(c config) *ToolClient

NewToolClient returns a client for the Tool from the given config.

func (*ToolClient) Create

func (c *ToolClient) Create() *ToolCreate

Create returns a builder for creating a Tool entity.

func (*ToolClient) CreateBulk

func (c *ToolClient) CreateBulk(builders ...*ToolCreate) *ToolCreateBulk

CreateBulk returns a builder for creating a bulk of Tool entities.

func (*ToolClient) Delete

func (c *ToolClient) Delete() *ToolDelete

Delete returns a delete builder for Tool.

func (*ToolClient) DeleteOne

func (c *ToolClient) DeleteOne(t *Tool) *ToolDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ToolClient) DeleteOneID

func (c *ToolClient) DeleteOneID(id int) *ToolDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ToolClient) Get

func (c *ToolClient) Get(ctx context.Context, id int) (*Tool, error)

Get returns a Tool entity by its id.

func (*ToolClient) GetX

func (c *ToolClient) GetX(ctx context.Context, id int) *Tool

GetX is like Get, but panics if an error occurs.

func (*ToolClient) Hooks

func (c *ToolClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ToolClient) Intercept

func (c *ToolClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tool.Intercept(f(g(h())))`.

func (*ToolClient) Interceptors

func (c *ToolClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ToolClient) Query

func (c *ToolClient) Query() *ToolQuery

Query returns a query builder for Tool.

func (*ToolClient) QueryEquipment

func (c *ToolClient) QueryEquipment(t *Tool) *EquipmentQuery

QueryEquipment queries the equipment edge of a Tool.

func (*ToolClient) Update

func (c *ToolClient) Update() *ToolUpdate

Update returns an update builder for Tool.

func (*ToolClient) UpdateOne

func (c *ToolClient) UpdateOne(t *Tool) *ToolUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ToolClient) UpdateOneID

func (c *ToolClient) UpdateOneID(id int) *ToolUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ToolClient) Use

func (c *ToolClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tool.Hooks(f(g(h())))`.

type ToolConnection

type ToolConnection struct {
	Edges      []*ToolEdge `json:"edges"`
	PageInfo   PageInfo    `json:"pageInfo"`
	TotalCount int         `json:"totalCount"`
}

ToolConnection is the connection containing edges to Tool.

type ToolCreate

type ToolCreate struct {
	// contains filtered or unexported fields
}

ToolCreate is the builder for creating a Tool entity.

func (*ToolCreate) Exec

func (tc *ToolCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ToolCreate) ExecX

func (tc *ToolCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ToolCreate) Mutation

func (tc *ToolCreate) Mutation() *ToolMutation

Mutation returns the ToolMutation object of the builder.

func (*ToolCreate) Save

func (tc *ToolCreate) Save(ctx context.Context) (*Tool, error)

Save creates the Tool in the database.

func (*ToolCreate) SaveX

func (tc *ToolCreate) SaveX(ctx context.Context) *Tool

SaveX calls Save and panics if Save returns an error.

func (*ToolCreate) SetEquipment

func (tc *ToolCreate) SetEquipment(e *Equipment) *ToolCreate

SetEquipment sets the "equipment" edge to the Equipment entity.

func (*ToolCreate) SetEquipmentID

func (tc *ToolCreate) SetEquipmentID(i int) *ToolCreate

SetEquipmentID sets the "equipment_id" field.

func (*ToolCreate) SetIndx

func (tc *ToolCreate) SetIndx(s string) *ToolCreate

SetIndx sets the "indx" field.

func (*ToolCreate) SetName

func (tc *ToolCreate) SetName(s string) *ToolCreate

SetName sets the "name" field.

func (*ToolCreate) SetTool

func (tc *ToolCreate) SetTool(input *Tool) *ToolCreate

func (*ToolCreate) SetToolCategory

func (tc *ToolCreate) SetToolCategory(s string) *ToolCreate

SetToolCategory sets the "tool_category" field.

type ToolCreateBulk

type ToolCreateBulk struct {
	// contains filtered or unexported fields
}

ToolCreateBulk is the builder for creating many Tool entities in bulk.

func (*ToolCreateBulk) Exec

func (tcb *ToolCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ToolCreateBulk) ExecX

func (tcb *ToolCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ToolCreateBulk) Save

func (tcb *ToolCreateBulk) Save(ctx context.Context) ([]*Tool, error)

Save creates the Tool entities in the database.

func (*ToolCreateBulk) SaveX

func (tcb *ToolCreateBulk) SaveX(ctx context.Context) []*Tool

SaveX is like Save, but panics if an error occurs.

type ToolDelete

type ToolDelete struct {
	// contains filtered or unexported fields
}

ToolDelete is the builder for deleting a Tool entity.

func (*ToolDelete) Exec

func (td *ToolDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ToolDelete) ExecX

func (td *ToolDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ToolDelete) Where

func (td *ToolDelete) Where(ps ...predicate.Tool) *ToolDelete

Where appends a list predicates to the ToolDelete builder.

type ToolDeleteOne

type ToolDeleteOne struct {
	// contains filtered or unexported fields
}

ToolDeleteOne is the builder for deleting a single Tool entity.

func (*ToolDeleteOne) Exec

func (tdo *ToolDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ToolDeleteOne) ExecX

func (tdo *ToolDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ToolDeleteOne) Where

func (tdo *ToolDeleteOne) Where(ps ...predicate.Tool) *ToolDeleteOne

Where appends a list predicates to the ToolDelete builder.

type ToolEdge

type ToolEdge struct {
	Node   *Tool  `json:"node"`
	Cursor Cursor `json:"cursor"`
}

ToolEdge is the edge representation of Tool.

type ToolEdges

type ToolEdges struct {
	// Equipment holds the value of the equipment edge.
	Equipment *Equipment `json:"equipment,omitempty"`
	// contains filtered or unexported fields
}

ToolEdges holds the relations/edges for other nodes in the graph.

func (ToolEdges) EquipmentOrErr

func (e ToolEdges) EquipmentOrErr() (*Equipment, error)

EquipmentOrErr returns the Equipment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ToolGroupBy

type ToolGroupBy struct {
	// contains filtered or unexported fields
}

ToolGroupBy is the group-by builder for Tool entities.

func (*ToolGroupBy) Aggregate

func (tgb *ToolGroupBy) Aggregate(fns ...AggregateFunc) *ToolGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ToolGroupBy) Bool

func (s *ToolGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ToolGroupBy) BoolX

func (s *ToolGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ToolGroupBy) Bools

func (s *ToolGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ToolGroupBy) BoolsX

func (s *ToolGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ToolGroupBy) Float64

func (s *ToolGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ToolGroupBy) Float64X

func (s *ToolGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ToolGroupBy) Float64s

func (s *ToolGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ToolGroupBy) Float64sX

func (s *ToolGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ToolGroupBy) Int

func (s *ToolGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ToolGroupBy) IntX

func (s *ToolGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ToolGroupBy) Ints

func (s *ToolGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ToolGroupBy) IntsX

func (s *ToolGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ToolGroupBy) Scan

func (tgb *ToolGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ToolGroupBy) ScanX

func (s *ToolGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ToolGroupBy) String

func (s *ToolGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ToolGroupBy) StringX

func (s *ToolGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ToolGroupBy) Strings

func (s *ToolGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ToolGroupBy) StringsX

func (s *ToolGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ToolMutation

type ToolMutation struct {
	// contains filtered or unexported fields
}

ToolMutation represents an operation that mutates the Tool nodes in the graph.

func (*ToolMutation) AddField

func (m *ToolMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ToolMutation) AddedEdges

func (m *ToolMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ToolMutation) AddedField

func (m *ToolMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ToolMutation) AddedFields

func (m *ToolMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ToolMutation) AddedIDs

func (m *ToolMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ToolMutation) ClearEdge

func (m *ToolMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*ToolMutation) ClearEquipment

func (m *ToolMutation) ClearEquipment()

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*ToolMutation) ClearField

func (m *ToolMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*ToolMutation) ClearedEdges

func (m *ToolMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ToolMutation) ClearedFields

func (m *ToolMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ToolMutation) Client

func (m ToolMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*ToolMutation) EdgeCleared

func (m *ToolMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ToolMutation) EquipmentCleared

func (m *ToolMutation) EquipmentCleared() bool

EquipmentCleared reports if the "equipment" edge to the Equipment entity was cleared.

func (*ToolMutation) EquipmentID

func (m *ToolMutation) EquipmentID() (r int, exists bool)

EquipmentID returns the value of the "equipment_id" field in the mutation.

func (*ToolMutation) EquipmentIDs

func (m *ToolMutation) EquipmentIDs() (ids []int)

EquipmentIDs returns the "equipment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EquipmentID instead. It exists only for internal usage by the builders.

func (*ToolMutation) Field

func (m *ToolMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ToolMutation) FieldCleared

func (m *ToolMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ToolMutation) Fields

func (m *ToolMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*ToolMutation) ID

func (m *ToolMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*ToolMutation) IDs

func (m *ToolMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*ToolMutation) Indx

func (m *ToolMutation) Indx() (r string, exists bool)

Indx returns the value of the "indx" field in the mutation.

func (*ToolMutation) Name

func (m *ToolMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ToolMutation) OldEquipmentID

func (m *ToolMutation) OldEquipmentID(ctx context.Context) (v int, err error)

OldEquipmentID returns the old "equipment_id" field's value of the Tool entity. If the Tool object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ToolMutation) OldField

func (m *ToolMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*ToolMutation) OldIndx

func (m *ToolMutation) OldIndx(ctx context.Context) (v string, err error)

OldIndx returns the old "indx" field's value of the Tool entity. If the Tool object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ToolMutation) OldName

func (m *ToolMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Tool entity. If the Tool object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ToolMutation) OldToolCategory

func (m *ToolMutation) OldToolCategory(ctx context.Context) (v string, err error)

OldToolCategory returns the old "tool_category" field's value of the Tool entity. If the Tool object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ToolMutation) Op

func (m *ToolMutation) Op() Op

Op returns the operation name.

func (*ToolMutation) RemovedEdges

func (m *ToolMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ToolMutation) RemovedIDs

func (m *ToolMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*ToolMutation) ResetEdge

func (m *ToolMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*ToolMutation) ResetEquipment

func (m *ToolMutation) ResetEquipment()

ResetEquipment resets all changes to the "equipment" edge.

func (*ToolMutation) ResetEquipmentID

func (m *ToolMutation) ResetEquipmentID()

ResetEquipmentID resets all changes to the "equipment_id" field.

func (*ToolMutation) ResetField

func (m *ToolMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*ToolMutation) ResetIndx

func (m *ToolMutation) ResetIndx()

ResetIndx resets all changes to the "indx" field.

func (*ToolMutation) ResetName

func (m *ToolMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ToolMutation) ResetToolCategory

func (m *ToolMutation) ResetToolCategory()

ResetToolCategory resets all changes to the "tool_category" field.

func (*ToolMutation) SetEquipmentID

func (m *ToolMutation) SetEquipmentID(i int)

SetEquipmentID sets the "equipment_id" field.

func (*ToolMutation) SetField

func (m *ToolMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ToolMutation) SetIndx

func (m *ToolMutation) SetIndx(s string)

SetIndx sets the "indx" field.

func (*ToolMutation) SetName

func (m *ToolMutation) SetName(s string)

SetName sets the "name" field.

func (*ToolMutation) SetOp

func (m *ToolMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ToolMutation) SetToolCategory

func (m *ToolMutation) SetToolCategory(s string)

SetToolCategory sets the "tool_category" field.

func (*ToolMutation) ToolCategory

func (m *ToolMutation) ToolCategory() (r string, exists bool)

ToolCategory returns the value of the "tool_category" field in the mutation.

func (ToolMutation) Tx

func (m ToolMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ToolMutation) Type

func (m *ToolMutation) Type() string

Type returns the node type of this mutation (Tool).

func (*ToolMutation) Where

func (m *ToolMutation) Where(ps ...predicate.Tool)

Where appends a list predicates to the ToolMutation builder.

func (*ToolMutation) WhereP

func (m *ToolMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ToolMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ToolOrder

type ToolOrder struct {
	Direction OrderDirection  `json:"direction"`
	Field     *ToolOrderField `json:"field"`
}

ToolOrder defines the ordering of Tool.

type ToolOrderField

type ToolOrderField struct {
	// Value extracts the ordering value from the given Tool.
	Value func(*Tool) (ent.Value, error)
	// contains filtered or unexported fields
}

ToolOrderField defines the ordering field of Tool.

func (ToolOrderField) MarshalGQL

func (f ToolOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (ToolOrderField) String

func (f ToolOrderField) String() string

String implement fmt.Stringer interface.

func (*ToolOrderField) UnmarshalGQL

func (f *ToolOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type ToolPaginateOption

type ToolPaginateOption func(*toolPager) error

ToolPaginateOption enables pagination customization.

func WithToolFilter

func WithToolFilter(filter func(*ToolQuery) (*ToolQuery, error)) ToolPaginateOption

WithToolFilter configures pagination filter.

func WithToolOrder

func WithToolOrder(order *ToolOrder) ToolPaginateOption

WithToolOrder configures pagination ordering.

type ToolQuery

type ToolQuery struct {
	// contains filtered or unexported fields
}

ToolQuery is the builder for querying Tool entities.

func (*ToolQuery) Aggregate

func (tq *ToolQuery) Aggregate(fns ...AggregateFunc) *ToolSelect

Aggregate returns a ToolSelect configured with the given aggregations.

func (*ToolQuery) All

func (tq *ToolQuery) All(ctx context.Context) ([]*Tool, error)

All executes the query and returns a list of Tools.

func (*ToolQuery) AllX

func (tq *ToolQuery) AllX(ctx context.Context) []*Tool

AllX is like All, but panics if an error occurs.

func (*ToolQuery) Clone

func (tq *ToolQuery) Clone() *ToolQuery

Clone returns a duplicate of the ToolQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ToolQuery) CollectFields

func (t *ToolQuery) CollectFields(ctx context.Context, satisfies ...string) (*ToolQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*ToolQuery) Count

func (tq *ToolQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ToolQuery) CountX

func (tq *ToolQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ToolQuery) Exist

func (tq *ToolQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ToolQuery) ExistX

func (tq *ToolQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ToolQuery) First

func (tq *ToolQuery) First(ctx context.Context) (*Tool, error)

First returns the first Tool entity from the query. Returns a *NotFoundError when no Tool was found.

func (*ToolQuery) FirstID

func (tq *ToolQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Tool ID from the query. Returns a *NotFoundError when no Tool ID was found.

func (*ToolQuery) FirstIDX

func (tq *ToolQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*ToolQuery) FirstX

func (tq *ToolQuery) FirstX(ctx context.Context) *Tool

FirstX is like First, but panics if an error occurs.

func (*ToolQuery) GroupBy

func (tq *ToolQuery) GroupBy(field string, fields ...string) *ToolGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Indx string `json:"index"`
	Count int `json:"count,omitempty"`
}

client.Tool.Query().
	GroupBy(tool.FieldIndx).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ToolQuery) IDs

func (tq *ToolQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Tool IDs.

func (*ToolQuery) IDsX

func (tq *ToolQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*ToolQuery) Limit

func (tq *ToolQuery) Limit(limit int) *ToolQuery

Limit the number of records to be returned by this query.

func (*ToolQuery) Offset

func (tq *ToolQuery) Offset(offset int) *ToolQuery

Offset to start from.

func (*ToolQuery) Only

func (tq *ToolQuery) Only(ctx context.Context) (*Tool, error)

Only returns a single Tool entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Tool entity is found. Returns a *NotFoundError when no Tool entities are found.

func (*ToolQuery) OnlyID

func (tq *ToolQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Tool ID in the query. Returns a *NotSingularError when more than one Tool ID is found. Returns a *NotFoundError when no entities are found.

func (*ToolQuery) OnlyIDX

func (tq *ToolQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ToolQuery) OnlyX

func (tq *ToolQuery) OnlyX(ctx context.Context) *Tool

OnlyX is like Only, but panics if an error occurs.

func (*ToolQuery) Order

func (tq *ToolQuery) Order(o ...tool.OrderOption) *ToolQuery

Order specifies how the records should be ordered.

func (*ToolQuery) Paginate

func (t *ToolQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...ToolPaginateOption,
) (*ToolConnection, error)

Paginate executes the query and returns a relay based cursor connection to Tool.

func (*ToolQuery) QueryEquipment

func (tq *ToolQuery) QueryEquipment() *EquipmentQuery

QueryEquipment chains the current query on the "equipment" edge.

func (*ToolQuery) Select

func (tq *ToolQuery) Select(fields ...string) *ToolSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Indx string `json:"index"`
}

client.Tool.Query().
	Select(tool.FieldIndx).
	Scan(ctx, &v)

func (*ToolQuery) Unique

func (tq *ToolQuery) Unique(unique bool) *ToolQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*ToolQuery) Where

func (tq *ToolQuery) Where(ps ...predicate.Tool) *ToolQuery

Where adds a new predicate for the ToolQuery builder.

func (*ToolQuery) WithEquipment

func (tq *ToolQuery) WithEquipment(opts ...func(*EquipmentQuery)) *ToolQuery

WithEquipment tells the query-builder to eager-load the nodes that are connected to the "equipment" edge. The optional arguments are used to configure the query builder of the edge.

type ToolSelect

type ToolSelect struct {
	*ToolQuery
	// contains filtered or unexported fields
}

ToolSelect is the builder for selecting fields of Tool entities.

func (*ToolSelect) Aggregate

func (ts *ToolSelect) Aggregate(fns ...AggregateFunc) *ToolSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ToolSelect) Bool

func (s *ToolSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ToolSelect) BoolX

func (s *ToolSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ToolSelect) Bools

func (s *ToolSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ToolSelect) BoolsX

func (s *ToolSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ToolSelect) Float64

func (s *ToolSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ToolSelect) Float64X

func (s *ToolSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ToolSelect) Float64s

func (s *ToolSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ToolSelect) Float64sX

func (s *ToolSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ToolSelect) Int

func (s *ToolSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ToolSelect) IntX

func (s *ToolSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ToolSelect) Ints

func (s *ToolSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ToolSelect) IntsX

func (s *ToolSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ToolSelect) Scan

func (ts *ToolSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ToolSelect) ScanX

func (s *ToolSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ToolSelect) String

func (s *ToolSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ToolSelect) StringX

func (s *ToolSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ToolSelect) Strings

func (s *ToolSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ToolSelect) StringsX

func (s *ToolSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ToolUpdate

type ToolUpdate struct {
	// contains filtered or unexported fields
}

ToolUpdate is the builder for updating Tool entities.

func (*ToolUpdate) ClearEquipment

func (tu *ToolUpdate) ClearEquipment() *ToolUpdate

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*ToolUpdate) Exec

func (tu *ToolUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ToolUpdate) ExecX

func (tu *ToolUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ToolUpdate) Mutation

func (tu *ToolUpdate) Mutation() *ToolMutation

Mutation returns the ToolMutation object of the builder.

func (*ToolUpdate) Save

func (tu *ToolUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ToolUpdate) SaveX

func (tu *ToolUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ToolUpdate) SetEquipment

func (tu *ToolUpdate) SetEquipment(e *Equipment) *ToolUpdate

SetEquipment sets the "equipment" edge to the Equipment entity.

func (*ToolUpdate) SetEquipmentID

func (tu *ToolUpdate) SetEquipmentID(i int) *ToolUpdate

SetEquipmentID sets the "equipment_id" field.

func (*ToolUpdate) SetIndx

func (tu *ToolUpdate) SetIndx(s string) *ToolUpdate

SetIndx sets the "indx" field.

func (*ToolUpdate) SetName

func (tu *ToolUpdate) SetName(s string) *ToolUpdate

SetName sets the "name" field.

func (*ToolUpdate) SetToolCategory

func (tu *ToolUpdate) SetToolCategory(s string) *ToolUpdate

SetToolCategory sets the "tool_category" field.

func (*ToolUpdate) Where

func (tu *ToolUpdate) Where(ps ...predicate.Tool) *ToolUpdate

Where appends a list predicates to the ToolUpdate builder.

type ToolUpdateOne

type ToolUpdateOne struct {
	// contains filtered or unexported fields
}

ToolUpdateOne is the builder for updating a single Tool entity.

func (*ToolUpdateOne) ClearEquipment

func (tuo *ToolUpdateOne) ClearEquipment() *ToolUpdateOne

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*ToolUpdateOne) Exec

func (tuo *ToolUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ToolUpdateOne) ExecX

func (tuo *ToolUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ToolUpdateOne) Mutation

func (tuo *ToolUpdateOne) Mutation() *ToolMutation

Mutation returns the ToolMutation object of the builder.

func (*ToolUpdateOne) Save

func (tuo *ToolUpdateOne) Save(ctx context.Context) (*Tool, error)

Save executes the query and returns the updated Tool entity.

func (*ToolUpdateOne) SaveX

func (tuo *ToolUpdateOne) SaveX(ctx context.Context) *Tool

SaveX is like Save, but panics if an error occurs.

func (*ToolUpdateOne) Select

func (tuo *ToolUpdateOne) Select(field string, fields ...string) *ToolUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ToolUpdateOne) SetEquipment

func (tuo *ToolUpdateOne) SetEquipment(e *Equipment) *ToolUpdateOne

SetEquipment sets the "equipment" edge to the Equipment entity.

func (*ToolUpdateOne) SetEquipmentID

func (tuo *ToolUpdateOne) SetEquipmentID(i int) *ToolUpdateOne

SetEquipmentID sets the "equipment_id" field.

func (*ToolUpdateOne) SetIndx

func (tuo *ToolUpdateOne) SetIndx(s string) *ToolUpdateOne

SetIndx sets the "indx" field.

func (*ToolUpdateOne) SetName

func (tuo *ToolUpdateOne) SetName(s string) *ToolUpdateOne

SetName sets the "name" field.

func (*ToolUpdateOne) SetToolCategory

func (tuo *ToolUpdateOne) SetToolCategory(s string) *ToolUpdateOne

SetToolCategory sets the "tool_category" field.

func (*ToolUpdateOne) Where

func (tuo *ToolUpdateOne) Where(ps ...predicate.Tool) *ToolUpdateOne

Where appends a list predicates to the ToolUpdate builder.

type ToolWhereInput

type ToolWhereInput struct {
	Predicates []predicate.Tool  `json:"-"`
	Not        *ToolWhereInput   `json:"not,omitempty"`
	Or         []*ToolWhereInput `json:"or,omitempty"`
	And        []*ToolWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "indx" field predicates.
	Indx             *string  `json:"indx,omitempty"`
	IndxNEQ          *string  `json:"indxNEQ,omitempty"`
	IndxIn           []string `json:"indxIn,omitempty"`
	IndxNotIn        []string `json:"indxNotIn,omitempty"`
	IndxGT           *string  `json:"indxGT,omitempty"`
	IndxGTE          *string  `json:"indxGTE,omitempty"`
	IndxLT           *string  `json:"indxLT,omitempty"`
	IndxLTE          *string  `json:"indxLTE,omitempty"`
	IndxContains     *string  `json:"indxContains,omitempty"`
	IndxHasPrefix    *string  `json:"indxHasPrefix,omitempty"`
	IndxHasSuffix    *string  `json:"indxHasSuffix,omitempty"`
	IndxEqualFold    *string  `json:"indxEqualFold,omitempty"`
	IndxContainsFold *string  `json:"indxContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "tool_category" field predicates.
	ToolCategory             *string  `json:"toolCategory,omitempty"`
	ToolCategoryNEQ          *string  `json:"toolCategoryNEQ,omitempty"`
	ToolCategoryIn           []string `json:"toolCategoryIn,omitempty"`
	ToolCategoryNotIn        []string `json:"toolCategoryNotIn,omitempty"`
	ToolCategoryGT           *string  `json:"toolCategoryGT,omitempty"`
	ToolCategoryGTE          *string  `json:"toolCategoryGTE,omitempty"`
	ToolCategoryLT           *string  `json:"toolCategoryLT,omitempty"`
	ToolCategoryLTE          *string  `json:"toolCategoryLTE,omitempty"`
	ToolCategoryContains     *string  `json:"toolCategoryContains,omitempty"`
	ToolCategoryHasPrefix    *string  `json:"toolCategoryHasPrefix,omitempty"`
	ToolCategoryHasSuffix    *string  `json:"toolCategoryHasSuffix,omitempty"`
	ToolCategoryEqualFold    *string  `json:"toolCategoryEqualFold,omitempty"`
	ToolCategoryContainsFold *string  `json:"toolCategoryContainsFold,omitempty"`

	// "equipment_id" field predicates.
	EquipmentID      *int  `json:"equipmentID,omitempty"`
	EquipmentIDNEQ   *int  `json:"equipmentIDNEQ,omitempty"`
	EquipmentIDIn    []int `json:"equipmentIDIn,omitempty"`
	EquipmentIDNotIn []int `json:"equipmentIDNotIn,omitempty"`

	// "equipment" edge predicates.
	HasEquipment     *bool                  `json:"hasEquipment,omitempty"`
	HasEquipmentWith []*EquipmentWhereInput `json:"hasEquipmentWith,omitempty"`
}

ToolWhereInput represents a where input for filtering Tool queries.

func (*ToolWhereInput) AddPredicates

func (i *ToolWhereInput) AddPredicates(predicates ...predicate.Tool)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*ToolWhereInput) Filter

func (i *ToolWhereInput) Filter(q *ToolQuery) (*ToolQuery, error)

Filter applies the ToolWhereInput filter on the ToolQuery builder.

func (*ToolWhereInput) P

func (i *ToolWhereInput) P() (predicate.Tool, error)

P returns a predicate for filtering tools. An error is returned if the input is empty or invalid.

type Tools

type Tools []*Tool

Tools is a parsable slice of Tool.

type Trait

type Trait struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Indx holds the value of the "indx" field.
	Indx string `json:"index"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Desc holds the value of the "desc" field.
	Desc []string `json:"desc,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TraitQuery when eager-loading is set.
	Edges TraitEdges `json:"-"`
	// contains filtered or unexported fields
}

Trait is the model entity for the Trait schema.

func (*Trait) IsNode

func (n *Trait) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Trait) MarshalJSON

func (t *Trait) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Trait) NamedRaces

func (t *Trait) NamedRaces(name string) ([]*Race, error)

NamedRaces returns the Races named value or an error if the edge was not loaded in eager-loading with this name.

func (*Trait) NamedSubraces

func (t *Trait) NamedSubraces(name string) ([]*Subrace, error)

NamedSubraces returns the Subraces named value or an error if the edge was not loaded in eager-loading with this name.

func (*Trait) Node

func (t *Trait) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*Trait) QueryRaces

func (t *Trait) QueryRaces() *RaceQuery

QueryRaces queries the "races" edge of the Trait entity.

func (*Trait) QuerySubraces

func (t *Trait) QuerySubraces() *SubraceQuery

QuerySubraces queries the "subraces" edge of the Trait entity.

func (*Trait) Races

func (t *Trait) Races(ctx context.Context) (result []*Race, err error)

func (*Trait) String

func (t *Trait) String() string

String implements the fmt.Stringer.

func (*Trait) Subraces

func (t *Trait) Subraces(ctx context.Context) (result []*Subrace, err error)

func (*Trait) ToEdge

func (t *Trait) ToEdge(order *TraitOrder) *TraitEdge

ToEdge converts Trait into TraitEdge.

func (*Trait) UnmarshalJSON

func (t *Trait) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*Trait) Unwrap

func (t *Trait) Unwrap() *Trait

Unwrap unwraps the Trait entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Trait) Update

func (t *Trait) Update() *TraitUpdateOne

Update returns a builder for updating this Trait. Note that you need to call Trait.Unwrap() before calling this method if this Trait was returned from a transaction, and the transaction was committed or rolled back.

func (*Trait) Value

func (t *Trait) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Trait. This includes values selected through modifiers, order, etc.

type TraitClient

type TraitClient struct {
	// contains filtered or unexported fields
}

TraitClient is a client for the Trait schema.

func NewTraitClient

func NewTraitClient(c config) *TraitClient

NewTraitClient returns a client for the Trait from the given config.

func (*TraitClient) Create

func (c *TraitClient) Create() *TraitCreate

Create returns a builder for creating a Trait entity.

func (*TraitClient) CreateBulk

func (c *TraitClient) CreateBulk(builders ...*TraitCreate) *TraitCreateBulk

CreateBulk returns a builder for creating a bulk of Trait entities.

func (*TraitClient) Delete

func (c *TraitClient) Delete() *TraitDelete

Delete returns a delete builder for Trait.

func (*TraitClient) DeleteOne

func (c *TraitClient) DeleteOne(t *Trait) *TraitDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TraitClient) DeleteOneID

func (c *TraitClient) DeleteOneID(id int) *TraitDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*TraitClient) Get

func (c *TraitClient) Get(ctx context.Context, id int) (*Trait, error)

Get returns a Trait entity by its id.

func (*TraitClient) GetX

func (c *TraitClient) GetX(ctx context.Context, id int) *Trait

GetX is like Get, but panics if an error occurs.

func (*TraitClient) Hooks

func (c *TraitClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TraitClient) Intercept

func (c *TraitClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `trait.Intercept(f(g(h())))`.

func (*TraitClient) Interceptors

func (c *TraitClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*TraitClient) Query

func (c *TraitClient) Query() *TraitQuery

Query returns a query builder for Trait.

func (*TraitClient) QueryRaces

func (c *TraitClient) QueryRaces(t *Trait) *RaceQuery

QueryRaces queries the races edge of a Trait.

func (*TraitClient) QuerySubraces

func (c *TraitClient) QuerySubraces(t *Trait) *SubraceQuery

QuerySubraces queries the subraces edge of a Trait.

func (*TraitClient) Update

func (c *TraitClient) Update() *TraitUpdate

Update returns an update builder for Trait.

func (*TraitClient) UpdateOne

func (c *TraitClient) UpdateOne(t *Trait) *TraitUpdateOne

UpdateOne returns an update builder for the given entity.

func (*TraitClient) UpdateOneID

func (c *TraitClient) UpdateOneID(id int) *TraitUpdateOne

UpdateOneID returns an update builder for the given id.

func (*TraitClient) Use

func (c *TraitClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `trait.Hooks(f(g(h())))`.

type TraitConnection

type TraitConnection struct {
	Edges      []*TraitEdge `json:"edges"`
	PageInfo   PageInfo     `json:"pageInfo"`
	TotalCount int          `json:"totalCount"`
}

TraitConnection is the connection containing edges to Trait.

type TraitCreate

type TraitCreate struct {
	// contains filtered or unexported fields
}

TraitCreate is the builder for creating a Trait entity.

func (*TraitCreate) AddRaceIDs

func (tc *TraitCreate) AddRaceIDs(ids ...int) *TraitCreate

AddRaceIDs adds the "races" edge to the Race entity by IDs.

func (*TraitCreate) AddRaces

func (tc *TraitCreate) AddRaces(r ...*Race) *TraitCreate

AddRaces adds the "races" edges to the Race entity.

func (*TraitCreate) AddSubraceIDs

func (tc *TraitCreate) AddSubraceIDs(ids ...int) *TraitCreate

AddSubraceIDs adds the "subraces" edge to the Subrace entity by IDs.

func (*TraitCreate) AddSubraces

func (tc *TraitCreate) AddSubraces(s ...*Subrace) *TraitCreate

AddSubraces adds the "subraces" edges to the Subrace entity.

func (*TraitCreate) Exec

func (tc *TraitCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TraitCreate) ExecX

func (tc *TraitCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TraitCreate) Mutation

func (tc *TraitCreate) Mutation() *TraitMutation

Mutation returns the TraitMutation object of the builder.

func (*TraitCreate) Save

func (tc *TraitCreate) Save(ctx context.Context) (*Trait, error)

Save creates the Trait in the database.

func (*TraitCreate) SaveX

func (tc *TraitCreate) SaveX(ctx context.Context) *Trait

SaveX calls Save and panics if Save returns an error.

func (*TraitCreate) SetDesc

func (tc *TraitCreate) SetDesc(s []string) *TraitCreate

SetDesc sets the "desc" field.

func (*TraitCreate) SetIndx

func (tc *TraitCreate) SetIndx(s string) *TraitCreate

SetIndx sets the "indx" field.

func (*TraitCreate) SetName

func (tc *TraitCreate) SetName(s string) *TraitCreate

SetName sets the "name" field.

func (*TraitCreate) SetTrait

func (tc *TraitCreate) SetTrait(input *Trait) *TraitCreate

type TraitCreateBulk

type TraitCreateBulk struct {
	// contains filtered or unexported fields
}

TraitCreateBulk is the builder for creating many Trait entities in bulk.

func (*TraitCreateBulk) Exec

func (tcb *TraitCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TraitCreateBulk) ExecX

func (tcb *TraitCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TraitCreateBulk) Save

func (tcb *TraitCreateBulk) Save(ctx context.Context) ([]*Trait, error)

Save creates the Trait entities in the database.

func (*TraitCreateBulk) SaveX

func (tcb *TraitCreateBulk) SaveX(ctx context.Context) []*Trait

SaveX is like Save, but panics if an error occurs.

type TraitDelete

type TraitDelete struct {
	// contains filtered or unexported fields
}

TraitDelete is the builder for deleting a Trait entity.

func (*TraitDelete) Exec

func (td *TraitDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TraitDelete) ExecX

func (td *TraitDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TraitDelete) Where

func (td *TraitDelete) Where(ps ...predicate.Trait) *TraitDelete

Where appends a list predicates to the TraitDelete builder.

type TraitDeleteOne

type TraitDeleteOne struct {
	// contains filtered or unexported fields
}

TraitDeleteOne is the builder for deleting a single Trait entity.

func (*TraitDeleteOne) Exec

func (tdo *TraitDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TraitDeleteOne) ExecX

func (tdo *TraitDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TraitDeleteOne) Where

func (tdo *TraitDeleteOne) Where(ps ...predicate.Trait) *TraitDeleteOne

Where appends a list predicates to the TraitDelete builder.

type TraitEdge

type TraitEdge struct {
	Node   *Trait `json:"node"`
	Cursor Cursor `json:"cursor"`
}

TraitEdge is the edge representation of Trait.

type TraitEdges

type TraitEdges struct {
	// Races holds the value of the races edge.
	Races []*Race `json:"races,omitempty"`
	// Subraces holds the value of the subraces edge.
	Subraces []*Subrace `json:"subraces,omitempty"`
	// contains filtered or unexported fields
}

TraitEdges holds the relations/edges for other nodes in the graph.

func (TraitEdges) RacesOrErr

func (e TraitEdges) RacesOrErr() ([]*Race, error)

RacesOrErr returns the Races value or an error if the edge was not loaded in eager-loading.

func (TraitEdges) SubracesOrErr

func (e TraitEdges) SubracesOrErr() ([]*Subrace, error)

SubracesOrErr returns the Subraces value or an error if the edge was not loaded in eager-loading.

type TraitGroupBy

type TraitGroupBy struct {
	// contains filtered or unexported fields
}

TraitGroupBy is the group-by builder for Trait entities.

func (*TraitGroupBy) Aggregate

func (tgb *TraitGroupBy) Aggregate(fns ...AggregateFunc) *TraitGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TraitGroupBy) Bool

func (s *TraitGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TraitGroupBy) BoolX

func (s *TraitGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TraitGroupBy) Bools

func (s *TraitGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TraitGroupBy) BoolsX

func (s *TraitGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TraitGroupBy) Float64

func (s *TraitGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TraitGroupBy) Float64X

func (s *TraitGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TraitGroupBy) Float64s

func (s *TraitGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TraitGroupBy) Float64sX

func (s *TraitGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TraitGroupBy) Int

func (s *TraitGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TraitGroupBy) IntX

func (s *TraitGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TraitGroupBy) Ints

func (s *TraitGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TraitGroupBy) IntsX

func (s *TraitGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TraitGroupBy) Scan

func (tgb *TraitGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TraitGroupBy) ScanX

func (s *TraitGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TraitGroupBy) String

func (s *TraitGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TraitGroupBy) StringX

func (s *TraitGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TraitGroupBy) Strings

func (s *TraitGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TraitGroupBy) StringsX

func (s *TraitGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TraitMutation

type TraitMutation struct {
	// contains filtered or unexported fields
}

TraitMutation represents an operation that mutates the Trait nodes in the graph.

func (*TraitMutation) AddField

func (m *TraitMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*TraitMutation) AddRaceIDs

func (m *TraitMutation) AddRaceIDs(ids ...int)

AddRaceIDs adds the "races" edge to the Race entity by ids.

func (*TraitMutation) AddSubraceIDs

func (m *TraitMutation) AddSubraceIDs(ids ...int)

AddSubraceIDs adds the "subraces" edge to the Subrace entity by ids.

func (*TraitMutation) AddedEdges

func (m *TraitMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TraitMutation) AddedField

func (m *TraitMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*TraitMutation) AddedFields

func (m *TraitMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TraitMutation) AddedIDs

func (m *TraitMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TraitMutation) AppendDesc

func (m *TraitMutation) AppendDesc(s []string)

AppendDesc adds s to the "desc" field.

func (*TraitMutation) AppendedDesc

func (m *TraitMutation) AppendedDesc() ([]string, bool)

AppendedDesc returns the list of values that were appended to the "desc" field in this mutation.

func (*TraitMutation) ClearEdge

func (m *TraitMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*TraitMutation) ClearField

func (m *TraitMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*TraitMutation) ClearRaces

func (m *TraitMutation) ClearRaces()

ClearRaces clears the "races" edge to the Race entity.

func (*TraitMutation) ClearSubraces

func (m *TraitMutation) ClearSubraces()

ClearSubraces clears the "subraces" edge to the Subrace entity.

func (*TraitMutation) ClearedEdges

func (m *TraitMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TraitMutation) ClearedFields

func (m *TraitMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TraitMutation) Client

func (m TraitMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*TraitMutation) Desc

func (m *TraitMutation) Desc() (r []string, exists bool)

Desc returns the value of the "desc" field in the mutation.

func (*TraitMutation) EdgeCleared

func (m *TraitMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TraitMutation) Field

func (m *TraitMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*TraitMutation) FieldCleared

func (m *TraitMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TraitMutation) Fields

func (m *TraitMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*TraitMutation) ID

func (m *TraitMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*TraitMutation) IDs

func (m *TraitMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*TraitMutation) Indx

func (m *TraitMutation) Indx() (r string, exists bool)

Indx returns the value of the "indx" field in the mutation.

func (*TraitMutation) Name

func (m *TraitMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*TraitMutation) OldDesc

func (m *TraitMutation) OldDesc(ctx context.Context) (v []string, err error)

OldDesc returns the old "desc" field's value of the Trait entity. If the Trait object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TraitMutation) OldField

func (m *TraitMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*TraitMutation) OldIndx

func (m *TraitMutation) OldIndx(ctx context.Context) (v string, err error)

OldIndx returns the old "indx" field's value of the Trait entity. If the Trait object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TraitMutation) OldName

func (m *TraitMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Trait entity. If the Trait object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TraitMutation) Op

func (m *TraitMutation) Op() Op

Op returns the operation name.

func (*TraitMutation) RacesCleared

func (m *TraitMutation) RacesCleared() bool

RacesCleared reports if the "races" edge to the Race entity was cleared.

func (*TraitMutation) RacesIDs

func (m *TraitMutation) RacesIDs() (ids []int)

RacesIDs returns the "races" edge IDs in the mutation.

func (*TraitMutation) RemoveRaceIDs

func (m *TraitMutation) RemoveRaceIDs(ids ...int)

RemoveRaceIDs removes the "races" edge to the Race entity by IDs.

func (*TraitMutation) RemoveSubraceIDs

func (m *TraitMutation) RemoveSubraceIDs(ids ...int)

RemoveSubraceIDs removes the "subraces" edge to the Subrace entity by IDs.

func (*TraitMutation) RemovedEdges

func (m *TraitMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TraitMutation) RemovedIDs

func (m *TraitMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*TraitMutation) RemovedRacesIDs

func (m *TraitMutation) RemovedRacesIDs() (ids []int)

RemovedRaces returns the removed IDs of the "races" edge to the Race entity.

func (*TraitMutation) RemovedSubracesIDs

func (m *TraitMutation) RemovedSubracesIDs() (ids []int)

RemovedSubraces returns the removed IDs of the "subraces" edge to the Subrace entity.

func (*TraitMutation) ResetDesc

func (m *TraitMutation) ResetDesc()

ResetDesc resets all changes to the "desc" field.

func (*TraitMutation) ResetEdge

func (m *TraitMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*TraitMutation) ResetField

func (m *TraitMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*TraitMutation) ResetIndx

func (m *TraitMutation) ResetIndx()

ResetIndx resets all changes to the "indx" field.

func (*TraitMutation) ResetName

func (m *TraitMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*TraitMutation) ResetRaces

func (m *TraitMutation) ResetRaces()

ResetRaces resets all changes to the "races" edge.

func (*TraitMutation) ResetSubraces

func (m *TraitMutation) ResetSubraces()

ResetSubraces resets all changes to the "subraces" edge.

func (*TraitMutation) SetDesc

func (m *TraitMutation) SetDesc(s []string)

SetDesc sets the "desc" field.

func (*TraitMutation) SetField

func (m *TraitMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*TraitMutation) SetIndx

func (m *TraitMutation) SetIndx(s string)

SetIndx sets the "indx" field.

func (*TraitMutation) SetName

func (m *TraitMutation) SetName(s string)

SetName sets the "name" field.

func (*TraitMutation) SetOp

func (m *TraitMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*TraitMutation) SubracesCleared

func (m *TraitMutation) SubracesCleared() bool

SubracesCleared reports if the "subraces" edge to the Subrace entity was cleared.

func (*TraitMutation) SubracesIDs

func (m *TraitMutation) SubracesIDs() (ids []int)

SubracesIDs returns the "subraces" edge IDs in the mutation.

func (TraitMutation) Tx

func (m TraitMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TraitMutation) Type

func (m *TraitMutation) Type() string

Type returns the node type of this mutation (Trait).

func (*TraitMutation) Where

func (m *TraitMutation) Where(ps ...predicate.Trait)

Where appends a list predicates to the TraitMutation builder.

func (*TraitMutation) WhereP

func (m *TraitMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TraitMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type TraitOrder

type TraitOrder struct {
	Direction OrderDirection   `json:"direction"`
	Field     *TraitOrderField `json:"field"`
}

TraitOrder defines the ordering of Trait.

type TraitOrderField

type TraitOrderField struct {
	// Value extracts the ordering value from the given Trait.
	Value func(*Trait) (ent.Value, error)
	// contains filtered or unexported fields
}

TraitOrderField defines the ordering field of Trait.

func (TraitOrderField) MarshalGQL

func (f TraitOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (TraitOrderField) String

func (f TraitOrderField) String() string

String implement fmt.Stringer interface.

func (*TraitOrderField) UnmarshalGQL

func (f *TraitOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type TraitPaginateOption

type TraitPaginateOption func(*traitPager) error

TraitPaginateOption enables pagination customization.

func WithTraitFilter

func WithTraitFilter(filter func(*TraitQuery) (*TraitQuery, error)) TraitPaginateOption

WithTraitFilter configures pagination filter.

func WithTraitOrder

func WithTraitOrder(order *TraitOrder) TraitPaginateOption

WithTraitOrder configures pagination ordering.

type TraitQuery

type TraitQuery struct {
	// contains filtered or unexported fields
}

TraitQuery is the builder for querying Trait entities.

func (*TraitQuery) Aggregate

func (tq *TraitQuery) Aggregate(fns ...AggregateFunc) *TraitSelect

Aggregate returns a TraitSelect configured with the given aggregations.

func (*TraitQuery) All

func (tq *TraitQuery) All(ctx context.Context) ([]*Trait, error)

All executes the query and returns a list of Traits.

func (*TraitQuery) AllX

func (tq *TraitQuery) AllX(ctx context.Context) []*Trait

AllX is like All, but panics if an error occurs.

func (*TraitQuery) Clone

func (tq *TraitQuery) Clone() *TraitQuery

Clone returns a duplicate of the TraitQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TraitQuery) CollectFields

func (t *TraitQuery) CollectFields(ctx context.Context, satisfies ...string) (*TraitQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*TraitQuery) Count

func (tq *TraitQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TraitQuery) CountX

func (tq *TraitQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TraitQuery) Exist

func (tq *TraitQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TraitQuery) ExistX

func (tq *TraitQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TraitQuery) First

func (tq *TraitQuery) First(ctx context.Context) (*Trait, error)

First returns the first Trait entity from the query. Returns a *NotFoundError when no Trait was found.

func (*TraitQuery) FirstID

func (tq *TraitQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Trait ID from the query. Returns a *NotFoundError when no Trait ID was found.

func (*TraitQuery) FirstIDX

func (tq *TraitQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*TraitQuery) FirstX

func (tq *TraitQuery) FirstX(ctx context.Context) *Trait

FirstX is like First, but panics if an error occurs.

func (*TraitQuery) GroupBy

func (tq *TraitQuery) GroupBy(field string, fields ...string) *TraitGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Indx string `json:"index"`
	Count int `json:"count,omitempty"`
}

client.Trait.Query().
	GroupBy(trait.FieldIndx).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TraitQuery) IDs

func (tq *TraitQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Trait IDs.

func (*TraitQuery) IDsX

func (tq *TraitQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*TraitQuery) Limit

func (tq *TraitQuery) Limit(limit int) *TraitQuery

Limit the number of records to be returned by this query.

func (*TraitQuery) Offset

func (tq *TraitQuery) Offset(offset int) *TraitQuery

Offset to start from.

func (*TraitQuery) Only

func (tq *TraitQuery) Only(ctx context.Context) (*Trait, error)

Only returns a single Trait entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Trait entity is found. Returns a *NotFoundError when no Trait entities are found.

func (*TraitQuery) OnlyID

func (tq *TraitQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Trait ID in the query. Returns a *NotSingularError when more than one Trait ID is found. Returns a *NotFoundError when no entities are found.

func (*TraitQuery) OnlyIDX

func (tq *TraitQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TraitQuery) OnlyX

func (tq *TraitQuery) OnlyX(ctx context.Context) *Trait

OnlyX is like Only, but panics if an error occurs.

func (*TraitQuery) Order

func (tq *TraitQuery) Order(o ...trait.OrderOption) *TraitQuery

Order specifies how the records should be ordered.

func (*TraitQuery) Paginate

func (t *TraitQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...TraitPaginateOption,
) (*TraitConnection, error)

Paginate executes the query and returns a relay based cursor connection to Trait.

func (*TraitQuery) QueryRaces

func (tq *TraitQuery) QueryRaces() *RaceQuery

QueryRaces chains the current query on the "races" edge.

func (*TraitQuery) QuerySubraces

func (tq *TraitQuery) QuerySubraces() *SubraceQuery

QuerySubraces chains the current query on the "subraces" edge.

func (*TraitQuery) Select

func (tq *TraitQuery) Select(fields ...string) *TraitSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Indx string `json:"index"`
}

client.Trait.Query().
	Select(trait.FieldIndx).
	Scan(ctx, &v)

func (*TraitQuery) Unique

func (tq *TraitQuery) Unique(unique bool) *TraitQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*TraitQuery) Where

func (tq *TraitQuery) Where(ps ...predicate.Trait) *TraitQuery

Where adds a new predicate for the TraitQuery builder.

func (*TraitQuery) WithNamedRaces

func (tq *TraitQuery) WithNamedRaces(name string, opts ...func(*RaceQuery)) *TraitQuery

WithNamedRaces tells the query-builder to eager-load the nodes that are connected to the "races" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*TraitQuery) WithNamedSubraces

func (tq *TraitQuery) WithNamedSubraces(name string, opts ...func(*SubraceQuery)) *TraitQuery

WithNamedSubraces tells the query-builder to eager-load the nodes that are connected to the "subraces" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*TraitQuery) WithRaces

func (tq *TraitQuery) WithRaces(opts ...func(*RaceQuery)) *TraitQuery

WithRaces tells the query-builder to eager-load the nodes that are connected to the "races" edge. The optional arguments are used to configure the query builder of the edge.

func (*TraitQuery) WithSubraces

func (tq *TraitQuery) WithSubraces(opts ...func(*SubraceQuery)) *TraitQuery

WithSubraces tells the query-builder to eager-load the nodes that are connected to the "subraces" edge. The optional arguments are used to configure the query builder of the edge.

type TraitSelect

type TraitSelect struct {
	*TraitQuery
	// contains filtered or unexported fields
}

TraitSelect is the builder for selecting fields of Trait entities.

func (*TraitSelect) Aggregate

func (ts *TraitSelect) Aggregate(fns ...AggregateFunc) *TraitSelect

Aggregate adds the given aggregation functions to the selector query.

func (*TraitSelect) Bool

func (s *TraitSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TraitSelect) BoolX

func (s *TraitSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TraitSelect) Bools

func (s *TraitSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TraitSelect) BoolsX

func (s *TraitSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TraitSelect) Float64

func (s *TraitSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TraitSelect) Float64X

func (s *TraitSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TraitSelect) Float64s

func (s *TraitSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TraitSelect) Float64sX

func (s *TraitSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TraitSelect) Int

func (s *TraitSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TraitSelect) IntX

func (s *TraitSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TraitSelect) Ints

func (s *TraitSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TraitSelect) IntsX

func (s *TraitSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TraitSelect) Scan

func (ts *TraitSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TraitSelect) ScanX

func (s *TraitSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TraitSelect) String

func (s *TraitSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TraitSelect) StringX

func (s *TraitSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TraitSelect) Strings

func (s *TraitSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TraitSelect) StringsX

func (s *TraitSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TraitUpdate

type TraitUpdate struct {
	// contains filtered or unexported fields
}

TraitUpdate is the builder for updating Trait entities.

func (*TraitUpdate) AddRaceIDs

func (tu *TraitUpdate) AddRaceIDs(ids ...int) *TraitUpdate

AddRaceIDs adds the "races" edge to the Race entity by IDs.

func (*TraitUpdate) AddRaces

func (tu *TraitUpdate) AddRaces(r ...*Race) *TraitUpdate

AddRaces adds the "races" edges to the Race entity.

func (*TraitUpdate) AddSubraceIDs

func (tu *TraitUpdate) AddSubraceIDs(ids ...int) *TraitUpdate

AddSubraceIDs adds the "subraces" edge to the Subrace entity by IDs.

func (*TraitUpdate) AddSubraces

func (tu *TraitUpdate) AddSubraces(s ...*Subrace) *TraitUpdate

AddSubraces adds the "subraces" edges to the Subrace entity.

func (*TraitUpdate) AppendDesc

func (tu *TraitUpdate) AppendDesc(s []string) *TraitUpdate

AppendDesc appends s to the "desc" field.

func (*TraitUpdate) ClearRaces

func (tu *TraitUpdate) ClearRaces() *TraitUpdate

ClearRaces clears all "races" edges to the Race entity.

func (*TraitUpdate) ClearSubraces

func (tu *TraitUpdate) ClearSubraces() *TraitUpdate

ClearSubraces clears all "subraces" edges to the Subrace entity.

func (*TraitUpdate) Exec

func (tu *TraitUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TraitUpdate) ExecX

func (tu *TraitUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TraitUpdate) Mutation

func (tu *TraitUpdate) Mutation() *TraitMutation

Mutation returns the TraitMutation object of the builder.

func (*TraitUpdate) RemoveRaceIDs

func (tu *TraitUpdate) RemoveRaceIDs(ids ...int) *TraitUpdate

RemoveRaceIDs removes the "races" edge to Race entities by IDs.

func (*TraitUpdate) RemoveRaces

func (tu *TraitUpdate) RemoveRaces(r ...*Race) *TraitUpdate

RemoveRaces removes "races" edges to Race entities.

func (*TraitUpdate) RemoveSubraceIDs

func (tu *TraitUpdate) RemoveSubraceIDs(ids ...int) *TraitUpdate

RemoveSubraceIDs removes the "subraces" edge to Subrace entities by IDs.

func (*TraitUpdate) RemoveSubraces

func (tu *TraitUpdate) RemoveSubraces(s ...*Subrace) *TraitUpdate

RemoveSubraces removes "subraces" edges to Subrace entities.

func (*TraitUpdate) Save

func (tu *TraitUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TraitUpdate) SaveX

func (tu *TraitUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TraitUpdate) SetDesc

func (tu *TraitUpdate) SetDesc(s []string) *TraitUpdate

SetDesc sets the "desc" field.

func (*TraitUpdate) SetIndx

func (tu *TraitUpdate) SetIndx(s string) *TraitUpdate

SetIndx sets the "indx" field.

func (*TraitUpdate) SetName

func (tu *TraitUpdate) SetName(s string) *TraitUpdate

SetName sets the "name" field.

func (*TraitUpdate) Where

func (tu *TraitUpdate) Where(ps ...predicate.Trait) *TraitUpdate

Where appends a list predicates to the TraitUpdate builder.

type TraitUpdateOne

type TraitUpdateOne struct {
	// contains filtered or unexported fields
}

TraitUpdateOne is the builder for updating a single Trait entity.

func (*TraitUpdateOne) AddRaceIDs

func (tuo *TraitUpdateOne) AddRaceIDs(ids ...int) *TraitUpdateOne

AddRaceIDs adds the "races" edge to the Race entity by IDs.

func (*TraitUpdateOne) AddRaces

func (tuo *TraitUpdateOne) AddRaces(r ...*Race) *TraitUpdateOne

AddRaces adds the "races" edges to the Race entity.

func (*TraitUpdateOne) AddSubraceIDs

func (tuo *TraitUpdateOne) AddSubraceIDs(ids ...int) *TraitUpdateOne

AddSubraceIDs adds the "subraces" edge to the Subrace entity by IDs.

func (*TraitUpdateOne) AddSubraces

func (tuo *TraitUpdateOne) AddSubraces(s ...*Subrace) *TraitUpdateOne

AddSubraces adds the "subraces" edges to the Subrace entity.

func (*TraitUpdateOne) AppendDesc

func (tuo *TraitUpdateOne) AppendDesc(s []string) *TraitUpdateOne

AppendDesc appends s to the "desc" field.

func (*TraitUpdateOne) ClearRaces

func (tuo *TraitUpdateOne) ClearRaces() *TraitUpdateOne

ClearRaces clears all "races" edges to the Race entity.

func (*TraitUpdateOne) ClearSubraces

func (tuo *TraitUpdateOne) ClearSubraces() *TraitUpdateOne

ClearSubraces clears all "subraces" edges to the Subrace entity.

func (*TraitUpdateOne) Exec

func (tuo *TraitUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TraitUpdateOne) ExecX

func (tuo *TraitUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TraitUpdateOne) Mutation

func (tuo *TraitUpdateOne) Mutation() *TraitMutation

Mutation returns the TraitMutation object of the builder.

func (*TraitUpdateOne) RemoveRaceIDs

func (tuo *TraitUpdateOne) RemoveRaceIDs(ids ...int) *TraitUpdateOne

RemoveRaceIDs removes the "races" edge to Race entities by IDs.

func (*TraitUpdateOne) RemoveRaces

func (tuo *TraitUpdateOne) RemoveRaces(r ...*Race) *TraitUpdateOne

RemoveRaces removes "races" edges to Race entities.

func (*TraitUpdateOne) RemoveSubraceIDs

func (tuo *TraitUpdateOne) RemoveSubraceIDs(ids ...int) *TraitUpdateOne

RemoveSubraceIDs removes the "subraces" edge to Subrace entities by IDs.

func (*TraitUpdateOne) RemoveSubraces

func (tuo *TraitUpdateOne) RemoveSubraces(s ...*Subrace) *TraitUpdateOne

RemoveSubraces removes "subraces" edges to Subrace entities.

func (*TraitUpdateOne) Save

func (tuo *TraitUpdateOne) Save(ctx context.Context) (*Trait, error)

Save executes the query and returns the updated Trait entity.

func (*TraitUpdateOne) SaveX

func (tuo *TraitUpdateOne) SaveX(ctx context.Context) *Trait

SaveX is like Save, but panics if an error occurs.

func (*TraitUpdateOne) Select

func (tuo *TraitUpdateOne) Select(field string, fields ...string) *TraitUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TraitUpdateOne) SetDesc

func (tuo *TraitUpdateOne) SetDesc(s []string) *TraitUpdateOne

SetDesc sets the "desc" field.

func (*TraitUpdateOne) SetIndx

func (tuo *TraitUpdateOne) SetIndx(s string) *TraitUpdateOne

SetIndx sets the "indx" field.

func (*TraitUpdateOne) SetName

func (tuo *TraitUpdateOne) SetName(s string) *TraitUpdateOne

SetName sets the "name" field.

func (*TraitUpdateOne) Where

func (tuo *TraitUpdateOne) Where(ps ...predicate.Trait) *TraitUpdateOne

Where appends a list predicates to the TraitUpdate builder.

type TraitWhereInput

type TraitWhereInput struct {
	Predicates []predicate.Trait  `json:"-"`
	Not        *TraitWhereInput   `json:"not,omitempty"`
	Or         []*TraitWhereInput `json:"or,omitempty"`
	And        []*TraitWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "indx" field predicates.
	Indx             *string  `json:"indx,omitempty"`
	IndxNEQ          *string  `json:"indxNEQ,omitempty"`
	IndxIn           []string `json:"indxIn,omitempty"`
	IndxNotIn        []string `json:"indxNotIn,omitempty"`
	IndxGT           *string  `json:"indxGT,omitempty"`
	IndxGTE          *string  `json:"indxGTE,omitempty"`
	IndxLT           *string  `json:"indxLT,omitempty"`
	IndxLTE          *string  `json:"indxLTE,omitempty"`
	IndxContains     *string  `json:"indxContains,omitempty"`
	IndxHasPrefix    *string  `json:"indxHasPrefix,omitempty"`
	IndxHasSuffix    *string  `json:"indxHasSuffix,omitempty"`
	IndxEqualFold    *string  `json:"indxEqualFold,omitempty"`
	IndxContainsFold *string  `json:"indxContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "races" edge predicates.
	HasRaces     *bool             `json:"hasRaces,omitempty"`
	HasRacesWith []*RaceWhereInput `json:"hasRacesWith,omitempty"`

	// "subraces" edge predicates.
	HasSubraces     *bool                `json:"hasSubraces,omitempty"`
	HasSubracesWith []*SubraceWhereInput `json:"hasSubracesWith,omitempty"`
}

TraitWhereInput represents a where input for filtering Trait queries.

func (*TraitWhereInput) AddPredicates

func (i *TraitWhereInput) AddPredicates(predicates ...predicate.Trait)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*TraitWhereInput) Filter

func (i *TraitWhereInput) Filter(q *TraitQuery) (*TraitQuery, error)

Filter applies the TraitWhereInput filter on the TraitQuery builder.

func (*TraitWhereInput) P

P returns a predicate for filtering traits. An error is returned if the input is empty or invalid.

type Traits

type Traits []*Trait

Traits is a parsable slice of Trait.

type TraverseFunc

type TraverseFunc = ent.TraverseFunc

ent aliases to avoid import conflicts in user's code.

type Traverser

type Traverser = ent.Traverser

ent aliases to avoid import conflicts in user's code.

type Tx

type Tx struct {

	// AbilityBonus is the client for interacting with the AbilityBonus builders.
	AbilityBonus *AbilityBonusClient
	// AbilityScore is the client for interacting with the AbilityScore builders.
	AbilityScore *AbilityScoreClient
	// Armor is the client for interacting with the Armor builders.
	Armor *ArmorClient
	// ArmorClass is the client for interacting with the ArmorClass builders.
	ArmorClass *ArmorClassClient
	// Class is the client for interacting with the Class builders.
	Class *ClassClient
	// ClassEquipment is the client for interacting with the ClassEquipment builders.
	ClassEquipment *ClassEquipmentClient
	// Coin is the client for interacting with the Coin builders.
	Coin *CoinClient
	// DamageType is the client for interacting with the DamageType builders.
	DamageType *DamageTypeClient
	// Equipment is the client for interacting with the Equipment builders.
	Equipment *EquipmentClient
	// EquipmentCategory is the client for interacting with the EquipmentCategory builders.
	EquipmentCategory *EquipmentCategoryClient
	// EquipmentChoice is the client for interacting with the EquipmentChoice builders.
	EquipmentChoice *EquipmentChoiceClient
	// EquipmentCost is the client for interacting with the EquipmentCost builders.
	EquipmentCost *EquipmentCostClient
	// Gear is the client for interacting with the Gear builders.
	Gear *GearClient
	// Language is the client for interacting with the Language builders.
	Language *LanguageClient
	// MagicSchool is the client for interacting with the MagicSchool builders.
	MagicSchool *MagicSchoolClient
	// Proficiency is the client for interacting with the Proficiency builders.
	Proficiency *ProficiencyClient
	// ProficiencyChoice is the client for interacting with the ProficiencyChoice builders.
	ProficiencyChoice *ProficiencyChoiceClient
	// Race is the client for interacting with the Race builders.
	Race *RaceClient
	// Rule is the client for interacting with the Rule builders.
	Rule *RuleClient
	// RuleSection is the client for interacting with the RuleSection builders.
	RuleSection *RuleSectionClient
	// Skill is the client for interacting with the Skill builders.
	Skill *SkillClient
	// Subrace is the client for interacting with the Subrace builders.
	Subrace *SubraceClient
	// Tool is the client for interacting with the Tool builders.
	Tool *ToolClient
	// Trait is the client for interacting with the Trait builders.
	Trait *TraitClient
	// Vehicle is the client for interacting with the Vehicle builders.
	Vehicle *VehicleClient
	// Weapon is the client for interacting with the Weapon builders.
	Weapon *WeaponClient
	// WeaponDamage is the client for interacting with the WeaponDamage builders.
	WeaponDamage *WeaponDamageClient
	// WeaponProperty is the client for interacting with the WeaponProperty builders.
	WeaponProperty *WeaponPropertyClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

type Vehicle

type Vehicle struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Indx holds the value of the "indx" field.
	Indx string `json:"index"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// VehicleCategory holds the value of the "vehicle_category" field.
	VehicleCategory string `json:"vehicle_category,omitempty"`
	// Capacity holds the value of the "capacity" field.
	Capacity string `json:"capacity,omitempty"`
	// EquipmentID holds the value of the "equipment_id" field.
	EquipmentID int `json:"equipment_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the VehicleQuery when eager-loading is set.
	Edges VehicleEdges `json:"-"`
	// contains filtered or unexported fields
}

Vehicle is the model entity for the Vehicle schema.

func (*Vehicle) Equipment

func (v *Vehicle) Equipment(ctx context.Context) (*Equipment, error)

func (*Vehicle) IsNode

func (n *Vehicle) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Vehicle) MarshalJSON

func (v *Vehicle) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Vehicle) Node

func (v *Vehicle) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*Vehicle) QueryEquipment

func (v *Vehicle) QueryEquipment() *EquipmentQuery

QueryEquipment queries the "equipment" edge of the Vehicle entity.

func (*Vehicle) String

func (v *Vehicle) String() string

String implements the fmt.Stringer.

func (*Vehicle) ToEdge

func (v *Vehicle) ToEdge(order *VehicleOrder) *VehicleEdge

ToEdge converts Vehicle into VehicleEdge.

func (*Vehicle) UnmarshalJSON

func (v *Vehicle) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*Vehicle) Unwrap

func (v *Vehicle) Unwrap() *Vehicle

Unwrap unwraps the Vehicle entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Vehicle) Update

func (v *Vehicle) Update() *VehicleUpdateOne

Update returns a builder for updating this Vehicle. Note that you need to call Vehicle.Unwrap() before calling this method if this Vehicle was returned from a transaction, and the transaction was committed or rolled back.

func (*Vehicle) Value

func (v *Vehicle) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Vehicle. This includes values selected through modifiers, order, etc.

type VehicleClient

type VehicleClient struct {
	// contains filtered or unexported fields
}

VehicleClient is a client for the Vehicle schema.

func NewVehicleClient

func NewVehicleClient(c config) *VehicleClient

NewVehicleClient returns a client for the Vehicle from the given config.

func (*VehicleClient) Create

func (c *VehicleClient) Create() *VehicleCreate

Create returns a builder for creating a Vehicle entity.

func (*VehicleClient) CreateBulk

func (c *VehicleClient) CreateBulk(builders ...*VehicleCreate) *VehicleCreateBulk

CreateBulk returns a builder for creating a bulk of Vehicle entities.

func (*VehicleClient) Delete

func (c *VehicleClient) Delete() *VehicleDelete

Delete returns a delete builder for Vehicle.

func (*VehicleClient) DeleteOne

func (c *VehicleClient) DeleteOne(v *Vehicle) *VehicleDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*VehicleClient) DeleteOneID

func (c *VehicleClient) DeleteOneID(id int) *VehicleDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*VehicleClient) Get

func (c *VehicleClient) Get(ctx context.Context, id int) (*Vehicle, error)

Get returns a Vehicle entity by its id.

func (*VehicleClient) GetX

func (c *VehicleClient) GetX(ctx context.Context, id int) *Vehicle

GetX is like Get, but panics if an error occurs.

func (*VehicleClient) Hooks

func (c *VehicleClient) Hooks() []Hook

Hooks returns the client hooks.

func (*VehicleClient) Intercept

func (c *VehicleClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `vehicle.Intercept(f(g(h())))`.

func (*VehicleClient) Interceptors

func (c *VehicleClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*VehicleClient) Query

func (c *VehicleClient) Query() *VehicleQuery

Query returns a query builder for Vehicle.

func (*VehicleClient) QueryEquipment

func (c *VehicleClient) QueryEquipment(v *Vehicle) *EquipmentQuery

QueryEquipment queries the equipment edge of a Vehicle.

func (*VehicleClient) Update

func (c *VehicleClient) Update() *VehicleUpdate

Update returns an update builder for Vehicle.

func (*VehicleClient) UpdateOne

func (c *VehicleClient) UpdateOne(v *Vehicle) *VehicleUpdateOne

UpdateOne returns an update builder for the given entity.

func (*VehicleClient) UpdateOneID

func (c *VehicleClient) UpdateOneID(id int) *VehicleUpdateOne

UpdateOneID returns an update builder for the given id.

func (*VehicleClient) Use

func (c *VehicleClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `vehicle.Hooks(f(g(h())))`.

type VehicleConnection

type VehicleConnection struct {
	Edges      []*VehicleEdge `json:"edges"`
	PageInfo   PageInfo       `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

VehicleConnection is the connection containing edges to Vehicle.

type VehicleCreate

type VehicleCreate struct {
	// contains filtered or unexported fields
}

VehicleCreate is the builder for creating a Vehicle entity.

func (*VehicleCreate) Exec

func (vc *VehicleCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*VehicleCreate) ExecX

func (vc *VehicleCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VehicleCreate) Mutation

func (vc *VehicleCreate) Mutation() *VehicleMutation

Mutation returns the VehicleMutation object of the builder.

func (*VehicleCreate) Save

func (vc *VehicleCreate) Save(ctx context.Context) (*Vehicle, error)

Save creates the Vehicle in the database.

func (*VehicleCreate) SaveX

func (vc *VehicleCreate) SaveX(ctx context.Context) *Vehicle

SaveX calls Save and panics if Save returns an error.

func (*VehicleCreate) SetCapacity

func (vc *VehicleCreate) SetCapacity(s string) *VehicleCreate

SetCapacity sets the "capacity" field.

func (*VehicleCreate) SetEquipment

func (vc *VehicleCreate) SetEquipment(e *Equipment) *VehicleCreate

SetEquipment sets the "equipment" edge to the Equipment entity.

func (*VehicleCreate) SetEquipmentID

func (vc *VehicleCreate) SetEquipmentID(i int) *VehicleCreate

SetEquipmentID sets the "equipment_id" field.

func (*VehicleCreate) SetIndx

func (vc *VehicleCreate) SetIndx(s string) *VehicleCreate

SetIndx sets the "indx" field.

func (*VehicleCreate) SetName

func (vc *VehicleCreate) SetName(s string) *VehicleCreate

SetName sets the "name" field.

func (*VehicleCreate) SetVehicle

func (vc *VehicleCreate) SetVehicle(input *Vehicle) *VehicleCreate

func (*VehicleCreate) SetVehicleCategory

func (vc *VehicleCreate) SetVehicleCategory(s string) *VehicleCreate

SetVehicleCategory sets the "vehicle_category" field.

type VehicleCreateBulk

type VehicleCreateBulk struct {
	// contains filtered or unexported fields
}

VehicleCreateBulk is the builder for creating many Vehicle entities in bulk.

func (*VehicleCreateBulk) Exec

func (vcb *VehicleCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*VehicleCreateBulk) ExecX

func (vcb *VehicleCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VehicleCreateBulk) Save

func (vcb *VehicleCreateBulk) Save(ctx context.Context) ([]*Vehicle, error)

Save creates the Vehicle entities in the database.

func (*VehicleCreateBulk) SaveX

func (vcb *VehicleCreateBulk) SaveX(ctx context.Context) []*Vehicle

SaveX is like Save, but panics if an error occurs.

type VehicleDelete

type VehicleDelete struct {
	// contains filtered or unexported fields
}

VehicleDelete is the builder for deleting a Vehicle entity.

func (*VehicleDelete) Exec

func (vd *VehicleDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*VehicleDelete) ExecX

func (vd *VehicleDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*VehicleDelete) Where

func (vd *VehicleDelete) Where(ps ...predicate.Vehicle) *VehicleDelete

Where appends a list predicates to the VehicleDelete builder.

type VehicleDeleteOne

type VehicleDeleteOne struct {
	// contains filtered or unexported fields
}

VehicleDeleteOne is the builder for deleting a single Vehicle entity.

func (*VehicleDeleteOne) Exec

func (vdo *VehicleDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*VehicleDeleteOne) ExecX

func (vdo *VehicleDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VehicleDeleteOne) Where

Where appends a list predicates to the VehicleDelete builder.

type VehicleEdge

type VehicleEdge struct {
	Node   *Vehicle `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

VehicleEdge is the edge representation of Vehicle.

type VehicleEdges

type VehicleEdges struct {
	// Equipment holds the value of the equipment edge.
	Equipment *Equipment `json:"equipment,omitempty"`
	// contains filtered or unexported fields
}

VehicleEdges holds the relations/edges for other nodes in the graph.

func (VehicleEdges) EquipmentOrErr

func (e VehicleEdges) EquipmentOrErr() (*Equipment, error)

EquipmentOrErr returns the Equipment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type VehicleGroupBy

type VehicleGroupBy struct {
	// contains filtered or unexported fields
}

VehicleGroupBy is the group-by builder for Vehicle entities.

func (*VehicleGroupBy) Aggregate

func (vgb *VehicleGroupBy) Aggregate(fns ...AggregateFunc) *VehicleGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*VehicleGroupBy) Bool

func (s *VehicleGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VehicleGroupBy) BoolX

func (s *VehicleGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VehicleGroupBy) Bools

func (s *VehicleGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VehicleGroupBy) BoolsX

func (s *VehicleGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VehicleGroupBy) Float64

func (s *VehicleGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VehicleGroupBy) Float64X

func (s *VehicleGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VehicleGroupBy) Float64s

func (s *VehicleGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VehicleGroupBy) Float64sX

func (s *VehicleGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VehicleGroupBy) Int

func (s *VehicleGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VehicleGroupBy) IntX

func (s *VehicleGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VehicleGroupBy) Ints

func (s *VehicleGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VehicleGroupBy) IntsX

func (s *VehicleGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VehicleGroupBy) Scan

func (vgb *VehicleGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VehicleGroupBy) ScanX

func (s *VehicleGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VehicleGroupBy) String

func (s *VehicleGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VehicleGroupBy) StringX

func (s *VehicleGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VehicleGroupBy) Strings

func (s *VehicleGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VehicleGroupBy) StringsX

func (s *VehicleGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VehicleMutation

type VehicleMutation struct {
	// contains filtered or unexported fields
}

VehicleMutation represents an operation that mutates the Vehicle nodes in the graph.

func (*VehicleMutation) AddField

func (m *VehicleMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*VehicleMutation) AddedEdges

func (m *VehicleMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*VehicleMutation) AddedField

func (m *VehicleMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*VehicleMutation) AddedFields

func (m *VehicleMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*VehicleMutation) AddedIDs

func (m *VehicleMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*VehicleMutation) Capacity

func (m *VehicleMutation) Capacity() (r string, exists bool)

Capacity returns the value of the "capacity" field in the mutation.

func (*VehicleMutation) ClearEdge

func (m *VehicleMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*VehicleMutation) ClearEquipment

func (m *VehicleMutation) ClearEquipment()

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*VehicleMutation) ClearField

func (m *VehicleMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*VehicleMutation) ClearedEdges

func (m *VehicleMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*VehicleMutation) ClearedFields

func (m *VehicleMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (VehicleMutation) Client

func (m VehicleMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*VehicleMutation) EdgeCleared

func (m *VehicleMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*VehicleMutation) EquipmentCleared

func (m *VehicleMutation) EquipmentCleared() bool

EquipmentCleared reports if the "equipment" edge to the Equipment entity was cleared.

func (*VehicleMutation) EquipmentID

func (m *VehicleMutation) EquipmentID() (r int, exists bool)

EquipmentID returns the value of the "equipment_id" field in the mutation.

func (*VehicleMutation) EquipmentIDs

func (m *VehicleMutation) EquipmentIDs() (ids []int)

EquipmentIDs returns the "equipment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EquipmentID instead. It exists only for internal usage by the builders.

func (*VehicleMutation) Field

func (m *VehicleMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*VehicleMutation) FieldCleared

func (m *VehicleMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*VehicleMutation) Fields

func (m *VehicleMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*VehicleMutation) ID

func (m *VehicleMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*VehicleMutation) IDs

func (m *VehicleMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*VehicleMutation) Indx

func (m *VehicleMutation) Indx() (r string, exists bool)

Indx returns the value of the "indx" field in the mutation.

func (*VehicleMutation) Name

func (m *VehicleMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*VehicleMutation) OldCapacity

func (m *VehicleMutation) OldCapacity(ctx context.Context) (v string, err error)

OldCapacity returns the old "capacity" field's value of the Vehicle entity. If the Vehicle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VehicleMutation) OldEquipmentID

func (m *VehicleMutation) OldEquipmentID(ctx context.Context) (v int, err error)

OldEquipmentID returns the old "equipment_id" field's value of the Vehicle entity. If the Vehicle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VehicleMutation) OldField

func (m *VehicleMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*VehicleMutation) OldIndx

func (m *VehicleMutation) OldIndx(ctx context.Context) (v string, err error)

OldIndx returns the old "indx" field's value of the Vehicle entity. If the Vehicle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VehicleMutation) OldName

func (m *VehicleMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Vehicle entity. If the Vehicle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VehicleMutation) OldVehicleCategory

func (m *VehicleMutation) OldVehicleCategory(ctx context.Context) (v string, err error)

OldVehicleCategory returns the old "vehicle_category" field's value of the Vehicle entity. If the Vehicle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VehicleMutation) Op

func (m *VehicleMutation) Op() Op

Op returns the operation name.

func (*VehicleMutation) RemovedEdges

func (m *VehicleMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*VehicleMutation) RemovedIDs

func (m *VehicleMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*VehicleMutation) ResetCapacity

func (m *VehicleMutation) ResetCapacity()

ResetCapacity resets all changes to the "capacity" field.

func (*VehicleMutation) ResetEdge

func (m *VehicleMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*VehicleMutation) ResetEquipment

func (m *VehicleMutation) ResetEquipment()

ResetEquipment resets all changes to the "equipment" edge.

func (*VehicleMutation) ResetEquipmentID

func (m *VehicleMutation) ResetEquipmentID()

ResetEquipmentID resets all changes to the "equipment_id" field.

func (*VehicleMutation) ResetField

func (m *VehicleMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*VehicleMutation) ResetIndx

func (m *VehicleMutation) ResetIndx()

ResetIndx resets all changes to the "indx" field.

func (*VehicleMutation) ResetName

func (m *VehicleMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*VehicleMutation) ResetVehicleCategory

func (m *VehicleMutation) ResetVehicleCategory()

ResetVehicleCategory resets all changes to the "vehicle_category" field.

func (*VehicleMutation) SetCapacity

func (m *VehicleMutation) SetCapacity(s string)

SetCapacity sets the "capacity" field.

func (*VehicleMutation) SetEquipmentID

func (m *VehicleMutation) SetEquipmentID(i int)

SetEquipmentID sets the "equipment_id" field.

func (*VehicleMutation) SetField

func (m *VehicleMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*VehicleMutation) SetIndx

func (m *VehicleMutation) SetIndx(s string)

SetIndx sets the "indx" field.

func (*VehicleMutation) SetName

func (m *VehicleMutation) SetName(s string)

SetName sets the "name" field.

func (*VehicleMutation) SetOp

func (m *VehicleMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*VehicleMutation) SetVehicleCategory

func (m *VehicleMutation) SetVehicleCategory(s string)

SetVehicleCategory sets the "vehicle_category" field.

func (VehicleMutation) Tx

func (m VehicleMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*VehicleMutation) Type

func (m *VehicleMutation) Type() string

Type returns the node type of this mutation (Vehicle).

func (*VehicleMutation) VehicleCategory

func (m *VehicleMutation) VehicleCategory() (r string, exists bool)

VehicleCategory returns the value of the "vehicle_category" field in the mutation.

func (*VehicleMutation) Where

func (m *VehicleMutation) Where(ps ...predicate.Vehicle)

Where appends a list predicates to the VehicleMutation builder.

func (*VehicleMutation) WhereP

func (m *VehicleMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the VehicleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type VehicleOrder

type VehicleOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *VehicleOrderField `json:"field"`
}

VehicleOrder defines the ordering of Vehicle.

type VehicleOrderField

type VehicleOrderField struct {
	// Value extracts the ordering value from the given Vehicle.
	Value func(*Vehicle) (ent.Value, error)
	// contains filtered or unexported fields
}

VehicleOrderField defines the ordering field of Vehicle.

func (VehicleOrderField) MarshalGQL

func (f VehicleOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (VehicleOrderField) String

func (f VehicleOrderField) String() string

String implement fmt.Stringer interface.

func (*VehicleOrderField) UnmarshalGQL

func (f *VehicleOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type VehiclePaginateOption

type VehiclePaginateOption func(*vehiclePager) error

VehiclePaginateOption enables pagination customization.

func WithVehicleFilter

func WithVehicleFilter(filter func(*VehicleQuery) (*VehicleQuery, error)) VehiclePaginateOption

WithVehicleFilter configures pagination filter.

func WithVehicleOrder

func WithVehicleOrder(order *VehicleOrder) VehiclePaginateOption

WithVehicleOrder configures pagination ordering.

type VehicleQuery

type VehicleQuery struct {
	// contains filtered or unexported fields
}

VehicleQuery is the builder for querying Vehicle entities.

func (*VehicleQuery) Aggregate

func (vq *VehicleQuery) Aggregate(fns ...AggregateFunc) *VehicleSelect

Aggregate returns a VehicleSelect configured with the given aggregations.

func (*VehicleQuery) All

func (vq *VehicleQuery) All(ctx context.Context) ([]*Vehicle, error)

All executes the query and returns a list of Vehicles.

func (*VehicleQuery) AllX

func (vq *VehicleQuery) AllX(ctx context.Context) []*Vehicle

AllX is like All, but panics if an error occurs.

func (*VehicleQuery) Clone

func (vq *VehicleQuery) Clone() *VehicleQuery

Clone returns a duplicate of the VehicleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*VehicleQuery) CollectFields

func (v *VehicleQuery) CollectFields(ctx context.Context, satisfies ...string) (*VehicleQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*VehicleQuery) Count

func (vq *VehicleQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*VehicleQuery) CountX

func (vq *VehicleQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*VehicleQuery) Exist

func (vq *VehicleQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*VehicleQuery) ExistX

func (vq *VehicleQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*VehicleQuery) First

func (vq *VehicleQuery) First(ctx context.Context) (*Vehicle, error)

First returns the first Vehicle entity from the query. Returns a *NotFoundError when no Vehicle was found.

func (*VehicleQuery) FirstID

func (vq *VehicleQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Vehicle ID from the query. Returns a *NotFoundError when no Vehicle ID was found.

func (*VehicleQuery) FirstIDX

func (vq *VehicleQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*VehicleQuery) FirstX

func (vq *VehicleQuery) FirstX(ctx context.Context) *Vehicle

FirstX is like First, but panics if an error occurs.

func (*VehicleQuery) GroupBy

func (vq *VehicleQuery) GroupBy(field string, fields ...string) *VehicleGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Indx string `json:"index"`
	Count int `json:"count,omitempty"`
}

client.Vehicle.Query().
	GroupBy(vehicle.FieldIndx).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*VehicleQuery) IDs

func (vq *VehicleQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Vehicle IDs.

func (*VehicleQuery) IDsX

func (vq *VehicleQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*VehicleQuery) Limit

func (vq *VehicleQuery) Limit(limit int) *VehicleQuery

Limit the number of records to be returned by this query.

func (*VehicleQuery) Offset

func (vq *VehicleQuery) Offset(offset int) *VehicleQuery

Offset to start from.

func (*VehicleQuery) Only

func (vq *VehicleQuery) Only(ctx context.Context) (*Vehicle, error)

Only returns a single Vehicle entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Vehicle entity is found. Returns a *NotFoundError when no Vehicle entities are found.

func (*VehicleQuery) OnlyID

func (vq *VehicleQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Vehicle ID in the query. Returns a *NotSingularError when more than one Vehicle ID is found. Returns a *NotFoundError when no entities are found.

func (*VehicleQuery) OnlyIDX

func (vq *VehicleQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*VehicleQuery) OnlyX

func (vq *VehicleQuery) OnlyX(ctx context.Context) *Vehicle

OnlyX is like Only, but panics if an error occurs.

func (*VehicleQuery) Order

func (vq *VehicleQuery) Order(o ...vehicle.OrderOption) *VehicleQuery

Order specifies how the records should be ordered.

func (*VehicleQuery) Paginate

func (v *VehicleQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...VehiclePaginateOption,
) (*VehicleConnection, error)

Paginate executes the query and returns a relay based cursor connection to Vehicle.

func (*VehicleQuery) QueryEquipment

func (vq *VehicleQuery) QueryEquipment() *EquipmentQuery

QueryEquipment chains the current query on the "equipment" edge.

func (*VehicleQuery) Select

func (vq *VehicleQuery) Select(fields ...string) *VehicleSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Indx string `json:"index"`
}

client.Vehicle.Query().
	Select(vehicle.FieldIndx).
	Scan(ctx, &v)

func (*VehicleQuery) Unique

func (vq *VehicleQuery) Unique(unique bool) *VehicleQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*VehicleQuery) Where

func (vq *VehicleQuery) Where(ps ...predicate.Vehicle) *VehicleQuery

Where adds a new predicate for the VehicleQuery builder.

func (*VehicleQuery) WithEquipment

func (vq *VehicleQuery) WithEquipment(opts ...func(*EquipmentQuery)) *VehicleQuery

WithEquipment tells the query-builder to eager-load the nodes that are connected to the "equipment" edge. The optional arguments are used to configure the query builder of the edge.

type VehicleSelect

type VehicleSelect struct {
	*VehicleQuery
	// contains filtered or unexported fields
}

VehicleSelect is the builder for selecting fields of Vehicle entities.

func (*VehicleSelect) Aggregate

func (vs *VehicleSelect) Aggregate(fns ...AggregateFunc) *VehicleSelect

Aggregate adds the given aggregation functions to the selector query.

func (*VehicleSelect) Bool

func (s *VehicleSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VehicleSelect) BoolX

func (s *VehicleSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VehicleSelect) Bools

func (s *VehicleSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VehicleSelect) BoolsX

func (s *VehicleSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VehicleSelect) Float64

func (s *VehicleSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VehicleSelect) Float64X

func (s *VehicleSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VehicleSelect) Float64s

func (s *VehicleSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VehicleSelect) Float64sX

func (s *VehicleSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VehicleSelect) Int

func (s *VehicleSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VehicleSelect) IntX

func (s *VehicleSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VehicleSelect) Ints

func (s *VehicleSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VehicleSelect) IntsX

func (s *VehicleSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VehicleSelect) Scan

func (vs *VehicleSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VehicleSelect) ScanX

func (s *VehicleSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VehicleSelect) String

func (s *VehicleSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VehicleSelect) StringX

func (s *VehicleSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VehicleSelect) Strings

func (s *VehicleSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VehicleSelect) StringsX

func (s *VehicleSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VehicleUpdate

type VehicleUpdate struct {
	// contains filtered or unexported fields
}

VehicleUpdate is the builder for updating Vehicle entities.

func (*VehicleUpdate) ClearEquipment

func (vu *VehicleUpdate) ClearEquipment() *VehicleUpdate

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*VehicleUpdate) Exec

func (vu *VehicleUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*VehicleUpdate) ExecX

func (vu *VehicleUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VehicleUpdate) Mutation

func (vu *VehicleUpdate) Mutation() *VehicleMutation

Mutation returns the VehicleMutation object of the builder.

func (*VehicleUpdate) Save

func (vu *VehicleUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*VehicleUpdate) SaveX

func (vu *VehicleUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*VehicleUpdate) SetCapacity

func (vu *VehicleUpdate) SetCapacity(s string) *VehicleUpdate

SetCapacity sets the "capacity" field.

func (*VehicleUpdate) SetEquipment

func (vu *VehicleUpdate) SetEquipment(e *Equipment) *VehicleUpdate

SetEquipment sets the "equipment" edge to the Equipment entity.

func (*VehicleUpdate) SetEquipmentID

func (vu *VehicleUpdate) SetEquipmentID(i int) *VehicleUpdate

SetEquipmentID sets the "equipment_id" field.

func (*VehicleUpdate) SetIndx

func (vu *VehicleUpdate) SetIndx(s string) *VehicleUpdate

SetIndx sets the "indx" field.

func (*VehicleUpdate) SetName

func (vu *VehicleUpdate) SetName(s string) *VehicleUpdate

SetName sets the "name" field.

func (*VehicleUpdate) SetVehicleCategory

func (vu *VehicleUpdate) SetVehicleCategory(s string) *VehicleUpdate

SetVehicleCategory sets the "vehicle_category" field.

func (*VehicleUpdate) Where

func (vu *VehicleUpdate) Where(ps ...predicate.Vehicle) *VehicleUpdate

Where appends a list predicates to the VehicleUpdate builder.

type VehicleUpdateOne

type VehicleUpdateOne struct {
	// contains filtered or unexported fields
}

VehicleUpdateOne is the builder for updating a single Vehicle entity.

func (*VehicleUpdateOne) ClearEquipment

func (vuo *VehicleUpdateOne) ClearEquipment() *VehicleUpdateOne

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*VehicleUpdateOne) Exec

func (vuo *VehicleUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*VehicleUpdateOne) ExecX

func (vuo *VehicleUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VehicleUpdateOne) Mutation

func (vuo *VehicleUpdateOne) Mutation() *VehicleMutation

Mutation returns the VehicleMutation object of the builder.

func (*VehicleUpdateOne) Save

func (vuo *VehicleUpdateOne) Save(ctx context.Context) (*Vehicle, error)

Save executes the query and returns the updated Vehicle entity.

func (*VehicleUpdateOne) SaveX

func (vuo *VehicleUpdateOne) SaveX(ctx context.Context) *Vehicle

SaveX is like Save, but panics if an error occurs.

func (*VehicleUpdateOne) Select

func (vuo *VehicleUpdateOne) Select(field string, fields ...string) *VehicleUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*VehicleUpdateOne) SetCapacity

func (vuo *VehicleUpdateOne) SetCapacity(s string) *VehicleUpdateOne

SetCapacity sets the "capacity" field.

func (*VehicleUpdateOne) SetEquipment

func (vuo *VehicleUpdateOne) SetEquipment(e *Equipment) *VehicleUpdateOne

SetEquipment sets the "equipment" edge to the Equipment entity.

func (*VehicleUpdateOne) SetEquipmentID

func (vuo *VehicleUpdateOne) SetEquipmentID(i int) *VehicleUpdateOne

SetEquipmentID sets the "equipment_id" field.

func (*VehicleUpdateOne) SetIndx

func (vuo *VehicleUpdateOne) SetIndx(s string) *VehicleUpdateOne

SetIndx sets the "indx" field.

func (*VehicleUpdateOne) SetName

func (vuo *VehicleUpdateOne) SetName(s string) *VehicleUpdateOne

SetName sets the "name" field.

func (*VehicleUpdateOne) SetVehicleCategory

func (vuo *VehicleUpdateOne) SetVehicleCategory(s string) *VehicleUpdateOne

SetVehicleCategory sets the "vehicle_category" field.

func (*VehicleUpdateOne) Where

Where appends a list predicates to the VehicleUpdate builder.

type VehicleWhereInput

type VehicleWhereInput struct {
	Predicates []predicate.Vehicle  `json:"-"`
	Not        *VehicleWhereInput   `json:"not,omitempty"`
	Or         []*VehicleWhereInput `json:"or,omitempty"`
	And        []*VehicleWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "indx" field predicates.
	Indx             *string  `json:"indx,omitempty"`
	IndxNEQ          *string  `json:"indxNEQ,omitempty"`
	IndxIn           []string `json:"indxIn,omitempty"`
	IndxNotIn        []string `json:"indxNotIn,omitempty"`
	IndxGT           *string  `json:"indxGT,omitempty"`
	IndxGTE          *string  `json:"indxGTE,omitempty"`
	IndxLT           *string  `json:"indxLT,omitempty"`
	IndxLTE          *string  `json:"indxLTE,omitempty"`
	IndxContains     *string  `json:"indxContains,omitempty"`
	IndxHasPrefix    *string  `json:"indxHasPrefix,omitempty"`
	IndxHasSuffix    *string  `json:"indxHasSuffix,omitempty"`
	IndxEqualFold    *string  `json:"indxEqualFold,omitempty"`
	IndxContainsFold *string  `json:"indxContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "vehicle_category" field predicates.
	VehicleCategory             *string  `json:"vehicleCategory,omitempty"`
	VehicleCategoryNEQ          *string  `json:"vehicleCategoryNEQ,omitempty"`
	VehicleCategoryIn           []string `json:"vehicleCategoryIn,omitempty"`
	VehicleCategoryNotIn        []string `json:"vehicleCategoryNotIn,omitempty"`
	VehicleCategoryGT           *string  `json:"vehicleCategoryGT,omitempty"`
	VehicleCategoryGTE          *string  `json:"vehicleCategoryGTE,omitempty"`
	VehicleCategoryLT           *string  `json:"vehicleCategoryLT,omitempty"`
	VehicleCategoryLTE          *string  `json:"vehicleCategoryLTE,omitempty"`
	VehicleCategoryContains     *string  `json:"vehicleCategoryContains,omitempty"`
	VehicleCategoryHasPrefix    *string  `json:"vehicleCategoryHasPrefix,omitempty"`
	VehicleCategoryHasSuffix    *string  `json:"vehicleCategoryHasSuffix,omitempty"`
	VehicleCategoryEqualFold    *string  `json:"vehicleCategoryEqualFold,omitempty"`
	VehicleCategoryContainsFold *string  `json:"vehicleCategoryContainsFold,omitempty"`

	// "capacity" field predicates.
	Capacity             *string  `json:"capacity,omitempty"`
	CapacityNEQ          *string  `json:"capacityNEQ,omitempty"`
	CapacityIn           []string `json:"capacityIn,omitempty"`
	CapacityNotIn        []string `json:"capacityNotIn,omitempty"`
	CapacityGT           *string  `json:"capacityGT,omitempty"`
	CapacityGTE          *string  `json:"capacityGTE,omitempty"`
	CapacityLT           *string  `json:"capacityLT,omitempty"`
	CapacityLTE          *string  `json:"capacityLTE,omitempty"`
	CapacityContains     *string  `json:"capacityContains,omitempty"`
	CapacityHasPrefix    *string  `json:"capacityHasPrefix,omitempty"`
	CapacityHasSuffix    *string  `json:"capacityHasSuffix,omitempty"`
	CapacityEqualFold    *string  `json:"capacityEqualFold,omitempty"`
	CapacityContainsFold *string  `json:"capacityContainsFold,omitempty"`

	// "equipment_id" field predicates.
	EquipmentID      *int  `json:"equipmentID,omitempty"`
	EquipmentIDNEQ   *int  `json:"equipmentIDNEQ,omitempty"`
	EquipmentIDIn    []int `json:"equipmentIDIn,omitempty"`
	EquipmentIDNotIn []int `json:"equipmentIDNotIn,omitempty"`

	// "equipment" edge predicates.
	HasEquipment     *bool                  `json:"hasEquipment,omitempty"`
	HasEquipmentWith []*EquipmentWhereInput `json:"hasEquipmentWith,omitempty"`
}

VehicleWhereInput represents a where input for filtering Vehicle queries.

func (*VehicleWhereInput) AddPredicates

func (i *VehicleWhereInput) AddPredicates(predicates ...predicate.Vehicle)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*VehicleWhereInput) Filter

Filter applies the VehicleWhereInput filter on the VehicleQuery builder.

func (*VehicleWhereInput) P

P returns a predicate for filtering vehicles. An error is returned if the input is empty or invalid.

type Vehicles

type Vehicles []*Vehicle

Vehicles is a parsable slice of Vehicle.

type Weapon

type Weapon struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Indx holds the value of the "indx" field.
	Indx string `json:"index"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// EquipmentID holds the value of the "equipment_id" field.
	EquipmentID int `json:"equipment_id,omitempty"`
	// WeaponCategory holds the value of the "weapon_category" field.
	WeaponCategory string `json:"weapon_category,omitempty"`
	// WeaponRange holds the value of the "weapon_range" field.
	WeaponRange string `json:"weapon_range,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the WeaponQuery when eager-loading is set.
	Edges WeaponEdges `json:"-"`
	// contains filtered or unexported fields
}

Weapon is the model entity for the Weapon schema.

func (*Weapon) Equipment

func (w *Weapon) Equipment(ctx context.Context) (*Equipment, error)

func (*Weapon) IsNode

func (n *Weapon) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Weapon) MarshalJSON

func (w *Weapon) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Weapon) NamedWeaponDamage

func (w *Weapon) NamedWeaponDamage(name string) ([]*WeaponDamage, error)

NamedWeaponDamage returns the WeaponDamage named value or an error if the edge was not loaded in eager-loading with this name.

func (*Weapon) NamedWeaponProperties

func (w *Weapon) NamedWeaponProperties(name string) ([]*WeaponProperty, error)

NamedWeaponProperties returns the WeaponProperties named value or an error if the edge was not loaded in eager-loading with this name.

func (*Weapon) Node

func (w *Weapon) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*Weapon) QueryEquipment

func (w *Weapon) QueryEquipment() *EquipmentQuery

QueryEquipment queries the "equipment" edge of the Weapon entity.

func (*Weapon) QueryWeaponDamage

func (w *Weapon) QueryWeaponDamage() *WeaponDamageQuery

QueryWeaponDamage queries the "weapon_damage" edge of the Weapon entity.

func (*Weapon) QueryWeaponProperties

func (w *Weapon) QueryWeaponProperties() *WeaponPropertyQuery

QueryWeaponProperties queries the "weapon_properties" edge of the Weapon entity.

func (*Weapon) String

func (w *Weapon) String() string

String implements the fmt.Stringer.

func (*Weapon) ToEdge

func (w *Weapon) ToEdge(order *WeaponOrder) *WeaponEdge

ToEdge converts Weapon into WeaponEdge.

func (*Weapon) UnmarshalJSON

func (w *Weapon) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*Weapon) Unwrap

func (w *Weapon) Unwrap() *Weapon

Unwrap unwraps the Weapon entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Weapon) Update

func (w *Weapon) Update() *WeaponUpdateOne

Update returns a builder for updating this Weapon. Note that you need to call Weapon.Unwrap() before calling this method if this Weapon was returned from a transaction, and the transaction was committed or rolled back.

func (*Weapon) Value

func (w *Weapon) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Weapon. This includes values selected through modifiers, order, etc.

func (*Weapon) WeaponDamage

func (w *Weapon) WeaponDamage(ctx context.Context) (result []*WeaponDamage, err error)

func (*Weapon) WeaponProperties

func (w *Weapon) WeaponProperties(ctx context.Context) (result []*WeaponProperty, err error)

type WeaponClient

type WeaponClient struct {
	// contains filtered or unexported fields
}

WeaponClient is a client for the Weapon schema.

func NewWeaponClient

func NewWeaponClient(c config) *WeaponClient

NewWeaponClient returns a client for the Weapon from the given config.

func (*WeaponClient) Create

func (c *WeaponClient) Create() *WeaponCreate

Create returns a builder for creating a Weapon entity.

func (*WeaponClient) CreateBulk

func (c *WeaponClient) CreateBulk(builders ...*WeaponCreate) *WeaponCreateBulk

CreateBulk returns a builder for creating a bulk of Weapon entities.

func (*WeaponClient) Delete

func (c *WeaponClient) Delete() *WeaponDelete

Delete returns a delete builder for Weapon.

func (*WeaponClient) DeleteOne

func (c *WeaponClient) DeleteOne(w *Weapon) *WeaponDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*WeaponClient) DeleteOneID

func (c *WeaponClient) DeleteOneID(id int) *WeaponDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*WeaponClient) Get

func (c *WeaponClient) Get(ctx context.Context, id int) (*Weapon, error)

Get returns a Weapon entity by its id.

func (*WeaponClient) GetX

func (c *WeaponClient) GetX(ctx context.Context, id int) *Weapon

GetX is like Get, but panics if an error occurs.

func (*WeaponClient) Hooks

func (c *WeaponClient) Hooks() []Hook

Hooks returns the client hooks.

func (*WeaponClient) Intercept

func (c *WeaponClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `weapon.Intercept(f(g(h())))`.

func (*WeaponClient) Interceptors

func (c *WeaponClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*WeaponClient) Query

func (c *WeaponClient) Query() *WeaponQuery

Query returns a query builder for Weapon.

func (*WeaponClient) QueryEquipment

func (c *WeaponClient) QueryEquipment(w *Weapon) *EquipmentQuery

QueryEquipment queries the equipment edge of a Weapon.

func (*WeaponClient) QueryWeaponDamage

func (c *WeaponClient) QueryWeaponDamage(w *Weapon) *WeaponDamageQuery

QueryWeaponDamage queries the weapon_damage edge of a Weapon.

func (*WeaponClient) QueryWeaponProperties

func (c *WeaponClient) QueryWeaponProperties(w *Weapon) *WeaponPropertyQuery

QueryWeaponProperties queries the weapon_properties edge of a Weapon.

func (*WeaponClient) Update

func (c *WeaponClient) Update() *WeaponUpdate

Update returns an update builder for Weapon.

func (*WeaponClient) UpdateOne

func (c *WeaponClient) UpdateOne(w *Weapon) *WeaponUpdateOne

UpdateOne returns an update builder for the given entity.

func (*WeaponClient) UpdateOneID

func (c *WeaponClient) UpdateOneID(id int) *WeaponUpdateOne

UpdateOneID returns an update builder for the given id.

func (*WeaponClient) Use

func (c *WeaponClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `weapon.Hooks(f(g(h())))`.

type WeaponConnection

type WeaponConnection struct {
	Edges      []*WeaponEdge `json:"edges"`
	PageInfo   PageInfo      `json:"pageInfo"`
	TotalCount int           `json:"totalCount"`
}

WeaponConnection is the connection containing edges to Weapon.

type WeaponCreate

type WeaponCreate struct {
	// contains filtered or unexported fields
}

WeaponCreate is the builder for creating a Weapon entity.

func (*WeaponCreate) AddWeaponDamage

func (wc *WeaponCreate) AddWeaponDamage(w ...*WeaponDamage) *WeaponCreate

AddWeaponDamage adds the "weapon_damage" edges to the WeaponDamage entity.

func (*WeaponCreate) AddWeaponDamageIDs

func (wc *WeaponCreate) AddWeaponDamageIDs(ids ...int) *WeaponCreate

AddWeaponDamageIDs adds the "weapon_damage" edge to the WeaponDamage entity by IDs.

func (*WeaponCreate) AddWeaponProperties

func (wc *WeaponCreate) AddWeaponProperties(w ...*WeaponProperty) *WeaponCreate

AddWeaponProperties adds the "weapon_properties" edges to the WeaponProperty entity.

func (*WeaponCreate) AddWeaponPropertyIDs

func (wc *WeaponCreate) AddWeaponPropertyIDs(ids ...int) *WeaponCreate

AddWeaponPropertyIDs adds the "weapon_properties" edge to the WeaponProperty entity by IDs.

func (*WeaponCreate) Exec

func (wc *WeaponCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*WeaponCreate) ExecX

func (wc *WeaponCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WeaponCreate) Mutation

func (wc *WeaponCreate) Mutation() *WeaponMutation

Mutation returns the WeaponMutation object of the builder.

func (*WeaponCreate) Save

func (wc *WeaponCreate) Save(ctx context.Context) (*Weapon, error)

Save creates the Weapon in the database.

func (*WeaponCreate) SaveX

func (wc *WeaponCreate) SaveX(ctx context.Context) *Weapon

SaveX calls Save and panics if Save returns an error.

func (*WeaponCreate) SetEquipment

func (wc *WeaponCreate) SetEquipment(e *Equipment) *WeaponCreate

SetEquipment sets the "equipment" edge to the Equipment entity.

func (*WeaponCreate) SetEquipmentID

func (wc *WeaponCreate) SetEquipmentID(i int) *WeaponCreate

SetEquipmentID sets the "equipment_id" field.

func (*WeaponCreate) SetIndx

func (wc *WeaponCreate) SetIndx(s string) *WeaponCreate

SetIndx sets the "indx" field.

func (*WeaponCreate) SetName

func (wc *WeaponCreate) SetName(s string) *WeaponCreate

SetName sets the "name" field.

func (*WeaponCreate) SetWeapon

func (wc *WeaponCreate) SetWeapon(input *Weapon) *WeaponCreate

func (*WeaponCreate) SetWeaponCategory

func (wc *WeaponCreate) SetWeaponCategory(s string) *WeaponCreate

SetWeaponCategory sets the "weapon_category" field.

func (*WeaponCreate) SetWeaponRange

func (wc *WeaponCreate) SetWeaponRange(s string) *WeaponCreate

SetWeaponRange sets the "weapon_range" field.

type WeaponCreateBulk

type WeaponCreateBulk struct {
	// contains filtered or unexported fields
}

WeaponCreateBulk is the builder for creating many Weapon entities in bulk.

func (*WeaponCreateBulk) Exec

func (wcb *WeaponCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*WeaponCreateBulk) ExecX

func (wcb *WeaponCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WeaponCreateBulk) Save

func (wcb *WeaponCreateBulk) Save(ctx context.Context) ([]*Weapon, error)

Save creates the Weapon entities in the database.

func (*WeaponCreateBulk) SaveX

func (wcb *WeaponCreateBulk) SaveX(ctx context.Context) []*Weapon

SaveX is like Save, but panics if an error occurs.

type WeaponDamage

type WeaponDamage struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// WeaponID holds the value of the "weapon_id" field.
	WeaponID int `json:"weapon_id,omitempty"`
	// DamageTypeID holds the value of the "damage_type_id" field.
	DamageTypeID int `json:"damage_type_id,omitempty"`
	// Dice holds the value of the "dice" field.
	Dice string `json:"dice,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the WeaponDamageQuery when eager-loading is set.
	Edges WeaponDamageEdges `json:"-"`
	// contains filtered or unexported fields
}

WeaponDamage is the model entity for the WeaponDamage schema.

func (*WeaponDamage) DamageType

func (wd *WeaponDamage) DamageType(ctx context.Context) (*DamageType, error)

func (*WeaponDamage) IsNode

func (n *WeaponDamage) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*WeaponDamage) MarshalJSON

func (wd *WeaponDamage) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*WeaponDamage) Node

func (wd *WeaponDamage) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*WeaponDamage) QueryDamageType

func (wd *WeaponDamage) QueryDamageType() *DamageTypeQuery

QueryDamageType queries the "damage_type" edge of the WeaponDamage entity.

func (*WeaponDamage) QueryWeapon

func (wd *WeaponDamage) QueryWeapon() *WeaponQuery

QueryWeapon queries the "weapon" edge of the WeaponDamage entity.

func (*WeaponDamage) String

func (wd *WeaponDamage) String() string

String implements the fmt.Stringer.

func (*WeaponDamage) ToEdge

func (wd *WeaponDamage) ToEdge(order *WeaponDamageOrder) *WeaponDamageEdge

ToEdge converts WeaponDamage into WeaponDamageEdge.

func (*WeaponDamage) UnmarshalJSON

func (wd *WeaponDamage) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*WeaponDamage) Unwrap

func (wd *WeaponDamage) Unwrap() *WeaponDamage

Unwrap unwraps the WeaponDamage entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*WeaponDamage) Update

func (wd *WeaponDamage) Update() *WeaponDamageUpdateOne

Update returns a builder for updating this WeaponDamage. Note that you need to call WeaponDamage.Unwrap() before calling this method if this WeaponDamage was returned from a transaction, and the transaction was committed or rolled back.

func (*WeaponDamage) Value

func (wd *WeaponDamage) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the WeaponDamage. This includes values selected through modifiers, order, etc.

func (*WeaponDamage) Weapon

func (wd *WeaponDamage) Weapon(ctx context.Context) (*Weapon, error)

type WeaponDamageClient

type WeaponDamageClient struct {
	// contains filtered or unexported fields
}

WeaponDamageClient is a client for the WeaponDamage schema.

func NewWeaponDamageClient

func NewWeaponDamageClient(c config) *WeaponDamageClient

NewWeaponDamageClient returns a client for the WeaponDamage from the given config.

func (*WeaponDamageClient) Create

Create returns a builder for creating a WeaponDamage entity.

func (*WeaponDamageClient) CreateBulk

func (c *WeaponDamageClient) CreateBulk(builders ...*WeaponDamageCreate) *WeaponDamageCreateBulk

CreateBulk returns a builder for creating a bulk of WeaponDamage entities.

func (*WeaponDamageClient) Delete

Delete returns a delete builder for WeaponDamage.

func (*WeaponDamageClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*WeaponDamageClient) DeleteOneID

func (c *WeaponDamageClient) DeleteOneID(id int) *WeaponDamageDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*WeaponDamageClient) Get

Get returns a WeaponDamage entity by its id.

func (*WeaponDamageClient) GetX

GetX is like Get, but panics if an error occurs.

func (*WeaponDamageClient) Hooks

func (c *WeaponDamageClient) Hooks() []Hook

Hooks returns the client hooks.

func (*WeaponDamageClient) Intercept

func (c *WeaponDamageClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `weapondamage.Intercept(f(g(h())))`.

func (*WeaponDamageClient) Interceptors

func (c *WeaponDamageClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*WeaponDamageClient) Query

Query returns a query builder for WeaponDamage.

func (*WeaponDamageClient) QueryDamageType

func (c *WeaponDamageClient) QueryDamageType(wd *WeaponDamage) *DamageTypeQuery

QueryDamageType queries the damage_type edge of a WeaponDamage.

func (*WeaponDamageClient) QueryWeapon

func (c *WeaponDamageClient) QueryWeapon(wd *WeaponDamage) *WeaponQuery

QueryWeapon queries the weapon edge of a WeaponDamage.

func (*WeaponDamageClient) Update

Update returns an update builder for WeaponDamage.

func (*WeaponDamageClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*WeaponDamageClient) UpdateOneID

func (c *WeaponDamageClient) UpdateOneID(id int) *WeaponDamageUpdateOne

UpdateOneID returns an update builder for the given id.

func (*WeaponDamageClient) Use

func (c *WeaponDamageClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `weapondamage.Hooks(f(g(h())))`.

type WeaponDamageConnection

type WeaponDamageConnection struct {
	Edges      []*WeaponDamageEdge `json:"edges"`
	PageInfo   PageInfo            `json:"pageInfo"`
	TotalCount int                 `json:"totalCount"`
}

WeaponDamageConnection is the connection containing edges to WeaponDamage.

type WeaponDamageCreate

type WeaponDamageCreate struct {
	// contains filtered or unexported fields
}

WeaponDamageCreate is the builder for creating a WeaponDamage entity.

func (*WeaponDamageCreate) Exec

func (wdc *WeaponDamageCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*WeaponDamageCreate) ExecX

func (wdc *WeaponDamageCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WeaponDamageCreate) Mutation

func (wdc *WeaponDamageCreate) Mutation() *WeaponDamageMutation

Mutation returns the WeaponDamageMutation object of the builder.

func (*WeaponDamageCreate) Save

Save creates the WeaponDamage in the database.

func (*WeaponDamageCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*WeaponDamageCreate) SetDamageType

func (wdc *WeaponDamageCreate) SetDamageType(d *DamageType) *WeaponDamageCreate

SetDamageType sets the "damage_type" edge to the DamageType entity.

func (*WeaponDamageCreate) SetDamageTypeID

func (wdc *WeaponDamageCreate) SetDamageTypeID(i int) *WeaponDamageCreate

SetDamageTypeID sets the "damage_type_id" field.

func (*WeaponDamageCreate) SetDice

func (wdc *WeaponDamageCreate) SetDice(s string) *WeaponDamageCreate

SetDice sets the "dice" field.

func (*WeaponDamageCreate) SetWeapon

func (wdc *WeaponDamageCreate) SetWeapon(w *Weapon) *WeaponDamageCreate

SetWeapon sets the "weapon" edge to the Weapon entity.

func (*WeaponDamageCreate) SetWeaponDamage

func (wdc *WeaponDamageCreate) SetWeaponDamage(input *WeaponDamage) *WeaponDamageCreate

func (*WeaponDamageCreate) SetWeaponID

func (wdc *WeaponDamageCreate) SetWeaponID(i int) *WeaponDamageCreate

SetWeaponID sets the "weapon_id" field.

type WeaponDamageCreateBulk

type WeaponDamageCreateBulk struct {
	// contains filtered or unexported fields
}

WeaponDamageCreateBulk is the builder for creating many WeaponDamage entities in bulk.

func (*WeaponDamageCreateBulk) Exec

func (wdcb *WeaponDamageCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*WeaponDamageCreateBulk) ExecX

func (wdcb *WeaponDamageCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WeaponDamageCreateBulk) Save

Save creates the WeaponDamage entities in the database.

func (*WeaponDamageCreateBulk) SaveX

func (wdcb *WeaponDamageCreateBulk) SaveX(ctx context.Context) []*WeaponDamage

SaveX is like Save, but panics if an error occurs.

type WeaponDamageDelete

type WeaponDamageDelete struct {
	// contains filtered or unexported fields
}

WeaponDamageDelete is the builder for deleting a WeaponDamage entity.

func (*WeaponDamageDelete) Exec

func (wdd *WeaponDamageDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*WeaponDamageDelete) ExecX

func (wdd *WeaponDamageDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*WeaponDamageDelete) Where

Where appends a list predicates to the WeaponDamageDelete builder.

type WeaponDamageDeleteOne

type WeaponDamageDeleteOne struct {
	// contains filtered or unexported fields
}

WeaponDamageDeleteOne is the builder for deleting a single WeaponDamage entity.

func (*WeaponDamageDeleteOne) Exec

func (wddo *WeaponDamageDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*WeaponDamageDeleteOne) ExecX

func (wddo *WeaponDamageDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WeaponDamageDeleteOne) Where

Where appends a list predicates to the WeaponDamageDelete builder.

type WeaponDamageEdge

type WeaponDamageEdge struct {
	Node   *WeaponDamage `json:"node"`
	Cursor Cursor        `json:"cursor"`
}

WeaponDamageEdge is the edge representation of WeaponDamage.

type WeaponDamageEdges

type WeaponDamageEdges struct {
	// Weapon holds the value of the weapon edge.
	Weapon *Weapon `json:"weapon,omitempty"`
	// DamageType holds the value of the damage_type edge.
	DamageType *DamageType `json:"damage_type,omitempty"`
	// contains filtered or unexported fields
}

WeaponDamageEdges holds the relations/edges for other nodes in the graph.

func (WeaponDamageEdges) DamageTypeOrErr

func (e WeaponDamageEdges) DamageTypeOrErr() (*DamageType, error)

DamageTypeOrErr returns the DamageType value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (WeaponDamageEdges) WeaponOrErr

func (e WeaponDamageEdges) WeaponOrErr() (*Weapon, error)

WeaponOrErr returns the Weapon value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type WeaponDamageGroupBy

type WeaponDamageGroupBy struct {
	// contains filtered or unexported fields
}

WeaponDamageGroupBy is the group-by builder for WeaponDamage entities.

func (*WeaponDamageGroupBy) Aggregate

func (wdgb *WeaponDamageGroupBy) Aggregate(fns ...AggregateFunc) *WeaponDamageGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*WeaponDamageGroupBy) Bool

func (s *WeaponDamageGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WeaponDamageGroupBy) BoolX

func (s *WeaponDamageGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WeaponDamageGroupBy) Bools

func (s *WeaponDamageGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WeaponDamageGroupBy) BoolsX

func (s *WeaponDamageGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WeaponDamageGroupBy) Float64

func (s *WeaponDamageGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WeaponDamageGroupBy) Float64X

func (s *WeaponDamageGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WeaponDamageGroupBy) Float64s

func (s *WeaponDamageGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WeaponDamageGroupBy) Float64sX

func (s *WeaponDamageGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WeaponDamageGroupBy) Int

func (s *WeaponDamageGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WeaponDamageGroupBy) IntX

func (s *WeaponDamageGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WeaponDamageGroupBy) Ints

func (s *WeaponDamageGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WeaponDamageGroupBy) IntsX

func (s *WeaponDamageGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WeaponDamageGroupBy) Scan

func (wdgb *WeaponDamageGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WeaponDamageGroupBy) ScanX

func (s *WeaponDamageGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WeaponDamageGroupBy) String

func (s *WeaponDamageGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WeaponDamageGroupBy) StringX

func (s *WeaponDamageGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WeaponDamageGroupBy) Strings

func (s *WeaponDamageGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WeaponDamageGroupBy) StringsX

func (s *WeaponDamageGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WeaponDamageMutation

type WeaponDamageMutation struct {
	// contains filtered or unexported fields
}

WeaponDamageMutation represents an operation that mutates the WeaponDamage nodes in the graph.

func (*WeaponDamageMutation) AddField

func (m *WeaponDamageMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*WeaponDamageMutation) AddedEdges

func (m *WeaponDamageMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*WeaponDamageMutation) AddedField

func (m *WeaponDamageMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*WeaponDamageMutation) AddedFields

func (m *WeaponDamageMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*WeaponDamageMutation) AddedIDs

func (m *WeaponDamageMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*WeaponDamageMutation) ClearDamageType

func (m *WeaponDamageMutation) ClearDamageType()

ClearDamageType clears the "damage_type" edge to the DamageType entity.

func (*WeaponDamageMutation) ClearEdge

func (m *WeaponDamageMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*WeaponDamageMutation) ClearField

func (m *WeaponDamageMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*WeaponDamageMutation) ClearWeapon

func (m *WeaponDamageMutation) ClearWeapon()

ClearWeapon clears the "weapon" edge to the Weapon entity.

func (*WeaponDamageMutation) ClearedEdges

func (m *WeaponDamageMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*WeaponDamageMutation) ClearedFields

func (m *WeaponDamageMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (WeaponDamageMutation) Client

func (m WeaponDamageMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*WeaponDamageMutation) DamageTypeCleared

func (m *WeaponDamageMutation) DamageTypeCleared() bool

DamageTypeCleared reports if the "damage_type" edge to the DamageType entity was cleared.

func (*WeaponDamageMutation) DamageTypeID

func (m *WeaponDamageMutation) DamageTypeID() (r int, exists bool)

DamageTypeID returns the value of the "damage_type_id" field in the mutation.

func (*WeaponDamageMutation) DamageTypeIDs

func (m *WeaponDamageMutation) DamageTypeIDs() (ids []int)

DamageTypeIDs returns the "damage_type" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DamageTypeID instead. It exists only for internal usage by the builders.

func (*WeaponDamageMutation) Dice

func (m *WeaponDamageMutation) Dice() (r string, exists bool)

Dice returns the value of the "dice" field in the mutation.

func (*WeaponDamageMutation) EdgeCleared

func (m *WeaponDamageMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*WeaponDamageMutation) Field

func (m *WeaponDamageMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*WeaponDamageMutation) FieldCleared

func (m *WeaponDamageMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*WeaponDamageMutation) Fields

func (m *WeaponDamageMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*WeaponDamageMutation) ID

func (m *WeaponDamageMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*WeaponDamageMutation) IDs

func (m *WeaponDamageMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*WeaponDamageMutation) OldDamageTypeID

func (m *WeaponDamageMutation) OldDamageTypeID(ctx context.Context) (v int, err error)

OldDamageTypeID returns the old "damage_type_id" field's value of the WeaponDamage entity. If the WeaponDamage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*WeaponDamageMutation) OldDice

func (m *WeaponDamageMutation) OldDice(ctx context.Context) (v string, err error)

OldDice returns the old "dice" field's value of the WeaponDamage entity. If the WeaponDamage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*WeaponDamageMutation) OldField

func (m *WeaponDamageMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*WeaponDamageMutation) OldWeaponID

func (m *WeaponDamageMutation) OldWeaponID(ctx context.Context) (v int, err error)

OldWeaponID returns the old "weapon_id" field's value of the WeaponDamage entity. If the WeaponDamage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*WeaponDamageMutation) Op

func (m *WeaponDamageMutation) Op() Op

Op returns the operation name.

func (*WeaponDamageMutation) RemovedEdges

func (m *WeaponDamageMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*WeaponDamageMutation) RemovedIDs

func (m *WeaponDamageMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*WeaponDamageMutation) ResetDamageType

func (m *WeaponDamageMutation) ResetDamageType()

ResetDamageType resets all changes to the "damage_type" edge.

func (*WeaponDamageMutation) ResetDamageTypeID

func (m *WeaponDamageMutation) ResetDamageTypeID()

ResetDamageTypeID resets all changes to the "damage_type_id" field.

func (*WeaponDamageMutation) ResetDice

func (m *WeaponDamageMutation) ResetDice()

ResetDice resets all changes to the "dice" field.

func (*WeaponDamageMutation) ResetEdge

func (m *WeaponDamageMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*WeaponDamageMutation) ResetField

func (m *WeaponDamageMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*WeaponDamageMutation) ResetWeapon

func (m *WeaponDamageMutation) ResetWeapon()

ResetWeapon resets all changes to the "weapon" edge.

func (*WeaponDamageMutation) ResetWeaponID

func (m *WeaponDamageMutation) ResetWeaponID()

ResetWeaponID resets all changes to the "weapon_id" field.

func (*WeaponDamageMutation) SetDamageTypeID

func (m *WeaponDamageMutation) SetDamageTypeID(i int)

SetDamageTypeID sets the "damage_type_id" field.

func (*WeaponDamageMutation) SetDice

func (m *WeaponDamageMutation) SetDice(s string)

SetDice sets the "dice" field.

func (*WeaponDamageMutation) SetField

func (m *WeaponDamageMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*WeaponDamageMutation) SetOp

func (m *WeaponDamageMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*WeaponDamageMutation) SetWeaponID

func (m *WeaponDamageMutation) SetWeaponID(i int)

SetWeaponID sets the "weapon_id" field.

func (WeaponDamageMutation) Tx

func (m WeaponDamageMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*WeaponDamageMutation) Type

func (m *WeaponDamageMutation) Type() string

Type returns the node type of this mutation (WeaponDamage).

func (*WeaponDamageMutation) WeaponCleared

func (m *WeaponDamageMutation) WeaponCleared() bool

WeaponCleared reports if the "weapon" edge to the Weapon entity was cleared.

func (*WeaponDamageMutation) WeaponID

func (m *WeaponDamageMutation) WeaponID() (r int, exists bool)

WeaponID returns the value of the "weapon_id" field in the mutation.

func (*WeaponDamageMutation) WeaponIDs

func (m *WeaponDamageMutation) WeaponIDs() (ids []int)

WeaponIDs returns the "weapon" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use WeaponID instead. It exists only for internal usage by the builders.

func (*WeaponDamageMutation) Where

Where appends a list predicates to the WeaponDamageMutation builder.

func (*WeaponDamageMutation) WhereP

func (m *WeaponDamageMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the WeaponDamageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type WeaponDamageOrder

type WeaponDamageOrder struct {
	Direction OrderDirection          `json:"direction"`
	Field     *WeaponDamageOrderField `json:"field"`
}

WeaponDamageOrder defines the ordering of WeaponDamage.

type WeaponDamageOrderField

type WeaponDamageOrderField struct {
	// Value extracts the ordering value from the given WeaponDamage.
	Value func(*WeaponDamage) (ent.Value, error)
	// contains filtered or unexported fields
}

WeaponDamageOrderField defines the ordering field of WeaponDamage.

type WeaponDamagePaginateOption

type WeaponDamagePaginateOption func(*weapondamagePager) error

WeaponDamagePaginateOption enables pagination customization.

func WithWeaponDamageFilter

func WithWeaponDamageFilter(filter func(*WeaponDamageQuery) (*WeaponDamageQuery, error)) WeaponDamagePaginateOption

WithWeaponDamageFilter configures pagination filter.

func WithWeaponDamageOrder

func WithWeaponDamageOrder(order *WeaponDamageOrder) WeaponDamagePaginateOption

WithWeaponDamageOrder configures pagination ordering.

type WeaponDamageQuery

type WeaponDamageQuery struct {
	// contains filtered or unexported fields
}

WeaponDamageQuery is the builder for querying WeaponDamage entities.

func (*WeaponDamageQuery) Aggregate

func (wdq *WeaponDamageQuery) Aggregate(fns ...AggregateFunc) *WeaponDamageSelect

Aggregate returns a WeaponDamageSelect configured with the given aggregations.

func (*WeaponDamageQuery) All

func (wdq *WeaponDamageQuery) All(ctx context.Context) ([]*WeaponDamage, error)

All executes the query and returns a list of WeaponDamages.

func (*WeaponDamageQuery) AllX

func (wdq *WeaponDamageQuery) AllX(ctx context.Context) []*WeaponDamage

AllX is like All, but panics if an error occurs.

func (*WeaponDamageQuery) Clone

func (wdq *WeaponDamageQuery) Clone() *WeaponDamageQuery

Clone returns a duplicate of the WeaponDamageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*WeaponDamageQuery) CollectFields

func (wd *WeaponDamageQuery) CollectFields(ctx context.Context, satisfies ...string) (*WeaponDamageQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*WeaponDamageQuery) Count

func (wdq *WeaponDamageQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WeaponDamageQuery) CountX

func (wdq *WeaponDamageQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*WeaponDamageQuery) Exist

func (wdq *WeaponDamageQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*WeaponDamageQuery) ExistX

func (wdq *WeaponDamageQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*WeaponDamageQuery) First

func (wdq *WeaponDamageQuery) First(ctx context.Context) (*WeaponDamage, error)

First returns the first WeaponDamage entity from the query. Returns a *NotFoundError when no WeaponDamage was found.

func (*WeaponDamageQuery) FirstID

func (wdq *WeaponDamageQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first WeaponDamage ID from the query. Returns a *NotFoundError when no WeaponDamage ID was found.

func (*WeaponDamageQuery) FirstIDX

func (wdq *WeaponDamageQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*WeaponDamageQuery) FirstX

func (wdq *WeaponDamageQuery) FirstX(ctx context.Context) *WeaponDamage

FirstX is like First, but panics if an error occurs.

func (*WeaponDamageQuery) GroupBy

func (wdq *WeaponDamageQuery) GroupBy(field string, fields ...string) *WeaponDamageGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	WeaponID int `json:"weapon_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.WeaponDamage.Query().
	GroupBy(weapondamage.FieldWeaponID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*WeaponDamageQuery) IDs

func (wdq *WeaponDamageQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of WeaponDamage IDs.

func (*WeaponDamageQuery) IDsX

func (wdq *WeaponDamageQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*WeaponDamageQuery) Limit

func (wdq *WeaponDamageQuery) Limit(limit int) *WeaponDamageQuery

Limit the number of records to be returned by this query.

func (*WeaponDamageQuery) Offset

func (wdq *WeaponDamageQuery) Offset(offset int) *WeaponDamageQuery

Offset to start from.

func (*WeaponDamageQuery) Only

func (wdq *WeaponDamageQuery) Only(ctx context.Context) (*WeaponDamage, error)

Only returns a single WeaponDamage entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WeaponDamage entity is found. Returns a *NotFoundError when no WeaponDamage entities are found.

func (*WeaponDamageQuery) OnlyID

func (wdq *WeaponDamageQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only WeaponDamage ID in the query. Returns a *NotSingularError when more than one WeaponDamage ID is found. Returns a *NotFoundError when no entities are found.

func (*WeaponDamageQuery) OnlyIDX

func (wdq *WeaponDamageQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*WeaponDamageQuery) OnlyX

func (wdq *WeaponDamageQuery) OnlyX(ctx context.Context) *WeaponDamage

OnlyX is like Only, but panics if an error occurs.

func (*WeaponDamageQuery) Order

Order specifies how the records should be ordered.

func (*WeaponDamageQuery) Paginate

func (wd *WeaponDamageQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...WeaponDamagePaginateOption,
) (*WeaponDamageConnection, error)

Paginate executes the query and returns a relay based cursor connection to WeaponDamage.

func (*WeaponDamageQuery) QueryDamageType

func (wdq *WeaponDamageQuery) QueryDamageType() *DamageTypeQuery

QueryDamageType chains the current query on the "damage_type" edge.

func (*WeaponDamageQuery) QueryWeapon

func (wdq *WeaponDamageQuery) QueryWeapon() *WeaponQuery

QueryWeapon chains the current query on the "weapon" edge.

func (*WeaponDamageQuery) Select

func (wdq *WeaponDamageQuery) Select(fields ...string) *WeaponDamageSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	WeaponID int `json:"weapon_id,omitempty"`
}

client.WeaponDamage.Query().
	Select(weapondamage.FieldWeaponID).
	Scan(ctx, &v)

func (*WeaponDamageQuery) Unique

func (wdq *WeaponDamageQuery) Unique(unique bool) *WeaponDamageQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*WeaponDamageQuery) Where

Where adds a new predicate for the WeaponDamageQuery builder.

func (*WeaponDamageQuery) WithDamageType

func (wdq *WeaponDamageQuery) WithDamageType(opts ...func(*DamageTypeQuery)) *WeaponDamageQuery

WithDamageType tells the query-builder to eager-load the nodes that are connected to the "damage_type" edge. The optional arguments are used to configure the query builder of the edge.

func (*WeaponDamageQuery) WithWeapon

func (wdq *WeaponDamageQuery) WithWeapon(opts ...func(*WeaponQuery)) *WeaponDamageQuery

WithWeapon tells the query-builder to eager-load the nodes that are connected to the "weapon" edge. The optional arguments are used to configure the query builder of the edge.

type WeaponDamageSelect

type WeaponDamageSelect struct {
	*WeaponDamageQuery
	// contains filtered or unexported fields
}

WeaponDamageSelect is the builder for selecting fields of WeaponDamage entities.

func (*WeaponDamageSelect) Aggregate

func (wds *WeaponDamageSelect) Aggregate(fns ...AggregateFunc) *WeaponDamageSelect

Aggregate adds the given aggregation functions to the selector query.

func (*WeaponDamageSelect) Bool

func (s *WeaponDamageSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WeaponDamageSelect) BoolX

func (s *WeaponDamageSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WeaponDamageSelect) Bools

func (s *WeaponDamageSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WeaponDamageSelect) BoolsX

func (s *WeaponDamageSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WeaponDamageSelect) Float64

func (s *WeaponDamageSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WeaponDamageSelect) Float64X

func (s *WeaponDamageSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WeaponDamageSelect) Float64s

func (s *WeaponDamageSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WeaponDamageSelect) Float64sX

func (s *WeaponDamageSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WeaponDamageSelect) Int

func (s *WeaponDamageSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WeaponDamageSelect) IntX

func (s *WeaponDamageSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WeaponDamageSelect) Ints

func (s *WeaponDamageSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WeaponDamageSelect) IntsX

func (s *WeaponDamageSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WeaponDamageSelect) Scan

func (wds *WeaponDamageSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WeaponDamageSelect) ScanX

func (s *WeaponDamageSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WeaponDamageSelect) String

func (s *WeaponDamageSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WeaponDamageSelect) StringX

func (s *WeaponDamageSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WeaponDamageSelect) Strings

func (s *WeaponDamageSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WeaponDamageSelect) StringsX

func (s *WeaponDamageSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WeaponDamageUpdate

type WeaponDamageUpdate struct {
	// contains filtered or unexported fields
}

WeaponDamageUpdate is the builder for updating WeaponDamage entities.

func (*WeaponDamageUpdate) ClearDamageType

func (wdu *WeaponDamageUpdate) ClearDamageType() *WeaponDamageUpdate

ClearDamageType clears the "damage_type" edge to the DamageType entity.

func (*WeaponDamageUpdate) ClearWeapon

func (wdu *WeaponDamageUpdate) ClearWeapon() *WeaponDamageUpdate

ClearWeapon clears the "weapon" edge to the Weapon entity.

func (*WeaponDamageUpdate) Exec

func (wdu *WeaponDamageUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*WeaponDamageUpdate) ExecX

func (wdu *WeaponDamageUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WeaponDamageUpdate) Mutation

func (wdu *WeaponDamageUpdate) Mutation() *WeaponDamageMutation

Mutation returns the WeaponDamageMutation object of the builder.

func (*WeaponDamageUpdate) Save

func (wdu *WeaponDamageUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*WeaponDamageUpdate) SaveX

func (wdu *WeaponDamageUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*WeaponDamageUpdate) SetDamageType

func (wdu *WeaponDamageUpdate) SetDamageType(d *DamageType) *WeaponDamageUpdate

SetDamageType sets the "damage_type" edge to the DamageType entity.

func (*WeaponDamageUpdate) SetDamageTypeID

func (wdu *WeaponDamageUpdate) SetDamageTypeID(i int) *WeaponDamageUpdate

SetDamageTypeID sets the "damage_type_id" field.

func (*WeaponDamageUpdate) SetDice

func (wdu *WeaponDamageUpdate) SetDice(s string) *WeaponDamageUpdate

SetDice sets the "dice" field.

func (*WeaponDamageUpdate) SetWeapon

func (wdu *WeaponDamageUpdate) SetWeapon(w *Weapon) *WeaponDamageUpdate

SetWeapon sets the "weapon" edge to the Weapon entity.

func (*WeaponDamageUpdate) SetWeaponID

func (wdu *WeaponDamageUpdate) SetWeaponID(i int) *WeaponDamageUpdate

SetWeaponID sets the "weapon_id" field.

func (*WeaponDamageUpdate) Where

Where appends a list predicates to the WeaponDamageUpdate builder.

type WeaponDamageUpdateOne

type WeaponDamageUpdateOne struct {
	// contains filtered or unexported fields
}

WeaponDamageUpdateOne is the builder for updating a single WeaponDamage entity.

func (*WeaponDamageUpdateOne) ClearDamageType

func (wduo *WeaponDamageUpdateOne) ClearDamageType() *WeaponDamageUpdateOne

ClearDamageType clears the "damage_type" edge to the DamageType entity.

func (*WeaponDamageUpdateOne) ClearWeapon

func (wduo *WeaponDamageUpdateOne) ClearWeapon() *WeaponDamageUpdateOne

ClearWeapon clears the "weapon" edge to the Weapon entity.

func (*WeaponDamageUpdateOne) Exec

func (wduo *WeaponDamageUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*WeaponDamageUpdateOne) ExecX

func (wduo *WeaponDamageUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WeaponDamageUpdateOne) Mutation

func (wduo *WeaponDamageUpdateOne) Mutation() *WeaponDamageMutation

Mutation returns the WeaponDamageMutation object of the builder.

func (*WeaponDamageUpdateOne) Save

Save executes the query and returns the updated WeaponDamage entity.

func (*WeaponDamageUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*WeaponDamageUpdateOne) Select

func (wduo *WeaponDamageUpdateOne) Select(field string, fields ...string) *WeaponDamageUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*WeaponDamageUpdateOne) SetDamageType

func (wduo *WeaponDamageUpdateOne) SetDamageType(d *DamageType) *WeaponDamageUpdateOne

SetDamageType sets the "damage_type" edge to the DamageType entity.

func (*WeaponDamageUpdateOne) SetDamageTypeID

func (wduo *WeaponDamageUpdateOne) SetDamageTypeID(i int) *WeaponDamageUpdateOne

SetDamageTypeID sets the "damage_type_id" field.

func (*WeaponDamageUpdateOne) SetDice

SetDice sets the "dice" field.

func (*WeaponDamageUpdateOne) SetWeapon

func (wduo *WeaponDamageUpdateOne) SetWeapon(w *Weapon) *WeaponDamageUpdateOne

SetWeapon sets the "weapon" edge to the Weapon entity.

func (*WeaponDamageUpdateOne) SetWeaponID

func (wduo *WeaponDamageUpdateOne) SetWeaponID(i int) *WeaponDamageUpdateOne

SetWeaponID sets the "weapon_id" field.

func (*WeaponDamageUpdateOne) Where

Where appends a list predicates to the WeaponDamageUpdate builder.

type WeaponDamageWhereInput

type WeaponDamageWhereInput struct {
	Predicates []predicate.WeaponDamage  `json:"-"`
	Not        *WeaponDamageWhereInput   `json:"not,omitempty"`
	Or         []*WeaponDamageWhereInput `json:"or,omitempty"`
	And        []*WeaponDamageWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "weapon_id" field predicates.
	WeaponID      *int  `json:"weaponID,omitempty"`
	WeaponIDNEQ   *int  `json:"weaponIDNEQ,omitempty"`
	WeaponIDIn    []int `json:"weaponIDIn,omitempty"`
	WeaponIDNotIn []int `json:"weaponIDNotIn,omitempty"`

	// "damage_type_id" field predicates.
	DamageTypeID      *int  `json:"damageTypeID,omitempty"`
	DamageTypeIDNEQ   *int  `json:"damageTypeIDNEQ,omitempty"`
	DamageTypeIDIn    []int `json:"damageTypeIDIn,omitempty"`
	DamageTypeIDNotIn []int `json:"damageTypeIDNotIn,omitempty"`

	// "dice" field predicates.
	Dice             *string  `json:"dice,omitempty"`
	DiceNEQ          *string  `json:"diceNEQ,omitempty"`
	DiceIn           []string `json:"diceIn,omitempty"`
	DiceNotIn        []string `json:"diceNotIn,omitempty"`
	DiceGT           *string  `json:"diceGT,omitempty"`
	DiceGTE          *string  `json:"diceGTE,omitempty"`
	DiceLT           *string  `json:"diceLT,omitempty"`
	DiceLTE          *string  `json:"diceLTE,omitempty"`
	DiceContains     *string  `json:"diceContains,omitempty"`
	DiceHasPrefix    *string  `json:"diceHasPrefix,omitempty"`
	DiceHasSuffix    *string  `json:"diceHasSuffix,omitempty"`
	DiceEqualFold    *string  `json:"diceEqualFold,omitempty"`
	DiceContainsFold *string  `json:"diceContainsFold,omitempty"`

	// "weapon" edge predicates.
	HasWeapon     *bool               `json:"hasWeapon,omitempty"`
	HasWeaponWith []*WeaponWhereInput `json:"hasWeaponWith,omitempty"`

	// "damage_type" edge predicates.
	HasDamageType     *bool                   `json:"hasDamageType,omitempty"`
	HasDamageTypeWith []*DamageTypeWhereInput `json:"hasDamageTypeWith,omitempty"`
}

WeaponDamageWhereInput represents a where input for filtering WeaponDamage queries.

func (*WeaponDamageWhereInput) AddPredicates

func (i *WeaponDamageWhereInput) AddPredicates(predicates ...predicate.WeaponDamage)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*WeaponDamageWhereInput) Filter

Filter applies the WeaponDamageWhereInput filter on the WeaponDamageQuery builder.

func (*WeaponDamageWhereInput) P

P returns a predicate for filtering weapondamages. An error is returned if the input is empty or invalid.

type WeaponDamages

type WeaponDamages []*WeaponDamage

WeaponDamages is a parsable slice of WeaponDamage.

type WeaponDelete

type WeaponDelete struct {
	// contains filtered or unexported fields
}

WeaponDelete is the builder for deleting a Weapon entity.

func (*WeaponDelete) Exec

func (wd *WeaponDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*WeaponDelete) ExecX

func (wd *WeaponDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*WeaponDelete) Where

func (wd *WeaponDelete) Where(ps ...predicate.Weapon) *WeaponDelete

Where appends a list predicates to the WeaponDelete builder.

type WeaponDeleteOne

type WeaponDeleteOne struct {
	// contains filtered or unexported fields
}

WeaponDeleteOne is the builder for deleting a single Weapon entity.

func (*WeaponDeleteOne) Exec

func (wdo *WeaponDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*WeaponDeleteOne) ExecX

func (wdo *WeaponDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WeaponDeleteOne) Where

func (wdo *WeaponDeleteOne) Where(ps ...predicate.Weapon) *WeaponDeleteOne

Where appends a list predicates to the WeaponDelete builder.

type WeaponEdge

type WeaponEdge struct {
	Node   *Weapon `json:"node"`
	Cursor Cursor  `json:"cursor"`
}

WeaponEdge is the edge representation of Weapon.

type WeaponEdges

type WeaponEdges struct {
	// Equipment holds the value of the equipment edge.
	Equipment *Equipment `json:"equipment,omitempty"`
	// WeaponDamage holds the value of the weapon_damage edge.
	WeaponDamage []*WeaponDamage `json:"weapon_damage,omitempty"`
	// WeaponProperties holds the value of the weapon_properties edge.
	WeaponProperties []*WeaponProperty `json:"weapon_properties,omitempty"`
	// contains filtered or unexported fields
}

WeaponEdges holds the relations/edges for other nodes in the graph.

func (WeaponEdges) EquipmentOrErr

func (e WeaponEdges) EquipmentOrErr() (*Equipment, error)

EquipmentOrErr returns the Equipment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (WeaponEdges) WeaponDamageOrErr

func (e WeaponEdges) WeaponDamageOrErr() ([]*WeaponDamage, error)

WeaponDamageOrErr returns the WeaponDamage value or an error if the edge was not loaded in eager-loading.

func (WeaponEdges) WeaponPropertiesOrErr

func (e WeaponEdges) WeaponPropertiesOrErr() ([]*WeaponProperty, error)

WeaponPropertiesOrErr returns the WeaponProperties value or an error if the edge was not loaded in eager-loading.

type WeaponGroupBy

type WeaponGroupBy struct {
	// contains filtered or unexported fields
}

WeaponGroupBy is the group-by builder for Weapon entities.

func (*WeaponGroupBy) Aggregate

func (wgb *WeaponGroupBy) Aggregate(fns ...AggregateFunc) *WeaponGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*WeaponGroupBy) Bool

func (s *WeaponGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WeaponGroupBy) BoolX

func (s *WeaponGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WeaponGroupBy) Bools

func (s *WeaponGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WeaponGroupBy) BoolsX

func (s *WeaponGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WeaponGroupBy) Float64

func (s *WeaponGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WeaponGroupBy) Float64X

func (s *WeaponGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WeaponGroupBy) Float64s

func (s *WeaponGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WeaponGroupBy) Float64sX

func (s *WeaponGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WeaponGroupBy) Int

func (s *WeaponGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WeaponGroupBy) IntX

func (s *WeaponGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WeaponGroupBy) Ints

func (s *WeaponGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WeaponGroupBy) IntsX

func (s *WeaponGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WeaponGroupBy) Scan

func (wgb *WeaponGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WeaponGroupBy) ScanX

func (s *WeaponGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WeaponGroupBy) String

func (s *WeaponGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WeaponGroupBy) StringX

func (s *WeaponGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WeaponGroupBy) Strings

func (s *WeaponGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WeaponGroupBy) StringsX

func (s *WeaponGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WeaponMutation

type WeaponMutation struct {
	// contains filtered or unexported fields
}

WeaponMutation represents an operation that mutates the Weapon nodes in the graph.

func (*WeaponMutation) AddField

func (m *WeaponMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*WeaponMutation) AddWeaponDamageIDs

func (m *WeaponMutation) AddWeaponDamageIDs(ids ...int)

AddWeaponDamageIDs adds the "weapon_damage" edge to the WeaponDamage entity by ids.

func (*WeaponMutation) AddWeaponPropertyIDs

func (m *WeaponMutation) AddWeaponPropertyIDs(ids ...int)

AddWeaponPropertyIDs adds the "weapon_properties" edge to the WeaponProperty entity by ids.

func (*WeaponMutation) AddedEdges

func (m *WeaponMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*WeaponMutation) AddedField

func (m *WeaponMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*WeaponMutation) AddedFields

func (m *WeaponMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*WeaponMutation) AddedIDs

func (m *WeaponMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*WeaponMutation) ClearEdge

func (m *WeaponMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*WeaponMutation) ClearEquipment

func (m *WeaponMutation) ClearEquipment()

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*WeaponMutation) ClearField

func (m *WeaponMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*WeaponMutation) ClearWeaponDamage

func (m *WeaponMutation) ClearWeaponDamage()

ClearWeaponDamage clears the "weapon_damage" edge to the WeaponDamage entity.

func (*WeaponMutation) ClearWeaponProperties

func (m *WeaponMutation) ClearWeaponProperties()

ClearWeaponProperties clears the "weapon_properties" edge to the WeaponProperty entity.

func (*WeaponMutation) ClearedEdges

func (m *WeaponMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*WeaponMutation) ClearedFields

func (m *WeaponMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (WeaponMutation) Client

func (m WeaponMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*WeaponMutation) EdgeCleared

func (m *WeaponMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*WeaponMutation) EquipmentCleared

func (m *WeaponMutation) EquipmentCleared() bool

EquipmentCleared reports if the "equipment" edge to the Equipment entity was cleared.

func (*WeaponMutation) EquipmentID

func (m *WeaponMutation) EquipmentID() (r int, exists bool)

EquipmentID returns the value of the "equipment_id" field in the mutation.

func (*WeaponMutation) EquipmentIDs

func (m *WeaponMutation) EquipmentIDs() (ids []int)

EquipmentIDs returns the "equipment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EquipmentID instead. It exists only for internal usage by the builders.

func (*WeaponMutation) Field

func (m *WeaponMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*WeaponMutation) FieldCleared

func (m *WeaponMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*WeaponMutation) Fields

func (m *WeaponMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*WeaponMutation) ID

func (m *WeaponMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*WeaponMutation) IDs

func (m *WeaponMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*WeaponMutation) Indx

func (m *WeaponMutation) Indx() (r string, exists bool)

Indx returns the value of the "indx" field in the mutation.

func (*WeaponMutation) Name

func (m *WeaponMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*WeaponMutation) OldEquipmentID

func (m *WeaponMutation) OldEquipmentID(ctx context.Context) (v int, err error)

OldEquipmentID returns the old "equipment_id" field's value of the Weapon entity. If the Weapon object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*WeaponMutation) OldField

func (m *WeaponMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*WeaponMutation) OldIndx

func (m *WeaponMutation) OldIndx(ctx context.Context) (v string, err error)

OldIndx returns the old "indx" field's value of the Weapon entity. If the Weapon object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*WeaponMutation) OldName

func (m *WeaponMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Weapon entity. If the Weapon object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*WeaponMutation) OldWeaponCategory

func (m *WeaponMutation) OldWeaponCategory(ctx context.Context) (v string, err error)

OldWeaponCategory returns the old "weapon_category" field's value of the Weapon entity. If the Weapon object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*WeaponMutation) OldWeaponRange

func (m *WeaponMutation) OldWeaponRange(ctx context.Context) (v string, err error)

OldWeaponRange returns the old "weapon_range" field's value of the Weapon entity. If the Weapon object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*WeaponMutation) Op

func (m *WeaponMutation) Op() Op

Op returns the operation name.

func (*WeaponMutation) RemoveWeaponDamageIDs

func (m *WeaponMutation) RemoveWeaponDamageIDs(ids ...int)

RemoveWeaponDamageIDs removes the "weapon_damage" edge to the WeaponDamage entity by IDs.

func (*WeaponMutation) RemoveWeaponPropertyIDs

func (m *WeaponMutation) RemoveWeaponPropertyIDs(ids ...int)

RemoveWeaponPropertyIDs removes the "weapon_properties" edge to the WeaponProperty entity by IDs.

func (*WeaponMutation) RemovedEdges

func (m *WeaponMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*WeaponMutation) RemovedIDs

func (m *WeaponMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*WeaponMutation) RemovedWeaponDamageIDs

func (m *WeaponMutation) RemovedWeaponDamageIDs() (ids []int)

RemovedWeaponDamage returns the removed IDs of the "weapon_damage" edge to the WeaponDamage entity.

func (*WeaponMutation) RemovedWeaponPropertiesIDs

func (m *WeaponMutation) RemovedWeaponPropertiesIDs() (ids []int)

RemovedWeaponProperties returns the removed IDs of the "weapon_properties" edge to the WeaponProperty entity.

func (*WeaponMutation) ResetEdge

func (m *WeaponMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*WeaponMutation) ResetEquipment

func (m *WeaponMutation) ResetEquipment()

ResetEquipment resets all changes to the "equipment" edge.

func (*WeaponMutation) ResetEquipmentID

func (m *WeaponMutation) ResetEquipmentID()

ResetEquipmentID resets all changes to the "equipment_id" field.

func (*WeaponMutation) ResetField

func (m *WeaponMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*WeaponMutation) ResetIndx

func (m *WeaponMutation) ResetIndx()

ResetIndx resets all changes to the "indx" field.

func (*WeaponMutation) ResetName

func (m *WeaponMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*WeaponMutation) ResetWeaponCategory

func (m *WeaponMutation) ResetWeaponCategory()

ResetWeaponCategory resets all changes to the "weapon_category" field.

func (*WeaponMutation) ResetWeaponDamage

func (m *WeaponMutation) ResetWeaponDamage()

ResetWeaponDamage resets all changes to the "weapon_damage" edge.

func (*WeaponMutation) ResetWeaponProperties

func (m *WeaponMutation) ResetWeaponProperties()

ResetWeaponProperties resets all changes to the "weapon_properties" edge.

func (*WeaponMutation) ResetWeaponRange

func (m *WeaponMutation) ResetWeaponRange()

ResetWeaponRange resets all changes to the "weapon_range" field.

func (*WeaponMutation) SetEquipmentID

func (m *WeaponMutation) SetEquipmentID(i int)

SetEquipmentID sets the "equipment_id" field.

func (*WeaponMutation) SetField

func (m *WeaponMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*WeaponMutation) SetIndx

func (m *WeaponMutation) SetIndx(s string)

SetIndx sets the "indx" field.

func (*WeaponMutation) SetName

func (m *WeaponMutation) SetName(s string)

SetName sets the "name" field.

func (*WeaponMutation) SetOp

func (m *WeaponMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*WeaponMutation) SetWeaponCategory

func (m *WeaponMutation) SetWeaponCategory(s string)

SetWeaponCategory sets the "weapon_category" field.

func (*WeaponMutation) SetWeaponRange

func (m *WeaponMutation) SetWeaponRange(s string)

SetWeaponRange sets the "weapon_range" field.

func (WeaponMutation) Tx

func (m WeaponMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*WeaponMutation) Type

func (m *WeaponMutation) Type() string

Type returns the node type of this mutation (Weapon).

func (*WeaponMutation) WeaponCategory

func (m *WeaponMutation) WeaponCategory() (r string, exists bool)

WeaponCategory returns the value of the "weapon_category" field in the mutation.

func (*WeaponMutation) WeaponDamageCleared

func (m *WeaponMutation) WeaponDamageCleared() bool

WeaponDamageCleared reports if the "weapon_damage" edge to the WeaponDamage entity was cleared.

func (*WeaponMutation) WeaponDamageIDs

func (m *WeaponMutation) WeaponDamageIDs() (ids []int)

WeaponDamageIDs returns the "weapon_damage" edge IDs in the mutation.

func (*WeaponMutation) WeaponPropertiesCleared

func (m *WeaponMutation) WeaponPropertiesCleared() bool

WeaponPropertiesCleared reports if the "weapon_properties" edge to the WeaponProperty entity was cleared.

func (*WeaponMutation) WeaponPropertiesIDs

func (m *WeaponMutation) WeaponPropertiesIDs() (ids []int)

WeaponPropertiesIDs returns the "weapon_properties" edge IDs in the mutation.

func (*WeaponMutation) WeaponRange

func (m *WeaponMutation) WeaponRange() (r string, exists bool)

WeaponRange returns the value of the "weapon_range" field in the mutation.

func (*WeaponMutation) Where

func (m *WeaponMutation) Where(ps ...predicate.Weapon)

Where appends a list predicates to the WeaponMutation builder.

func (*WeaponMutation) WhereP

func (m *WeaponMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the WeaponMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type WeaponOrder

type WeaponOrder struct {
	Direction OrderDirection    `json:"direction"`
	Field     *WeaponOrderField `json:"field"`
}

WeaponOrder defines the ordering of Weapon.

type WeaponOrderField

type WeaponOrderField struct {
	// Value extracts the ordering value from the given Weapon.
	Value func(*Weapon) (ent.Value, error)
	// contains filtered or unexported fields
}

WeaponOrderField defines the ordering field of Weapon.

func (WeaponOrderField) MarshalGQL

func (f WeaponOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (WeaponOrderField) String

func (f WeaponOrderField) String() string

String implement fmt.Stringer interface.

func (*WeaponOrderField) UnmarshalGQL

func (f *WeaponOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type WeaponPaginateOption

type WeaponPaginateOption func(*weaponPager) error

WeaponPaginateOption enables pagination customization.

func WithWeaponFilter

func WithWeaponFilter(filter func(*WeaponQuery) (*WeaponQuery, error)) WeaponPaginateOption

WithWeaponFilter configures pagination filter.

func WithWeaponOrder

func WithWeaponOrder(order *WeaponOrder) WeaponPaginateOption

WithWeaponOrder configures pagination ordering.

type WeaponProperties

type WeaponProperties []*WeaponProperty

WeaponProperties is a parsable slice of WeaponProperty.

type WeaponProperty

type WeaponProperty struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Indx holds the value of the "indx" field.
	Indx string `json:"index"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Desc holds the value of the "desc" field.
	Desc []string `json:"desc,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the WeaponPropertyQuery when eager-loading is set.
	Edges WeaponPropertyEdges `json:"-"`
	// contains filtered or unexported fields
}

WeaponProperty is the model entity for the WeaponProperty schema.

func (*WeaponProperty) IsNode

func (n *WeaponProperty) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*WeaponProperty) MarshalJSON

func (wp *WeaponProperty) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*WeaponProperty) NamedWeapons

func (wp *WeaponProperty) NamedWeapons(name string) ([]*Weapon, error)

NamedWeapons returns the Weapons named value or an error if the edge was not loaded in eager-loading with this name.

func (*WeaponProperty) Node

func (wp *WeaponProperty) Node(ctx context.Context) (node *Node, err error)

Node implements Noder interface

func (*WeaponProperty) QueryWeapons

func (wp *WeaponProperty) QueryWeapons() *WeaponQuery

QueryWeapons queries the "weapons" edge of the WeaponProperty entity.

func (*WeaponProperty) String

func (wp *WeaponProperty) String() string

String implements the fmt.Stringer.

func (*WeaponProperty) ToEdge

ToEdge converts WeaponProperty into WeaponPropertyEdge.

func (*WeaponProperty) UnmarshalJSON

func (wp *WeaponProperty) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*WeaponProperty) Unwrap

func (wp *WeaponProperty) Unwrap() *WeaponProperty

Unwrap unwraps the WeaponProperty entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*WeaponProperty) Update

Update returns a builder for updating this WeaponProperty. Note that you need to call WeaponProperty.Unwrap() before calling this method if this WeaponProperty was returned from a transaction, and the transaction was committed or rolled back.

func (*WeaponProperty) Value

func (wp *WeaponProperty) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the WeaponProperty. This includes values selected through modifiers, order, etc.

func (*WeaponProperty) Weapons

func (wp *WeaponProperty) Weapons(ctx context.Context) (result []*Weapon, err error)

type WeaponPropertyClient

type WeaponPropertyClient struct {
	// contains filtered or unexported fields
}

WeaponPropertyClient is a client for the WeaponProperty schema.

func NewWeaponPropertyClient

func NewWeaponPropertyClient(c config) *WeaponPropertyClient

NewWeaponPropertyClient returns a client for the WeaponProperty from the given config.

func (*WeaponPropertyClient) Create

Create returns a builder for creating a WeaponProperty entity.

func (*WeaponPropertyClient) CreateBulk

CreateBulk returns a builder for creating a bulk of WeaponProperty entities.

func (*WeaponPropertyClient) Delete

Delete returns a delete builder for WeaponProperty.

func (*WeaponPropertyClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*WeaponPropertyClient) DeleteOneID

func (c *WeaponPropertyClient) DeleteOneID(id int) *WeaponPropertyDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*WeaponPropertyClient) Get

Get returns a WeaponProperty entity by its id.

func (*WeaponPropertyClient) GetX

GetX is like Get, but panics if an error occurs.

func (*WeaponPropertyClient) Hooks

func (c *WeaponPropertyClient) Hooks() []Hook

Hooks returns the client hooks.

func (*WeaponPropertyClient) Intercept

func (c *WeaponPropertyClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `weaponproperty.Intercept(f(g(h())))`.

func (*WeaponPropertyClient) Interceptors

func (c *WeaponPropertyClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*WeaponPropertyClient) Query

Query returns a query builder for WeaponProperty.

func (*WeaponPropertyClient) QueryWeapons

func (c *WeaponPropertyClient) QueryWeapons(wp *WeaponProperty) *WeaponQuery

QueryWeapons queries the weapons edge of a WeaponProperty.

func (*WeaponPropertyClient) Update

Update returns an update builder for WeaponProperty.

func (*WeaponPropertyClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*WeaponPropertyClient) UpdateOneID

func (c *WeaponPropertyClient) UpdateOneID(id int) *WeaponPropertyUpdateOne

UpdateOneID returns an update builder for the given id.

func (*WeaponPropertyClient) Use

func (c *WeaponPropertyClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `weaponproperty.Hooks(f(g(h())))`.

type WeaponPropertyConnection

type WeaponPropertyConnection struct {
	Edges      []*WeaponPropertyEdge `json:"edges"`
	PageInfo   PageInfo              `json:"pageInfo"`
	TotalCount int                   `json:"totalCount"`
}

WeaponPropertyConnection is the connection containing edges to WeaponProperty.

type WeaponPropertyCreate

type WeaponPropertyCreate struct {
	// contains filtered or unexported fields
}

WeaponPropertyCreate is the builder for creating a WeaponProperty entity.

func (*WeaponPropertyCreate) AddWeaponIDs

func (wpc *WeaponPropertyCreate) AddWeaponIDs(ids ...int) *WeaponPropertyCreate

AddWeaponIDs adds the "weapons" edge to the Weapon entity by IDs.

func (*WeaponPropertyCreate) AddWeapons

func (wpc *WeaponPropertyCreate) AddWeapons(w ...*Weapon) *WeaponPropertyCreate

AddWeapons adds the "weapons" edges to the Weapon entity.

func (*WeaponPropertyCreate) Exec

func (wpc *WeaponPropertyCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*WeaponPropertyCreate) ExecX

func (wpc *WeaponPropertyCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WeaponPropertyCreate) Mutation

Mutation returns the WeaponPropertyMutation object of the builder.

func (*WeaponPropertyCreate) Save

Save creates the WeaponProperty in the database.

func (*WeaponPropertyCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*WeaponPropertyCreate) SetDesc

SetDesc sets the "desc" field.

func (*WeaponPropertyCreate) SetIndx

SetIndx sets the "indx" field.

func (*WeaponPropertyCreate) SetName

SetName sets the "name" field.

func (*WeaponPropertyCreate) SetWeaponProperty

func (wpc *WeaponPropertyCreate) SetWeaponProperty(input *WeaponProperty) *WeaponPropertyCreate

type WeaponPropertyCreateBulk

type WeaponPropertyCreateBulk struct {
	// contains filtered or unexported fields
}

WeaponPropertyCreateBulk is the builder for creating many WeaponProperty entities in bulk.

func (*WeaponPropertyCreateBulk) Exec

Exec executes the query.

func (*WeaponPropertyCreateBulk) ExecX

func (wpcb *WeaponPropertyCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WeaponPropertyCreateBulk) Save

Save creates the WeaponProperty entities in the database.

func (*WeaponPropertyCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type WeaponPropertyDelete

type WeaponPropertyDelete struct {
	// contains filtered or unexported fields
}

WeaponPropertyDelete is the builder for deleting a WeaponProperty entity.

func (*WeaponPropertyDelete) Exec

func (wpd *WeaponPropertyDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*WeaponPropertyDelete) ExecX

func (wpd *WeaponPropertyDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*WeaponPropertyDelete) Where

Where appends a list predicates to the WeaponPropertyDelete builder.

type WeaponPropertyDeleteOne

type WeaponPropertyDeleteOne struct {
	// contains filtered or unexported fields
}

WeaponPropertyDeleteOne is the builder for deleting a single WeaponProperty entity.

func (*WeaponPropertyDeleteOne) Exec

func (wpdo *WeaponPropertyDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*WeaponPropertyDeleteOne) ExecX

func (wpdo *WeaponPropertyDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WeaponPropertyDeleteOne) Where

Where appends a list predicates to the WeaponPropertyDelete builder.

type WeaponPropertyEdge

type WeaponPropertyEdge struct {
	Node   *WeaponProperty `json:"node"`
	Cursor Cursor          `json:"cursor"`
}

WeaponPropertyEdge is the edge representation of WeaponProperty.

type WeaponPropertyEdges

type WeaponPropertyEdges struct {
	// Weapons holds the value of the weapons edge.
	Weapons []*Weapon `json:"weapons,omitempty"`
	// contains filtered or unexported fields
}

WeaponPropertyEdges holds the relations/edges for other nodes in the graph.

func (WeaponPropertyEdges) WeaponsOrErr

func (e WeaponPropertyEdges) WeaponsOrErr() ([]*Weapon, error)

WeaponsOrErr returns the Weapons value or an error if the edge was not loaded in eager-loading.

type WeaponPropertyGroupBy

type WeaponPropertyGroupBy struct {
	// contains filtered or unexported fields
}

WeaponPropertyGroupBy is the group-by builder for WeaponProperty entities.

func (*WeaponPropertyGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*WeaponPropertyGroupBy) Bool

func (s *WeaponPropertyGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WeaponPropertyGroupBy) BoolX

func (s *WeaponPropertyGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WeaponPropertyGroupBy) Bools

func (s *WeaponPropertyGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WeaponPropertyGroupBy) BoolsX

func (s *WeaponPropertyGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WeaponPropertyGroupBy) Float64

func (s *WeaponPropertyGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WeaponPropertyGroupBy) Float64X

func (s *WeaponPropertyGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WeaponPropertyGroupBy) Float64s

func (s *WeaponPropertyGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WeaponPropertyGroupBy) Float64sX

func (s *WeaponPropertyGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WeaponPropertyGroupBy) Int

func (s *WeaponPropertyGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WeaponPropertyGroupBy) IntX

func (s *WeaponPropertyGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WeaponPropertyGroupBy) Ints

func (s *WeaponPropertyGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WeaponPropertyGroupBy) IntsX

func (s *WeaponPropertyGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WeaponPropertyGroupBy) Scan

func (wpgb *WeaponPropertyGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WeaponPropertyGroupBy) ScanX

func (s *WeaponPropertyGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WeaponPropertyGroupBy) String

func (s *WeaponPropertyGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WeaponPropertyGroupBy) StringX

func (s *WeaponPropertyGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WeaponPropertyGroupBy) Strings

func (s *WeaponPropertyGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WeaponPropertyGroupBy) StringsX

func (s *WeaponPropertyGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WeaponPropertyMutation

type WeaponPropertyMutation struct {
	// contains filtered or unexported fields
}

WeaponPropertyMutation represents an operation that mutates the WeaponProperty nodes in the graph.

func (*WeaponPropertyMutation) AddField

func (m *WeaponPropertyMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*WeaponPropertyMutation) AddWeaponIDs

func (m *WeaponPropertyMutation) AddWeaponIDs(ids ...int)

AddWeaponIDs adds the "weapons" edge to the Weapon entity by ids.

func (*WeaponPropertyMutation) AddedEdges

func (m *WeaponPropertyMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*WeaponPropertyMutation) AddedField

func (m *WeaponPropertyMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*WeaponPropertyMutation) AddedFields

func (m *WeaponPropertyMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*WeaponPropertyMutation) AddedIDs

func (m *WeaponPropertyMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*WeaponPropertyMutation) AppendDesc

func (m *WeaponPropertyMutation) AppendDesc(s []string)

AppendDesc adds s to the "desc" field.

func (*WeaponPropertyMutation) AppendedDesc

func (m *WeaponPropertyMutation) AppendedDesc() ([]string, bool)

AppendedDesc returns the list of values that were appended to the "desc" field in this mutation.

func (*WeaponPropertyMutation) ClearEdge

func (m *WeaponPropertyMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*WeaponPropertyMutation) ClearField

func (m *WeaponPropertyMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*WeaponPropertyMutation) ClearWeapons

func (m *WeaponPropertyMutation) ClearWeapons()

ClearWeapons clears the "weapons" edge to the Weapon entity.

func (*WeaponPropertyMutation) ClearedEdges

func (m *WeaponPropertyMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*WeaponPropertyMutation) ClearedFields

func (m *WeaponPropertyMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (WeaponPropertyMutation) Client

func (m WeaponPropertyMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*WeaponPropertyMutation) Desc

func (m *WeaponPropertyMutation) Desc() (r []string, exists bool)

Desc returns the value of the "desc" field in the mutation.

func (*WeaponPropertyMutation) EdgeCleared

func (m *WeaponPropertyMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*WeaponPropertyMutation) Field

func (m *WeaponPropertyMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*WeaponPropertyMutation) FieldCleared

func (m *WeaponPropertyMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*WeaponPropertyMutation) Fields

func (m *WeaponPropertyMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*WeaponPropertyMutation) ID

func (m *WeaponPropertyMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*WeaponPropertyMutation) IDs

func (m *WeaponPropertyMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*WeaponPropertyMutation) Indx

func (m *WeaponPropertyMutation) Indx() (r string, exists bool)

Indx returns the value of the "indx" field in the mutation.

func (*WeaponPropertyMutation) Name

func (m *WeaponPropertyMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*WeaponPropertyMutation) OldDesc

func (m *WeaponPropertyMutation) OldDesc(ctx context.Context) (v []string, err error)

OldDesc returns the old "desc" field's value of the WeaponProperty entity. If the WeaponProperty object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*WeaponPropertyMutation) OldField

func (m *WeaponPropertyMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*WeaponPropertyMutation) OldIndx

func (m *WeaponPropertyMutation) OldIndx(ctx context.Context) (v string, err error)

OldIndx returns the old "indx" field's value of the WeaponProperty entity. If the WeaponProperty object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*WeaponPropertyMutation) OldName

func (m *WeaponPropertyMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the WeaponProperty entity. If the WeaponProperty object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*WeaponPropertyMutation) Op

func (m *WeaponPropertyMutation) Op() Op

Op returns the operation name.

func (*WeaponPropertyMutation) RemoveWeaponIDs

func (m *WeaponPropertyMutation) RemoveWeaponIDs(ids ...int)

RemoveWeaponIDs removes the "weapons" edge to the Weapon entity by IDs.

func (*WeaponPropertyMutation) RemovedEdges

func (m *WeaponPropertyMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*WeaponPropertyMutation) RemovedIDs

func (m *WeaponPropertyMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*WeaponPropertyMutation) RemovedWeaponsIDs

func (m *WeaponPropertyMutation) RemovedWeaponsIDs() (ids []int)

RemovedWeapons returns the removed IDs of the "weapons" edge to the Weapon entity.

func (*WeaponPropertyMutation) ResetDesc

func (m *WeaponPropertyMutation) ResetDesc()

ResetDesc resets all changes to the "desc" field.

func (*WeaponPropertyMutation) ResetEdge

func (m *WeaponPropertyMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*WeaponPropertyMutation) ResetField

func (m *WeaponPropertyMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*WeaponPropertyMutation) ResetIndx

func (m *WeaponPropertyMutation) ResetIndx()

ResetIndx resets all changes to the "indx" field.

func (*WeaponPropertyMutation) ResetName

func (m *WeaponPropertyMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*WeaponPropertyMutation) ResetWeapons

func (m *WeaponPropertyMutation) ResetWeapons()

ResetWeapons resets all changes to the "weapons" edge.

func (*WeaponPropertyMutation) SetDesc

func (m *WeaponPropertyMutation) SetDesc(s []string)

SetDesc sets the "desc" field.

func (*WeaponPropertyMutation) SetField

func (m *WeaponPropertyMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*WeaponPropertyMutation) SetIndx

func (m *WeaponPropertyMutation) SetIndx(s string)

SetIndx sets the "indx" field.

func (*WeaponPropertyMutation) SetName

func (m *WeaponPropertyMutation) SetName(s string)

SetName sets the "name" field.

func (*WeaponPropertyMutation) SetOp

func (m *WeaponPropertyMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (WeaponPropertyMutation) Tx

func (m WeaponPropertyMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*WeaponPropertyMutation) Type

func (m *WeaponPropertyMutation) Type() string

Type returns the node type of this mutation (WeaponProperty).

func (*WeaponPropertyMutation) WeaponsCleared

func (m *WeaponPropertyMutation) WeaponsCleared() bool

WeaponsCleared reports if the "weapons" edge to the Weapon entity was cleared.

func (*WeaponPropertyMutation) WeaponsIDs

func (m *WeaponPropertyMutation) WeaponsIDs() (ids []int)

WeaponsIDs returns the "weapons" edge IDs in the mutation.

func (*WeaponPropertyMutation) Where

Where appends a list predicates to the WeaponPropertyMutation builder.

func (*WeaponPropertyMutation) WhereP

func (m *WeaponPropertyMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the WeaponPropertyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type WeaponPropertyOrder

type WeaponPropertyOrder struct {
	Direction OrderDirection            `json:"direction"`
	Field     *WeaponPropertyOrderField `json:"field"`
}

WeaponPropertyOrder defines the ordering of WeaponProperty.

type WeaponPropertyOrderField

type WeaponPropertyOrderField struct {
	// Value extracts the ordering value from the given WeaponProperty.
	Value func(*WeaponProperty) (ent.Value, error)
	// contains filtered or unexported fields
}

WeaponPropertyOrderField defines the ordering field of WeaponProperty.

func (WeaponPropertyOrderField) MarshalGQL

func (f WeaponPropertyOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (WeaponPropertyOrderField) String

func (f WeaponPropertyOrderField) String() string

String implement fmt.Stringer interface.

func (*WeaponPropertyOrderField) UnmarshalGQL

func (f *WeaponPropertyOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type WeaponPropertyPaginateOption

type WeaponPropertyPaginateOption func(*weaponpropertyPager) error

WeaponPropertyPaginateOption enables pagination customization.

func WithWeaponPropertyFilter

func WithWeaponPropertyFilter(filter func(*WeaponPropertyQuery) (*WeaponPropertyQuery, error)) WeaponPropertyPaginateOption

WithWeaponPropertyFilter configures pagination filter.

func WithWeaponPropertyOrder

func WithWeaponPropertyOrder(order *WeaponPropertyOrder) WeaponPropertyPaginateOption

WithWeaponPropertyOrder configures pagination ordering.

type WeaponPropertyQuery

type WeaponPropertyQuery struct {
	// contains filtered or unexported fields
}

WeaponPropertyQuery is the builder for querying WeaponProperty entities.

func (*WeaponPropertyQuery) Aggregate

func (wpq *WeaponPropertyQuery) Aggregate(fns ...AggregateFunc) *WeaponPropertySelect

Aggregate returns a WeaponPropertySelect configured with the given aggregations.

func (*WeaponPropertyQuery) All

All executes the query and returns a list of WeaponProperties.

func (*WeaponPropertyQuery) AllX

AllX is like All, but panics if an error occurs.

func (*WeaponPropertyQuery) Clone

Clone returns a duplicate of the WeaponPropertyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*WeaponPropertyQuery) CollectFields

func (wp *WeaponPropertyQuery) CollectFields(ctx context.Context, satisfies ...string) (*WeaponPropertyQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*WeaponPropertyQuery) Count

func (wpq *WeaponPropertyQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WeaponPropertyQuery) CountX

func (wpq *WeaponPropertyQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*WeaponPropertyQuery) Exist

func (wpq *WeaponPropertyQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*WeaponPropertyQuery) ExistX

func (wpq *WeaponPropertyQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*WeaponPropertyQuery) First

First returns the first WeaponProperty entity from the query. Returns a *NotFoundError when no WeaponProperty was found.

func (*WeaponPropertyQuery) FirstID

func (wpq *WeaponPropertyQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first WeaponProperty ID from the query. Returns a *NotFoundError when no WeaponProperty ID was found.

func (*WeaponPropertyQuery) FirstIDX

func (wpq *WeaponPropertyQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*WeaponPropertyQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*WeaponPropertyQuery) GroupBy

func (wpq *WeaponPropertyQuery) GroupBy(field string, fields ...string) *WeaponPropertyGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Indx string `json:"index"`
	Count int `json:"count,omitempty"`
}

client.WeaponProperty.Query().
	GroupBy(weaponproperty.FieldIndx).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*WeaponPropertyQuery) IDs

func (wpq *WeaponPropertyQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of WeaponProperty IDs.

func (*WeaponPropertyQuery) IDsX

func (wpq *WeaponPropertyQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*WeaponPropertyQuery) Limit

func (wpq *WeaponPropertyQuery) Limit(limit int) *WeaponPropertyQuery

Limit the number of records to be returned by this query.

func (*WeaponPropertyQuery) Offset

func (wpq *WeaponPropertyQuery) Offset(offset int) *WeaponPropertyQuery

Offset to start from.

func (*WeaponPropertyQuery) Only

Only returns a single WeaponProperty entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WeaponProperty entity is found. Returns a *NotFoundError when no WeaponProperty entities are found.

func (*WeaponPropertyQuery) OnlyID

func (wpq *WeaponPropertyQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only WeaponProperty ID in the query. Returns a *NotSingularError when more than one WeaponProperty ID is found. Returns a *NotFoundError when no entities are found.

func (*WeaponPropertyQuery) OnlyIDX

func (wpq *WeaponPropertyQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*WeaponPropertyQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*WeaponPropertyQuery) Order

Order specifies how the records should be ordered.

func (*WeaponPropertyQuery) Paginate

func (wp *WeaponPropertyQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...WeaponPropertyPaginateOption,
) (*WeaponPropertyConnection, error)

Paginate executes the query and returns a relay based cursor connection to WeaponProperty.

func (*WeaponPropertyQuery) QueryWeapons

func (wpq *WeaponPropertyQuery) QueryWeapons() *WeaponQuery

QueryWeapons chains the current query on the "weapons" edge.

func (*WeaponPropertyQuery) Select

func (wpq *WeaponPropertyQuery) Select(fields ...string) *WeaponPropertySelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Indx string `json:"index"`
}

client.WeaponProperty.Query().
	Select(weaponproperty.FieldIndx).
	Scan(ctx, &v)

func (*WeaponPropertyQuery) Unique

func (wpq *WeaponPropertyQuery) Unique(unique bool) *WeaponPropertyQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*WeaponPropertyQuery) Where

Where adds a new predicate for the WeaponPropertyQuery builder.

func (*WeaponPropertyQuery) WithNamedWeapons

func (wpq *WeaponPropertyQuery) WithNamedWeapons(name string, opts ...func(*WeaponQuery)) *WeaponPropertyQuery

WithNamedWeapons tells the query-builder to eager-load the nodes that are connected to the "weapons" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*WeaponPropertyQuery) WithWeapons

func (wpq *WeaponPropertyQuery) WithWeapons(opts ...func(*WeaponQuery)) *WeaponPropertyQuery

WithWeapons tells the query-builder to eager-load the nodes that are connected to the "weapons" edge. The optional arguments are used to configure the query builder of the edge.

type WeaponPropertySelect

type WeaponPropertySelect struct {
	*WeaponPropertyQuery
	// contains filtered or unexported fields
}

WeaponPropertySelect is the builder for selecting fields of WeaponProperty entities.

func (*WeaponPropertySelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*WeaponPropertySelect) Bool

func (s *WeaponPropertySelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WeaponPropertySelect) BoolX

func (s *WeaponPropertySelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WeaponPropertySelect) Bools

func (s *WeaponPropertySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WeaponPropertySelect) BoolsX

func (s *WeaponPropertySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WeaponPropertySelect) Float64

func (s *WeaponPropertySelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WeaponPropertySelect) Float64X

func (s *WeaponPropertySelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WeaponPropertySelect) Float64s

func (s *WeaponPropertySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WeaponPropertySelect) Float64sX

func (s *WeaponPropertySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WeaponPropertySelect) Int

func (s *WeaponPropertySelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WeaponPropertySelect) IntX

func (s *WeaponPropertySelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WeaponPropertySelect) Ints

func (s *WeaponPropertySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WeaponPropertySelect) IntsX

func (s *WeaponPropertySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WeaponPropertySelect) Scan

func (wps *WeaponPropertySelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WeaponPropertySelect) ScanX

func (s *WeaponPropertySelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WeaponPropertySelect) String

func (s *WeaponPropertySelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WeaponPropertySelect) StringX

func (s *WeaponPropertySelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WeaponPropertySelect) Strings

func (s *WeaponPropertySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WeaponPropertySelect) StringsX

func (s *WeaponPropertySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WeaponPropertyUpdate

type WeaponPropertyUpdate struct {
	// contains filtered or unexported fields
}

WeaponPropertyUpdate is the builder for updating WeaponProperty entities.

func (*WeaponPropertyUpdate) AddWeaponIDs

func (wpu *WeaponPropertyUpdate) AddWeaponIDs(ids ...int) *WeaponPropertyUpdate

AddWeaponIDs adds the "weapons" edge to the Weapon entity by IDs.

func (*WeaponPropertyUpdate) AddWeapons

func (wpu *WeaponPropertyUpdate) AddWeapons(w ...*Weapon) *WeaponPropertyUpdate

AddWeapons adds the "weapons" edges to the Weapon entity.

func (*WeaponPropertyUpdate) AppendDesc

func (wpu *WeaponPropertyUpdate) AppendDesc(s []string) *WeaponPropertyUpdate

AppendDesc appends s to the "desc" field.

func (*WeaponPropertyUpdate) ClearWeapons

func (wpu *WeaponPropertyUpdate) ClearWeapons() *WeaponPropertyUpdate

ClearWeapons clears all "weapons" edges to the Weapon entity.

func (*WeaponPropertyUpdate) Exec

func (wpu *WeaponPropertyUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*WeaponPropertyUpdate) ExecX

func (wpu *WeaponPropertyUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WeaponPropertyUpdate) Mutation

Mutation returns the WeaponPropertyMutation object of the builder.

func (*WeaponPropertyUpdate) RemoveWeaponIDs

func (wpu *WeaponPropertyUpdate) RemoveWeaponIDs(ids ...int) *WeaponPropertyUpdate

RemoveWeaponIDs removes the "weapons" edge to Weapon entities by IDs.

func (*WeaponPropertyUpdate) RemoveWeapons

func (wpu *WeaponPropertyUpdate) RemoveWeapons(w ...*Weapon) *WeaponPropertyUpdate

RemoveWeapons removes "weapons" edges to Weapon entities.

func (*WeaponPropertyUpdate) Save

func (wpu *WeaponPropertyUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*WeaponPropertyUpdate) SaveX

func (wpu *WeaponPropertyUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*WeaponPropertyUpdate) SetDesc

SetDesc sets the "desc" field.

func (*WeaponPropertyUpdate) SetIndx

SetIndx sets the "indx" field.

func (*WeaponPropertyUpdate) SetName

SetName sets the "name" field.

func (*WeaponPropertyUpdate) Where

Where appends a list predicates to the WeaponPropertyUpdate builder.

type WeaponPropertyUpdateOne

type WeaponPropertyUpdateOne struct {
	// contains filtered or unexported fields
}

WeaponPropertyUpdateOne is the builder for updating a single WeaponProperty entity.

func (*WeaponPropertyUpdateOne) AddWeaponIDs

func (wpuo *WeaponPropertyUpdateOne) AddWeaponIDs(ids ...int) *WeaponPropertyUpdateOne

AddWeaponIDs adds the "weapons" edge to the Weapon entity by IDs.

func (*WeaponPropertyUpdateOne) AddWeapons

func (wpuo *WeaponPropertyUpdateOne) AddWeapons(w ...*Weapon) *WeaponPropertyUpdateOne

AddWeapons adds the "weapons" edges to the Weapon entity.

func (*WeaponPropertyUpdateOne) AppendDesc

AppendDesc appends s to the "desc" field.

func (*WeaponPropertyUpdateOne) ClearWeapons

func (wpuo *WeaponPropertyUpdateOne) ClearWeapons() *WeaponPropertyUpdateOne

ClearWeapons clears all "weapons" edges to the Weapon entity.

func (*WeaponPropertyUpdateOne) Exec

func (wpuo *WeaponPropertyUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*WeaponPropertyUpdateOne) ExecX

func (wpuo *WeaponPropertyUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WeaponPropertyUpdateOne) Mutation

Mutation returns the WeaponPropertyMutation object of the builder.

func (*WeaponPropertyUpdateOne) RemoveWeaponIDs

func (wpuo *WeaponPropertyUpdateOne) RemoveWeaponIDs(ids ...int) *WeaponPropertyUpdateOne

RemoveWeaponIDs removes the "weapons" edge to Weapon entities by IDs.

func (*WeaponPropertyUpdateOne) RemoveWeapons

func (wpuo *WeaponPropertyUpdateOne) RemoveWeapons(w ...*Weapon) *WeaponPropertyUpdateOne

RemoveWeapons removes "weapons" edges to Weapon entities.

func (*WeaponPropertyUpdateOne) Save

Save executes the query and returns the updated WeaponProperty entity.

func (*WeaponPropertyUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*WeaponPropertyUpdateOne) Select

func (wpuo *WeaponPropertyUpdateOne) Select(field string, fields ...string) *WeaponPropertyUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*WeaponPropertyUpdateOne) SetDesc

SetDesc sets the "desc" field.

func (*WeaponPropertyUpdateOne) SetIndx

SetIndx sets the "indx" field.

func (*WeaponPropertyUpdateOne) SetName

SetName sets the "name" field.

func (*WeaponPropertyUpdateOne) Where

Where appends a list predicates to the WeaponPropertyUpdate builder.

type WeaponPropertyWhereInput

type WeaponPropertyWhereInput struct {
	Predicates []predicate.WeaponProperty  `json:"-"`
	Not        *WeaponPropertyWhereInput   `json:"not,omitempty"`
	Or         []*WeaponPropertyWhereInput `json:"or,omitempty"`
	And        []*WeaponPropertyWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "indx" field predicates.
	Indx             *string  `json:"indx,omitempty"`
	IndxNEQ          *string  `json:"indxNEQ,omitempty"`
	IndxIn           []string `json:"indxIn,omitempty"`
	IndxNotIn        []string `json:"indxNotIn,omitempty"`
	IndxGT           *string  `json:"indxGT,omitempty"`
	IndxGTE          *string  `json:"indxGTE,omitempty"`
	IndxLT           *string  `json:"indxLT,omitempty"`
	IndxLTE          *string  `json:"indxLTE,omitempty"`
	IndxContains     *string  `json:"indxContains,omitempty"`
	IndxHasPrefix    *string  `json:"indxHasPrefix,omitempty"`
	IndxHasSuffix    *string  `json:"indxHasSuffix,omitempty"`
	IndxEqualFold    *string  `json:"indxEqualFold,omitempty"`
	IndxContainsFold *string  `json:"indxContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "weapons" edge predicates.
	HasWeapons     *bool               `json:"hasWeapons,omitempty"`
	HasWeaponsWith []*WeaponWhereInput `json:"hasWeaponsWith,omitempty"`
}

WeaponPropertyWhereInput represents a where input for filtering WeaponProperty queries.

func (*WeaponPropertyWhereInput) AddPredicates

func (i *WeaponPropertyWhereInput) AddPredicates(predicates ...predicate.WeaponProperty)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*WeaponPropertyWhereInput) Filter

Filter applies the WeaponPropertyWhereInput filter on the WeaponPropertyQuery builder.

func (*WeaponPropertyWhereInput) P

P returns a predicate for filtering weaponproperties. An error is returned if the input is empty or invalid.

type WeaponQuery

type WeaponQuery struct {
	// contains filtered or unexported fields
}

WeaponQuery is the builder for querying Weapon entities.

func (*WeaponQuery) Aggregate

func (wq *WeaponQuery) Aggregate(fns ...AggregateFunc) *WeaponSelect

Aggregate returns a WeaponSelect configured with the given aggregations.

func (*WeaponQuery) All

func (wq *WeaponQuery) All(ctx context.Context) ([]*Weapon, error)

All executes the query and returns a list of Weapons.

func (*WeaponQuery) AllX

func (wq *WeaponQuery) AllX(ctx context.Context) []*Weapon

AllX is like All, but panics if an error occurs.

func (*WeaponQuery) Clone

func (wq *WeaponQuery) Clone() *WeaponQuery

Clone returns a duplicate of the WeaponQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*WeaponQuery) CollectFields

func (w *WeaponQuery) CollectFields(ctx context.Context, satisfies ...string) (*WeaponQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*WeaponQuery) Count

func (wq *WeaponQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WeaponQuery) CountX

func (wq *WeaponQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*WeaponQuery) Exist

func (wq *WeaponQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*WeaponQuery) ExistX

func (wq *WeaponQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*WeaponQuery) First

func (wq *WeaponQuery) First(ctx context.Context) (*Weapon, error)

First returns the first Weapon entity from the query. Returns a *NotFoundError when no Weapon was found.

func (*WeaponQuery) FirstID

func (wq *WeaponQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Weapon ID from the query. Returns a *NotFoundError when no Weapon ID was found.

func (*WeaponQuery) FirstIDX

func (wq *WeaponQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*WeaponQuery) FirstX

func (wq *WeaponQuery) FirstX(ctx context.Context) *Weapon

FirstX is like First, but panics if an error occurs.

func (*WeaponQuery) GroupBy

func (wq *WeaponQuery) GroupBy(field string, fields ...string) *WeaponGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Indx string `json:"index"`
	Count int `json:"count,omitempty"`
}

client.Weapon.Query().
	GroupBy(weapon.FieldIndx).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*WeaponQuery) IDs

func (wq *WeaponQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Weapon IDs.

func (*WeaponQuery) IDsX

func (wq *WeaponQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*WeaponQuery) Limit

func (wq *WeaponQuery) Limit(limit int) *WeaponQuery

Limit the number of records to be returned by this query.

func (*WeaponQuery) Offset

func (wq *WeaponQuery) Offset(offset int) *WeaponQuery

Offset to start from.

func (*WeaponQuery) Only

func (wq *WeaponQuery) Only(ctx context.Context) (*Weapon, error)

Only returns a single Weapon entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Weapon entity is found. Returns a *NotFoundError when no Weapon entities are found.

func (*WeaponQuery) OnlyID

func (wq *WeaponQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Weapon ID in the query. Returns a *NotSingularError when more than one Weapon ID is found. Returns a *NotFoundError when no entities are found.

func (*WeaponQuery) OnlyIDX

func (wq *WeaponQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*WeaponQuery) OnlyX

func (wq *WeaponQuery) OnlyX(ctx context.Context) *Weapon

OnlyX is like Only, but panics if an error occurs.

func (*WeaponQuery) Order

func (wq *WeaponQuery) Order(o ...weapon.OrderOption) *WeaponQuery

Order specifies how the records should be ordered.

func (*WeaponQuery) Paginate

func (w *WeaponQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...WeaponPaginateOption,
) (*WeaponConnection, error)

Paginate executes the query and returns a relay based cursor connection to Weapon.

func (*WeaponQuery) QueryEquipment

func (wq *WeaponQuery) QueryEquipment() *EquipmentQuery

QueryEquipment chains the current query on the "equipment" edge.

func (*WeaponQuery) QueryWeaponDamage

func (wq *WeaponQuery) QueryWeaponDamage() *WeaponDamageQuery

QueryWeaponDamage chains the current query on the "weapon_damage" edge.

func (*WeaponQuery) QueryWeaponProperties

func (wq *WeaponQuery) QueryWeaponProperties() *WeaponPropertyQuery

QueryWeaponProperties chains the current query on the "weapon_properties" edge.

func (*WeaponQuery) Select

func (wq *WeaponQuery) Select(fields ...string) *WeaponSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Indx string `json:"index"`
}

client.Weapon.Query().
	Select(weapon.FieldIndx).
	Scan(ctx, &v)

func (*WeaponQuery) Unique

func (wq *WeaponQuery) Unique(unique bool) *WeaponQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*WeaponQuery) Where

func (wq *WeaponQuery) Where(ps ...predicate.Weapon) *WeaponQuery

Where adds a new predicate for the WeaponQuery builder.

func (*WeaponQuery) WithEquipment

func (wq *WeaponQuery) WithEquipment(opts ...func(*EquipmentQuery)) *WeaponQuery

WithEquipment tells the query-builder to eager-load the nodes that are connected to the "equipment" edge. The optional arguments are used to configure the query builder of the edge.

func (*WeaponQuery) WithNamedWeaponDamage

func (wq *WeaponQuery) WithNamedWeaponDamage(name string, opts ...func(*WeaponDamageQuery)) *WeaponQuery

WithNamedWeaponDamage tells the query-builder to eager-load the nodes that are connected to the "weapon_damage" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*WeaponQuery) WithNamedWeaponProperties

func (wq *WeaponQuery) WithNamedWeaponProperties(name string, opts ...func(*WeaponPropertyQuery)) *WeaponQuery

WithNamedWeaponProperties tells the query-builder to eager-load the nodes that are connected to the "weapon_properties" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*WeaponQuery) WithWeaponDamage

func (wq *WeaponQuery) WithWeaponDamage(opts ...func(*WeaponDamageQuery)) *WeaponQuery

WithWeaponDamage tells the query-builder to eager-load the nodes that are connected to the "weapon_damage" edge. The optional arguments are used to configure the query builder of the edge.

func (*WeaponQuery) WithWeaponProperties

func (wq *WeaponQuery) WithWeaponProperties(opts ...func(*WeaponPropertyQuery)) *WeaponQuery

WithWeaponProperties tells the query-builder to eager-load the nodes that are connected to the "weapon_properties" edge. The optional arguments are used to configure the query builder of the edge.

type WeaponSelect

type WeaponSelect struct {
	*WeaponQuery
	// contains filtered or unexported fields
}

WeaponSelect is the builder for selecting fields of Weapon entities.

func (*WeaponSelect) Aggregate

func (ws *WeaponSelect) Aggregate(fns ...AggregateFunc) *WeaponSelect

Aggregate adds the given aggregation functions to the selector query.

func (*WeaponSelect) Bool

func (s *WeaponSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*WeaponSelect) BoolX

func (s *WeaponSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*WeaponSelect) Bools

func (s *WeaponSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*WeaponSelect) BoolsX

func (s *WeaponSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*WeaponSelect) Float64

func (s *WeaponSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*WeaponSelect) Float64X

func (s *WeaponSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*WeaponSelect) Float64s

func (s *WeaponSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*WeaponSelect) Float64sX

func (s *WeaponSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*WeaponSelect) Int

func (s *WeaponSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*WeaponSelect) IntX

func (s *WeaponSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*WeaponSelect) Ints

func (s *WeaponSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*WeaponSelect) IntsX

func (s *WeaponSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*WeaponSelect) Scan

func (ws *WeaponSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*WeaponSelect) ScanX

func (s *WeaponSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*WeaponSelect) String

func (s *WeaponSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*WeaponSelect) StringX

func (s *WeaponSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*WeaponSelect) Strings

func (s *WeaponSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*WeaponSelect) StringsX

func (s *WeaponSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type WeaponUpdate

type WeaponUpdate struct {
	// contains filtered or unexported fields
}

WeaponUpdate is the builder for updating Weapon entities.

func (*WeaponUpdate) AddWeaponDamage

func (wu *WeaponUpdate) AddWeaponDamage(w ...*WeaponDamage) *WeaponUpdate

AddWeaponDamage adds the "weapon_damage" edges to the WeaponDamage entity.

func (*WeaponUpdate) AddWeaponDamageIDs

func (wu *WeaponUpdate) AddWeaponDamageIDs(ids ...int) *WeaponUpdate

AddWeaponDamageIDs adds the "weapon_damage" edge to the WeaponDamage entity by IDs.

func (*WeaponUpdate) AddWeaponProperties

func (wu *WeaponUpdate) AddWeaponProperties(w ...*WeaponProperty) *WeaponUpdate

AddWeaponProperties adds the "weapon_properties" edges to the WeaponProperty entity.

func (*WeaponUpdate) AddWeaponPropertyIDs

func (wu *WeaponUpdate) AddWeaponPropertyIDs(ids ...int) *WeaponUpdate

AddWeaponPropertyIDs adds the "weapon_properties" edge to the WeaponProperty entity by IDs.

func (*WeaponUpdate) ClearEquipment

func (wu *WeaponUpdate) ClearEquipment() *WeaponUpdate

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*WeaponUpdate) ClearWeaponDamage

func (wu *WeaponUpdate) ClearWeaponDamage() *WeaponUpdate

ClearWeaponDamage clears all "weapon_damage" edges to the WeaponDamage entity.

func (*WeaponUpdate) ClearWeaponProperties

func (wu *WeaponUpdate) ClearWeaponProperties() *WeaponUpdate

ClearWeaponProperties clears all "weapon_properties" edges to the WeaponProperty entity.

func (*WeaponUpdate) Exec

func (wu *WeaponUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*WeaponUpdate) ExecX

func (wu *WeaponUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WeaponUpdate) Mutation

func (wu *WeaponUpdate) Mutation() *WeaponMutation

Mutation returns the WeaponMutation object of the builder.

func (*WeaponUpdate) RemoveWeaponDamage

func (wu *WeaponUpdate) RemoveWeaponDamage(w ...*WeaponDamage) *WeaponUpdate

RemoveWeaponDamage removes "weapon_damage" edges to WeaponDamage entities.

func (*WeaponUpdate) RemoveWeaponDamageIDs

func (wu *WeaponUpdate) RemoveWeaponDamageIDs(ids ...int) *WeaponUpdate

RemoveWeaponDamageIDs removes the "weapon_damage" edge to WeaponDamage entities by IDs.

func (*WeaponUpdate) RemoveWeaponProperties

func (wu *WeaponUpdate) RemoveWeaponProperties(w ...*WeaponProperty) *WeaponUpdate

RemoveWeaponProperties removes "weapon_properties" edges to WeaponProperty entities.

func (*WeaponUpdate) RemoveWeaponPropertyIDs

func (wu *WeaponUpdate) RemoveWeaponPropertyIDs(ids ...int) *WeaponUpdate

RemoveWeaponPropertyIDs removes the "weapon_properties" edge to WeaponProperty entities by IDs.

func (*WeaponUpdate) Save

func (wu *WeaponUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*WeaponUpdate) SaveX

func (wu *WeaponUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*WeaponUpdate) SetEquipment

func (wu *WeaponUpdate) SetEquipment(e *Equipment) *WeaponUpdate

SetEquipment sets the "equipment" edge to the Equipment entity.

func (*WeaponUpdate) SetEquipmentID

func (wu *WeaponUpdate) SetEquipmentID(i int) *WeaponUpdate

SetEquipmentID sets the "equipment_id" field.

func (*WeaponUpdate) SetIndx

func (wu *WeaponUpdate) SetIndx(s string) *WeaponUpdate

SetIndx sets the "indx" field.

func (*WeaponUpdate) SetName

func (wu *WeaponUpdate) SetName(s string) *WeaponUpdate

SetName sets the "name" field.

func (*WeaponUpdate) SetWeaponCategory

func (wu *WeaponUpdate) SetWeaponCategory(s string) *WeaponUpdate

SetWeaponCategory sets the "weapon_category" field.

func (*WeaponUpdate) SetWeaponRange

func (wu *WeaponUpdate) SetWeaponRange(s string) *WeaponUpdate

SetWeaponRange sets the "weapon_range" field.

func (*WeaponUpdate) Where

func (wu *WeaponUpdate) Where(ps ...predicate.Weapon) *WeaponUpdate

Where appends a list predicates to the WeaponUpdate builder.

type WeaponUpdateOne

type WeaponUpdateOne struct {
	// contains filtered or unexported fields
}

WeaponUpdateOne is the builder for updating a single Weapon entity.

func (*WeaponUpdateOne) AddWeaponDamage

func (wuo *WeaponUpdateOne) AddWeaponDamage(w ...*WeaponDamage) *WeaponUpdateOne

AddWeaponDamage adds the "weapon_damage" edges to the WeaponDamage entity.

func (*WeaponUpdateOne) AddWeaponDamageIDs

func (wuo *WeaponUpdateOne) AddWeaponDamageIDs(ids ...int) *WeaponUpdateOne

AddWeaponDamageIDs adds the "weapon_damage" edge to the WeaponDamage entity by IDs.

func (*WeaponUpdateOne) AddWeaponProperties

func (wuo *WeaponUpdateOne) AddWeaponProperties(w ...*WeaponProperty) *WeaponUpdateOne

AddWeaponProperties adds the "weapon_properties" edges to the WeaponProperty entity.

func (*WeaponUpdateOne) AddWeaponPropertyIDs

func (wuo *WeaponUpdateOne) AddWeaponPropertyIDs(ids ...int) *WeaponUpdateOne

AddWeaponPropertyIDs adds the "weapon_properties" edge to the WeaponProperty entity by IDs.

func (*WeaponUpdateOne) ClearEquipment

func (wuo *WeaponUpdateOne) ClearEquipment() *WeaponUpdateOne

ClearEquipment clears the "equipment" edge to the Equipment entity.

func (*WeaponUpdateOne) ClearWeaponDamage

func (wuo *WeaponUpdateOne) ClearWeaponDamage() *WeaponUpdateOne

ClearWeaponDamage clears all "weapon_damage" edges to the WeaponDamage entity.

func (*WeaponUpdateOne) ClearWeaponProperties

func (wuo *WeaponUpdateOne) ClearWeaponProperties() *WeaponUpdateOne

ClearWeaponProperties clears all "weapon_properties" edges to the WeaponProperty entity.

func (*WeaponUpdateOne) Exec

func (wuo *WeaponUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*WeaponUpdateOne) ExecX

func (wuo *WeaponUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*WeaponUpdateOne) Mutation

func (wuo *WeaponUpdateOne) Mutation() *WeaponMutation

Mutation returns the WeaponMutation object of the builder.

func (*WeaponUpdateOne) RemoveWeaponDamage

func (wuo *WeaponUpdateOne) RemoveWeaponDamage(w ...*WeaponDamage) *WeaponUpdateOne

RemoveWeaponDamage removes "weapon_damage" edges to WeaponDamage entities.

func (*WeaponUpdateOne) RemoveWeaponDamageIDs

func (wuo *WeaponUpdateOne) RemoveWeaponDamageIDs(ids ...int) *WeaponUpdateOne

RemoveWeaponDamageIDs removes the "weapon_damage" edge to WeaponDamage entities by IDs.

func (*WeaponUpdateOne) RemoveWeaponProperties

func (wuo *WeaponUpdateOne) RemoveWeaponProperties(w ...*WeaponProperty) *WeaponUpdateOne

RemoveWeaponProperties removes "weapon_properties" edges to WeaponProperty entities.

func (*WeaponUpdateOne) RemoveWeaponPropertyIDs

func (wuo *WeaponUpdateOne) RemoveWeaponPropertyIDs(ids ...int) *WeaponUpdateOne

RemoveWeaponPropertyIDs removes the "weapon_properties" edge to WeaponProperty entities by IDs.

func (*WeaponUpdateOne) Save

func (wuo *WeaponUpdateOne) Save(ctx context.Context) (*Weapon, error)

Save executes the query and returns the updated Weapon entity.

func (*WeaponUpdateOne) SaveX

func (wuo *WeaponUpdateOne) SaveX(ctx context.Context) *Weapon

SaveX is like Save, but panics if an error occurs.

func (*WeaponUpdateOne) Select

func (wuo *WeaponUpdateOne) Select(field string, fields ...string) *WeaponUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*WeaponUpdateOne) SetEquipment

func (wuo *WeaponUpdateOne) SetEquipment(e *Equipment) *WeaponUpdateOne

SetEquipment sets the "equipment" edge to the Equipment entity.

func (*WeaponUpdateOne) SetEquipmentID

func (wuo *WeaponUpdateOne) SetEquipmentID(i int) *WeaponUpdateOne

SetEquipmentID sets the "equipment_id" field.

func (*WeaponUpdateOne) SetIndx

func (wuo *WeaponUpdateOne) SetIndx(s string) *WeaponUpdateOne

SetIndx sets the "indx" field.

func (*WeaponUpdateOne) SetName

func (wuo *WeaponUpdateOne) SetName(s string) *WeaponUpdateOne

SetName sets the "name" field.

func (*WeaponUpdateOne) SetWeaponCategory

func (wuo *WeaponUpdateOne) SetWeaponCategory(s string) *WeaponUpdateOne

SetWeaponCategory sets the "weapon_category" field.

func (*WeaponUpdateOne) SetWeaponRange

func (wuo *WeaponUpdateOne) SetWeaponRange(s string) *WeaponUpdateOne

SetWeaponRange sets the "weapon_range" field.

func (*WeaponUpdateOne) Where

func (wuo *WeaponUpdateOne) Where(ps ...predicate.Weapon) *WeaponUpdateOne

Where appends a list predicates to the WeaponUpdate builder.

type WeaponWhereInput

type WeaponWhereInput struct {
	Predicates []predicate.Weapon  `json:"-"`
	Not        *WeaponWhereInput   `json:"not,omitempty"`
	Or         []*WeaponWhereInput `json:"or,omitempty"`
	And        []*WeaponWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "indx" field predicates.
	Indx             *string  `json:"indx,omitempty"`
	IndxNEQ          *string  `json:"indxNEQ,omitempty"`
	IndxIn           []string `json:"indxIn,omitempty"`
	IndxNotIn        []string `json:"indxNotIn,omitempty"`
	IndxGT           *string  `json:"indxGT,omitempty"`
	IndxGTE          *string  `json:"indxGTE,omitempty"`
	IndxLT           *string  `json:"indxLT,omitempty"`
	IndxLTE          *string  `json:"indxLTE,omitempty"`
	IndxContains     *string  `json:"indxContains,omitempty"`
	IndxHasPrefix    *string  `json:"indxHasPrefix,omitempty"`
	IndxHasSuffix    *string  `json:"indxHasSuffix,omitempty"`
	IndxEqualFold    *string  `json:"indxEqualFold,omitempty"`
	IndxContainsFold *string  `json:"indxContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "weapon_category" field predicates.
	WeaponCategory             *string  `json:"weaponCategory,omitempty"`
	WeaponCategoryNEQ          *string  `json:"weaponCategoryNEQ,omitempty"`
	WeaponCategoryIn           []string `json:"weaponCategoryIn,omitempty"`
	WeaponCategoryNotIn        []string `json:"weaponCategoryNotIn,omitempty"`
	WeaponCategoryGT           *string  `json:"weaponCategoryGT,omitempty"`
	WeaponCategoryGTE          *string  `json:"weaponCategoryGTE,omitempty"`
	WeaponCategoryLT           *string  `json:"weaponCategoryLT,omitempty"`
	WeaponCategoryLTE          *string  `json:"weaponCategoryLTE,omitempty"`
	WeaponCategoryContains     *string  `json:"weaponCategoryContains,omitempty"`
	WeaponCategoryHasPrefix    *string  `json:"weaponCategoryHasPrefix,omitempty"`
	WeaponCategoryHasSuffix    *string  `json:"weaponCategoryHasSuffix,omitempty"`
	WeaponCategoryEqualFold    *string  `json:"weaponCategoryEqualFold,omitempty"`
	WeaponCategoryContainsFold *string  `json:"weaponCategoryContainsFold,omitempty"`

	// "weapon_range" field predicates.
	WeaponRange             *string  `json:"weaponRange,omitempty"`
	WeaponRangeNEQ          *string  `json:"weaponRangeNEQ,omitempty"`
	WeaponRangeIn           []string `json:"weaponRangeIn,omitempty"`
	WeaponRangeNotIn        []string `json:"weaponRangeNotIn,omitempty"`
	WeaponRangeGT           *string  `json:"weaponRangeGT,omitempty"`
	WeaponRangeGTE          *string  `json:"weaponRangeGTE,omitempty"`
	WeaponRangeLT           *string  `json:"weaponRangeLT,omitempty"`
	WeaponRangeLTE          *string  `json:"weaponRangeLTE,omitempty"`
	WeaponRangeContains     *string  `json:"weaponRangeContains,omitempty"`
	WeaponRangeHasPrefix    *string  `json:"weaponRangeHasPrefix,omitempty"`
	WeaponRangeHasSuffix    *string  `json:"weaponRangeHasSuffix,omitempty"`
	WeaponRangeEqualFold    *string  `json:"weaponRangeEqualFold,omitempty"`
	WeaponRangeContainsFold *string  `json:"weaponRangeContainsFold,omitempty"`

	// "equipment" edge predicates.
	HasEquipment     *bool                  `json:"hasEquipment,omitempty"`
	HasEquipmentWith []*EquipmentWhereInput `json:"hasEquipmentWith,omitempty"`

	// "weapon_damage" edge predicates.
	HasWeaponDamage     *bool                     `json:"hasWeaponDamage,omitempty"`
	HasWeaponDamageWith []*WeaponDamageWhereInput `json:"hasWeaponDamageWith,omitempty"`

	// "weapon_properties" edge predicates.
	HasWeaponProperties     *bool                       `json:"hasWeaponProperties,omitempty"`
	HasWeaponPropertiesWith []*WeaponPropertyWhereInput `json:"hasWeaponPropertiesWith,omitempty"`
}

WeaponWhereInput represents a where input for filtering Weapon queries.

func (*WeaponWhereInput) AddPredicates

func (i *WeaponWhereInput) AddPredicates(predicates ...predicate.Weapon)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*WeaponWhereInput) Filter

func (i *WeaponWhereInput) Filter(q *WeaponQuery) (*WeaponQuery, error)

Filter applies the WeaponWhereInput filter on the WeaponQuery builder.

func (*WeaponWhereInput) P

P returns a predicate for filtering weapons. An error is returned if the input is empty or invalid.

type Weapons

type Weapons []*Weapon

Weapons is a parsable slice of Weapon.

Source Files

Jump to

Keyboard shortcuts

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