Documentation ¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Categories
- type Category
- type CategoryClient
- func (c *CategoryClient) Create() *CategoryCreate
- func (c *CategoryClient) CreateBulk(builders ...*CategoryCreate) *CategoryCreateBulk
- func (c *CategoryClient) Delete() *CategoryDelete
- func (c *CategoryClient) DeleteOne(ca *Category) *CategoryDeleteOne
- func (c *CategoryClient) DeleteOneID(id int) *CategoryDeleteOne
- func (c *CategoryClient) Get(ctx context.Context, id int) (*Category, error)
- func (c *CategoryClient) GetX(ctx context.Context, id int) *Category
- func (c *CategoryClient) Hooks() []Hook
- func (c *CategoryClient) Intercept(interceptors ...Interceptor)
- func (c *CategoryClient) Interceptors() []Interceptor
- func (c *CategoryClient) MapCreateBulk(slice any, setFunc func(*CategoryCreate, int)) *CategoryCreateBulk
- func (c *CategoryClient) Query() *CategoryQuery
- func (c *CategoryClient) QueryChallengeGroups(ca *Category) *ChallengeGroupQuery
- func (c *CategoryClient) Update() *CategoryUpdate
- func (c *CategoryClient) UpdateOne(ca *Category) *CategoryUpdateOne
- func (c *CategoryClient) UpdateOneID(id int) *CategoryUpdateOne
- func (c *CategoryClient) Use(hooks ...Hook)
- type CategoryCreate
- func (cc *CategoryCreate) AddChallengeGroupIDs(ids ...int) *CategoryCreate
- func (cc *CategoryCreate) AddChallengeGroups(c ...*ChallengeGroup) *CategoryCreate
- func (cc *CategoryCreate) Exec(ctx context.Context) error
- func (cc *CategoryCreate) ExecX(ctx context.Context)
- func (cc *CategoryCreate) Mutation() *CategoryMutation
- func (cc *CategoryCreate) Save(ctx context.Context) (*Category, error)
- func (cc *CategoryCreate) SaveX(ctx context.Context) *Category
- func (cc *CategoryCreate) SetName(s string) *CategoryCreate
- type CategoryCreateBulk
- type CategoryDelete
- type CategoryDeleteOne
- type CategoryEdges
- type CategoryGroupBy
- func (cgb *CategoryGroupBy) Aggregate(fns ...AggregateFunc) *CategoryGroupBy
- func (s *CategoryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CategoryGroupBy) BoolX(ctx context.Context) bool
- func (s *CategoryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CategoryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CategoryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CategoryGroupBy) Float64X(ctx context.Context) float64
- func (s *CategoryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CategoryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CategoryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CategoryGroupBy) IntX(ctx context.Context) int
- func (s *CategoryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CategoryGroupBy) IntsX(ctx context.Context) []int
- func (cgb *CategoryGroupBy) Scan(ctx context.Context, v any) error
- func (s *CategoryGroupBy) ScanX(ctx context.Context, v any)
- func (s *CategoryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CategoryGroupBy) StringX(ctx context.Context) string
- func (s *CategoryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CategoryGroupBy) StringsX(ctx context.Context) []string
- type CategoryMutation
- func (m *CategoryMutation) AddChallengeGroupIDs(ids ...int)
- func (m *CategoryMutation) AddField(name string, value ent.Value) error
- func (m *CategoryMutation) AddedEdges() []string
- func (m *CategoryMutation) AddedField(name string) (ent.Value, bool)
- func (m *CategoryMutation) AddedFields() []string
- func (m *CategoryMutation) AddedIDs(name string) []ent.Value
- func (m *CategoryMutation) ChallengeGroupsCleared() bool
- func (m *CategoryMutation) ChallengeGroupsIDs() (ids []int)
- func (m *CategoryMutation) ClearChallengeGroups()
- func (m *CategoryMutation) ClearEdge(name string) error
- func (m *CategoryMutation) ClearField(name string) error
- func (m *CategoryMutation) ClearedEdges() []string
- func (m *CategoryMutation) ClearedFields() []string
- func (m CategoryMutation) Client() *Client
- func (m *CategoryMutation) EdgeCleared(name string) bool
- func (m *CategoryMutation) Field(name string) (ent.Value, bool)
- func (m *CategoryMutation) FieldCleared(name string) bool
- func (m *CategoryMutation) Fields() []string
- func (m *CategoryMutation) ID() (id int, exists bool)
- func (m *CategoryMutation) IDs(ctx context.Context) ([]int, error)
- func (m *CategoryMutation) Name() (r string, exists bool)
- func (m *CategoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CategoryMutation) OldName(ctx context.Context) (v string, err error)
- func (m *CategoryMutation) Op() Op
- func (m *CategoryMutation) RemoveChallengeGroupIDs(ids ...int)
- func (m *CategoryMutation) RemovedChallengeGroupsIDs() (ids []int)
- func (m *CategoryMutation) RemovedEdges() []string
- func (m *CategoryMutation) RemovedIDs(name string) []ent.Value
- func (m *CategoryMutation) ResetChallengeGroups()
- func (m *CategoryMutation) ResetEdge(name string) error
- func (m *CategoryMutation) ResetField(name string) error
- func (m *CategoryMutation) ResetName()
- func (m *CategoryMutation) SetField(name string, value ent.Value) error
- func (m *CategoryMutation) SetName(s string)
- func (m *CategoryMutation) SetOp(op Op)
- func (m CategoryMutation) Tx() (*Tx, error)
- func (m *CategoryMutation) Type() string
- func (m *CategoryMutation) Where(ps ...predicate.Category)
- func (m *CategoryMutation) WhereP(ps ...func(*sql.Selector))
- type CategoryQuery
- func (cq *CategoryQuery) Aggregate(fns ...AggregateFunc) *CategorySelect
- func (cq *CategoryQuery) All(ctx context.Context) ([]*Category, error)
- func (cq *CategoryQuery) AllX(ctx context.Context) []*Category
- func (cq *CategoryQuery) Clone() *CategoryQuery
- func (cq *CategoryQuery) Count(ctx context.Context) (int, error)
- func (cq *CategoryQuery) CountX(ctx context.Context) int
- func (cq *CategoryQuery) Exist(ctx context.Context) (bool, error)
- func (cq *CategoryQuery) ExistX(ctx context.Context) bool
- func (cq *CategoryQuery) First(ctx context.Context) (*Category, error)
- func (cq *CategoryQuery) FirstID(ctx context.Context) (id int, err error)
- func (cq *CategoryQuery) FirstIDX(ctx context.Context) int
- func (cq *CategoryQuery) FirstX(ctx context.Context) *Category
- func (cq *CategoryQuery) GroupBy(field string, fields ...string) *CategoryGroupBy
- func (cq *CategoryQuery) IDs(ctx context.Context) (ids []int, err error)
- func (cq *CategoryQuery) IDsX(ctx context.Context) []int
- func (cq *CategoryQuery) Limit(limit int) *CategoryQuery
- func (cq *CategoryQuery) Offset(offset int) *CategoryQuery
- func (cq *CategoryQuery) Only(ctx context.Context) (*Category, error)
- func (cq *CategoryQuery) OnlyID(ctx context.Context) (id int, err error)
- func (cq *CategoryQuery) OnlyIDX(ctx context.Context) int
- func (cq *CategoryQuery) OnlyX(ctx context.Context) *Category
- func (cq *CategoryQuery) Order(o ...category.OrderOption) *CategoryQuery
- func (cq *CategoryQuery) QueryChallengeGroups() *ChallengeGroupQuery
- func (cq *CategoryQuery) Select(fields ...string) *CategorySelect
- func (cq *CategoryQuery) Unique(unique bool) *CategoryQuery
- func (cq *CategoryQuery) Where(ps ...predicate.Category) *CategoryQuery
- func (cq *CategoryQuery) WithChallengeGroups(opts ...func(*ChallengeGroupQuery)) *CategoryQuery
- type CategorySelect
- func (cs *CategorySelect) Aggregate(fns ...AggregateFunc) *CategorySelect
- func (s *CategorySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CategorySelect) BoolX(ctx context.Context) bool
- func (s *CategorySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CategorySelect) BoolsX(ctx context.Context) []bool
- func (s *CategorySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CategorySelect) Float64X(ctx context.Context) float64
- func (s *CategorySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CategorySelect) Float64sX(ctx context.Context) []float64
- func (s *CategorySelect) Int(ctx context.Context) (_ int, err error)
- func (s *CategorySelect) IntX(ctx context.Context) int
- func (s *CategorySelect) Ints(ctx context.Context) ([]int, error)
- func (s *CategorySelect) IntsX(ctx context.Context) []int
- func (cs *CategorySelect) Scan(ctx context.Context, v any) error
- func (s *CategorySelect) ScanX(ctx context.Context, v any)
- func (s *CategorySelect) String(ctx context.Context) (_ string, err error)
- func (s *CategorySelect) StringX(ctx context.Context) string
- func (s *CategorySelect) Strings(ctx context.Context) ([]string, error)
- func (s *CategorySelect) StringsX(ctx context.Context) []string
- type CategoryUpdate
- func (cu *CategoryUpdate) AddChallengeGroupIDs(ids ...int) *CategoryUpdate
- func (cu *CategoryUpdate) AddChallengeGroups(c ...*ChallengeGroup) *CategoryUpdate
- func (cu *CategoryUpdate) ClearChallengeGroups() *CategoryUpdate
- func (cu *CategoryUpdate) Exec(ctx context.Context) error
- func (cu *CategoryUpdate) ExecX(ctx context.Context)
- func (cu *CategoryUpdate) Mutation() *CategoryMutation
- func (cu *CategoryUpdate) RemoveChallengeGroupIDs(ids ...int) *CategoryUpdate
- func (cu *CategoryUpdate) RemoveChallengeGroups(c ...*ChallengeGroup) *CategoryUpdate
- func (cu *CategoryUpdate) Save(ctx context.Context) (int, error)
- func (cu *CategoryUpdate) SaveX(ctx context.Context) int
- func (cu *CategoryUpdate) SetName(s string) *CategoryUpdate
- func (cu *CategoryUpdate) SetNillableName(s *string) *CategoryUpdate
- func (cu *CategoryUpdate) Where(ps ...predicate.Category) *CategoryUpdate
- type CategoryUpdateOne
- func (cuo *CategoryUpdateOne) AddChallengeGroupIDs(ids ...int) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) AddChallengeGroups(c ...*ChallengeGroup) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) ClearChallengeGroups() *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) Exec(ctx context.Context) error
- func (cuo *CategoryUpdateOne) ExecX(ctx context.Context)
- func (cuo *CategoryUpdateOne) Mutation() *CategoryMutation
- func (cuo *CategoryUpdateOne) RemoveChallengeGroupIDs(ids ...int) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) RemoveChallengeGroups(c ...*ChallengeGroup) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) Save(ctx context.Context) (*Category, error)
- func (cuo *CategoryUpdateOne) SaveX(ctx context.Context) *Category
- func (cuo *CategoryUpdateOne) Select(field string, fields ...string) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetName(s string) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetNillableName(s *string) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) Where(ps ...predicate.Category) *CategoryUpdateOne
- type Challenge
- type ChallengeClient
- func (c *ChallengeClient) Create() *ChallengeCreate
- func (c *ChallengeClient) CreateBulk(builders ...*ChallengeCreate) *ChallengeCreateBulk
- func (c *ChallengeClient) Delete() *ChallengeDelete
- func (c *ChallengeClient) DeleteOne(ch *Challenge) *ChallengeDeleteOne
- func (c *ChallengeClient) DeleteOneID(id int) *ChallengeDeleteOne
- func (c *ChallengeClient) Get(ctx context.Context, id int) (*Challenge, error)
- func (c *ChallengeClient) GetX(ctx context.Context, id int) *Challenge
- func (c *ChallengeClient) Hooks() []Hook
- func (c *ChallengeClient) Intercept(interceptors ...Interceptor)
- func (c *ChallengeClient) Interceptors() []Interceptor
- func (c *ChallengeClient) MapCreateBulk(slice any, setFunc func(*ChallengeCreate, int)) *ChallengeCreateBulk
- func (c *ChallengeClient) Query() *ChallengeQuery
- func (c *ChallengeClient) QueryChallengeGroup(ch *Challenge) *ChallengeGroupQuery
- func (c *ChallengeClient) Update() *ChallengeUpdate
- func (c *ChallengeClient) UpdateOne(ch *Challenge) *ChallengeUpdateOne
- func (c *ChallengeClient) UpdateOneID(id int) *ChallengeUpdateOne
- func (c *ChallengeClient) Use(hooks ...Hook)
- type ChallengeCreate
- func (cc *ChallengeCreate) AddChallengeGroup(c ...*ChallengeGroup) *ChallengeCreate
- func (cc *ChallengeCreate) AddChallengeGroupIDs(ids ...int) *ChallengeCreate
- func (cc *ChallengeCreate) Exec(ctx context.Context) error
- func (cc *ChallengeCreate) ExecX(ctx context.Context)
- func (cc *ChallengeCreate) Mutation() *ChallengeMutation
- func (cc *ChallengeCreate) Save(ctx context.Context) (*Challenge, error)
- func (cc *ChallengeCreate) SaveX(ctx context.Context) *Challenge
- func (cc *ChallengeCreate) SetMedia(s string) *ChallengeCreate
- func (cc *ChallengeCreate) SetPrompt(s string) *ChallengeCreate
- func (cc *ChallengeCreate) SetResponse(s string) *ChallengeCreate
- func (cc *ChallengeCreate) SetValue(i int) *ChallengeCreate
- type ChallengeCreateBulk
- type ChallengeDelete
- type ChallengeDeleteOne
- type ChallengeEdges
- type ChallengeGroup
- func (cg *ChallengeGroup) QueryCategory() *CategoryQuery
- func (cg *ChallengeGroup) QueryChallenges() *ChallengeQuery
- func (cg *ChallengeGroup) QueryEpisodeRound() *EpisodeRoundQuery
- func (cg *ChallengeGroup) String() string
- func (cg *ChallengeGroup) Unwrap() *ChallengeGroup
- func (cg *ChallengeGroup) Update() *ChallengeGroupUpdateOne
- func (cg *ChallengeGroup) Value(name string) (ent.Value, error)
- type ChallengeGroupBy
- func (cgb *ChallengeGroupBy) Aggregate(fns ...AggregateFunc) *ChallengeGroupBy
- func (s *ChallengeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ChallengeGroupBy) BoolX(ctx context.Context) bool
- func (s *ChallengeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ChallengeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ChallengeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ChallengeGroupBy) Float64X(ctx context.Context) float64
- func (s *ChallengeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ChallengeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ChallengeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ChallengeGroupBy) IntX(ctx context.Context) int
- func (s *ChallengeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ChallengeGroupBy) IntsX(ctx context.Context) []int
- func (cgb *ChallengeGroupBy) Scan(ctx context.Context, v any) error
- func (s *ChallengeGroupBy) ScanX(ctx context.Context, v any)
- func (s *ChallengeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ChallengeGroupBy) StringX(ctx context.Context) string
- func (s *ChallengeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ChallengeGroupBy) StringsX(ctx context.Context) []string
- type ChallengeGroupClient
- func (c *ChallengeGroupClient) Create() *ChallengeGroupCreate
- func (c *ChallengeGroupClient) CreateBulk(builders ...*ChallengeGroupCreate) *ChallengeGroupCreateBulk
- func (c *ChallengeGroupClient) Delete() *ChallengeGroupDelete
- func (c *ChallengeGroupClient) DeleteOne(cg *ChallengeGroup) *ChallengeGroupDeleteOne
- func (c *ChallengeGroupClient) DeleteOneID(id int) *ChallengeGroupDeleteOne
- func (c *ChallengeGroupClient) Get(ctx context.Context, id int) (*ChallengeGroup, error)
- func (c *ChallengeGroupClient) GetX(ctx context.Context, id int) *ChallengeGroup
- func (c *ChallengeGroupClient) Hooks() []Hook
- func (c *ChallengeGroupClient) Intercept(interceptors ...Interceptor)
- func (c *ChallengeGroupClient) Interceptors() []Interceptor
- func (c *ChallengeGroupClient) MapCreateBulk(slice any, setFunc func(*ChallengeGroupCreate, int)) *ChallengeGroupCreateBulk
- func (c *ChallengeGroupClient) Query() *ChallengeGroupQuery
- func (c *ChallengeGroupClient) QueryCategory(cg *ChallengeGroup) *CategoryQuery
- func (c *ChallengeGroupClient) QueryChallenges(cg *ChallengeGroup) *ChallengeQuery
- func (c *ChallengeGroupClient) QueryEpisodeRound(cg *ChallengeGroup) *EpisodeRoundQuery
- func (c *ChallengeGroupClient) Update() *ChallengeGroupUpdate
- func (c *ChallengeGroupClient) UpdateOne(cg *ChallengeGroup) *ChallengeGroupUpdateOne
- func (c *ChallengeGroupClient) UpdateOneID(id int) *ChallengeGroupUpdateOne
- func (c *ChallengeGroupClient) Use(hooks ...Hook)
- type ChallengeGroupCreate
- func (cgc *ChallengeGroupCreate) AddCategory(c ...*Category) *ChallengeGroupCreate
- func (cgc *ChallengeGroupCreate) AddCategoryIDs(ids ...int) *ChallengeGroupCreate
- func (cgc *ChallengeGroupCreate) AddChallengeIDs(ids ...int) *ChallengeGroupCreate
- func (cgc *ChallengeGroupCreate) AddChallenges(c ...*Challenge) *ChallengeGroupCreate
- func (cgc *ChallengeGroupCreate) AddEpisodeRound(e ...*EpisodeRound) *ChallengeGroupCreate
- func (cgc *ChallengeGroupCreate) AddEpisodeRoundIDs(ids ...int) *ChallengeGroupCreate
- func (cgc *ChallengeGroupCreate) Exec(ctx context.Context) error
- func (cgc *ChallengeGroupCreate) ExecX(ctx context.Context)
- func (cgc *ChallengeGroupCreate) Mutation() *ChallengeGroupMutation
- func (cgc *ChallengeGroupCreate) Save(ctx context.Context) (*ChallengeGroup, error)
- func (cgc *ChallengeGroupCreate) SaveX(ctx context.Context) *ChallengeGroup
- type ChallengeGroupCreateBulk
- func (cgcb *ChallengeGroupCreateBulk) Exec(ctx context.Context) error
- func (cgcb *ChallengeGroupCreateBulk) ExecX(ctx context.Context)
- func (cgcb *ChallengeGroupCreateBulk) Save(ctx context.Context) ([]*ChallengeGroup, error)
- func (cgcb *ChallengeGroupCreateBulk) SaveX(ctx context.Context) []*ChallengeGroup
- type ChallengeGroupDelete
- type ChallengeGroupDeleteOne
- type ChallengeGroupEdges
- type ChallengeGroupGroupBy
- func (cggb *ChallengeGroupGroupBy) Aggregate(fns ...AggregateFunc) *ChallengeGroupGroupBy
- func (s *ChallengeGroupGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ChallengeGroupGroupBy) BoolX(ctx context.Context) bool
- func (s *ChallengeGroupGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ChallengeGroupGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ChallengeGroupGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ChallengeGroupGroupBy) Float64X(ctx context.Context) float64
- func (s *ChallengeGroupGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ChallengeGroupGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ChallengeGroupGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ChallengeGroupGroupBy) IntX(ctx context.Context) int
- func (s *ChallengeGroupGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ChallengeGroupGroupBy) IntsX(ctx context.Context) []int
- func (cggb *ChallengeGroupGroupBy) Scan(ctx context.Context, v any) error
- func (s *ChallengeGroupGroupBy) ScanX(ctx context.Context, v any)
- func (s *ChallengeGroupGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ChallengeGroupGroupBy) StringX(ctx context.Context) string
- func (s *ChallengeGroupGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ChallengeGroupGroupBy) StringsX(ctx context.Context) []string
- type ChallengeGroupMutation
- func (m *ChallengeGroupMutation) AddCategoryIDs(ids ...int)
- func (m *ChallengeGroupMutation) AddChallengeIDs(ids ...int)
- func (m *ChallengeGroupMutation) AddEpisodeRoundIDs(ids ...int)
- func (m *ChallengeGroupMutation) AddField(name string, value ent.Value) error
- func (m *ChallengeGroupMutation) AddedEdges() []string
- func (m *ChallengeGroupMutation) AddedField(name string) (ent.Value, bool)
- func (m *ChallengeGroupMutation) AddedFields() []string
- func (m *ChallengeGroupMutation) AddedIDs(name string) []ent.Value
- func (m *ChallengeGroupMutation) CategoryCleared() bool
- func (m *ChallengeGroupMutation) CategoryIDs() (ids []int)
- func (m *ChallengeGroupMutation) ChallengesCleared() bool
- func (m *ChallengeGroupMutation) ChallengesIDs() (ids []int)
- func (m *ChallengeGroupMutation) ClearCategory()
- func (m *ChallengeGroupMutation) ClearChallenges()
- func (m *ChallengeGroupMutation) ClearEdge(name string) error
- func (m *ChallengeGroupMutation) ClearEpisodeRound()
- func (m *ChallengeGroupMutation) ClearField(name string) error
- func (m *ChallengeGroupMutation) ClearedEdges() []string
- func (m *ChallengeGroupMutation) ClearedFields() []string
- func (m ChallengeGroupMutation) Client() *Client
- func (m *ChallengeGroupMutation) EdgeCleared(name string) bool
- func (m *ChallengeGroupMutation) EpisodeRoundCleared() bool
- func (m *ChallengeGroupMutation) EpisodeRoundIDs() (ids []int)
- func (m *ChallengeGroupMutation) Field(name string) (ent.Value, bool)
- func (m *ChallengeGroupMutation) FieldCleared(name string) bool
- func (m *ChallengeGroupMutation) Fields() []string
- func (m *ChallengeGroupMutation) ID() (id int, exists bool)
- func (m *ChallengeGroupMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ChallengeGroupMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ChallengeGroupMutation) Op() Op
- func (m *ChallengeGroupMutation) RemoveCategoryIDs(ids ...int)
- func (m *ChallengeGroupMutation) RemoveChallengeIDs(ids ...int)
- func (m *ChallengeGroupMutation) RemoveEpisodeRoundIDs(ids ...int)
- func (m *ChallengeGroupMutation) RemovedCategoryIDs() (ids []int)
- func (m *ChallengeGroupMutation) RemovedChallengesIDs() (ids []int)
- func (m *ChallengeGroupMutation) RemovedEdges() []string
- func (m *ChallengeGroupMutation) RemovedEpisodeRoundIDs() (ids []int)
- func (m *ChallengeGroupMutation) RemovedIDs(name string) []ent.Value
- func (m *ChallengeGroupMutation) ResetCategory()
- func (m *ChallengeGroupMutation) ResetChallenges()
- func (m *ChallengeGroupMutation) ResetEdge(name string) error
- func (m *ChallengeGroupMutation) ResetEpisodeRound()
- func (m *ChallengeGroupMutation) ResetField(name string) error
- func (m *ChallengeGroupMutation) SetField(name string, value ent.Value) error
- func (m *ChallengeGroupMutation) SetOp(op Op)
- func (m ChallengeGroupMutation) Tx() (*Tx, error)
- func (m *ChallengeGroupMutation) Type() string
- func (m *ChallengeGroupMutation) Where(ps ...predicate.ChallengeGroup)
- func (m *ChallengeGroupMutation) WhereP(ps ...func(*sql.Selector))
- type ChallengeGroupQuery
- func (cgq *ChallengeGroupQuery) Aggregate(fns ...AggregateFunc) *ChallengeGroupSelect
- func (cgq *ChallengeGroupQuery) All(ctx context.Context) ([]*ChallengeGroup, error)
- func (cgq *ChallengeGroupQuery) AllX(ctx context.Context) []*ChallengeGroup
- func (cgq *ChallengeGroupQuery) Clone() *ChallengeGroupQuery
- func (cgq *ChallengeGroupQuery) Count(ctx context.Context) (int, error)
- func (cgq *ChallengeGroupQuery) CountX(ctx context.Context) int
- func (cgq *ChallengeGroupQuery) Exist(ctx context.Context) (bool, error)
- func (cgq *ChallengeGroupQuery) ExistX(ctx context.Context) bool
- func (cgq *ChallengeGroupQuery) First(ctx context.Context) (*ChallengeGroup, error)
- func (cgq *ChallengeGroupQuery) FirstID(ctx context.Context) (id int, err error)
- func (cgq *ChallengeGroupQuery) FirstIDX(ctx context.Context) int
- func (cgq *ChallengeGroupQuery) FirstX(ctx context.Context) *ChallengeGroup
- func (cgq *ChallengeGroupQuery) GroupBy(field string, fields ...string) *ChallengeGroupGroupBy
- func (cgq *ChallengeGroupQuery) IDs(ctx context.Context) (ids []int, err error)
- func (cgq *ChallengeGroupQuery) IDsX(ctx context.Context) []int
- func (cgq *ChallengeGroupQuery) Limit(limit int) *ChallengeGroupQuery
- func (cgq *ChallengeGroupQuery) Offset(offset int) *ChallengeGroupQuery
- func (cgq *ChallengeGroupQuery) Only(ctx context.Context) (*ChallengeGroup, error)
- func (cgq *ChallengeGroupQuery) OnlyID(ctx context.Context) (id int, err error)
- func (cgq *ChallengeGroupQuery) OnlyIDX(ctx context.Context) int
- func (cgq *ChallengeGroupQuery) OnlyX(ctx context.Context) *ChallengeGroup
- func (cgq *ChallengeGroupQuery) Order(o ...challengegroup.OrderOption) *ChallengeGroupQuery
- func (cgq *ChallengeGroupQuery) QueryCategory() *CategoryQuery
- func (cgq *ChallengeGroupQuery) QueryChallenges() *ChallengeQuery
- func (cgq *ChallengeGroupQuery) QueryEpisodeRound() *EpisodeRoundQuery
- func (cgq *ChallengeGroupQuery) Select(fields ...string) *ChallengeGroupSelect
- func (cgq *ChallengeGroupQuery) Unique(unique bool) *ChallengeGroupQuery
- func (cgq *ChallengeGroupQuery) Where(ps ...predicate.ChallengeGroup) *ChallengeGroupQuery
- func (cgq *ChallengeGroupQuery) WithCategory(opts ...func(*CategoryQuery)) *ChallengeGroupQuery
- func (cgq *ChallengeGroupQuery) WithChallenges(opts ...func(*ChallengeQuery)) *ChallengeGroupQuery
- func (cgq *ChallengeGroupQuery) WithEpisodeRound(opts ...func(*EpisodeRoundQuery)) *ChallengeGroupQuery
- type ChallengeGroupSelect
- func (cgs *ChallengeGroupSelect) Aggregate(fns ...AggregateFunc) *ChallengeGroupSelect
- func (s *ChallengeGroupSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ChallengeGroupSelect) BoolX(ctx context.Context) bool
- func (s *ChallengeGroupSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ChallengeGroupSelect) BoolsX(ctx context.Context) []bool
- func (s *ChallengeGroupSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ChallengeGroupSelect) Float64X(ctx context.Context) float64
- func (s *ChallengeGroupSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ChallengeGroupSelect) Float64sX(ctx context.Context) []float64
- func (s *ChallengeGroupSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ChallengeGroupSelect) IntX(ctx context.Context) int
- func (s *ChallengeGroupSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ChallengeGroupSelect) IntsX(ctx context.Context) []int
- func (cgs *ChallengeGroupSelect) Scan(ctx context.Context, v any) error
- func (s *ChallengeGroupSelect) ScanX(ctx context.Context, v any)
- func (s *ChallengeGroupSelect) String(ctx context.Context) (_ string, err error)
- func (s *ChallengeGroupSelect) StringX(ctx context.Context) string
- func (s *ChallengeGroupSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ChallengeGroupSelect) StringsX(ctx context.Context) []string
- type ChallengeGroupUpdate
- func (cgu *ChallengeGroupUpdate) AddCategory(c ...*Category) *ChallengeGroupUpdate
- func (cgu *ChallengeGroupUpdate) AddCategoryIDs(ids ...int) *ChallengeGroupUpdate
- func (cgu *ChallengeGroupUpdate) AddChallengeIDs(ids ...int) *ChallengeGroupUpdate
- func (cgu *ChallengeGroupUpdate) AddChallenges(c ...*Challenge) *ChallengeGroupUpdate
- func (cgu *ChallengeGroupUpdate) AddEpisodeRound(e ...*EpisodeRound) *ChallengeGroupUpdate
- func (cgu *ChallengeGroupUpdate) AddEpisodeRoundIDs(ids ...int) *ChallengeGroupUpdate
- func (cgu *ChallengeGroupUpdate) ClearCategory() *ChallengeGroupUpdate
- func (cgu *ChallengeGroupUpdate) ClearChallenges() *ChallengeGroupUpdate
- func (cgu *ChallengeGroupUpdate) ClearEpisodeRound() *ChallengeGroupUpdate
- func (cgu *ChallengeGroupUpdate) Exec(ctx context.Context) error
- func (cgu *ChallengeGroupUpdate) ExecX(ctx context.Context)
- func (cgu *ChallengeGroupUpdate) Mutation() *ChallengeGroupMutation
- func (cgu *ChallengeGroupUpdate) RemoveCategory(c ...*Category) *ChallengeGroupUpdate
- func (cgu *ChallengeGroupUpdate) RemoveCategoryIDs(ids ...int) *ChallengeGroupUpdate
- func (cgu *ChallengeGroupUpdate) RemoveChallengeIDs(ids ...int) *ChallengeGroupUpdate
- func (cgu *ChallengeGroupUpdate) RemoveChallenges(c ...*Challenge) *ChallengeGroupUpdate
- func (cgu *ChallengeGroupUpdate) RemoveEpisodeRound(e ...*EpisodeRound) *ChallengeGroupUpdate
- func (cgu *ChallengeGroupUpdate) RemoveEpisodeRoundIDs(ids ...int) *ChallengeGroupUpdate
- func (cgu *ChallengeGroupUpdate) Save(ctx context.Context) (int, error)
- func (cgu *ChallengeGroupUpdate) SaveX(ctx context.Context) int
- func (cgu *ChallengeGroupUpdate) Where(ps ...predicate.ChallengeGroup) *ChallengeGroupUpdate
- type ChallengeGroupUpdateOne
- func (cguo *ChallengeGroupUpdateOne) AddCategory(c ...*Category) *ChallengeGroupUpdateOne
- func (cguo *ChallengeGroupUpdateOne) AddCategoryIDs(ids ...int) *ChallengeGroupUpdateOne
- func (cguo *ChallengeGroupUpdateOne) AddChallengeIDs(ids ...int) *ChallengeGroupUpdateOne
- func (cguo *ChallengeGroupUpdateOne) AddChallenges(c ...*Challenge) *ChallengeGroupUpdateOne
- func (cguo *ChallengeGroupUpdateOne) AddEpisodeRound(e ...*EpisodeRound) *ChallengeGroupUpdateOne
- func (cguo *ChallengeGroupUpdateOne) AddEpisodeRoundIDs(ids ...int) *ChallengeGroupUpdateOne
- func (cguo *ChallengeGroupUpdateOne) ClearCategory() *ChallengeGroupUpdateOne
- func (cguo *ChallengeGroupUpdateOne) ClearChallenges() *ChallengeGroupUpdateOne
- func (cguo *ChallengeGroupUpdateOne) ClearEpisodeRound() *ChallengeGroupUpdateOne
- func (cguo *ChallengeGroupUpdateOne) Exec(ctx context.Context) error
- func (cguo *ChallengeGroupUpdateOne) ExecX(ctx context.Context)
- func (cguo *ChallengeGroupUpdateOne) Mutation() *ChallengeGroupMutation
- func (cguo *ChallengeGroupUpdateOne) RemoveCategory(c ...*Category) *ChallengeGroupUpdateOne
- func (cguo *ChallengeGroupUpdateOne) RemoveCategoryIDs(ids ...int) *ChallengeGroupUpdateOne
- func (cguo *ChallengeGroupUpdateOne) RemoveChallengeIDs(ids ...int) *ChallengeGroupUpdateOne
- func (cguo *ChallengeGroupUpdateOne) RemoveChallenges(c ...*Challenge) *ChallengeGroupUpdateOne
- func (cguo *ChallengeGroupUpdateOne) RemoveEpisodeRound(e ...*EpisodeRound) *ChallengeGroupUpdateOne
- func (cguo *ChallengeGroupUpdateOne) RemoveEpisodeRoundIDs(ids ...int) *ChallengeGroupUpdateOne
- func (cguo *ChallengeGroupUpdateOne) Save(ctx context.Context) (*ChallengeGroup, error)
- func (cguo *ChallengeGroupUpdateOne) SaveX(ctx context.Context) *ChallengeGroup
- func (cguo *ChallengeGroupUpdateOne) Select(field string, fields ...string) *ChallengeGroupUpdateOne
- func (cguo *ChallengeGroupUpdateOne) Where(ps ...predicate.ChallengeGroup) *ChallengeGroupUpdateOne
- type ChallengeGroups
- type ChallengeMutation
- func (m *ChallengeMutation) AddChallengeGroupIDs(ids ...int)
- func (m *ChallengeMutation) AddField(name string, value ent.Value) error
- func (m *ChallengeMutation) AddValue(i int)
- func (m *ChallengeMutation) AddedEdges() []string
- func (m *ChallengeMutation) AddedField(name string) (ent.Value, bool)
- func (m *ChallengeMutation) AddedFields() []string
- func (m *ChallengeMutation) AddedIDs(name string) []ent.Value
- func (m *ChallengeMutation) AddedValue() (r int, exists bool)
- func (m *ChallengeMutation) ChallengeGroupCleared() bool
- func (m *ChallengeMutation) ChallengeGroupIDs() (ids []int)
- func (m *ChallengeMutation) ClearChallengeGroup()
- func (m *ChallengeMutation) ClearEdge(name string) error
- func (m *ChallengeMutation) ClearField(name string) error
- func (m *ChallengeMutation) ClearedEdges() []string
- func (m *ChallengeMutation) ClearedFields() []string
- func (m ChallengeMutation) Client() *Client
- func (m *ChallengeMutation) EdgeCleared(name string) bool
- func (m *ChallengeMutation) Field(name string) (ent.Value, bool)
- func (m *ChallengeMutation) FieldCleared(name string) bool
- func (m *ChallengeMutation) Fields() []string
- func (m *ChallengeMutation) ID() (id int, exists bool)
- func (m *ChallengeMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ChallengeMutation) Media() (r string, exists bool)
- func (m *ChallengeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ChallengeMutation) OldMedia(ctx context.Context) (v string, err error)
- func (m *ChallengeMutation) OldPrompt(ctx context.Context) (v string, err error)
- func (m *ChallengeMutation) OldResponse(ctx context.Context) (v string, err error)
- func (m *ChallengeMutation) OldValue(ctx context.Context) (v int, err error)
- func (m *ChallengeMutation) Op() Op
- func (m *ChallengeMutation) Prompt() (r string, exists bool)
- func (m *ChallengeMutation) RemoveChallengeGroupIDs(ids ...int)
- func (m *ChallengeMutation) RemovedChallengeGroupIDs() (ids []int)
- func (m *ChallengeMutation) RemovedEdges() []string
- func (m *ChallengeMutation) RemovedIDs(name string) []ent.Value
- func (m *ChallengeMutation) ResetChallengeGroup()
- func (m *ChallengeMutation) ResetEdge(name string) error
- func (m *ChallengeMutation) ResetField(name string) error
- func (m *ChallengeMutation) ResetMedia()
- func (m *ChallengeMutation) ResetPrompt()
- func (m *ChallengeMutation) ResetResponse()
- func (m *ChallengeMutation) ResetValue()
- func (m *ChallengeMutation) Response() (r string, exists bool)
- func (m *ChallengeMutation) SetField(name string, value ent.Value) error
- func (m *ChallengeMutation) SetMedia(s string)
- func (m *ChallengeMutation) SetOp(op Op)
- func (m *ChallengeMutation) SetPrompt(s string)
- func (m *ChallengeMutation) SetResponse(s string)
- func (m *ChallengeMutation) SetValue(i int)
- func (m ChallengeMutation) Tx() (*Tx, error)
- func (m *ChallengeMutation) Type() string
- func (m *ChallengeMutation) Value() (r int, exists bool)
- func (m *ChallengeMutation) Where(ps ...predicate.Challenge)
- func (m *ChallengeMutation) WhereP(ps ...func(*sql.Selector))
- type ChallengeQuery
- func (cq *ChallengeQuery) Aggregate(fns ...AggregateFunc) *ChallengeSelect
- func (cq *ChallengeQuery) All(ctx context.Context) ([]*Challenge, error)
- func (cq *ChallengeQuery) AllX(ctx context.Context) []*Challenge
- func (cq *ChallengeQuery) Clone() *ChallengeQuery
- func (cq *ChallengeQuery) Count(ctx context.Context) (int, error)
- func (cq *ChallengeQuery) CountX(ctx context.Context) int
- func (cq *ChallengeQuery) Exist(ctx context.Context) (bool, error)
- func (cq *ChallengeQuery) ExistX(ctx context.Context) bool
- func (cq *ChallengeQuery) First(ctx context.Context) (*Challenge, error)
- func (cq *ChallengeQuery) FirstID(ctx context.Context) (id int, err error)
- func (cq *ChallengeQuery) FirstIDX(ctx context.Context) int
- func (cq *ChallengeQuery) FirstX(ctx context.Context) *Challenge
- func (cq *ChallengeQuery) GroupBy(field string, fields ...string) *ChallengeGroupBy
- func (cq *ChallengeQuery) IDs(ctx context.Context) (ids []int, err error)
- func (cq *ChallengeQuery) IDsX(ctx context.Context) []int
- func (cq *ChallengeQuery) Limit(limit int) *ChallengeQuery
- func (cq *ChallengeQuery) Offset(offset int) *ChallengeQuery
- func (cq *ChallengeQuery) Only(ctx context.Context) (*Challenge, error)
- func (cq *ChallengeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (cq *ChallengeQuery) OnlyIDX(ctx context.Context) int
- func (cq *ChallengeQuery) OnlyX(ctx context.Context) *Challenge
- func (cq *ChallengeQuery) Order(o ...challenge.OrderOption) *ChallengeQuery
- func (cq *ChallengeQuery) QueryChallengeGroup() *ChallengeGroupQuery
- func (cq *ChallengeQuery) Select(fields ...string) *ChallengeSelect
- func (cq *ChallengeQuery) Unique(unique bool) *ChallengeQuery
- func (cq *ChallengeQuery) Where(ps ...predicate.Challenge) *ChallengeQuery
- func (cq *ChallengeQuery) WithChallengeGroup(opts ...func(*ChallengeGroupQuery)) *ChallengeQuery
- type ChallengeSelect
- func (cs *ChallengeSelect) Aggregate(fns ...AggregateFunc) *ChallengeSelect
- func (s *ChallengeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ChallengeSelect) BoolX(ctx context.Context) bool
- func (s *ChallengeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ChallengeSelect) BoolsX(ctx context.Context) []bool
- func (s *ChallengeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ChallengeSelect) Float64X(ctx context.Context) float64
- func (s *ChallengeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ChallengeSelect) Float64sX(ctx context.Context) []float64
- func (s *ChallengeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ChallengeSelect) IntX(ctx context.Context) int
- func (s *ChallengeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ChallengeSelect) IntsX(ctx context.Context) []int
- func (cs *ChallengeSelect) Scan(ctx context.Context, v any) error
- func (s *ChallengeSelect) ScanX(ctx context.Context, v any)
- func (s *ChallengeSelect) String(ctx context.Context) (_ string, err error)
- func (s *ChallengeSelect) StringX(ctx context.Context) string
- func (s *ChallengeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ChallengeSelect) StringsX(ctx context.Context) []string
- type ChallengeUpdate
- func (cu *ChallengeUpdate) AddChallengeGroup(c ...*ChallengeGroup) *ChallengeUpdate
- func (cu *ChallengeUpdate) AddChallengeGroupIDs(ids ...int) *ChallengeUpdate
- func (cu *ChallengeUpdate) AddValue(i int) *ChallengeUpdate
- func (cu *ChallengeUpdate) ClearChallengeGroup() *ChallengeUpdate
- func (cu *ChallengeUpdate) Exec(ctx context.Context) error
- func (cu *ChallengeUpdate) ExecX(ctx context.Context)
- func (cu *ChallengeUpdate) Mutation() *ChallengeMutation
- func (cu *ChallengeUpdate) RemoveChallengeGroup(c ...*ChallengeGroup) *ChallengeUpdate
- func (cu *ChallengeUpdate) RemoveChallengeGroupIDs(ids ...int) *ChallengeUpdate
- func (cu *ChallengeUpdate) Save(ctx context.Context) (int, error)
- func (cu *ChallengeUpdate) SaveX(ctx context.Context) int
- func (cu *ChallengeUpdate) SetMedia(s string) *ChallengeUpdate
- func (cu *ChallengeUpdate) SetNillableMedia(s *string) *ChallengeUpdate
- func (cu *ChallengeUpdate) SetNillablePrompt(s *string) *ChallengeUpdate
- func (cu *ChallengeUpdate) SetNillableResponse(s *string) *ChallengeUpdate
- func (cu *ChallengeUpdate) SetNillableValue(i *int) *ChallengeUpdate
- func (cu *ChallengeUpdate) SetPrompt(s string) *ChallengeUpdate
- func (cu *ChallengeUpdate) SetResponse(s string) *ChallengeUpdate
- func (cu *ChallengeUpdate) SetValue(i int) *ChallengeUpdate
- func (cu *ChallengeUpdate) Where(ps ...predicate.Challenge) *ChallengeUpdate
- type ChallengeUpdateOne
- func (cuo *ChallengeUpdateOne) AddChallengeGroup(c ...*ChallengeGroup) *ChallengeUpdateOne
- func (cuo *ChallengeUpdateOne) AddChallengeGroupIDs(ids ...int) *ChallengeUpdateOne
- func (cuo *ChallengeUpdateOne) AddValue(i int) *ChallengeUpdateOne
- func (cuo *ChallengeUpdateOne) ClearChallengeGroup() *ChallengeUpdateOne
- func (cuo *ChallengeUpdateOne) Exec(ctx context.Context) error
- func (cuo *ChallengeUpdateOne) ExecX(ctx context.Context)
- func (cuo *ChallengeUpdateOne) Mutation() *ChallengeMutation
- func (cuo *ChallengeUpdateOne) RemoveChallengeGroup(c ...*ChallengeGroup) *ChallengeUpdateOne
- func (cuo *ChallengeUpdateOne) RemoveChallengeGroupIDs(ids ...int) *ChallengeUpdateOne
- func (cuo *ChallengeUpdateOne) Save(ctx context.Context) (*Challenge, error)
- func (cuo *ChallengeUpdateOne) SaveX(ctx context.Context) *Challenge
- func (cuo *ChallengeUpdateOne) Select(field string, fields ...string) *ChallengeUpdateOne
- func (cuo *ChallengeUpdateOne) SetMedia(s string) *ChallengeUpdateOne
- func (cuo *ChallengeUpdateOne) SetNillableMedia(s *string) *ChallengeUpdateOne
- func (cuo *ChallengeUpdateOne) SetNillablePrompt(s *string) *ChallengeUpdateOne
- func (cuo *ChallengeUpdateOne) SetNillableResponse(s *string) *ChallengeUpdateOne
- func (cuo *ChallengeUpdateOne) SetNillableValue(i *int) *ChallengeUpdateOne
- func (cuo *ChallengeUpdateOne) SetPrompt(s string) *ChallengeUpdateOne
- func (cuo *ChallengeUpdateOne) SetResponse(s string) *ChallengeUpdateOne
- func (cuo *ChallengeUpdateOne) SetValue(i int) *ChallengeUpdateOne
- func (cuo *ChallengeUpdateOne) Where(ps ...predicate.Challenge) *ChallengeUpdateOne
- type Challenges
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Episode
- type EpisodeClient
- func (c *EpisodeClient) Create() *EpisodeCreate
- func (c *EpisodeClient) CreateBulk(builders ...*EpisodeCreate) *EpisodeCreateBulk
- func (c *EpisodeClient) Delete() *EpisodeDelete
- func (c *EpisodeClient) DeleteOne(e *Episode) *EpisodeDeleteOne
- func (c *EpisodeClient) DeleteOneID(id int) *EpisodeDeleteOne
- func (c *EpisodeClient) Get(ctx context.Context, id int) (*Episode, error)
- func (c *EpisodeClient) GetX(ctx context.Context, id int) *Episode
- func (c *EpisodeClient) Hooks() []Hook
- func (c *EpisodeClient) Intercept(interceptors ...Interceptor)
- func (c *EpisodeClient) Interceptors() []Interceptor
- func (c *EpisodeClient) MapCreateBulk(slice any, setFunc func(*EpisodeCreate, int)) *EpisodeCreateBulk
- func (c *EpisodeClient) Query() *EpisodeQuery
- func (c *EpisodeClient) QueryRounds(e *Episode) *EpisodeRoundQuery
- func (c *EpisodeClient) Update() *EpisodeUpdate
- func (c *EpisodeClient) UpdateOne(e *Episode) *EpisodeUpdateOne
- func (c *EpisodeClient) UpdateOneID(id int) *EpisodeUpdateOne
- func (c *EpisodeClient) Use(hooks ...Hook)
- type EpisodeCreate
- func (ec *EpisodeCreate) AddRoundIDs(ids ...int) *EpisodeCreate
- func (ec *EpisodeCreate) AddRounds(e ...*EpisodeRound) *EpisodeCreate
- func (ec *EpisodeCreate) Exec(ctx context.Context) error
- func (ec *EpisodeCreate) ExecX(ctx context.Context)
- func (ec *EpisodeCreate) Mutation() *EpisodeMutation
- func (ec *EpisodeCreate) Save(ctx context.Context) (*Episode, error)
- func (ec *EpisodeCreate) SaveX(ctx context.Context) *Episode
- func (ec *EpisodeCreate) SetAired(t time.Time) *EpisodeCreate
- func (ec *EpisodeCreate) SetDifficulty(e episode.Difficulty) *EpisodeCreate
- type EpisodeCreateBulk
- type EpisodeDelete
- type EpisodeDeleteOne
- type EpisodeEdges
- type EpisodeGroupBy
- func (egb *EpisodeGroupBy) Aggregate(fns ...AggregateFunc) *EpisodeGroupBy
- func (s *EpisodeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *EpisodeGroupBy) BoolX(ctx context.Context) bool
- func (s *EpisodeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *EpisodeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *EpisodeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *EpisodeGroupBy) Float64X(ctx context.Context) float64
- func (s *EpisodeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *EpisodeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *EpisodeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *EpisodeGroupBy) IntX(ctx context.Context) int
- func (s *EpisodeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *EpisodeGroupBy) IntsX(ctx context.Context) []int
- func (egb *EpisodeGroupBy) Scan(ctx context.Context, v any) error
- func (s *EpisodeGroupBy) ScanX(ctx context.Context, v any)
- func (s *EpisodeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *EpisodeGroupBy) StringX(ctx context.Context) string
- func (s *EpisodeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *EpisodeGroupBy) StringsX(ctx context.Context) []string
- type EpisodeMutation
- func (m *EpisodeMutation) AddField(name string, value ent.Value) error
- func (m *EpisodeMutation) AddRoundIDs(ids ...int)
- func (m *EpisodeMutation) AddedEdges() []string
- func (m *EpisodeMutation) AddedField(name string) (ent.Value, bool)
- func (m *EpisodeMutation) AddedFields() []string
- func (m *EpisodeMutation) AddedIDs(name string) []ent.Value
- func (m *EpisodeMutation) Aired() (r time.Time, exists bool)
- func (m *EpisodeMutation) ClearEdge(name string) error
- func (m *EpisodeMutation) ClearField(name string) error
- func (m *EpisodeMutation) ClearRounds()
- func (m *EpisodeMutation) ClearedEdges() []string
- func (m *EpisodeMutation) ClearedFields() []string
- func (m EpisodeMutation) Client() *Client
- func (m *EpisodeMutation) Difficulty() (r episode.Difficulty, exists bool)
- func (m *EpisodeMutation) EdgeCleared(name string) bool
- func (m *EpisodeMutation) Field(name string) (ent.Value, bool)
- func (m *EpisodeMutation) FieldCleared(name string) bool
- func (m *EpisodeMutation) Fields() []string
- func (m *EpisodeMutation) ID() (id int, exists bool)
- func (m *EpisodeMutation) IDs(ctx context.Context) ([]int, error)
- func (m *EpisodeMutation) OldAired(ctx context.Context) (v time.Time, err error)
- func (m *EpisodeMutation) OldDifficulty(ctx context.Context) (v episode.Difficulty, err error)
- func (m *EpisodeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *EpisodeMutation) Op() Op
- func (m *EpisodeMutation) RemoveRoundIDs(ids ...int)
- func (m *EpisodeMutation) RemovedEdges() []string
- func (m *EpisodeMutation) RemovedIDs(name string) []ent.Value
- func (m *EpisodeMutation) RemovedRoundsIDs() (ids []int)
- func (m *EpisodeMutation) ResetAired()
- func (m *EpisodeMutation) ResetDifficulty()
- func (m *EpisodeMutation) ResetEdge(name string) error
- func (m *EpisodeMutation) ResetField(name string) error
- func (m *EpisodeMutation) ResetRounds()
- func (m *EpisodeMutation) RoundsCleared() bool
- func (m *EpisodeMutation) RoundsIDs() (ids []int)
- func (m *EpisodeMutation) SetAired(t time.Time)
- func (m *EpisodeMutation) SetDifficulty(e episode.Difficulty)
- func (m *EpisodeMutation) SetField(name string, value ent.Value) error
- func (m *EpisodeMutation) SetOp(op Op)
- func (m EpisodeMutation) Tx() (*Tx, error)
- func (m *EpisodeMutation) Type() string
- func (m *EpisodeMutation) Where(ps ...predicate.Episode)
- func (m *EpisodeMutation) WhereP(ps ...func(*sql.Selector))
- type EpisodeQuery
- func (eq *EpisodeQuery) Aggregate(fns ...AggregateFunc) *EpisodeSelect
- func (eq *EpisodeQuery) All(ctx context.Context) ([]*Episode, error)
- func (eq *EpisodeQuery) AllX(ctx context.Context) []*Episode
- func (eq *EpisodeQuery) Clone() *EpisodeQuery
- func (eq *EpisodeQuery) Count(ctx context.Context) (int, error)
- func (eq *EpisodeQuery) CountX(ctx context.Context) int
- func (eq *EpisodeQuery) Exist(ctx context.Context) (bool, error)
- func (eq *EpisodeQuery) ExistX(ctx context.Context) bool
- func (eq *EpisodeQuery) First(ctx context.Context) (*Episode, error)
- func (eq *EpisodeQuery) FirstID(ctx context.Context) (id int, err error)
- func (eq *EpisodeQuery) FirstIDX(ctx context.Context) int
- func (eq *EpisodeQuery) FirstX(ctx context.Context) *Episode
- func (eq *EpisodeQuery) GroupBy(field string, fields ...string) *EpisodeGroupBy
- func (eq *EpisodeQuery) IDs(ctx context.Context) (ids []int, err error)
- func (eq *EpisodeQuery) IDsX(ctx context.Context) []int
- func (eq *EpisodeQuery) Limit(limit int) *EpisodeQuery
- func (eq *EpisodeQuery) Offset(offset int) *EpisodeQuery
- func (eq *EpisodeQuery) Only(ctx context.Context) (*Episode, error)
- func (eq *EpisodeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (eq *EpisodeQuery) OnlyIDX(ctx context.Context) int
- func (eq *EpisodeQuery) OnlyX(ctx context.Context) *Episode
- func (eq *EpisodeQuery) Order(o ...episode.OrderOption) *EpisodeQuery
- func (eq *EpisodeQuery) QueryRounds() *EpisodeRoundQuery
- func (eq *EpisodeQuery) Select(fields ...string) *EpisodeSelect
- func (eq *EpisodeQuery) Unique(unique bool) *EpisodeQuery
- func (eq *EpisodeQuery) Where(ps ...predicate.Episode) *EpisodeQuery
- func (eq *EpisodeQuery) WithRounds(opts ...func(*EpisodeRoundQuery)) *EpisodeQuery
- type EpisodeRound
- func (er *EpisodeRound) QueryCategories() *ChallengeGroupQuery
- func (er *EpisodeRound) QueryEpisode() *EpisodeQuery
- func (er *EpisodeRound) String() string
- func (er *EpisodeRound) Unwrap() *EpisodeRound
- func (er *EpisodeRound) Update() *EpisodeRoundUpdateOne
- func (er *EpisodeRound) Value(name string) (ent.Value, error)
- type EpisodeRoundClient
- func (c *EpisodeRoundClient) Create() *EpisodeRoundCreate
- func (c *EpisodeRoundClient) CreateBulk(builders ...*EpisodeRoundCreate) *EpisodeRoundCreateBulk
- func (c *EpisodeRoundClient) Delete() *EpisodeRoundDelete
- func (c *EpisodeRoundClient) DeleteOne(er *EpisodeRound) *EpisodeRoundDeleteOne
- func (c *EpisodeRoundClient) DeleteOneID(id int) *EpisodeRoundDeleteOne
- func (c *EpisodeRoundClient) Get(ctx context.Context, id int) (*EpisodeRound, error)
- func (c *EpisodeRoundClient) GetX(ctx context.Context, id int) *EpisodeRound
- func (c *EpisodeRoundClient) Hooks() []Hook
- func (c *EpisodeRoundClient) Intercept(interceptors ...Interceptor)
- func (c *EpisodeRoundClient) Interceptors() []Interceptor
- func (c *EpisodeRoundClient) MapCreateBulk(slice any, setFunc func(*EpisodeRoundCreate, int)) *EpisodeRoundCreateBulk
- func (c *EpisodeRoundClient) Query() *EpisodeRoundQuery
- func (c *EpisodeRoundClient) QueryCategories(er *EpisodeRound) *ChallengeGroupQuery
- func (c *EpisodeRoundClient) QueryEpisode(er *EpisodeRound) *EpisodeQuery
- func (c *EpisodeRoundClient) Update() *EpisodeRoundUpdate
- func (c *EpisodeRoundClient) UpdateOne(er *EpisodeRound) *EpisodeRoundUpdateOne
- func (c *EpisodeRoundClient) UpdateOneID(id int) *EpisodeRoundUpdateOne
- func (c *EpisodeRoundClient) Use(hooks ...Hook)
- type EpisodeRoundCreate
- func (erc *EpisodeRoundCreate) AddCategories(c ...*ChallengeGroup) *EpisodeRoundCreate
- func (erc *EpisodeRoundCreate) AddCategoryIDs(ids ...int) *EpisodeRoundCreate
- func (erc *EpisodeRoundCreate) AddEpisode(e ...*Episode) *EpisodeRoundCreate
- func (erc *EpisodeRoundCreate) AddEpisodeIDs(ids ...int) *EpisodeRoundCreate
- func (erc *EpisodeRoundCreate) Exec(ctx context.Context) error
- func (erc *EpisodeRoundCreate) ExecX(ctx context.Context)
- func (erc *EpisodeRoundCreate) Mutation() *EpisodeRoundMutation
- func (erc *EpisodeRoundCreate) Save(ctx context.Context) (*EpisodeRound, error)
- func (erc *EpisodeRoundCreate) SaveX(ctx context.Context) *EpisodeRound
- func (erc *EpisodeRoundCreate) SetRound(e episoderound.Round) *EpisodeRoundCreate
- type EpisodeRoundCreateBulk
- type EpisodeRoundDelete
- type EpisodeRoundDeleteOne
- type EpisodeRoundEdges
- type EpisodeRoundGroupBy
- func (ergb *EpisodeRoundGroupBy) Aggregate(fns ...AggregateFunc) *EpisodeRoundGroupBy
- func (s *EpisodeRoundGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *EpisodeRoundGroupBy) BoolX(ctx context.Context) bool
- func (s *EpisodeRoundGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *EpisodeRoundGroupBy) BoolsX(ctx context.Context) []bool
- func (s *EpisodeRoundGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *EpisodeRoundGroupBy) Float64X(ctx context.Context) float64
- func (s *EpisodeRoundGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *EpisodeRoundGroupBy) Float64sX(ctx context.Context) []float64
- func (s *EpisodeRoundGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *EpisodeRoundGroupBy) IntX(ctx context.Context) int
- func (s *EpisodeRoundGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *EpisodeRoundGroupBy) IntsX(ctx context.Context) []int
- func (ergb *EpisodeRoundGroupBy) Scan(ctx context.Context, v any) error
- func (s *EpisodeRoundGroupBy) ScanX(ctx context.Context, v any)
- func (s *EpisodeRoundGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *EpisodeRoundGroupBy) StringX(ctx context.Context) string
- func (s *EpisodeRoundGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *EpisodeRoundGroupBy) StringsX(ctx context.Context) []string
- type EpisodeRoundMutation
- func (m *EpisodeRoundMutation) AddCategoryIDs(ids ...int)
- func (m *EpisodeRoundMutation) AddEpisodeIDs(ids ...int)
- func (m *EpisodeRoundMutation) AddField(name string, value ent.Value) error
- func (m *EpisodeRoundMutation) AddedEdges() []string
- func (m *EpisodeRoundMutation) AddedField(name string) (ent.Value, bool)
- func (m *EpisodeRoundMutation) AddedFields() []string
- func (m *EpisodeRoundMutation) AddedIDs(name string) []ent.Value
- func (m *EpisodeRoundMutation) CategoriesCleared() bool
- func (m *EpisodeRoundMutation) CategoriesIDs() (ids []int)
- func (m *EpisodeRoundMutation) ClearCategories()
- func (m *EpisodeRoundMutation) ClearEdge(name string) error
- func (m *EpisodeRoundMutation) ClearEpisode()
- func (m *EpisodeRoundMutation) ClearField(name string) error
- func (m *EpisodeRoundMutation) ClearedEdges() []string
- func (m *EpisodeRoundMutation) ClearedFields() []string
- func (m EpisodeRoundMutation) Client() *Client
- func (m *EpisodeRoundMutation) EdgeCleared(name string) bool
- func (m *EpisodeRoundMutation) EpisodeCleared() bool
- func (m *EpisodeRoundMutation) EpisodeIDs() (ids []int)
- func (m *EpisodeRoundMutation) Field(name string) (ent.Value, bool)
- func (m *EpisodeRoundMutation) FieldCleared(name string) bool
- func (m *EpisodeRoundMutation) Fields() []string
- func (m *EpisodeRoundMutation) ID() (id int, exists bool)
- func (m *EpisodeRoundMutation) IDs(ctx context.Context) ([]int, error)
- func (m *EpisodeRoundMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *EpisodeRoundMutation) OldRound(ctx context.Context) (v episoderound.Round, err error)
- func (m *EpisodeRoundMutation) Op() Op
- func (m *EpisodeRoundMutation) RemoveCategoryIDs(ids ...int)
- func (m *EpisodeRoundMutation) RemoveEpisodeIDs(ids ...int)
- func (m *EpisodeRoundMutation) RemovedCategoriesIDs() (ids []int)
- func (m *EpisodeRoundMutation) RemovedEdges() []string
- func (m *EpisodeRoundMutation) RemovedEpisodeIDs() (ids []int)
- func (m *EpisodeRoundMutation) RemovedIDs(name string) []ent.Value
- func (m *EpisodeRoundMutation) ResetCategories()
- func (m *EpisodeRoundMutation) ResetEdge(name string) error
- func (m *EpisodeRoundMutation) ResetEpisode()
- func (m *EpisodeRoundMutation) ResetField(name string) error
- func (m *EpisodeRoundMutation) ResetRound()
- func (m *EpisodeRoundMutation) Round() (r episoderound.Round, exists bool)
- func (m *EpisodeRoundMutation) SetField(name string, value ent.Value) error
- func (m *EpisodeRoundMutation) SetOp(op Op)
- func (m *EpisodeRoundMutation) SetRound(e episoderound.Round)
- func (m EpisodeRoundMutation) Tx() (*Tx, error)
- func (m *EpisodeRoundMutation) Type() string
- func (m *EpisodeRoundMutation) Where(ps ...predicate.EpisodeRound)
- func (m *EpisodeRoundMutation) WhereP(ps ...func(*sql.Selector))
- type EpisodeRoundQuery
- func (erq *EpisodeRoundQuery) Aggregate(fns ...AggregateFunc) *EpisodeRoundSelect
- func (erq *EpisodeRoundQuery) All(ctx context.Context) ([]*EpisodeRound, error)
- func (erq *EpisodeRoundQuery) AllX(ctx context.Context) []*EpisodeRound
- func (erq *EpisodeRoundQuery) Clone() *EpisodeRoundQuery
- func (erq *EpisodeRoundQuery) Count(ctx context.Context) (int, error)
- func (erq *EpisodeRoundQuery) CountX(ctx context.Context) int
- func (erq *EpisodeRoundQuery) Exist(ctx context.Context) (bool, error)
- func (erq *EpisodeRoundQuery) ExistX(ctx context.Context) bool
- func (erq *EpisodeRoundQuery) First(ctx context.Context) (*EpisodeRound, error)
- func (erq *EpisodeRoundQuery) FirstID(ctx context.Context) (id int, err error)
- func (erq *EpisodeRoundQuery) FirstIDX(ctx context.Context) int
- func (erq *EpisodeRoundQuery) FirstX(ctx context.Context) *EpisodeRound
- func (erq *EpisodeRoundQuery) GroupBy(field string, fields ...string) *EpisodeRoundGroupBy
- func (erq *EpisodeRoundQuery) IDs(ctx context.Context) (ids []int, err error)
- func (erq *EpisodeRoundQuery) IDsX(ctx context.Context) []int
- func (erq *EpisodeRoundQuery) Limit(limit int) *EpisodeRoundQuery
- func (erq *EpisodeRoundQuery) Offset(offset int) *EpisodeRoundQuery
- func (erq *EpisodeRoundQuery) Only(ctx context.Context) (*EpisodeRound, error)
- func (erq *EpisodeRoundQuery) OnlyID(ctx context.Context) (id int, err error)
- func (erq *EpisodeRoundQuery) OnlyIDX(ctx context.Context) int
- func (erq *EpisodeRoundQuery) OnlyX(ctx context.Context) *EpisodeRound
- func (erq *EpisodeRoundQuery) Order(o ...episoderound.OrderOption) *EpisodeRoundQuery
- func (erq *EpisodeRoundQuery) QueryCategories() *ChallengeGroupQuery
- func (erq *EpisodeRoundQuery) QueryEpisode() *EpisodeQuery
- func (erq *EpisodeRoundQuery) Select(fields ...string) *EpisodeRoundSelect
- func (erq *EpisodeRoundQuery) Unique(unique bool) *EpisodeRoundQuery
- func (erq *EpisodeRoundQuery) Where(ps ...predicate.EpisodeRound) *EpisodeRoundQuery
- func (erq *EpisodeRoundQuery) WithCategories(opts ...func(*ChallengeGroupQuery)) *EpisodeRoundQuery
- func (erq *EpisodeRoundQuery) WithEpisode(opts ...func(*EpisodeQuery)) *EpisodeRoundQuery
- type EpisodeRoundSelect
- func (ers *EpisodeRoundSelect) Aggregate(fns ...AggregateFunc) *EpisodeRoundSelect
- func (s *EpisodeRoundSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *EpisodeRoundSelect) BoolX(ctx context.Context) bool
- func (s *EpisodeRoundSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *EpisodeRoundSelect) BoolsX(ctx context.Context) []bool
- func (s *EpisodeRoundSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *EpisodeRoundSelect) Float64X(ctx context.Context) float64
- func (s *EpisodeRoundSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *EpisodeRoundSelect) Float64sX(ctx context.Context) []float64
- func (s *EpisodeRoundSelect) Int(ctx context.Context) (_ int, err error)
- func (s *EpisodeRoundSelect) IntX(ctx context.Context) int
- func (s *EpisodeRoundSelect) Ints(ctx context.Context) ([]int, error)
- func (s *EpisodeRoundSelect) IntsX(ctx context.Context) []int
- func (ers *EpisodeRoundSelect) Scan(ctx context.Context, v any) error
- func (s *EpisodeRoundSelect) ScanX(ctx context.Context, v any)
- func (s *EpisodeRoundSelect) String(ctx context.Context) (_ string, err error)
- func (s *EpisodeRoundSelect) StringX(ctx context.Context) string
- func (s *EpisodeRoundSelect) Strings(ctx context.Context) ([]string, error)
- func (s *EpisodeRoundSelect) StringsX(ctx context.Context) []string
- type EpisodeRoundUpdate
- func (eru *EpisodeRoundUpdate) AddCategories(c ...*ChallengeGroup) *EpisodeRoundUpdate
- func (eru *EpisodeRoundUpdate) AddCategoryIDs(ids ...int) *EpisodeRoundUpdate
- func (eru *EpisodeRoundUpdate) AddEpisode(e ...*Episode) *EpisodeRoundUpdate
- func (eru *EpisodeRoundUpdate) AddEpisodeIDs(ids ...int) *EpisodeRoundUpdate
- func (eru *EpisodeRoundUpdate) ClearCategories() *EpisodeRoundUpdate
- func (eru *EpisodeRoundUpdate) ClearEpisode() *EpisodeRoundUpdate
- func (eru *EpisodeRoundUpdate) Exec(ctx context.Context) error
- func (eru *EpisodeRoundUpdate) ExecX(ctx context.Context)
- func (eru *EpisodeRoundUpdate) Mutation() *EpisodeRoundMutation
- func (eru *EpisodeRoundUpdate) RemoveCategories(c ...*ChallengeGroup) *EpisodeRoundUpdate
- func (eru *EpisodeRoundUpdate) RemoveCategoryIDs(ids ...int) *EpisodeRoundUpdate
- func (eru *EpisodeRoundUpdate) RemoveEpisode(e ...*Episode) *EpisodeRoundUpdate
- func (eru *EpisodeRoundUpdate) RemoveEpisodeIDs(ids ...int) *EpisodeRoundUpdate
- func (eru *EpisodeRoundUpdate) Save(ctx context.Context) (int, error)
- func (eru *EpisodeRoundUpdate) SaveX(ctx context.Context) int
- func (eru *EpisodeRoundUpdate) SetNillableRound(e *episoderound.Round) *EpisodeRoundUpdate
- func (eru *EpisodeRoundUpdate) SetRound(e episoderound.Round) *EpisodeRoundUpdate
- func (eru *EpisodeRoundUpdate) Where(ps ...predicate.EpisodeRound) *EpisodeRoundUpdate
- type EpisodeRoundUpdateOne
- func (eruo *EpisodeRoundUpdateOne) AddCategories(c ...*ChallengeGroup) *EpisodeRoundUpdateOne
- func (eruo *EpisodeRoundUpdateOne) AddCategoryIDs(ids ...int) *EpisodeRoundUpdateOne
- func (eruo *EpisodeRoundUpdateOne) AddEpisode(e ...*Episode) *EpisodeRoundUpdateOne
- func (eruo *EpisodeRoundUpdateOne) AddEpisodeIDs(ids ...int) *EpisodeRoundUpdateOne
- func (eruo *EpisodeRoundUpdateOne) ClearCategories() *EpisodeRoundUpdateOne
- func (eruo *EpisodeRoundUpdateOne) ClearEpisode() *EpisodeRoundUpdateOne
- func (eruo *EpisodeRoundUpdateOne) Exec(ctx context.Context) error
- func (eruo *EpisodeRoundUpdateOne) ExecX(ctx context.Context)
- func (eruo *EpisodeRoundUpdateOne) Mutation() *EpisodeRoundMutation
- func (eruo *EpisodeRoundUpdateOne) RemoveCategories(c ...*ChallengeGroup) *EpisodeRoundUpdateOne
- func (eruo *EpisodeRoundUpdateOne) RemoveCategoryIDs(ids ...int) *EpisodeRoundUpdateOne
- func (eruo *EpisodeRoundUpdateOne) RemoveEpisode(e ...*Episode) *EpisodeRoundUpdateOne
- func (eruo *EpisodeRoundUpdateOne) RemoveEpisodeIDs(ids ...int) *EpisodeRoundUpdateOne
- func (eruo *EpisodeRoundUpdateOne) Save(ctx context.Context) (*EpisodeRound, error)
- func (eruo *EpisodeRoundUpdateOne) SaveX(ctx context.Context) *EpisodeRound
- func (eruo *EpisodeRoundUpdateOne) Select(field string, fields ...string) *EpisodeRoundUpdateOne
- func (eruo *EpisodeRoundUpdateOne) SetNillableRound(e *episoderound.Round) *EpisodeRoundUpdateOne
- func (eruo *EpisodeRoundUpdateOne) SetRound(e episoderound.Round) *EpisodeRoundUpdateOne
- func (eruo *EpisodeRoundUpdateOne) Where(ps ...predicate.EpisodeRound) *EpisodeRoundUpdateOne
- type EpisodeRounds
- type EpisodeSelect
- func (es *EpisodeSelect) Aggregate(fns ...AggregateFunc) *EpisodeSelect
- func (s *EpisodeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *EpisodeSelect) BoolX(ctx context.Context) bool
- func (s *EpisodeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *EpisodeSelect) BoolsX(ctx context.Context) []bool
- func (s *EpisodeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *EpisodeSelect) Float64X(ctx context.Context) float64
- func (s *EpisodeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *EpisodeSelect) Float64sX(ctx context.Context) []float64
- func (s *EpisodeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *EpisodeSelect) IntX(ctx context.Context) int
- func (s *EpisodeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *EpisodeSelect) IntsX(ctx context.Context) []int
- func (es *EpisodeSelect) Scan(ctx context.Context, v any) error
- func (s *EpisodeSelect) ScanX(ctx context.Context, v any)
- func (s *EpisodeSelect) String(ctx context.Context) (_ string, err error)
- func (s *EpisodeSelect) StringX(ctx context.Context) string
- func (s *EpisodeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *EpisodeSelect) StringsX(ctx context.Context) []string
- type EpisodeUpdate
- func (eu *EpisodeUpdate) AddRoundIDs(ids ...int) *EpisodeUpdate
- func (eu *EpisodeUpdate) AddRounds(e ...*EpisodeRound) *EpisodeUpdate
- func (eu *EpisodeUpdate) ClearRounds() *EpisodeUpdate
- func (eu *EpisodeUpdate) Exec(ctx context.Context) error
- func (eu *EpisodeUpdate) ExecX(ctx context.Context)
- func (eu *EpisodeUpdate) Mutation() *EpisodeMutation
- func (eu *EpisodeUpdate) RemoveRoundIDs(ids ...int) *EpisodeUpdate
- func (eu *EpisodeUpdate) RemoveRounds(e ...*EpisodeRound) *EpisodeUpdate
- func (eu *EpisodeUpdate) Save(ctx context.Context) (int, error)
- func (eu *EpisodeUpdate) SaveX(ctx context.Context) int
- func (eu *EpisodeUpdate) SetAired(t time.Time) *EpisodeUpdate
- func (eu *EpisodeUpdate) SetDifficulty(e episode.Difficulty) *EpisodeUpdate
- func (eu *EpisodeUpdate) SetNillableAired(t *time.Time) *EpisodeUpdate
- func (eu *EpisodeUpdate) SetNillableDifficulty(e *episode.Difficulty) *EpisodeUpdate
- func (eu *EpisodeUpdate) Where(ps ...predicate.Episode) *EpisodeUpdate
- type EpisodeUpdateOne
- func (euo *EpisodeUpdateOne) AddRoundIDs(ids ...int) *EpisodeUpdateOne
- func (euo *EpisodeUpdateOne) AddRounds(e ...*EpisodeRound) *EpisodeUpdateOne
- func (euo *EpisodeUpdateOne) ClearRounds() *EpisodeUpdateOne
- func (euo *EpisodeUpdateOne) Exec(ctx context.Context) error
- func (euo *EpisodeUpdateOne) ExecX(ctx context.Context)
- func (euo *EpisodeUpdateOne) Mutation() *EpisodeMutation
- func (euo *EpisodeUpdateOne) RemoveRoundIDs(ids ...int) *EpisodeUpdateOne
- func (euo *EpisodeUpdateOne) RemoveRounds(e ...*EpisodeRound) *EpisodeUpdateOne
- func (euo *EpisodeUpdateOne) Save(ctx context.Context) (*Episode, error)
- func (euo *EpisodeUpdateOne) SaveX(ctx context.Context) *Episode
- func (euo *EpisodeUpdateOne) Select(field string, fields ...string) *EpisodeUpdateOne
- func (euo *EpisodeUpdateOne) SetAired(t time.Time) *EpisodeUpdateOne
- func (euo *EpisodeUpdateOne) SetDifficulty(e episode.Difficulty) *EpisodeUpdateOne
- func (euo *EpisodeUpdateOne) SetNillableAired(t *time.Time) *EpisodeUpdateOne
- func (euo *EpisodeUpdateOne) SetNillableDifficulty(e *episode.Difficulty) *EpisodeUpdateOne
- func (euo *EpisodeUpdateOne) Where(ps ...predicate.Episode) *EpisodeUpdateOne
- type Episodes
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeCategory = "Category" TypeChallenge = "Challenge" TypeChallengeGroup = "ChallengeGroup" TypeEpisode = "Episode" TypeEpisodeRound = "EpisodeRound" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
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 Category ¶
type Category struct { // ID of the ent. ID int `json:"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 CategoryQuery when eager-loading is set. Edges CategoryEdges `json:"edges"` // contains filtered or unexported fields }
Category is the model entity for the Category schema.
func (*Category) QueryChallengeGroups ¶
func (c *Category) QueryChallengeGroups() *ChallengeGroupQuery
QueryChallengeGroups queries the "challenge_groups" edge of the Category entity.
func (*Category) Unwrap ¶
Unwrap unwraps the Category 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 (*Category) Update ¶
func (c *Category) Update() *CategoryUpdateOne
Update returns a builder for updating this Category. Note that you need to call Category.Unwrap() before calling this method if this Category was returned from a transaction, and the transaction was committed or rolled back.
type CategoryClient ¶
type CategoryClient struct {
// contains filtered or unexported fields
}
CategoryClient is a client for the Category schema.
func NewCategoryClient ¶
func NewCategoryClient(c config) *CategoryClient
NewCategoryClient returns a client for the Category from the given config.
func (*CategoryClient) Create ¶
func (c *CategoryClient) Create() *CategoryCreate
Create returns a builder for creating a Category entity.
func (*CategoryClient) CreateBulk ¶
func (c *CategoryClient) CreateBulk(builders ...*CategoryCreate) *CategoryCreateBulk
CreateBulk returns a builder for creating a bulk of Category entities.
func (*CategoryClient) Delete ¶
func (c *CategoryClient) Delete() *CategoryDelete
Delete returns a delete builder for Category.
func (*CategoryClient) DeleteOne ¶
func (c *CategoryClient) DeleteOne(ca *Category) *CategoryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CategoryClient) DeleteOneID ¶
func (c *CategoryClient) DeleteOneID(id int) *CategoryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CategoryClient) GetX ¶
func (c *CategoryClient) GetX(ctx context.Context, id int) *Category
GetX is like Get, but panics if an error occurs.
func (*CategoryClient) Hooks ¶
func (c *CategoryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CategoryClient) Intercept ¶
func (c *CategoryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `category.Intercept(f(g(h())))`.
func (*CategoryClient) Interceptors ¶
func (c *CategoryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CategoryClient) MapCreateBulk ¶
func (c *CategoryClient) MapCreateBulk(slice any, setFunc func(*CategoryCreate, int)) *CategoryCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CategoryClient) Query ¶
func (c *CategoryClient) Query() *CategoryQuery
Query returns a query builder for Category.
func (*CategoryClient) QueryChallengeGroups ¶
func (c *CategoryClient) QueryChallengeGroups(ca *Category) *ChallengeGroupQuery
QueryChallengeGroups queries the challenge_groups edge of a Category.
func (*CategoryClient) Update ¶
func (c *CategoryClient) Update() *CategoryUpdate
Update returns an update builder for Category.
func (*CategoryClient) UpdateOne ¶
func (c *CategoryClient) UpdateOne(ca *Category) *CategoryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CategoryClient) UpdateOneID ¶
func (c *CategoryClient) UpdateOneID(id int) *CategoryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CategoryClient) Use ¶
func (c *CategoryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `category.Hooks(f(g(h())))`.
type CategoryCreate ¶
type CategoryCreate struct {
// contains filtered or unexported fields
}
CategoryCreate is the builder for creating a Category entity.
func (*CategoryCreate) AddChallengeGroupIDs ¶
func (cc *CategoryCreate) AddChallengeGroupIDs(ids ...int) *CategoryCreate
AddChallengeGroupIDs adds the "challenge_groups" edge to the ChallengeGroup entity by IDs.
func (*CategoryCreate) AddChallengeGroups ¶
func (cc *CategoryCreate) AddChallengeGroups(c ...*ChallengeGroup) *CategoryCreate
AddChallengeGroups adds the "challenge_groups" edges to the ChallengeGroup entity.
func (*CategoryCreate) Exec ¶
func (cc *CategoryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CategoryCreate) ExecX ¶
func (cc *CategoryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategoryCreate) Mutation ¶
func (cc *CategoryCreate) Mutation() *CategoryMutation
Mutation returns the CategoryMutation object of the builder.
func (*CategoryCreate) Save ¶
func (cc *CategoryCreate) Save(ctx context.Context) (*Category, error)
Save creates the Category in the database.
func (*CategoryCreate) SaveX ¶
func (cc *CategoryCreate) SaveX(ctx context.Context) *Category
SaveX calls Save and panics if Save returns an error.
func (*CategoryCreate) SetName ¶
func (cc *CategoryCreate) SetName(s string) *CategoryCreate
SetName sets the "name" field.
type CategoryCreateBulk ¶
type CategoryCreateBulk struct {
// contains filtered or unexported fields
}
CategoryCreateBulk is the builder for creating many Category entities in bulk.
func (*CategoryCreateBulk) Exec ¶
func (ccb *CategoryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CategoryCreateBulk) ExecX ¶
func (ccb *CategoryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CategoryDelete ¶
type CategoryDelete struct {
// contains filtered or unexported fields
}
CategoryDelete is the builder for deleting a Category entity.
func (*CategoryDelete) Exec ¶
func (cd *CategoryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CategoryDelete) ExecX ¶
func (cd *CategoryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CategoryDelete) Where ¶
func (cd *CategoryDelete) Where(ps ...predicate.Category) *CategoryDelete
Where appends a list predicates to the CategoryDelete builder.
type CategoryDeleteOne ¶
type CategoryDeleteOne struct {
// contains filtered or unexported fields
}
CategoryDeleteOne is the builder for deleting a single Category entity.
func (*CategoryDeleteOne) Exec ¶
func (cdo *CategoryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CategoryDeleteOne) ExecX ¶
func (cdo *CategoryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategoryDeleteOne) Where ¶
func (cdo *CategoryDeleteOne) Where(ps ...predicate.Category) *CategoryDeleteOne
Where appends a list predicates to the CategoryDelete builder.
type CategoryEdges ¶
type CategoryEdges struct { // ChallengeGroups holds the value of the challenge_groups edge. ChallengeGroups []*ChallengeGroup `json:"challenge_groups,omitempty"` // contains filtered or unexported fields }
CategoryEdges holds the relations/edges for other nodes in the graph.
func (CategoryEdges) ChallengeGroupsOrErr ¶
func (e CategoryEdges) ChallengeGroupsOrErr() ([]*ChallengeGroup, error)
ChallengeGroupsOrErr returns the ChallengeGroups value or an error if the edge was not loaded in eager-loading.
type CategoryGroupBy ¶
type CategoryGroupBy struct {
// contains filtered or unexported fields
}
CategoryGroupBy is the group-by builder for Category entities.
func (*CategoryGroupBy) Aggregate ¶
func (cgb *CategoryGroupBy) Aggregate(fns ...AggregateFunc) *CategoryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CategoryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Scan ¶
func (cgb *CategoryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CategoryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CategoryMutation ¶
type CategoryMutation struct {
// contains filtered or unexported fields
}
CategoryMutation represents an operation that mutates the Category nodes in the graph.
func (*CategoryMutation) AddChallengeGroupIDs ¶
func (m *CategoryMutation) AddChallengeGroupIDs(ids ...int)
AddChallengeGroupIDs adds the "challenge_groups" edge to the ChallengeGroup entity by ids.
func (*CategoryMutation) AddField ¶
func (m *CategoryMutation) 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 (*CategoryMutation) AddedEdges ¶
func (m *CategoryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CategoryMutation) AddedField ¶
func (m *CategoryMutation) 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 (*CategoryMutation) AddedFields ¶
func (m *CategoryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CategoryMutation) AddedIDs ¶
func (m *CategoryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CategoryMutation) ChallengeGroupsCleared ¶
func (m *CategoryMutation) ChallengeGroupsCleared() bool
ChallengeGroupsCleared reports if the "challenge_groups" edge to the ChallengeGroup entity was cleared.
func (*CategoryMutation) ChallengeGroupsIDs ¶
func (m *CategoryMutation) ChallengeGroupsIDs() (ids []int)
ChallengeGroupsIDs returns the "challenge_groups" edge IDs in the mutation.
func (*CategoryMutation) ClearChallengeGroups ¶
func (m *CategoryMutation) ClearChallengeGroups()
ClearChallengeGroups clears the "challenge_groups" edge to the ChallengeGroup entity.
func (*CategoryMutation) ClearEdge ¶
func (m *CategoryMutation) 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 (*CategoryMutation) ClearField ¶
func (m *CategoryMutation) 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 (*CategoryMutation) ClearedEdges ¶
func (m *CategoryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CategoryMutation) ClearedFields ¶
func (m *CategoryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CategoryMutation) Client ¶
func (m CategoryMutation) 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 (*CategoryMutation) EdgeCleared ¶
func (m *CategoryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CategoryMutation) Field ¶
func (m *CategoryMutation) 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 (*CategoryMutation) FieldCleared ¶
func (m *CategoryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CategoryMutation) Fields ¶
func (m *CategoryMutation) 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 (*CategoryMutation) ID ¶
func (m *CategoryMutation) 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 (*CategoryMutation) IDs ¶
func (m *CategoryMutation) 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 (*CategoryMutation) Name ¶
func (m *CategoryMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*CategoryMutation) OldField ¶
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 (*CategoryMutation) OldName ¶
func (m *CategoryMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Category entity. If the Category 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 (*CategoryMutation) RemoveChallengeGroupIDs ¶
func (m *CategoryMutation) RemoveChallengeGroupIDs(ids ...int)
RemoveChallengeGroupIDs removes the "challenge_groups" edge to the ChallengeGroup entity by IDs.
func (*CategoryMutation) RemovedChallengeGroupsIDs ¶
func (m *CategoryMutation) RemovedChallengeGroupsIDs() (ids []int)
RemovedChallengeGroups returns the removed IDs of the "challenge_groups" edge to the ChallengeGroup entity.
func (*CategoryMutation) RemovedEdges ¶
func (m *CategoryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CategoryMutation) RemovedIDs ¶
func (m *CategoryMutation) 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 (*CategoryMutation) ResetChallengeGroups ¶
func (m *CategoryMutation) ResetChallengeGroups()
ResetChallengeGroups resets all changes to the "challenge_groups" edge.
func (*CategoryMutation) ResetEdge ¶
func (m *CategoryMutation) 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 (*CategoryMutation) ResetField ¶
func (m *CategoryMutation) 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 (*CategoryMutation) ResetName ¶
func (m *CategoryMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*CategoryMutation) SetField ¶
func (m *CategoryMutation) 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 (*CategoryMutation) SetName ¶
func (m *CategoryMutation) SetName(s string)
SetName sets the "name" field.
func (*CategoryMutation) SetOp ¶
func (m *CategoryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (CategoryMutation) Tx ¶
func (m CategoryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CategoryMutation) Type ¶
func (m *CategoryMutation) Type() string
Type returns the node type of this mutation (Category).
func (*CategoryMutation) Where ¶
func (m *CategoryMutation) Where(ps ...predicate.Category)
Where appends a list predicates to the CategoryMutation builder.
func (*CategoryMutation) WhereP ¶
func (m *CategoryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CategoryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CategoryQuery ¶
type CategoryQuery struct {
// contains filtered or unexported fields
}
CategoryQuery is the builder for querying Category entities.
func (*CategoryQuery) Aggregate ¶
func (cq *CategoryQuery) Aggregate(fns ...AggregateFunc) *CategorySelect
Aggregate returns a CategorySelect configured with the given aggregations.
func (*CategoryQuery) All ¶
func (cq *CategoryQuery) All(ctx context.Context) ([]*Category, error)
All executes the query and returns a list of Categories.
func (*CategoryQuery) AllX ¶
func (cq *CategoryQuery) AllX(ctx context.Context) []*Category
AllX is like All, but panics if an error occurs.
func (*CategoryQuery) Clone ¶
func (cq *CategoryQuery) Clone() *CategoryQuery
Clone returns a duplicate of the CategoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CategoryQuery) Count ¶
func (cq *CategoryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CategoryQuery) CountX ¶
func (cq *CategoryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CategoryQuery) Exist ¶
func (cq *CategoryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CategoryQuery) ExistX ¶
func (cq *CategoryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CategoryQuery) First ¶
func (cq *CategoryQuery) First(ctx context.Context) (*Category, error)
First returns the first Category entity from the query. Returns a *NotFoundError when no Category was found.
func (*CategoryQuery) FirstID ¶
func (cq *CategoryQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Category ID from the query. Returns a *NotFoundError when no Category ID was found.
func (*CategoryQuery) FirstIDX ¶
func (cq *CategoryQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*CategoryQuery) FirstX ¶
func (cq *CategoryQuery) FirstX(ctx context.Context) *Category
FirstX is like First, but panics if an error occurs.
func (*CategoryQuery) GroupBy ¶
func (cq *CategoryQuery) GroupBy(field string, fields ...string) *CategoryGroupBy
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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Category.Query(). GroupBy(category.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*CategoryQuery) IDs ¶
func (cq *CategoryQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Category IDs.
func (*CategoryQuery) IDsX ¶
func (cq *CategoryQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*CategoryQuery) Limit ¶
func (cq *CategoryQuery) Limit(limit int) *CategoryQuery
Limit the number of records to be returned by this query.
func (*CategoryQuery) Offset ¶
func (cq *CategoryQuery) Offset(offset int) *CategoryQuery
Offset to start from.
func (*CategoryQuery) Only ¶
func (cq *CategoryQuery) Only(ctx context.Context) (*Category, error)
Only returns a single Category entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Category entity is found. Returns a *NotFoundError when no Category entities are found.
func (*CategoryQuery) OnlyID ¶
func (cq *CategoryQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Category ID in the query. Returns a *NotSingularError when more than one Category ID is found. Returns a *NotFoundError when no entities are found.
func (*CategoryQuery) OnlyIDX ¶
func (cq *CategoryQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CategoryQuery) OnlyX ¶
func (cq *CategoryQuery) OnlyX(ctx context.Context) *Category
OnlyX is like Only, but panics if an error occurs.
func (*CategoryQuery) Order ¶
func (cq *CategoryQuery) Order(o ...category.OrderOption) *CategoryQuery
Order specifies how the records should be ordered.
func (*CategoryQuery) QueryChallengeGroups ¶
func (cq *CategoryQuery) QueryChallengeGroups() *ChallengeGroupQuery
QueryChallengeGroups chains the current query on the "challenge_groups" edge.
func (*CategoryQuery) Select ¶
func (cq *CategoryQuery) Select(fields ...string) *CategorySelect
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 { Name string `json:"name,omitempty"` } client.Category.Query(). Select(category.FieldName). Scan(ctx, &v)
func (*CategoryQuery) Unique ¶
func (cq *CategoryQuery) Unique(unique bool) *CategoryQuery
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 (*CategoryQuery) Where ¶
func (cq *CategoryQuery) Where(ps ...predicate.Category) *CategoryQuery
Where adds a new predicate for the CategoryQuery builder.
func (*CategoryQuery) WithChallengeGroups ¶
func (cq *CategoryQuery) WithChallengeGroups(opts ...func(*ChallengeGroupQuery)) *CategoryQuery
WithChallengeGroups tells the query-builder to eager-load the nodes that are connected to the "challenge_groups" edge. The optional arguments are used to configure the query builder of the edge.
type CategorySelect ¶
type CategorySelect struct { *CategoryQuery // contains filtered or unexported fields }
CategorySelect is the builder for selecting fields of Category entities.
func (*CategorySelect) Aggregate ¶
func (cs *CategorySelect) Aggregate(fns ...AggregateFunc) *CategorySelect
Aggregate adds the given aggregation functions to the selector query.
func (*CategorySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Scan ¶
func (cs *CategorySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CategorySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CategoryUpdate ¶
type CategoryUpdate struct {
// contains filtered or unexported fields
}
CategoryUpdate is the builder for updating Category entities.
func (*CategoryUpdate) AddChallengeGroupIDs ¶
func (cu *CategoryUpdate) AddChallengeGroupIDs(ids ...int) *CategoryUpdate
AddChallengeGroupIDs adds the "challenge_groups" edge to the ChallengeGroup entity by IDs.
func (*CategoryUpdate) AddChallengeGroups ¶
func (cu *CategoryUpdate) AddChallengeGroups(c ...*ChallengeGroup) *CategoryUpdate
AddChallengeGroups adds the "challenge_groups" edges to the ChallengeGroup entity.
func (*CategoryUpdate) ClearChallengeGroups ¶
func (cu *CategoryUpdate) ClearChallengeGroups() *CategoryUpdate
ClearChallengeGroups clears all "challenge_groups" edges to the ChallengeGroup entity.
func (*CategoryUpdate) Exec ¶
func (cu *CategoryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CategoryUpdate) ExecX ¶
func (cu *CategoryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategoryUpdate) Mutation ¶
func (cu *CategoryUpdate) Mutation() *CategoryMutation
Mutation returns the CategoryMutation object of the builder.
func (*CategoryUpdate) RemoveChallengeGroupIDs ¶
func (cu *CategoryUpdate) RemoveChallengeGroupIDs(ids ...int) *CategoryUpdate
RemoveChallengeGroupIDs removes the "challenge_groups" edge to ChallengeGroup entities by IDs.
func (*CategoryUpdate) RemoveChallengeGroups ¶
func (cu *CategoryUpdate) RemoveChallengeGroups(c ...*ChallengeGroup) *CategoryUpdate
RemoveChallengeGroups removes "challenge_groups" edges to ChallengeGroup entities.
func (*CategoryUpdate) Save ¶
func (cu *CategoryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CategoryUpdate) SaveX ¶
func (cu *CategoryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CategoryUpdate) SetName ¶
func (cu *CategoryUpdate) SetName(s string) *CategoryUpdate
SetName sets the "name" field.
func (*CategoryUpdate) SetNillableName ¶
func (cu *CategoryUpdate) SetNillableName(s *string) *CategoryUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*CategoryUpdate) Where ¶
func (cu *CategoryUpdate) Where(ps ...predicate.Category) *CategoryUpdate
Where appends a list predicates to the CategoryUpdate builder.
type CategoryUpdateOne ¶
type CategoryUpdateOne struct {
// contains filtered or unexported fields
}
CategoryUpdateOne is the builder for updating a single Category entity.
func (*CategoryUpdateOne) AddChallengeGroupIDs ¶
func (cuo *CategoryUpdateOne) AddChallengeGroupIDs(ids ...int) *CategoryUpdateOne
AddChallengeGroupIDs adds the "challenge_groups" edge to the ChallengeGroup entity by IDs.
func (*CategoryUpdateOne) AddChallengeGroups ¶
func (cuo *CategoryUpdateOne) AddChallengeGroups(c ...*ChallengeGroup) *CategoryUpdateOne
AddChallengeGroups adds the "challenge_groups" edges to the ChallengeGroup entity.
func (*CategoryUpdateOne) ClearChallengeGroups ¶
func (cuo *CategoryUpdateOne) ClearChallengeGroups() *CategoryUpdateOne
ClearChallengeGroups clears all "challenge_groups" edges to the ChallengeGroup entity.
func (*CategoryUpdateOne) Exec ¶
func (cuo *CategoryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CategoryUpdateOne) ExecX ¶
func (cuo *CategoryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategoryUpdateOne) Mutation ¶
func (cuo *CategoryUpdateOne) Mutation() *CategoryMutation
Mutation returns the CategoryMutation object of the builder.
func (*CategoryUpdateOne) RemoveChallengeGroupIDs ¶
func (cuo *CategoryUpdateOne) RemoveChallengeGroupIDs(ids ...int) *CategoryUpdateOne
RemoveChallengeGroupIDs removes the "challenge_groups" edge to ChallengeGroup entities by IDs.
func (*CategoryUpdateOne) RemoveChallengeGroups ¶
func (cuo *CategoryUpdateOne) RemoveChallengeGroups(c ...*ChallengeGroup) *CategoryUpdateOne
RemoveChallengeGroups removes "challenge_groups" edges to ChallengeGroup entities.
func (*CategoryUpdateOne) Save ¶
func (cuo *CategoryUpdateOne) Save(ctx context.Context) (*Category, error)
Save executes the query and returns the updated Category entity.
func (*CategoryUpdateOne) SaveX ¶
func (cuo *CategoryUpdateOne) SaveX(ctx context.Context) *Category
SaveX is like Save, but panics if an error occurs.
func (*CategoryUpdateOne) Select ¶
func (cuo *CategoryUpdateOne) Select(field string, fields ...string) *CategoryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CategoryUpdateOne) SetName ¶
func (cuo *CategoryUpdateOne) SetName(s string) *CategoryUpdateOne
SetName sets the "name" field.
func (*CategoryUpdateOne) SetNillableName ¶
func (cuo *CategoryUpdateOne) SetNillableName(s *string) *CategoryUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*CategoryUpdateOne) Where ¶
func (cuo *CategoryUpdateOne) Where(ps ...predicate.Category) *CategoryUpdateOne
Where appends a list predicates to the CategoryUpdate builder.
type Challenge ¶
type Challenge struct { // ID of the ent. ID int `json:"id,omitempty"` // Media holds the value of the "media" field. Media string `json:"media,omitempty"` // May be a URL path if the media type is defined. Prompt string `json:"prompt,omitempty"` // Response holds the value of the "response" field. Response string `json:"response,omitempty"` // If positive, the board's given value; if negative, the player's wagered value. Value int `json:"value,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ChallengeQuery when eager-loading is set. Edges ChallengeEdges `json:"edges"` // contains filtered or unexported fields }
Challenge is the model entity for the Challenge schema.
func (*Challenge) GetValue ¶
GetValue returns the ent.Value that was dynamically selected and assigned to the Challenge. This includes values selected through modifiers, order, etc.
func (*Challenge) QueryChallengeGroup ¶
func (c *Challenge) QueryChallengeGroup() *ChallengeGroupQuery
QueryChallengeGroup queries the "challenge_group" edge of the Challenge entity.
func (*Challenge) Unwrap ¶
Unwrap unwraps the Challenge 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 (*Challenge) Update ¶
func (c *Challenge) Update() *ChallengeUpdateOne
Update returns a builder for updating this Challenge. Note that you need to call Challenge.Unwrap() before calling this method if this Challenge was returned from a transaction, and the transaction was committed or rolled back.
type ChallengeClient ¶
type ChallengeClient struct {
// contains filtered or unexported fields
}
ChallengeClient is a client for the Challenge schema.
func NewChallengeClient ¶
func NewChallengeClient(c config) *ChallengeClient
NewChallengeClient returns a client for the Challenge from the given config.
func (*ChallengeClient) Create ¶
func (c *ChallengeClient) Create() *ChallengeCreate
Create returns a builder for creating a Challenge entity.
func (*ChallengeClient) CreateBulk ¶
func (c *ChallengeClient) CreateBulk(builders ...*ChallengeCreate) *ChallengeCreateBulk
CreateBulk returns a builder for creating a bulk of Challenge entities.
func (*ChallengeClient) Delete ¶
func (c *ChallengeClient) Delete() *ChallengeDelete
Delete returns a delete builder for Challenge.
func (*ChallengeClient) DeleteOne ¶
func (c *ChallengeClient) DeleteOne(ch *Challenge) *ChallengeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ChallengeClient) DeleteOneID ¶
func (c *ChallengeClient) DeleteOneID(id int) *ChallengeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ChallengeClient) GetX ¶
func (c *ChallengeClient) GetX(ctx context.Context, id int) *Challenge
GetX is like Get, but panics if an error occurs.
func (*ChallengeClient) Hooks ¶
func (c *ChallengeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ChallengeClient) Intercept ¶
func (c *ChallengeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `challenge.Intercept(f(g(h())))`.
func (*ChallengeClient) Interceptors ¶
func (c *ChallengeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ChallengeClient) MapCreateBulk ¶
func (c *ChallengeClient) MapCreateBulk(slice any, setFunc func(*ChallengeCreate, int)) *ChallengeCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ChallengeClient) Query ¶
func (c *ChallengeClient) Query() *ChallengeQuery
Query returns a query builder for Challenge.
func (*ChallengeClient) QueryChallengeGroup ¶
func (c *ChallengeClient) QueryChallengeGroup(ch *Challenge) *ChallengeGroupQuery
QueryChallengeGroup queries the challenge_group edge of a Challenge.
func (*ChallengeClient) Update ¶
func (c *ChallengeClient) Update() *ChallengeUpdate
Update returns an update builder for Challenge.
func (*ChallengeClient) UpdateOne ¶
func (c *ChallengeClient) UpdateOne(ch *Challenge) *ChallengeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ChallengeClient) UpdateOneID ¶
func (c *ChallengeClient) UpdateOneID(id int) *ChallengeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ChallengeClient) Use ¶
func (c *ChallengeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `challenge.Hooks(f(g(h())))`.
type ChallengeCreate ¶
type ChallengeCreate struct {
// contains filtered or unexported fields
}
ChallengeCreate is the builder for creating a Challenge entity.
func (*ChallengeCreate) AddChallengeGroup ¶
func (cc *ChallengeCreate) AddChallengeGroup(c ...*ChallengeGroup) *ChallengeCreate
AddChallengeGroup adds the "challenge_group" edges to the ChallengeGroup entity.
func (*ChallengeCreate) AddChallengeGroupIDs ¶
func (cc *ChallengeCreate) AddChallengeGroupIDs(ids ...int) *ChallengeCreate
AddChallengeGroupIDs adds the "challenge_group" edge to the ChallengeGroup entity by IDs.
func (*ChallengeCreate) Exec ¶
func (cc *ChallengeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ChallengeCreate) ExecX ¶
func (cc *ChallengeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChallengeCreate) Mutation ¶
func (cc *ChallengeCreate) Mutation() *ChallengeMutation
Mutation returns the ChallengeMutation object of the builder.
func (*ChallengeCreate) Save ¶
func (cc *ChallengeCreate) Save(ctx context.Context) (*Challenge, error)
Save creates the Challenge in the database.
func (*ChallengeCreate) SaveX ¶
func (cc *ChallengeCreate) SaveX(ctx context.Context) *Challenge
SaveX calls Save and panics if Save returns an error.
func (*ChallengeCreate) SetMedia ¶
func (cc *ChallengeCreate) SetMedia(s string) *ChallengeCreate
SetMedia sets the "media" field.
func (*ChallengeCreate) SetPrompt ¶
func (cc *ChallengeCreate) SetPrompt(s string) *ChallengeCreate
SetPrompt sets the "prompt" field.
func (*ChallengeCreate) SetResponse ¶
func (cc *ChallengeCreate) SetResponse(s string) *ChallengeCreate
SetResponse sets the "response" field.
func (*ChallengeCreate) SetValue ¶
func (cc *ChallengeCreate) SetValue(i int) *ChallengeCreate
SetValue sets the "value" field.
type ChallengeCreateBulk ¶
type ChallengeCreateBulk struct {
// contains filtered or unexported fields
}
ChallengeCreateBulk is the builder for creating many Challenge entities in bulk.
func (*ChallengeCreateBulk) Exec ¶
func (ccb *ChallengeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ChallengeCreateBulk) ExecX ¶
func (ccb *ChallengeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ChallengeDelete ¶
type ChallengeDelete struct {
// contains filtered or unexported fields
}
ChallengeDelete is the builder for deleting a Challenge entity.
func (*ChallengeDelete) Exec ¶
func (cd *ChallengeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ChallengeDelete) ExecX ¶
func (cd *ChallengeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ChallengeDelete) Where ¶
func (cd *ChallengeDelete) Where(ps ...predicate.Challenge) *ChallengeDelete
Where appends a list predicates to the ChallengeDelete builder.
type ChallengeDeleteOne ¶
type ChallengeDeleteOne struct {
// contains filtered or unexported fields
}
ChallengeDeleteOne is the builder for deleting a single Challenge entity.
func (*ChallengeDeleteOne) Exec ¶
func (cdo *ChallengeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ChallengeDeleteOne) ExecX ¶
func (cdo *ChallengeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChallengeDeleteOne) Where ¶
func (cdo *ChallengeDeleteOne) Where(ps ...predicate.Challenge) *ChallengeDeleteOne
Where appends a list predicates to the ChallengeDelete builder.
type ChallengeEdges ¶
type ChallengeEdges struct { // ChallengeGroup holds the value of the challenge_group edge. ChallengeGroup []*ChallengeGroup `json:"challenge_group,omitempty"` // contains filtered or unexported fields }
ChallengeEdges holds the relations/edges for other nodes in the graph.
func (ChallengeEdges) ChallengeGroupOrErr ¶
func (e ChallengeEdges) ChallengeGroupOrErr() ([]*ChallengeGroup, error)
ChallengeGroupOrErr returns the ChallengeGroup value or an error if the edge was not loaded in eager-loading.
type ChallengeGroup ¶
type ChallengeGroup struct { // ID of the ent. ID int `json:"id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ChallengeGroupQuery when eager-loading is set. Edges ChallengeGroupEdges `json:"edges"` // contains filtered or unexported fields }
ChallengeGroup is the model entity for the ChallengeGroup schema.
func (*ChallengeGroup) QueryCategory ¶
func (cg *ChallengeGroup) QueryCategory() *CategoryQuery
QueryCategory queries the "category" edge of the ChallengeGroup entity.
func (*ChallengeGroup) QueryChallenges ¶
func (cg *ChallengeGroup) QueryChallenges() *ChallengeQuery
QueryChallenges queries the "challenges" edge of the ChallengeGroup entity.
func (*ChallengeGroup) QueryEpisodeRound ¶
func (cg *ChallengeGroup) QueryEpisodeRound() *EpisodeRoundQuery
QueryEpisodeRound queries the "episode_round" edge of the ChallengeGroup entity.
func (*ChallengeGroup) String ¶
func (cg *ChallengeGroup) String() string
String implements the fmt.Stringer.
func (*ChallengeGroup) Unwrap ¶
func (cg *ChallengeGroup) Unwrap() *ChallengeGroup
Unwrap unwraps the ChallengeGroup 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 (*ChallengeGroup) Update ¶
func (cg *ChallengeGroup) Update() *ChallengeGroupUpdateOne
Update returns a builder for updating this ChallengeGroup. Note that you need to call ChallengeGroup.Unwrap() before calling this method if this ChallengeGroup was returned from a transaction, and the transaction was committed or rolled back.
type ChallengeGroupBy ¶
type ChallengeGroupBy struct {
// contains filtered or unexported fields
}
ChallengeGroupBy is the group-by builder for Challenge entities.
func (*ChallengeGroupBy) Aggregate ¶
func (cgb *ChallengeGroupBy) Aggregate(fns ...AggregateFunc) *ChallengeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ChallengeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ChallengeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ChallengeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ChallengeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ChallengeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ChallengeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ChallengeGroupBy) Scan ¶
func (cgb *ChallengeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ChallengeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ChallengeGroupClient ¶
type ChallengeGroupClient struct {
// contains filtered or unexported fields
}
ChallengeGroupClient is a client for the ChallengeGroup schema.
func NewChallengeGroupClient ¶
func NewChallengeGroupClient(c config) *ChallengeGroupClient
NewChallengeGroupClient returns a client for the ChallengeGroup from the given config.
func (*ChallengeGroupClient) Create ¶
func (c *ChallengeGroupClient) Create() *ChallengeGroupCreate
Create returns a builder for creating a ChallengeGroup entity.
func (*ChallengeGroupClient) CreateBulk ¶
func (c *ChallengeGroupClient) CreateBulk(builders ...*ChallengeGroupCreate) *ChallengeGroupCreateBulk
CreateBulk returns a builder for creating a bulk of ChallengeGroup entities.
func (*ChallengeGroupClient) Delete ¶
func (c *ChallengeGroupClient) Delete() *ChallengeGroupDelete
Delete returns a delete builder for ChallengeGroup.
func (*ChallengeGroupClient) DeleteOne ¶
func (c *ChallengeGroupClient) DeleteOne(cg *ChallengeGroup) *ChallengeGroupDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ChallengeGroupClient) DeleteOneID ¶
func (c *ChallengeGroupClient) DeleteOneID(id int) *ChallengeGroupDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ChallengeGroupClient) Get ¶
func (c *ChallengeGroupClient) Get(ctx context.Context, id int) (*ChallengeGroup, error)
Get returns a ChallengeGroup entity by its id.
func (*ChallengeGroupClient) GetX ¶
func (c *ChallengeGroupClient) GetX(ctx context.Context, id int) *ChallengeGroup
GetX is like Get, but panics if an error occurs.
func (*ChallengeGroupClient) Hooks ¶
func (c *ChallengeGroupClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ChallengeGroupClient) Intercept ¶
func (c *ChallengeGroupClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `challengegroup.Intercept(f(g(h())))`.
func (*ChallengeGroupClient) Interceptors ¶
func (c *ChallengeGroupClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ChallengeGroupClient) MapCreateBulk ¶
func (c *ChallengeGroupClient) MapCreateBulk(slice any, setFunc func(*ChallengeGroupCreate, int)) *ChallengeGroupCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ChallengeGroupClient) Query ¶
func (c *ChallengeGroupClient) Query() *ChallengeGroupQuery
Query returns a query builder for ChallengeGroup.
func (*ChallengeGroupClient) QueryCategory ¶
func (c *ChallengeGroupClient) QueryCategory(cg *ChallengeGroup) *CategoryQuery
QueryCategory queries the category edge of a ChallengeGroup.
func (*ChallengeGroupClient) QueryChallenges ¶
func (c *ChallengeGroupClient) QueryChallenges(cg *ChallengeGroup) *ChallengeQuery
QueryChallenges queries the challenges edge of a ChallengeGroup.
func (*ChallengeGroupClient) QueryEpisodeRound ¶
func (c *ChallengeGroupClient) QueryEpisodeRound(cg *ChallengeGroup) *EpisodeRoundQuery
QueryEpisodeRound queries the episode_round edge of a ChallengeGroup.
func (*ChallengeGroupClient) Update ¶
func (c *ChallengeGroupClient) Update() *ChallengeGroupUpdate
Update returns an update builder for ChallengeGroup.
func (*ChallengeGroupClient) UpdateOne ¶
func (c *ChallengeGroupClient) UpdateOne(cg *ChallengeGroup) *ChallengeGroupUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ChallengeGroupClient) UpdateOneID ¶
func (c *ChallengeGroupClient) UpdateOneID(id int) *ChallengeGroupUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ChallengeGroupClient) Use ¶
func (c *ChallengeGroupClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `challengegroup.Hooks(f(g(h())))`.
type ChallengeGroupCreate ¶
type ChallengeGroupCreate struct {
// contains filtered or unexported fields
}
ChallengeGroupCreate is the builder for creating a ChallengeGroup entity.
func (*ChallengeGroupCreate) AddCategory ¶
func (cgc *ChallengeGroupCreate) AddCategory(c ...*Category) *ChallengeGroupCreate
AddCategory adds the "category" edges to the Category entity.
func (*ChallengeGroupCreate) AddCategoryIDs ¶
func (cgc *ChallengeGroupCreate) AddCategoryIDs(ids ...int) *ChallengeGroupCreate
AddCategoryIDs adds the "category" edge to the Category entity by IDs.
func (*ChallengeGroupCreate) AddChallengeIDs ¶
func (cgc *ChallengeGroupCreate) AddChallengeIDs(ids ...int) *ChallengeGroupCreate
AddChallengeIDs adds the "challenges" edge to the Challenge entity by IDs.
func (*ChallengeGroupCreate) AddChallenges ¶
func (cgc *ChallengeGroupCreate) AddChallenges(c ...*Challenge) *ChallengeGroupCreate
AddChallenges adds the "challenges" edges to the Challenge entity.
func (*ChallengeGroupCreate) AddEpisodeRound ¶
func (cgc *ChallengeGroupCreate) AddEpisodeRound(e ...*EpisodeRound) *ChallengeGroupCreate
AddEpisodeRound adds the "episode_round" edges to the EpisodeRound entity.
func (*ChallengeGroupCreate) AddEpisodeRoundIDs ¶
func (cgc *ChallengeGroupCreate) AddEpisodeRoundIDs(ids ...int) *ChallengeGroupCreate
AddEpisodeRoundIDs adds the "episode_round" edge to the EpisodeRound entity by IDs.
func (*ChallengeGroupCreate) Exec ¶
func (cgc *ChallengeGroupCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ChallengeGroupCreate) ExecX ¶
func (cgc *ChallengeGroupCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChallengeGroupCreate) Mutation ¶
func (cgc *ChallengeGroupCreate) Mutation() *ChallengeGroupMutation
Mutation returns the ChallengeGroupMutation object of the builder.
func (*ChallengeGroupCreate) Save ¶
func (cgc *ChallengeGroupCreate) Save(ctx context.Context) (*ChallengeGroup, error)
Save creates the ChallengeGroup in the database.
func (*ChallengeGroupCreate) SaveX ¶
func (cgc *ChallengeGroupCreate) SaveX(ctx context.Context) *ChallengeGroup
SaveX calls Save and panics if Save returns an error.
type ChallengeGroupCreateBulk ¶
type ChallengeGroupCreateBulk struct {
// contains filtered or unexported fields
}
ChallengeGroupCreateBulk is the builder for creating many ChallengeGroup entities in bulk.
func (*ChallengeGroupCreateBulk) Exec ¶
func (cgcb *ChallengeGroupCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ChallengeGroupCreateBulk) ExecX ¶
func (cgcb *ChallengeGroupCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChallengeGroupCreateBulk) Save ¶
func (cgcb *ChallengeGroupCreateBulk) Save(ctx context.Context) ([]*ChallengeGroup, error)
Save creates the ChallengeGroup entities in the database.
func (*ChallengeGroupCreateBulk) SaveX ¶
func (cgcb *ChallengeGroupCreateBulk) SaveX(ctx context.Context) []*ChallengeGroup
SaveX is like Save, but panics if an error occurs.
type ChallengeGroupDelete ¶
type ChallengeGroupDelete struct {
// contains filtered or unexported fields
}
ChallengeGroupDelete is the builder for deleting a ChallengeGroup entity.
func (*ChallengeGroupDelete) Exec ¶
func (cgd *ChallengeGroupDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ChallengeGroupDelete) ExecX ¶
func (cgd *ChallengeGroupDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ChallengeGroupDelete) Where ¶
func (cgd *ChallengeGroupDelete) Where(ps ...predicate.ChallengeGroup) *ChallengeGroupDelete
Where appends a list predicates to the ChallengeGroupDelete builder.
type ChallengeGroupDeleteOne ¶
type ChallengeGroupDeleteOne struct {
// contains filtered or unexported fields
}
ChallengeGroupDeleteOne is the builder for deleting a single ChallengeGroup entity.
func (*ChallengeGroupDeleteOne) Exec ¶
func (cgdo *ChallengeGroupDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ChallengeGroupDeleteOne) ExecX ¶
func (cgdo *ChallengeGroupDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChallengeGroupDeleteOne) Where ¶
func (cgdo *ChallengeGroupDeleteOne) Where(ps ...predicate.ChallengeGroup) *ChallengeGroupDeleteOne
Where appends a list predicates to the ChallengeGroupDelete builder.
type ChallengeGroupEdges ¶
type ChallengeGroupEdges struct { // Challenges holds the value of the challenges edge. Challenges []*Challenge `json:"challenges,omitempty"` // Category holds the value of the category edge. Category []*Category `json:"category,omitempty"` // EpisodeRound holds the value of the episode_round edge. EpisodeRound []*EpisodeRound `json:"episode_round,omitempty"` // contains filtered or unexported fields }
ChallengeGroupEdges holds the relations/edges for other nodes in the graph.
func (ChallengeGroupEdges) CategoryOrErr ¶
func (e ChallengeGroupEdges) CategoryOrErr() ([]*Category, error)
CategoryOrErr returns the Category value or an error if the edge was not loaded in eager-loading.
func (ChallengeGroupEdges) ChallengesOrErr ¶
func (e ChallengeGroupEdges) ChallengesOrErr() ([]*Challenge, error)
ChallengesOrErr returns the Challenges value or an error if the edge was not loaded in eager-loading.
func (ChallengeGroupEdges) EpisodeRoundOrErr ¶
func (e ChallengeGroupEdges) EpisodeRoundOrErr() ([]*EpisodeRound, error)
EpisodeRoundOrErr returns the EpisodeRound value or an error if the edge was not loaded in eager-loading.
type ChallengeGroupGroupBy ¶
type ChallengeGroupGroupBy struct {
// contains filtered or unexported fields
}
ChallengeGroupGroupBy is the group-by builder for ChallengeGroup entities.
func (*ChallengeGroupGroupBy) Aggregate ¶
func (cggb *ChallengeGroupGroupBy) Aggregate(fns ...AggregateFunc) *ChallengeGroupGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ChallengeGroupGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ChallengeGroupGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ChallengeGroupGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ChallengeGroupGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ChallengeGroupGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ChallengeGroupGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ChallengeGroupGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ChallengeGroupGroupBy) Scan ¶
func (cggb *ChallengeGroupGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ChallengeGroupGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ChallengeGroupMutation ¶
type ChallengeGroupMutation struct {
// contains filtered or unexported fields
}
ChallengeGroupMutation represents an operation that mutates the ChallengeGroup nodes in the graph.
func (*ChallengeGroupMutation) AddCategoryIDs ¶
func (m *ChallengeGroupMutation) AddCategoryIDs(ids ...int)
AddCategoryIDs adds the "category" edge to the Category entity by ids.
func (*ChallengeGroupMutation) AddChallengeIDs ¶
func (m *ChallengeGroupMutation) AddChallengeIDs(ids ...int)
AddChallengeIDs adds the "challenges" edge to the Challenge entity by ids.
func (*ChallengeGroupMutation) AddEpisodeRoundIDs ¶
func (m *ChallengeGroupMutation) AddEpisodeRoundIDs(ids ...int)
AddEpisodeRoundIDs adds the "episode_round" edge to the EpisodeRound entity by ids.
func (*ChallengeGroupMutation) AddField ¶
func (m *ChallengeGroupMutation) 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 (*ChallengeGroupMutation) AddedEdges ¶
func (m *ChallengeGroupMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ChallengeGroupMutation) AddedField ¶
func (m *ChallengeGroupMutation) 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 (*ChallengeGroupMutation) AddedFields ¶
func (m *ChallengeGroupMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ChallengeGroupMutation) AddedIDs ¶
func (m *ChallengeGroupMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ChallengeGroupMutation) CategoryCleared ¶
func (m *ChallengeGroupMutation) CategoryCleared() bool
CategoryCleared reports if the "category" edge to the Category entity was cleared.
func (*ChallengeGroupMutation) CategoryIDs ¶
func (m *ChallengeGroupMutation) CategoryIDs() (ids []int)
CategoryIDs returns the "category" edge IDs in the mutation.
func (*ChallengeGroupMutation) ChallengesCleared ¶
func (m *ChallengeGroupMutation) ChallengesCleared() bool
ChallengesCleared reports if the "challenges" edge to the Challenge entity was cleared.
func (*ChallengeGroupMutation) ChallengesIDs ¶
func (m *ChallengeGroupMutation) ChallengesIDs() (ids []int)
ChallengesIDs returns the "challenges" edge IDs in the mutation.
func (*ChallengeGroupMutation) ClearCategory ¶
func (m *ChallengeGroupMutation) ClearCategory()
ClearCategory clears the "category" edge to the Category entity.
func (*ChallengeGroupMutation) ClearChallenges ¶
func (m *ChallengeGroupMutation) ClearChallenges()
ClearChallenges clears the "challenges" edge to the Challenge entity.
func (*ChallengeGroupMutation) ClearEdge ¶
func (m *ChallengeGroupMutation) 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 (*ChallengeGroupMutation) ClearEpisodeRound ¶
func (m *ChallengeGroupMutation) ClearEpisodeRound()
ClearEpisodeRound clears the "episode_round" edge to the EpisodeRound entity.
func (*ChallengeGroupMutation) ClearField ¶
func (m *ChallengeGroupMutation) 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 (*ChallengeGroupMutation) ClearedEdges ¶
func (m *ChallengeGroupMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ChallengeGroupMutation) ClearedFields ¶
func (m *ChallengeGroupMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ChallengeGroupMutation) Client ¶
func (m ChallengeGroupMutation) 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 (*ChallengeGroupMutation) EdgeCleared ¶
func (m *ChallengeGroupMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ChallengeGroupMutation) EpisodeRoundCleared ¶
func (m *ChallengeGroupMutation) EpisodeRoundCleared() bool
EpisodeRoundCleared reports if the "episode_round" edge to the EpisodeRound entity was cleared.
func (*ChallengeGroupMutation) EpisodeRoundIDs ¶
func (m *ChallengeGroupMutation) EpisodeRoundIDs() (ids []int)
EpisodeRoundIDs returns the "episode_round" edge IDs in the mutation.
func (*ChallengeGroupMutation) Field ¶
func (m *ChallengeGroupMutation) 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 (*ChallengeGroupMutation) FieldCleared ¶
func (m *ChallengeGroupMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ChallengeGroupMutation) Fields ¶
func (m *ChallengeGroupMutation) 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 (*ChallengeGroupMutation) ID ¶
func (m *ChallengeGroupMutation) 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 (*ChallengeGroupMutation) IDs ¶
func (m *ChallengeGroupMutation) 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 (*ChallengeGroupMutation) OldField ¶
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 (*ChallengeGroupMutation) Op ¶
func (m *ChallengeGroupMutation) Op() Op
Op returns the operation name.
func (*ChallengeGroupMutation) RemoveCategoryIDs ¶
func (m *ChallengeGroupMutation) RemoveCategoryIDs(ids ...int)
RemoveCategoryIDs removes the "category" edge to the Category entity by IDs.
func (*ChallengeGroupMutation) RemoveChallengeIDs ¶
func (m *ChallengeGroupMutation) RemoveChallengeIDs(ids ...int)
RemoveChallengeIDs removes the "challenges" edge to the Challenge entity by IDs.
func (*ChallengeGroupMutation) RemoveEpisodeRoundIDs ¶
func (m *ChallengeGroupMutation) RemoveEpisodeRoundIDs(ids ...int)
RemoveEpisodeRoundIDs removes the "episode_round" edge to the EpisodeRound entity by IDs.
func (*ChallengeGroupMutation) RemovedCategoryIDs ¶
func (m *ChallengeGroupMutation) RemovedCategoryIDs() (ids []int)
RemovedCategory returns the removed IDs of the "category" edge to the Category entity.
func (*ChallengeGroupMutation) RemovedChallengesIDs ¶
func (m *ChallengeGroupMutation) RemovedChallengesIDs() (ids []int)
RemovedChallenges returns the removed IDs of the "challenges" edge to the Challenge entity.
func (*ChallengeGroupMutation) RemovedEdges ¶
func (m *ChallengeGroupMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ChallengeGroupMutation) RemovedEpisodeRoundIDs ¶
func (m *ChallengeGroupMutation) RemovedEpisodeRoundIDs() (ids []int)
RemovedEpisodeRound returns the removed IDs of the "episode_round" edge to the EpisodeRound entity.
func (*ChallengeGroupMutation) RemovedIDs ¶
func (m *ChallengeGroupMutation) 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 (*ChallengeGroupMutation) ResetCategory ¶
func (m *ChallengeGroupMutation) ResetCategory()
ResetCategory resets all changes to the "category" edge.
func (*ChallengeGroupMutation) ResetChallenges ¶
func (m *ChallengeGroupMutation) ResetChallenges()
ResetChallenges resets all changes to the "challenges" edge.
func (*ChallengeGroupMutation) ResetEdge ¶
func (m *ChallengeGroupMutation) 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 (*ChallengeGroupMutation) ResetEpisodeRound ¶
func (m *ChallengeGroupMutation) ResetEpisodeRound()
ResetEpisodeRound resets all changes to the "episode_round" edge.
func (*ChallengeGroupMutation) ResetField ¶
func (m *ChallengeGroupMutation) 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 (*ChallengeGroupMutation) SetField ¶
func (m *ChallengeGroupMutation) 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 (*ChallengeGroupMutation) SetOp ¶
func (m *ChallengeGroupMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (ChallengeGroupMutation) Tx ¶
func (m ChallengeGroupMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ChallengeGroupMutation) Type ¶
func (m *ChallengeGroupMutation) Type() string
Type returns the node type of this mutation (ChallengeGroup).
func (*ChallengeGroupMutation) Where ¶
func (m *ChallengeGroupMutation) Where(ps ...predicate.ChallengeGroup)
Where appends a list predicates to the ChallengeGroupMutation builder.
func (*ChallengeGroupMutation) WhereP ¶
func (m *ChallengeGroupMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ChallengeGroupMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ChallengeGroupQuery ¶
type ChallengeGroupQuery struct {
// contains filtered or unexported fields
}
ChallengeGroupQuery is the builder for querying ChallengeGroup entities.
func (*ChallengeGroupQuery) Aggregate ¶
func (cgq *ChallengeGroupQuery) Aggregate(fns ...AggregateFunc) *ChallengeGroupSelect
Aggregate returns a ChallengeGroupSelect configured with the given aggregations.
func (*ChallengeGroupQuery) All ¶
func (cgq *ChallengeGroupQuery) All(ctx context.Context) ([]*ChallengeGroup, error)
All executes the query and returns a list of ChallengeGroups.
func (*ChallengeGroupQuery) AllX ¶
func (cgq *ChallengeGroupQuery) AllX(ctx context.Context) []*ChallengeGroup
AllX is like All, but panics if an error occurs.
func (*ChallengeGroupQuery) Clone ¶
func (cgq *ChallengeGroupQuery) Clone() *ChallengeGroupQuery
Clone returns a duplicate of the ChallengeGroupQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ChallengeGroupQuery) Count ¶
func (cgq *ChallengeGroupQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ChallengeGroupQuery) CountX ¶
func (cgq *ChallengeGroupQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ChallengeGroupQuery) Exist ¶
func (cgq *ChallengeGroupQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ChallengeGroupQuery) ExistX ¶
func (cgq *ChallengeGroupQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ChallengeGroupQuery) First ¶
func (cgq *ChallengeGroupQuery) First(ctx context.Context) (*ChallengeGroup, error)
First returns the first ChallengeGroup entity from the query. Returns a *NotFoundError when no ChallengeGroup was found.
func (*ChallengeGroupQuery) FirstID ¶
func (cgq *ChallengeGroupQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first ChallengeGroup ID from the query. Returns a *NotFoundError when no ChallengeGroup ID was found.
func (*ChallengeGroupQuery) FirstIDX ¶
func (cgq *ChallengeGroupQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ChallengeGroupQuery) FirstX ¶
func (cgq *ChallengeGroupQuery) FirstX(ctx context.Context) *ChallengeGroup
FirstX is like First, but panics if an error occurs.
func (*ChallengeGroupQuery) GroupBy ¶
func (cgq *ChallengeGroupQuery) GroupBy(field string, fields ...string) *ChallengeGroupGroupBy
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.
func (*ChallengeGroupQuery) IDs ¶
func (cgq *ChallengeGroupQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of ChallengeGroup IDs.
func (*ChallengeGroupQuery) IDsX ¶
func (cgq *ChallengeGroupQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ChallengeGroupQuery) Limit ¶
func (cgq *ChallengeGroupQuery) Limit(limit int) *ChallengeGroupQuery
Limit the number of records to be returned by this query.
func (*ChallengeGroupQuery) Offset ¶
func (cgq *ChallengeGroupQuery) Offset(offset int) *ChallengeGroupQuery
Offset to start from.
func (*ChallengeGroupQuery) Only ¶
func (cgq *ChallengeGroupQuery) Only(ctx context.Context) (*ChallengeGroup, error)
Only returns a single ChallengeGroup entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ChallengeGroup entity is found. Returns a *NotFoundError when no ChallengeGroup entities are found.
func (*ChallengeGroupQuery) OnlyID ¶
func (cgq *ChallengeGroupQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only ChallengeGroup ID in the query. Returns a *NotSingularError when more than one ChallengeGroup ID is found. Returns a *NotFoundError when no entities are found.
func (*ChallengeGroupQuery) OnlyIDX ¶
func (cgq *ChallengeGroupQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ChallengeGroupQuery) OnlyX ¶
func (cgq *ChallengeGroupQuery) OnlyX(ctx context.Context) *ChallengeGroup
OnlyX is like Only, but panics if an error occurs.
func (*ChallengeGroupQuery) Order ¶
func (cgq *ChallengeGroupQuery) Order(o ...challengegroup.OrderOption) *ChallengeGroupQuery
Order specifies how the records should be ordered.
func (*ChallengeGroupQuery) QueryCategory ¶
func (cgq *ChallengeGroupQuery) QueryCategory() *CategoryQuery
QueryCategory chains the current query on the "category" edge.
func (*ChallengeGroupQuery) QueryChallenges ¶
func (cgq *ChallengeGroupQuery) QueryChallenges() *ChallengeQuery
QueryChallenges chains the current query on the "challenges" edge.
func (*ChallengeGroupQuery) QueryEpisodeRound ¶
func (cgq *ChallengeGroupQuery) QueryEpisodeRound() *EpisodeRoundQuery
QueryEpisodeRound chains the current query on the "episode_round" edge.
func (*ChallengeGroupQuery) Select ¶
func (cgq *ChallengeGroupQuery) Select(fields ...string) *ChallengeGroupSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
func (*ChallengeGroupQuery) Unique ¶
func (cgq *ChallengeGroupQuery) Unique(unique bool) *ChallengeGroupQuery
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 (*ChallengeGroupQuery) Where ¶
func (cgq *ChallengeGroupQuery) Where(ps ...predicate.ChallengeGroup) *ChallengeGroupQuery
Where adds a new predicate for the ChallengeGroupQuery builder.
func (*ChallengeGroupQuery) WithCategory ¶
func (cgq *ChallengeGroupQuery) WithCategory(opts ...func(*CategoryQuery)) *ChallengeGroupQuery
WithCategory tells the query-builder to eager-load the nodes that are connected to the "category" edge. The optional arguments are used to configure the query builder of the edge.
func (*ChallengeGroupQuery) WithChallenges ¶
func (cgq *ChallengeGroupQuery) WithChallenges(opts ...func(*ChallengeQuery)) *ChallengeGroupQuery
WithChallenges tells the query-builder to eager-load the nodes that are connected to the "challenges" edge. The optional arguments are used to configure the query builder of the edge.
func (*ChallengeGroupQuery) WithEpisodeRound ¶
func (cgq *ChallengeGroupQuery) WithEpisodeRound(opts ...func(*EpisodeRoundQuery)) *ChallengeGroupQuery
WithEpisodeRound tells the query-builder to eager-load the nodes that are connected to the "episode_round" edge. The optional arguments are used to configure the query builder of the edge.
type ChallengeGroupSelect ¶
type ChallengeGroupSelect struct { *ChallengeGroupQuery // contains filtered or unexported fields }
ChallengeGroupSelect is the builder for selecting fields of ChallengeGroup entities.
func (*ChallengeGroupSelect) Aggregate ¶
func (cgs *ChallengeGroupSelect) Aggregate(fns ...AggregateFunc) *ChallengeGroupSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ChallengeGroupSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ChallengeGroupSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ChallengeGroupSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ChallengeGroupSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ChallengeGroupSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ChallengeGroupSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ChallengeGroupSelect) Scan ¶
func (cgs *ChallengeGroupSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ChallengeGroupSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ChallengeGroupUpdate ¶
type ChallengeGroupUpdate struct {
// contains filtered or unexported fields
}
ChallengeGroupUpdate is the builder for updating ChallengeGroup entities.
func (*ChallengeGroupUpdate) AddCategory ¶
func (cgu *ChallengeGroupUpdate) AddCategory(c ...*Category) *ChallengeGroupUpdate
AddCategory adds the "category" edges to the Category entity.
func (*ChallengeGroupUpdate) AddCategoryIDs ¶
func (cgu *ChallengeGroupUpdate) AddCategoryIDs(ids ...int) *ChallengeGroupUpdate
AddCategoryIDs adds the "category" edge to the Category entity by IDs.
func (*ChallengeGroupUpdate) AddChallengeIDs ¶
func (cgu *ChallengeGroupUpdate) AddChallengeIDs(ids ...int) *ChallengeGroupUpdate
AddChallengeIDs adds the "challenges" edge to the Challenge entity by IDs.
func (*ChallengeGroupUpdate) AddChallenges ¶
func (cgu *ChallengeGroupUpdate) AddChallenges(c ...*Challenge) *ChallengeGroupUpdate
AddChallenges adds the "challenges" edges to the Challenge entity.
func (*ChallengeGroupUpdate) AddEpisodeRound ¶
func (cgu *ChallengeGroupUpdate) AddEpisodeRound(e ...*EpisodeRound) *ChallengeGroupUpdate
AddEpisodeRound adds the "episode_round" edges to the EpisodeRound entity.
func (*ChallengeGroupUpdate) AddEpisodeRoundIDs ¶
func (cgu *ChallengeGroupUpdate) AddEpisodeRoundIDs(ids ...int) *ChallengeGroupUpdate
AddEpisodeRoundIDs adds the "episode_round" edge to the EpisodeRound entity by IDs.
func (*ChallengeGroupUpdate) ClearCategory ¶
func (cgu *ChallengeGroupUpdate) ClearCategory() *ChallengeGroupUpdate
ClearCategory clears all "category" edges to the Category entity.
func (*ChallengeGroupUpdate) ClearChallenges ¶
func (cgu *ChallengeGroupUpdate) ClearChallenges() *ChallengeGroupUpdate
ClearChallenges clears all "challenges" edges to the Challenge entity.
func (*ChallengeGroupUpdate) ClearEpisodeRound ¶
func (cgu *ChallengeGroupUpdate) ClearEpisodeRound() *ChallengeGroupUpdate
ClearEpisodeRound clears all "episode_round" edges to the EpisodeRound entity.
func (*ChallengeGroupUpdate) Exec ¶
func (cgu *ChallengeGroupUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ChallengeGroupUpdate) ExecX ¶
func (cgu *ChallengeGroupUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChallengeGroupUpdate) Mutation ¶
func (cgu *ChallengeGroupUpdate) Mutation() *ChallengeGroupMutation
Mutation returns the ChallengeGroupMutation object of the builder.
func (*ChallengeGroupUpdate) RemoveCategory ¶
func (cgu *ChallengeGroupUpdate) RemoveCategory(c ...*Category) *ChallengeGroupUpdate
RemoveCategory removes "category" edges to Category entities.
func (*ChallengeGroupUpdate) RemoveCategoryIDs ¶
func (cgu *ChallengeGroupUpdate) RemoveCategoryIDs(ids ...int) *ChallengeGroupUpdate
RemoveCategoryIDs removes the "category" edge to Category entities by IDs.
func (*ChallengeGroupUpdate) RemoveChallengeIDs ¶
func (cgu *ChallengeGroupUpdate) RemoveChallengeIDs(ids ...int) *ChallengeGroupUpdate
RemoveChallengeIDs removes the "challenges" edge to Challenge entities by IDs.
func (*ChallengeGroupUpdate) RemoveChallenges ¶
func (cgu *ChallengeGroupUpdate) RemoveChallenges(c ...*Challenge) *ChallengeGroupUpdate
RemoveChallenges removes "challenges" edges to Challenge entities.
func (*ChallengeGroupUpdate) RemoveEpisodeRound ¶
func (cgu *ChallengeGroupUpdate) RemoveEpisodeRound(e ...*EpisodeRound) *ChallengeGroupUpdate
RemoveEpisodeRound removes "episode_round" edges to EpisodeRound entities.
func (*ChallengeGroupUpdate) RemoveEpisodeRoundIDs ¶
func (cgu *ChallengeGroupUpdate) RemoveEpisodeRoundIDs(ids ...int) *ChallengeGroupUpdate
RemoveEpisodeRoundIDs removes the "episode_round" edge to EpisodeRound entities by IDs.
func (*ChallengeGroupUpdate) Save ¶
func (cgu *ChallengeGroupUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ChallengeGroupUpdate) SaveX ¶
func (cgu *ChallengeGroupUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ChallengeGroupUpdate) Where ¶
func (cgu *ChallengeGroupUpdate) Where(ps ...predicate.ChallengeGroup) *ChallengeGroupUpdate
Where appends a list predicates to the ChallengeGroupUpdate builder.
type ChallengeGroupUpdateOne ¶
type ChallengeGroupUpdateOne struct {
// contains filtered or unexported fields
}
ChallengeGroupUpdateOne is the builder for updating a single ChallengeGroup entity.
func (*ChallengeGroupUpdateOne) AddCategory ¶
func (cguo *ChallengeGroupUpdateOne) AddCategory(c ...*Category) *ChallengeGroupUpdateOne
AddCategory adds the "category" edges to the Category entity.
func (*ChallengeGroupUpdateOne) AddCategoryIDs ¶
func (cguo *ChallengeGroupUpdateOne) AddCategoryIDs(ids ...int) *ChallengeGroupUpdateOne
AddCategoryIDs adds the "category" edge to the Category entity by IDs.
func (*ChallengeGroupUpdateOne) AddChallengeIDs ¶
func (cguo *ChallengeGroupUpdateOne) AddChallengeIDs(ids ...int) *ChallengeGroupUpdateOne
AddChallengeIDs adds the "challenges" edge to the Challenge entity by IDs.
func (*ChallengeGroupUpdateOne) AddChallenges ¶
func (cguo *ChallengeGroupUpdateOne) AddChallenges(c ...*Challenge) *ChallengeGroupUpdateOne
AddChallenges adds the "challenges" edges to the Challenge entity.
func (*ChallengeGroupUpdateOne) AddEpisodeRound ¶
func (cguo *ChallengeGroupUpdateOne) AddEpisodeRound(e ...*EpisodeRound) *ChallengeGroupUpdateOne
AddEpisodeRound adds the "episode_round" edges to the EpisodeRound entity.
func (*ChallengeGroupUpdateOne) AddEpisodeRoundIDs ¶
func (cguo *ChallengeGroupUpdateOne) AddEpisodeRoundIDs(ids ...int) *ChallengeGroupUpdateOne
AddEpisodeRoundIDs adds the "episode_round" edge to the EpisodeRound entity by IDs.
func (*ChallengeGroupUpdateOne) ClearCategory ¶
func (cguo *ChallengeGroupUpdateOne) ClearCategory() *ChallengeGroupUpdateOne
ClearCategory clears all "category" edges to the Category entity.
func (*ChallengeGroupUpdateOne) ClearChallenges ¶
func (cguo *ChallengeGroupUpdateOne) ClearChallenges() *ChallengeGroupUpdateOne
ClearChallenges clears all "challenges" edges to the Challenge entity.
func (*ChallengeGroupUpdateOne) ClearEpisodeRound ¶
func (cguo *ChallengeGroupUpdateOne) ClearEpisodeRound() *ChallengeGroupUpdateOne
ClearEpisodeRound clears all "episode_round" edges to the EpisodeRound entity.
func (*ChallengeGroupUpdateOne) Exec ¶
func (cguo *ChallengeGroupUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ChallengeGroupUpdateOne) ExecX ¶
func (cguo *ChallengeGroupUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChallengeGroupUpdateOne) Mutation ¶
func (cguo *ChallengeGroupUpdateOne) Mutation() *ChallengeGroupMutation
Mutation returns the ChallengeGroupMutation object of the builder.
func (*ChallengeGroupUpdateOne) RemoveCategory ¶
func (cguo *ChallengeGroupUpdateOne) RemoveCategory(c ...*Category) *ChallengeGroupUpdateOne
RemoveCategory removes "category" edges to Category entities.
func (*ChallengeGroupUpdateOne) RemoveCategoryIDs ¶
func (cguo *ChallengeGroupUpdateOne) RemoveCategoryIDs(ids ...int) *ChallengeGroupUpdateOne
RemoveCategoryIDs removes the "category" edge to Category entities by IDs.
func (*ChallengeGroupUpdateOne) RemoveChallengeIDs ¶
func (cguo *ChallengeGroupUpdateOne) RemoveChallengeIDs(ids ...int) *ChallengeGroupUpdateOne
RemoveChallengeIDs removes the "challenges" edge to Challenge entities by IDs.
func (*ChallengeGroupUpdateOne) RemoveChallenges ¶
func (cguo *ChallengeGroupUpdateOne) RemoveChallenges(c ...*Challenge) *ChallengeGroupUpdateOne
RemoveChallenges removes "challenges" edges to Challenge entities.
func (*ChallengeGroupUpdateOne) RemoveEpisodeRound ¶
func (cguo *ChallengeGroupUpdateOne) RemoveEpisodeRound(e ...*EpisodeRound) *ChallengeGroupUpdateOne
RemoveEpisodeRound removes "episode_round" edges to EpisodeRound entities.
func (*ChallengeGroupUpdateOne) RemoveEpisodeRoundIDs ¶
func (cguo *ChallengeGroupUpdateOne) RemoveEpisodeRoundIDs(ids ...int) *ChallengeGroupUpdateOne
RemoveEpisodeRoundIDs removes the "episode_round" edge to EpisodeRound entities by IDs.
func (*ChallengeGroupUpdateOne) Save ¶
func (cguo *ChallengeGroupUpdateOne) Save(ctx context.Context) (*ChallengeGroup, error)
Save executes the query and returns the updated ChallengeGroup entity.
func (*ChallengeGroupUpdateOne) SaveX ¶
func (cguo *ChallengeGroupUpdateOne) SaveX(ctx context.Context) *ChallengeGroup
SaveX is like Save, but panics if an error occurs.
func (*ChallengeGroupUpdateOne) Select ¶
func (cguo *ChallengeGroupUpdateOne) Select(field string, fields ...string) *ChallengeGroupUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ChallengeGroupUpdateOne) Where ¶
func (cguo *ChallengeGroupUpdateOne) Where(ps ...predicate.ChallengeGroup) *ChallengeGroupUpdateOne
Where appends a list predicates to the ChallengeGroupUpdate builder.
type ChallengeGroups ¶
type ChallengeGroups []*ChallengeGroup
ChallengeGroups is a parsable slice of ChallengeGroup.
type ChallengeMutation ¶
type ChallengeMutation struct {
// contains filtered or unexported fields
}
ChallengeMutation represents an operation that mutates the Challenge nodes in the graph.
func (*ChallengeMutation) AddChallengeGroupIDs ¶
func (m *ChallengeMutation) AddChallengeGroupIDs(ids ...int)
AddChallengeGroupIDs adds the "challenge_group" edge to the ChallengeGroup entity by ids.
func (*ChallengeMutation) AddField ¶
func (m *ChallengeMutation) 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 (*ChallengeMutation) AddValue ¶
func (m *ChallengeMutation) AddValue(i int)
AddValue adds i to the "value" field.
func (*ChallengeMutation) AddedEdges ¶
func (m *ChallengeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ChallengeMutation) AddedField ¶
func (m *ChallengeMutation) 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 (*ChallengeMutation) AddedFields ¶
func (m *ChallengeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ChallengeMutation) AddedIDs ¶
func (m *ChallengeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ChallengeMutation) AddedValue ¶
func (m *ChallengeMutation) AddedValue() (r int, exists bool)
AddedValue returns the value that was added to the "value" field in this mutation.
func (*ChallengeMutation) ChallengeGroupCleared ¶
func (m *ChallengeMutation) ChallengeGroupCleared() bool
ChallengeGroupCleared reports if the "challenge_group" edge to the ChallengeGroup entity was cleared.
func (*ChallengeMutation) ChallengeGroupIDs ¶
func (m *ChallengeMutation) ChallengeGroupIDs() (ids []int)
ChallengeGroupIDs returns the "challenge_group" edge IDs in the mutation.
func (*ChallengeMutation) ClearChallengeGroup ¶
func (m *ChallengeMutation) ClearChallengeGroup()
ClearChallengeGroup clears the "challenge_group" edge to the ChallengeGroup entity.
func (*ChallengeMutation) ClearEdge ¶
func (m *ChallengeMutation) 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 (*ChallengeMutation) ClearField ¶
func (m *ChallengeMutation) 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 (*ChallengeMutation) ClearedEdges ¶
func (m *ChallengeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ChallengeMutation) ClearedFields ¶
func (m *ChallengeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ChallengeMutation) Client ¶
func (m ChallengeMutation) 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 (*ChallengeMutation) EdgeCleared ¶
func (m *ChallengeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ChallengeMutation) Field ¶
func (m *ChallengeMutation) 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 (*ChallengeMutation) FieldCleared ¶
func (m *ChallengeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ChallengeMutation) Fields ¶
func (m *ChallengeMutation) 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 (*ChallengeMutation) ID ¶
func (m *ChallengeMutation) 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 (*ChallengeMutation) IDs ¶
func (m *ChallengeMutation) 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 (*ChallengeMutation) Media ¶
func (m *ChallengeMutation) Media() (r string, exists bool)
Media returns the value of the "media" field in the mutation.
func (*ChallengeMutation) OldField ¶
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 (*ChallengeMutation) OldMedia ¶
func (m *ChallengeMutation) OldMedia(ctx context.Context) (v string, err error)
OldMedia returns the old "media" field's value of the Challenge entity. If the Challenge 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 (*ChallengeMutation) OldPrompt ¶
func (m *ChallengeMutation) OldPrompt(ctx context.Context) (v string, err error)
OldPrompt returns the old "prompt" field's value of the Challenge entity. If the Challenge 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 (*ChallengeMutation) OldResponse ¶
func (m *ChallengeMutation) OldResponse(ctx context.Context) (v string, err error)
OldResponse returns the old "response" field's value of the Challenge entity. If the Challenge 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 (*ChallengeMutation) OldValue ¶
func (m *ChallengeMutation) OldValue(ctx context.Context) (v int, err error)
OldValue returns the old "value" field's value of the Challenge entity. If the Challenge 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 (*ChallengeMutation) Prompt ¶
func (m *ChallengeMutation) Prompt() (r string, exists bool)
Prompt returns the value of the "prompt" field in the mutation.
func (*ChallengeMutation) RemoveChallengeGroupIDs ¶
func (m *ChallengeMutation) RemoveChallengeGroupIDs(ids ...int)
RemoveChallengeGroupIDs removes the "challenge_group" edge to the ChallengeGroup entity by IDs.
func (*ChallengeMutation) RemovedChallengeGroupIDs ¶
func (m *ChallengeMutation) RemovedChallengeGroupIDs() (ids []int)
RemovedChallengeGroup returns the removed IDs of the "challenge_group" edge to the ChallengeGroup entity.
func (*ChallengeMutation) RemovedEdges ¶
func (m *ChallengeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ChallengeMutation) RemovedIDs ¶
func (m *ChallengeMutation) 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 (*ChallengeMutation) ResetChallengeGroup ¶
func (m *ChallengeMutation) ResetChallengeGroup()
ResetChallengeGroup resets all changes to the "challenge_group" edge.
func (*ChallengeMutation) ResetEdge ¶
func (m *ChallengeMutation) 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 (*ChallengeMutation) ResetField ¶
func (m *ChallengeMutation) 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 (*ChallengeMutation) ResetMedia ¶
func (m *ChallengeMutation) ResetMedia()
ResetMedia resets all changes to the "media" field.
func (*ChallengeMutation) ResetPrompt ¶
func (m *ChallengeMutation) ResetPrompt()
ResetPrompt resets all changes to the "prompt" field.
func (*ChallengeMutation) ResetResponse ¶
func (m *ChallengeMutation) ResetResponse()
ResetResponse resets all changes to the "response" field.
func (*ChallengeMutation) ResetValue ¶
func (m *ChallengeMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*ChallengeMutation) Response ¶
func (m *ChallengeMutation) Response() (r string, exists bool)
Response returns the value of the "response" field in the mutation.
func (*ChallengeMutation) SetField ¶
func (m *ChallengeMutation) 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 (*ChallengeMutation) SetMedia ¶
func (m *ChallengeMutation) SetMedia(s string)
SetMedia sets the "media" field.
func (*ChallengeMutation) SetOp ¶
func (m *ChallengeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ChallengeMutation) SetPrompt ¶
func (m *ChallengeMutation) SetPrompt(s string)
SetPrompt sets the "prompt" field.
func (*ChallengeMutation) SetResponse ¶
func (m *ChallengeMutation) SetResponse(s string)
SetResponse sets the "response" field.
func (*ChallengeMutation) SetValue ¶
func (m *ChallengeMutation) SetValue(i int)
SetValue sets the "value" field.
func (ChallengeMutation) Tx ¶
func (m ChallengeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ChallengeMutation) Type ¶
func (m *ChallengeMutation) Type() string
Type returns the node type of this mutation (Challenge).
func (*ChallengeMutation) Value ¶
func (m *ChallengeMutation) Value() (r int, exists bool)
Value returns the value of the "value" field in the mutation.
func (*ChallengeMutation) Where ¶
func (m *ChallengeMutation) Where(ps ...predicate.Challenge)
Where appends a list predicates to the ChallengeMutation builder.
func (*ChallengeMutation) WhereP ¶
func (m *ChallengeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ChallengeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ChallengeQuery ¶
type ChallengeQuery struct {
// contains filtered or unexported fields
}
ChallengeQuery is the builder for querying Challenge entities.
func (*ChallengeQuery) Aggregate ¶
func (cq *ChallengeQuery) Aggregate(fns ...AggregateFunc) *ChallengeSelect
Aggregate returns a ChallengeSelect configured with the given aggregations.
func (*ChallengeQuery) All ¶
func (cq *ChallengeQuery) All(ctx context.Context) ([]*Challenge, error)
All executes the query and returns a list of Challenges.
func (*ChallengeQuery) AllX ¶
func (cq *ChallengeQuery) AllX(ctx context.Context) []*Challenge
AllX is like All, but panics if an error occurs.
func (*ChallengeQuery) Clone ¶
func (cq *ChallengeQuery) Clone() *ChallengeQuery
Clone returns a duplicate of the ChallengeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ChallengeQuery) Count ¶
func (cq *ChallengeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ChallengeQuery) CountX ¶
func (cq *ChallengeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ChallengeQuery) Exist ¶
func (cq *ChallengeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ChallengeQuery) ExistX ¶
func (cq *ChallengeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ChallengeQuery) First ¶
func (cq *ChallengeQuery) First(ctx context.Context) (*Challenge, error)
First returns the first Challenge entity from the query. Returns a *NotFoundError when no Challenge was found.
func (*ChallengeQuery) FirstID ¶
func (cq *ChallengeQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Challenge ID from the query. Returns a *NotFoundError when no Challenge ID was found.
func (*ChallengeQuery) FirstIDX ¶
func (cq *ChallengeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ChallengeQuery) FirstX ¶
func (cq *ChallengeQuery) FirstX(ctx context.Context) *Challenge
FirstX is like First, but panics if an error occurs.
func (*ChallengeQuery) GroupBy ¶
func (cq *ChallengeQuery) GroupBy(field string, fields ...string) *ChallengeGroupBy
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 { Media string `json:"media,omitempty"` Count int `json:"count,omitempty"` } client.Challenge.Query(). GroupBy(challenge.FieldMedia). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ChallengeQuery) IDs ¶
func (cq *ChallengeQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Challenge IDs.
func (*ChallengeQuery) IDsX ¶
func (cq *ChallengeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ChallengeQuery) Limit ¶
func (cq *ChallengeQuery) Limit(limit int) *ChallengeQuery
Limit the number of records to be returned by this query.
func (*ChallengeQuery) Offset ¶
func (cq *ChallengeQuery) Offset(offset int) *ChallengeQuery
Offset to start from.
func (*ChallengeQuery) Only ¶
func (cq *ChallengeQuery) Only(ctx context.Context) (*Challenge, error)
Only returns a single Challenge entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Challenge entity is found. Returns a *NotFoundError when no Challenge entities are found.
func (*ChallengeQuery) OnlyID ¶
func (cq *ChallengeQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Challenge ID in the query. Returns a *NotSingularError when more than one Challenge ID is found. Returns a *NotFoundError when no entities are found.
func (*ChallengeQuery) OnlyIDX ¶
func (cq *ChallengeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ChallengeQuery) OnlyX ¶
func (cq *ChallengeQuery) OnlyX(ctx context.Context) *Challenge
OnlyX is like Only, but panics if an error occurs.
func (*ChallengeQuery) Order ¶
func (cq *ChallengeQuery) Order(o ...challenge.OrderOption) *ChallengeQuery
Order specifies how the records should be ordered.
func (*ChallengeQuery) QueryChallengeGroup ¶
func (cq *ChallengeQuery) QueryChallengeGroup() *ChallengeGroupQuery
QueryChallengeGroup chains the current query on the "challenge_group" edge.
func (*ChallengeQuery) Select ¶
func (cq *ChallengeQuery) Select(fields ...string) *ChallengeSelect
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 { Media string `json:"media,omitempty"` } client.Challenge.Query(). Select(challenge.FieldMedia). Scan(ctx, &v)
func (*ChallengeQuery) Unique ¶
func (cq *ChallengeQuery) Unique(unique bool) *ChallengeQuery
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 (*ChallengeQuery) Where ¶
func (cq *ChallengeQuery) Where(ps ...predicate.Challenge) *ChallengeQuery
Where adds a new predicate for the ChallengeQuery builder.
func (*ChallengeQuery) WithChallengeGroup ¶
func (cq *ChallengeQuery) WithChallengeGroup(opts ...func(*ChallengeGroupQuery)) *ChallengeQuery
WithChallengeGroup tells the query-builder to eager-load the nodes that are connected to the "challenge_group" edge. The optional arguments are used to configure the query builder of the edge.
type ChallengeSelect ¶
type ChallengeSelect struct { *ChallengeQuery // contains filtered or unexported fields }
ChallengeSelect is the builder for selecting fields of Challenge entities.
func (*ChallengeSelect) Aggregate ¶
func (cs *ChallengeSelect) Aggregate(fns ...AggregateFunc) *ChallengeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ChallengeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ChallengeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ChallengeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ChallengeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ChallengeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ChallengeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ChallengeSelect) Scan ¶
func (cs *ChallengeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ChallengeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ChallengeUpdate ¶
type ChallengeUpdate struct {
// contains filtered or unexported fields
}
ChallengeUpdate is the builder for updating Challenge entities.
func (*ChallengeUpdate) AddChallengeGroup ¶
func (cu *ChallengeUpdate) AddChallengeGroup(c ...*ChallengeGroup) *ChallengeUpdate
AddChallengeGroup adds the "challenge_group" edges to the ChallengeGroup entity.
func (*ChallengeUpdate) AddChallengeGroupIDs ¶
func (cu *ChallengeUpdate) AddChallengeGroupIDs(ids ...int) *ChallengeUpdate
AddChallengeGroupIDs adds the "challenge_group" edge to the ChallengeGroup entity by IDs.
func (*ChallengeUpdate) AddValue ¶
func (cu *ChallengeUpdate) AddValue(i int) *ChallengeUpdate
AddValue adds i to the "value" field.
func (*ChallengeUpdate) ClearChallengeGroup ¶
func (cu *ChallengeUpdate) ClearChallengeGroup() *ChallengeUpdate
ClearChallengeGroup clears all "challenge_group" edges to the ChallengeGroup entity.
func (*ChallengeUpdate) Exec ¶
func (cu *ChallengeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ChallengeUpdate) ExecX ¶
func (cu *ChallengeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChallengeUpdate) Mutation ¶
func (cu *ChallengeUpdate) Mutation() *ChallengeMutation
Mutation returns the ChallengeMutation object of the builder.
func (*ChallengeUpdate) RemoveChallengeGroup ¶
func (cu *ChallengeUpdate) RemoveChallengeGroup(c ...*ChallengeGroup) *ChallengeUpdate
RemoveChallengeGroup removes "challenge_group" edges to ChallengeGroup entities.
func (*ChallengeUpdate) RemoveChallengeGroupIDs ¶
func (cu *ChallengeUpdate) RemoveChallengeGroupIDs(ids ...int) *ChallengeUpdate
RemoveChallengeGroupIDs removes the "challenge_group" edge to ChallengeGroup entities by IDs.
func (*ChallengeUpdate) Save ¶
func (cu *ChallengeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ChallengeUpdate) SaveX ¶
func (cu *ChallengeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ChallengeUpdate) SetMedia ¶
func (cu *ChallengeUpdate) SetMedia(s string) *ChallengeUpdate
SetMedia sets the "media" field.
func (*ChallengeUpdate) SetNillableMedia ¶
func (cu *ChallengeUpdate) SetNillableMedia(s *string) *ChallengeUpdate
SetNillableMedia sets the "media" field if the given value is not nil.
func (*ChallengeUpdate) SetNillablePrompt ¶
func (cu *ChallengeUpdate) SetNillablePrompt(s *string) *ChallengeUpdate
SetNillablePrompt sets the "prompt" field if the given value is not nil.
func (*ChallengeUpdate) SetNillableResponse ¶
func (cu *ChallengeUpdate) SetNillableResponse(s *string) *ChallengeUpdate
SetNillableResponse sets the "response" field if the given value is not nil.
func (*ChallengeUpdate) SetNillableValue ¶
func (cu *ChallengeUpdate) SetNillableValue(i *int) *ChallengeUpdate
SetNillableValue sets the "value" field if the given value is not nil.
func (*ChallengeUpdate) SetPrompt ¶
func (cu *ChallengeUpdate) SetPrompt(s string) *ChallengeUpdate
SetPrompt sets the "prompt" field.
func (*ChallengeUpdate) SetResponse ¶
func (cu *ChallengeUpdate) SetResponse(s string) *ChallengeUpdate
SetResponse sets the "response" field.
func (*ChallengeUpdate) SetValue ¶
func (cu *ChallengeUpdate) SetValue(i int) *ChallengeUpdate
SetValue sets the "value" field.
func (*ChallengeUpdate) Where ¶
func (cu *ChallengeUpdate) Where(ps ...predicate.Challenge) *ChallengeUpdate
Where appends a list predicates to the ChallengeUpdate builder.
type ChallengeUpdateOne ¶
type ChallengeUpdateOne struct {
// contains filtered or unexported fields
}
ChallengeUpdateOne is the builder for updating a single Challenge entity.
func (*ChallengeUpdateOne) AddChallengeGroup ¶
func (cuo *ChallengeUpdateOne) AddChallengeGroup(c ...*ChallengeGroup) *ChallengeUpdateOne
AddChallengeGroup adds the "challenge_group" edges to the ChallengeGroup entity.
func (*ChallengeUpdateOne) AddChallengeGroupIDs ¶
func (cuo *ChallengeUpdateOne) AddChallengeGroupIDs(ids ...int) *ChallengeUpdateOne
AddChallengeGroupIDs adds the "challenge_group" edge to the ChallengeGroup entity by IDs.
func (*ChallengeUpdateOne) AddValue ¶
func (cuo *ChallengeUpdateOne) AddValue(i int) *ChallengeUpdateOne
AddValue adds i to the "value" field.
func (*ChallengeUpdateOne) ClearChallengeGroup ¶
func (cuo *ChallengeUpdateOne) ClearChallengeGroup() *ChallengeUpdateOne
ClearChallengeGroup clears all "challenge_group" edges to the ChallengeGroup entity.
func (*ChallengeUpdateOne) Exec ¶
func (cuo *ChallengeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ChallengeUpdateOne) ExecX ¶
func (cuo *ChallengeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChallengeUpdateOne) Mutation ¶
func (cuo *ChallengeUpdateOne) Mutation() *ChallengeMutation
Mutation returns the ChallengeMutation object of the builder.
func (*ChallengeUpdateOne) RemoveChallengeGroup ¶
func (cuo *ChallengeUpdateOne) RemoveChallengeGroup(c ...*ChallengeGroup) *ChallengeUpdateOne
RemoveChallengeGroup removes "challenge_group" edges to ChallengeGroup entities.
func (*ChallengeUpdateOne) RemoveChallengeGroupIDs ¶
func (cuo *ChallengeUpdateOne) RemoveChallengeGroupIDs(ids ...int) *ChallengeUpdateOne
RemoveChallengeGroupIDs removes the "challenge_group" edge to ChallengeGroup entities by IDs.
func (*ChallengeUpdateOne) Save ¶
func (cuo *ChallengeUpdateOne) Save(ctx context.Context) (*Challenge, error)
Save executes the query and returns the updated Challenge entity.
func (*ChallengeUpdateOne) SaveX ¶
func (cuo *ChallengeUpdateOne) SaveX(ctx context.Context) *Challenge
SaveX is like Save, but panics if an error occurs.
func (*ChallengeUpdateOne) Select ¶
func (cuo *ChallengeUpdateOne) Select(field string, fields ...string) *ChallengeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ChallengeUpdateOne) SetMedia ¶
func (cuo *ChallengeUpdateOne) SetMedia(s string) *ChallengeUpdateOne
SetMedia sets the "media" field.
func (*ChallengeUpdateOne) SetNillableMedia ¶
func (cuo *ChallengeUpdateOne) SetNillableMedia(s *string) *ChallengeUpdateOne
SetNillableMedia sets the "media" field if the given value is not nil.
func (*ChallengeUpdateOne) SetNillablePrompt ¶
func (cuo *ChallengeUpdateOne) SetNillablePrompt(s *string) *ChallengeUpdateOne
SetNillablePrompt sets the "prompt" field if the given value is not nil.
func (*ChallengeUpdateOne) SetNillableResponse ¶
func (cuo *ChallengeUpdateOne) SetNillableResponse(s *string) *ChallengeUpdateOne
SetNillableResponse sets the "response" field if the given value is not nil.
func (*ChallengeUpdateOne) SetNillableValue ¶
func (cuo *ChallengeUpdateOne) SetNillableValue(i *int) *ChallengeUpdateOne
SetNillableValue sets the "value" field if the given value is not nil.
func (*ChallengeUpdateOne) SetPrompt ¶
func (cuo *ChallengeUpdateOne) SetPrompt(s string) *ChallengeUpdateOne
SetPrompt sets the "prompt" field.
func (*ChallengeUpdateOne) SetResponse ¶
func (cuo *ChallengeUpdateOne) SetResponse(s string) *ChallengeUpdateOne
SetResponse sets the "response" field.
func (*ChallengeUpdateOne) SetValue ¶
func (cuo *ChallengeUpdateOne) SetValue(i int) *ChallengeUpdateOne
SetValue sets the "value" field.
func (*ChallengeUpdateOne) Where ¶
func (cuo *ChallengeUpdateOne) Where(ps ...predicate.Challenge) *ChallengeUpdateOne
Where appends a list predicates to the ChallengeUpdate builder.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Category is the client for interacting with the Category builders. Category *CategoryClient // Challenge is the client for interacting with the Challenge builders. Challenge *ChallengeClient // ChallengeGroup is the client for interacting with the ChallengeGroup builders. ChallengeGroup *ChallengeGroupClient // Episode is the client for interacting with the Episode builders. Episode *EpisodeClient // EpisodeRound is the client for interacting with the EpisodeRound builders. EpisodeRound *EpisodeRoundClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
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) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). Category. 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(...)`.
type CommitFunc ¶
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.
type CommitHook ¶
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 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 Episode ¶
type Episode struct { // ID of the ent. ID int `json:"id,omitempty"` // Aired holds the value of the "aired" field. Aired time.Time `json:"aired,omitempty"` // Difficulty holds the value of the "difficulty" field. Difficulty episode.Difficulty `json:"difficulty,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the EpisodeQuery when eager-loading is set. Edges EpisodeEdges `json:"edges"` // contains filtered or unexported fields }
Episode is the model entity for the Episode schema.
func (*Episode) QueryRounds ¶
func (e *Episode) QueryRounds() *EpisodeRoundQuery
QueryRounds queries the "rounds" edge of the Episode entity.
func (*Episode) Unwrap ¶
Unwrap unwraps the Episode 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 (*Episode) Update ¶
func (e *Episode) Update() *EpisodeUpdateOne
Update returns a builder for updating this Episode. Note that you need to call Episode.Unwrap() before calling this method if this Episode was returned from a transaction, and the transaction was committed or rolled back.
type EpisodeClient ¶
type EpisodeClient struct {
// contains filtered or unexported fields
}
EpisodeClient is a client for the Episode schema.
func NewEpisodeClient ¶
func NewEpisodeClient(c config) *EpisodeClient
NewEpisodeClient returns a client for the Episode from the given config.
func (*EpisodeClient) Create ¶
func (c *EpisodeClient) Create() *EpisodeCreate
Create returns a builder for creating a Episode entity.
func (*EpisodeClient) CreateBulk ¶
func (c *EpisodeClient) CreateBulk(builders ...*EpisodeCreate) *EpisodeCreateBulk
CreateBulk returns a builder for creating a bulk of Episode entities.
func (*EpisodeClient) Delete ¶
func (c *EpisodeClient) Delete() *EpisodeDelete
Delete returns a delete builder for Episode.
func (*EpisodeClient) DeleteOne ¶
func (c *EpisodeClient) DeleteOne(e *Episode) *EpisodeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*EpisodeClient) DeleteOneID ¶
func (c *EpisodeClient) DeleteOneID(id int) *EpisodeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*EpisodeClient) GetX ¶
func (c *EpisodeClient) GetX(ctx context.Context, id int) *Episode
GetX is like Get, but panics if an error occurs.
func (*EpisodeClient) Hooks ¶
func (c *EpisodeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*EpisodeClient) Intercept ¶
func (c *EpisodeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `episode.Intercept(f(g(h())))`.
func (*EpisodeClient) Interceptors ¶
func (c *EpisodeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*EpisodeClient) MapCreateBulk ¶
func (c *EpisodeClient) MapCreateBulk(slice any, setFunc func(*EpisodeCreate, int)) *EpisodeCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*EpisodeClient) Query ¶
func (c *EpisodeClient) Query() *EpisodeQuery
Query returns a query builder for Episode.
func (*EpisodeClient) QueryRounds ¶
func (c *EpisodeClient) QueryRounds(e *Episode) *EpisodeRoundQuery
QueryRounds queries the rounds edge of a Episode.
func (*EpisodeClient) Update ¶
func (c *EpisodeClient) Update() *EpisodeUpdate
Update returns an update builder for Episode.
func (*EpisodeClient) UpdateOne ¶
func (c *EpisodeClient) UpdateOne(e *Episode) *EpisodeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*EpisodeClient) UpdateOneID ¶
func (c *EpisodeClient) UpdateOneID(id int) *EpisodeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*EpisodeClient) Use ¶
func (c *EpisodeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `episode.Hooks(f(g(h())))`.
type EpisodeCreate ¶
type EpisodeCreate struct {
// contains filtered or unexported fields
}
EpisodeCreate is the builder for creating a Episode entity.
func (*EpisodeCreate) AddRoundIDs ¶
func (ec *EpisodeCreate) AddRoundIDs(ids ...int) *EpisodeCreate
AddRoundIDs adds the "rounds" edge to the EpisodeRound entity by IDs.
func (*EpisodeCreate) AddRounds ¶
func (ec *EpisodeCreate) AddRounds(e ...*EpisodeRound) *EpisodeCreate
AddRounds adds the "rounds" edges to the EpisodeRound entity.
func (*EpisodeCreate) Exec ¶
func (ec *EpisodeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*EpisodeCreate) ExecX ¶
func (ec *EpisodeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EpisodeCreate) Mutation ¶
func (ec *EpisodeCreate) Mutation() *EpisodeMutation
Mutation returns the EpisodeMutation object of the builder.
func (*EpisodeCreate) Save ¶
func (ec *EpisodeCreate) Save(ctx context.Context) (*Episode, error)
Save creates the Episode in the database.
func (*EpisodeCreate) SaveX ¶
func (ec *EpisodeCreate) SaveX(ctx context.Context) *Episode
SaveX calls Save and panics if Save returns an error.
func (*EpisodeCreate) SetAired ¶
func (ec *EpisodeCreate) SetAired(t time.Time) *EpisodeCreate
SetAired sets the "aired" field.
func (*EpisodeCreate) SetDifficulty ¶
func (ec *EpisodeCreate) SetDifficulty(e episode.Difficulty) *EpisodeCreate
SetDifficulty sets the "difficulty" field.
type EpisodeCreateBulk ¶
type EpisodeCreateBulk struct {
// contains filtered or unexported fields
}
EpisodeCreateBulk is the builder for creating many Episode entities in bulk.
func (*EpisodeCreateBulk) Exec ¶
func (ecb *EpisodeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*EpisodeCreateBulk) ExecX ¶
func (ecb *EpisodeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type EpisodeDelete ¶
type EpisodeDelete struct {
// contains filtered or unexported fields
}
EpisodeDelete is the builder for deleting a Episode entity.
func (*EpisodeDelete) Exec ¶
func (ed *EpisodeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*EpisodeDelete) ExecX ¶
func (ed *EpisodeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*EpisodeDelete) Where ¶
func (ed *EpisodeDelete) Where(ps ...predicate.Episode) *EpisodeDelete
Where appends a list predicates to the EpisodeDelete builder.
type EpisodeDeleteOne ¶
type EpisodeDeleteOne struct {
// contains filtered or unexported fields
}
EpisodeDeleteOne is the builder for deleting a single Episode entity.
func (*EpisodeDeleteOne) Exec ¶
func (edo *EpisodeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*EpisodeDeleteOne) ExecX ¶
func (edo *EpisodeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EpisodeDeleteOne) Where ¶
func (edo *EpisodeDeleteOne) Where(ps ...predicate.Episode) *EpisodeDeleteOne
Where appends a list predicates to the EpisodeDelete builder.
type EpisodeEdges ¶
type EpisodeEdges struct { // Rounds holds the value of the rounds edge. Rounds []*EpisodeRound `json:"rounds,omitempty"` // contains filtered or unexported fields }
EpisodeEdges holds the relations/edges for other nodes in the graph.
func (EpisodeEdges) RoundsOrErr ¶
func (e EpisodeEdges) RoundsOrErr() ([]*EpisodeRound, error)
RoundsOrErr returns the Rounds value or an error if the edge was not loaded in eager-loading.
type EpisodeGroupBy ¶
type EpisodeGroupBy struct {
// contains filtered or unexported fields
}
EpisodeGroupBy is the group-by builder for Episode entities.
func (*EpisodeGroupBy) Aggregate ¶
func (egb *EpisodeGroupBy) Aggregate(fns ...AggregateFunc) *EpisodeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*EpisodeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EpisodeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EpisodeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EpisodeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EpisodeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EpisodeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EpisodeGroupBy) Scan ¶
func (egb *EpisodeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EpisodeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EpisodeMutation ¶
type EpisodeMutation struct {
// contains filtered or unexported fields
}
EpisodeMutation represents an operation that mutates the Episode nodes in the graph.
func (*EpisodeMutation) AddField ¶
func (m *EpisodeMutation) 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 (*EpisodeMutation) AddRoundIDs ¶
func (m *EpisodeMutation) AddRoundIDs(ids ...int)
AddRoundIDs adds the "rounds" edge to the EpisodeRound entity by ids.
func (*EpisodeMutation) AddedEdges ¶
func (m *EpisodeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*EpisodeMutation) AddedField ¶
func (m *EpisodeMutation) 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 (*EpisodeMutation) AddedFields ¶
func (m *EpisodeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*EpisodeMutation) AddedIDs ¶
func (m *EpisodeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*EpisodeMutation) Aired ¶
func (m *EpisodeMutation) Aired() (r time.Time, exists bool)
Aired returns the value of the "aired" field in the mutation.
func (*EpisodeMutation) ClearEdge ¶
func (m *EpisodeMutation) 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 (*EpisodeMutation) ClearField ¶
func (m *EpisodeMutation) 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 (*EpisodeMutation) ClearRounds ¶
func (m *EpisodeMutation) ClearRounds()
ClearRounds clears the "rounds" edge to the EpisodeRound entity.
func (*EpisodeMutation) ClearedEdges ¶
func (m *EpisodeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*EpisodeMutation) ClearedFields ¶
func (m *EpisodeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (EpisodeMutation) Client ¶
func (m EpisodeMutation) 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 (*EpisodeMutation) Difficulty ¶
func (m *EpisodeMutation) Difficulty() (r episode.Difficulty, exists bool)
Difficulty returns the value of the "difficulty" field in the mutation.
func (*EpisodeMutation) EdgeCleared ¶
func (m *EpisodeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*EpisodeMutation) Field ¶
func (m *EpisodeMutation) 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 (*EpisodeMutation) FieldCleared ¶
func (m *EpisodeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*EpisodeMutation) Fields ¶
func (m *EpisodeMutation) 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 (*EpisodeMutation) ID ¶
func (m *EpisodeMutation) 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 (*EpisodeMutation) IDs ¶
func (m *EpisodeMutation) 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 (*EpisodeMutation) OldAired ¶
OldAired returns the old "aired" field's value of the Episode entity. If the Episode 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 (*EpisodeMutation) OldDifficulty ¶
func (m *EpisodeMutation) OldDifficulty(ctx context.Context) (v episode.Difficulty, err error)
OldDifficulty returns the old "difficulty" field's value of the Episode entity. If the Episode 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 (*EpisodeMutation) OldField ¶
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 (*EpisodeMutation) RemoveRoundIDs ¶
func (m *EpisodeMutation) RemoveRoundIDs(ids ...int)
RemoveRoundIDs removes the "rounds" edge to the EpisodeRound entity by IDs.
func (*EpisodeMutation) RemovedEdges ¶
func (m *EpisodeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*EpisodeMutation) RemovedIDs ¶
func (m *EpisodeMutation) 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 (*EpisodeMutation) RemovedRoundsIDs ¶
func (m *EpisodeMutation) RemovedRoundsIDs() (ids []int)
RemovedRounds returns the removed IDs of the "rounds" edge to the EpisodeRound entity.
func (*EpisodeMutation) ResetAired ¶
func (m *EpisodeMutation) ResetAired()
ResetAired resets all changes to the "aired" field.
func (*EpisodeMutation) ResetDifficulty ¶
func (m *EpisodeMutation) ResetDifficulty()
ResetDifficulty resets all changes to the "difficulty" field.
func (*EpisodeMutation) ResetEdge ¶
func (m *EpisodeMutation) 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 (*EpisodeMutation) ResetField ¶
func (m *EpisodeMutation) 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 (*EpisodeMutation) ResetRounds ¶
func (m *EpisodeMutation) ResetRounds()
ResetRounds resets all changes to the "rounds" edge.
func (*EpisodeMutation) RoundsCleared ¶
func (m *EpisodeMutation) RoundsCleared() bool
RoundsCleared reports if the "rounds" edge to the EpisodeRound entity was cleared.
func (*EpisodeMutation) RoundsIDs ¶
func (m *EpisodeMutation) RoundsIDs() (ids []int)
RoundsIDs returns the "rounds" edge IDs in the mutation.
func (*EpisodeMutation) SetAired ¶
func (m *EpisodeMutation) SetAired(t time.Time)
SetAired sets the "aired" field.
func (*EpisodeMutation) SetDifficulty ¶
func (m *EpisodeMutation) SetDifficulty(e episode.Difficulty)
SetDifficulty sets the "difficulty" field.
func (*EpisodeMutation) SetField ¶
func (m *EpisodeMutation) 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 (*EpisodeMutation) SetOp ¶
func (m *EpisodeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (EpisodeMutation) Tx ¶
func (m EpisodeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*EpisodeMutation) Type ¶
func (m *EpisodeMutation) Type() string
Type returns the node type of this mutation (Episode).
func (*EpisodeMutation) Where ¶
func (m *EpisodeMutation) Where(ps ...predicate.Episode)
Where appends a list predicates to the EpisodeMutation builder.
func (*EpisodeMutation) WhereP ¶
func (m *EpisodeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the EpisodeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type EpisodeQuery ¶
type EpisodeQuery struct {
// contains filtered or unexported fields
}
EpisodeQuery is the builder for querying Episode entities.
func (*EpisodeQuery) Aggregate ¶
func (eq *EpisodeQuery) Aggregate(fns ...AggregateFunc) *EpisodeSelect
Aggregate returns a EpisodeSelect configured with the given aggregations.
func (*EpisodeQuery) All ¶
func (eq *EpisodeQuery) All(ctx context.Context) ([]*Episode, error)
All executes the query and returns a list of Episodes.
func (*EpisodeQuery) AllX ¶
func (eq *EpisodeQuery) AllX(ctx context.Context) []*Episode
AllX is like All, but panics if an error occurs.
func (*EpisodeQuery) Clone ¶
func (eq *EpisodeQuery) Clone() *EpisodeQuery
Clone returns a duplicate of the EpisodeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*EpisodeQuery) Count ¶
func (eq *EpisodeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*EpisodeQuery) CountX ¶
func (eq *EpisodeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*EpisodeQuery) Exist ¶
func (eq *EpisodeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*EpisodeQuery) ExistX ¶
func (eq *EpisodeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*EpisodeQuery) First ¶
func (eq *EpisodeQuery) First(ctx context.Context) (*Episode, error)
First returns the first Episode entity from the query. Returns a *NotFoundError when no Episode was found.
func (*EpisodeQuery) FirstID ¶
func (eq *EpisodeQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Episode ID from the query. Returns a *NotFoundError when no Episode ID was found.
func (*EpisodeQuery) FirstIDX ¶
func (eq *EpisodeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*EpisodeQuery) FirstX ¶
func (eq *EpisodeQuery) FirstX(ctx context.Context) *Episode
FirstX is like First, but panics if an error occurs.
func (*EpisodeQuery) GroupBy ¶
func (eq *EpisodeQuery) GroupBy(field string, fields ...string) *EpisodeGroupBy
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 { Aired time.Time `json:"aired,omitempty"` Count int `json:"count,omitempty"` } client.Episode.Query(). GroupBy(episode.FieldAired). Aggregate(ent.Count()). Scan(ctx, &v)
func (*EpisodeQuery) IDs ¶
func (eq *EpisodeQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Episode IDs.
func (*EpisodeQuery) IDsX ¶
func (eq *EpisodeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*EpisodeQuery) Limit ¶
func (eq *EpisodeQuery) Limit(limit int) *EpisodeQuery
Limit the number of records to be returned by this query.
func (*EpisodeQuery) Offset ¶
func (eq *EpisodeQuery) Offset(offset int) *EpisodeQuery
Offset to start from.
func (*EpisodeQuery) Only ¶
func (eq *EpisodeQuery) Only(ctx context.Context) (*Episode, error)
Only returns a single Episode entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Episode entity is found. Returns a *NotFoundError when no Episode entities are found.
func (*EpisodeQuery) OnlyID ¶
func (eq *EpisodeQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Episode ID in the query. Returns a *NotSingularError when more than one Episode ID is found. Returns a *NotFoundError when no entities are found.
func (*EpisodeQuery) OnlyIDX ¶
func (eq *EpisodeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*EpisodeQuery) OnlyX ¶
func (eq *EpisodeQuery) OnlyX(ctx context.Context) *Episode
OnlyX is like Only, but panics if an error occurs.
func (*EpisodeQuery) Order ¶
func (eq *EpisodeQuery) Order(o ...episode.OrderOption) *EpisodeQuery
Order specifies how the records should be ordered.
func (*EpisodeQuery) QueryRounds ¶
func (eq *EpisodeQuery) QueryRounds() *EpisodeRoundQuery
QueryRounds chains the current query on the "rounds" edge.
func (*EpisodeQuery) Select ¶
func (eq *EpisodeQuery) Select(fields ...string) *EpisodeSelect
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 { Aired time.Time `json:"aired,omitempty"` } client.Episode.Query(). Select(episode.FieldAired). Scan(ctx, &v)
func (*EpisodeQuery) Unique ¶
func (eq *EpisodeQuery) Unique(unique bool) *EpisodeQuery
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 (*EpisodeQuery) Where ¶
func (eq *EpisodeQuery) Where(ps ...predicate.Episode) *EpisodeQuery
Where adds a new predicate for the EpisodeQuery builder.
func (*EpisodeQuery) WithRounds ¶
func (eq *EpisodeQuery) WithRounds(opts ...func(*EpisodeRoundQuery)) *EpisodeQuery
WithRounds tells the query-builder to eager-load the nodes that are connected to the "rounds" edge. The optional arguments are used to configure the query builder of the edge.
type EpisodeRound ¶
type EpisodeRound struct { // ID of the ent. ID int `json:"id,omitempty"` // Round holds the value of the "round" field. Round episoderound.Round `json:"round,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the EpisodeRoundQuery when eager-loading is set. Edges EpisodeRoundEdges `json:"edges"` // contains filtered or unexported fields }
EpisodeRound is the model entity for the EpisodeRound schema.
func (*EpisodeRound) QueryCategories ¶
func (er *EpisodeRound) QueryCategories() *ChallengeGroupQuery
QueryCategories queries the "categories" edge of the EpisodeRound entity.
func (*EpisodeRound) QueryEpisode ¶
func (er *EpisodeRound) QueryEpisode() *EpisodeQuery
QueryEpisode queries the "episode" edge of the EpisodeRound entity.
func (*EpisodeRound) String ¶
func (er *EpisodeRound) String() string
String implements the fmt.Stringer.
func (*EpisodeRound) Unwrap ¶
func (er *EpisodeRound) Unwrap() *EpisodeRound
Unwrap unwraps the EpisodeRound 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 (*EpisodeRound) Update ¶
func (er *EpisodeRound) Update() *EpisodeRoundUpdateOne
Update returns a builder for updating this EpisodeRound. Note that you need to call EpisodeRound.Unwrap() before calling this method if this EpisodeRound was returned from a transaction, and the transaction was committed or rolled back.
type EpisodeRoundClient ¶
type EpisodeRoundClient struct {
// contains filtered or unexported fields
}
EpisodeRoundClient is a client for the EpisodeRound schema.
func NewEpisodeRoundClient ¶
func NewEpisodeRoundClient(c config) *EpisodeRoundClient
NewEpisodeRoundClient returns a client for the EpisodeRound from the given config.
func (*EpisodeRoundClient) Create ¶
func (c *EpisodeRoundClient) Create() *EpisodeRoundCreate
Create returns a builder for creating a EpisodeRound entity.
func (*EpisodeRoundClient) CreateBulk ¶
func (c *EpisodeRoundClient) CreateBulk(builders ...*EpisodeRoundCreate) *EpisodeRoundCreateBulk
CreateBulk returns a builder for creating a bulk of EpisodeRound entities.
func (*EpisodeRoundClient) Delete ¶
func (c *EpisodeRoundClient) Delete() *EpisodeRoundDelete
Delete returns a delete builder for EpisodeRound.
func (*EpisodeRoundClient) DeleteOne ¶
func (c *EpisodeRoundClient) DeleteOne(er *EpisodeRound) *EpisodeRoundDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*EpisodeRoundClient) DeleteOneID ¶
func (c *EpisodeRoundClient) DeleteOneID(id int) *EpisodeRoundDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*EpisodeRoundClient) Get ¶
func (c *EpisodeRoundClient) Get(ctx context.Context, id int) (*EpisodeRound, error)
Get returns a EpisodeRound entity by its id.
func (*EpisodeRoundClient) GetX ¶
func (c *EpisodeRoundClient) GetX(ctx context.Context, id int) *EpisodeRound
GetX is like Get, but panics if an error occurs.
func (*EpisodeRoundClient) Hooks ¶
func (c *EpisodeRoundClient) Hooks() []Hook
Hooks returns the client hooks.
func (*EpisodeRoundClient) Intercept ¶
func (c *EpisodeRoundClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `episoderound.Intercept(f(g(h())))`.
func (*EpisodeRoundClient) Interceptors ¶
func (c *EpisodeRoundClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*EpisodeRoundClient) MapCreateBulk ¶
func (c *EpisodeRoundClient) MapCreateBulk(slice any, setFunc func(*EpisodeRoundCreate, int)) *EpisodeRoundCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*EpisodeRoundClient) Query ¶
func (c *EpisodeRoundClient) Query() *EpisodeRoundQuery
Query returns a query builder for EpisodeRound.
func (*EpisodeRoundClient) QueryCategories ¶
func (c *EpisodeRoundClient) QueryCategories(er *EpisodeRound) *ChallengeGroupQuery
QueryCategories queries the categories edge of a EpisodeRound.
func (*EpisodeRoundClient) QueryEpisode ¶
func (c *EpisodeRoundClient) QueryEpisode(er *EpisodeRound) *EpisodeQuery
QueryEpisode queries the episode edge of a EpisodeRound.
func (*EpisodeRoundClient) Update ¶
func (c *EpisodeRoundClient) Update() *EpisodeRoundUpdate
Update returns an update builder for EpisodeRound.
func (*EpisodeRoundClient) UpdateOne ¶
func (c *EpisodeRoundClient) UpdateOne(er *EpisodeRound) *EpisodeRoundUpdateOne
UpdateOne returns an update builder for the given entity.
func (*EpisodeRoundClient) UpdateOneID ¶
func (c *EpisodeRoundClient) UpdateOneID(id int) *EpisodeRoundUpdateOne
UpdateOneID returns an update builder for the given id.
func (*EpisodeRoundClient) Use ¶
func (c *EpisodeRoundClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `episoderound.Hooks(f(g(h())))`.
type EpisodeRoundCreate ¶
type EpisodeRoundCreate struct {
// contains filtered or unexported fields
}
EpisodeRoundCreate is the builder for creating a EpisodeRound entity.
func (*EpisodeRoundCreate) AddCategories ¶
func (erc *EpisodeRoundCreate) AddCategories(c ...*ChallengeGroup) *EpisodeRoundCreate
AddCategories adds the "categories" edges to the ChallengeGroup entity.
func (*EpisodeRoundCreate) AddCategoryIDs ¶
func (erc *EpisodeRoundCreate) AddCategoryIDs(ids ...int) *EpisodeRoundCreate
AddCategoryIDs adds the "categories" edge to the ChallengeGroup entity by IDs.
func (*EpisodeRoundCreate) AddEpisode ¶
func (erc *EpisodeRoundCreate) AddEpisode(e ...*Episode) *EpisodeRoundCreate
AddEpisode adds the "episode" edges to the Episode entity.
func (*EpisodeRoundCreate) AddEpisodeIDs ¶
func (erc *EpisodeRoundCreate) AddEpisodeIDs(ids ...int) *EpisodeRoundCreate
AddEpisodeIDs adds the "episode" edge to the Episode entity by IDs.
func (*EpisodeRoundCreate) Exec ¶
func (erc *EpisodeRoundCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*EpisodeRoundCreate) ExecX ¶
func (erc *EpisodeRoundCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EpisodeRoundCreate) Mutation ¶
func (erc *EpisodeRoundCreate) Mutation() *EpisodeRoundMutation
Mutation returns the EpisodeRoundMutation object of the builder.
func (*EpisodeRoundCreate) Save ¶
func (erc *EpisodeRoundCreate) Save(ctx context.Context) (*EpisodeRound, error)
Save creates the EpisodeRound in the database.
func (*EpisodeRoundCreate) SaveX ¶
func (erc *EpisodeRoundCreate) SaveX(ctx context.Context) *EpisodeRound
SaveX calls Save and panics if Save returns an error.
func (*EpisodeRoundCreate) SetRound ¶
func (erc *EpisodeRoundCreate) SetRound(e episoderound.Round) *EpisodeRoundCreate
SetRound sets the "round" field.
type EpisodeRoundCreateBulk ¶
type EpisodeRoundCreateBulk struct {
// contains filtered or unexported fields
}
EpisodeRoundCreateBulk is the builder for creating many EpisodeRound entities in bulk.
func (*EpisodeRoundCreateBulk) Exec ¶
func (ercb *EpisodeRoundCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*EpisodeRoundCreateBulk) ExecX ¶
func (ercb *EpisodeRoundCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EpisodeRoundCreateBulk) Save ¶
func (ercb *EpisodeRoundCreateBulk) Save(ctx context.Context) ([]*EpisodeRound, error)
Save creates the EpisodeRound entities in the database.
func (*EpisodeRoundCreateBulk) SaveX ¶
func (ercb *EpisodeRoundCreateBulk) SaveX(ctx context.Context) []*EpisodeRound
SaveX is like Save, but panics if an error occurs.
type EpisodeRoundDelete ¶
type EpisodeRoundDelete struct {
// contains filtered or unexported fields
}
EpisodeRoundDelete is the builder for deleting a EpisodeRound entity.
func (*EpisodeRoundDelete) Exec ¶
func (erd *EpisodeRoundDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*EpisodeRoundDelete) ExecX ¶
func (erd *EpisodeRoundDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*EpisodeRoundDelete) Where ¶
func (erd *EpisodeRoundDelete) Where(ps ...predicate.EpisodeRound) *EpisodeRoundDelete
Where appends a list predicates to the EpisodeRoundDelete builder.
type EpisodeRoundDeleteOne ¶
type EpisodeRoundDeleteOne struct {
// contains filtered or unexported fields
}
EpisodeRoundDeleteOne is the builder for deleting a single EpisodeRound entity.
func (*EpisodeRoundDeleteOne) Exec ¶
func (erdo *EpisodeRoundDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*EpisodeRoundDeleteOne) ExecX ¶
func (erdo *EpisodeRoundDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EpisodeRoundDeleteOne) Where ¶
func (erdo *EpisodeRoundDeleteOne) Where(ps ...predicate.EpisodeRound) *EpisodeRoundDeleteOne
Where appends a list predicates to the EpisodeRoundDelete builder.
type EpisodeRoundEdges ¶
type EpisodeRoundEdges struct { // Categories holds the value of the categories edge. Categories []*ChallengeGroup `json:"categories,omitempty"` // Episode holds the value of the episode edge. Episode []*Episode `json:"episode,omitempty"` // contains filtered or unexported fields }
EpisodeRoundEdges holds the relations/edges for other nodes in the graph.
func (EpisodeRoundEdges) CategoriesOrErr ¶
func (e EpisodeRoundEdges) CategoriesOrErr() ([]*ChallengeGroup, error)
CategoriesOrErr returns the Categories value or an error if the edge was not loaded in eager-loading.
func (EpisodeRoundEdges) EpisodeOrErr ¶
func (e EpisodeRoundEdges) EpisodeOrErr() ([]*Episode, error)
EpisodeOrErr returns the Episode value or an error if the edge was not loaded in eager-loading.
type EpisodeRoundGroupBy ¶
type EpisodeRoundGroupBy struct {
// contains filtered or unexported fields
}
EpisodeRoundGroupBy is the group-by builder for EpisodeRound entities.
func (*EpisodeRoundGroupBy) Aggregate ¶
func (ergb *EpisodeRoundGroupBy) Aggregate(fns ...AggregateFunc) *EpisodeRoundGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*EpisodeRoundGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EpisodeRoundGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EpisodeRoundGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EpisodeRoundGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EpisodeRoundGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EpisodeRoundGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EpisodeRoundGroupBy) Scan ¶
func (ergb *EpisodeRoundGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EpisodeRoundGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EpisodeRoundMutation ¶
type EpisodeRoundMutation struct {
// contains filtered or unexported fields
}
EpisodeRoundMutation represents an operation that mutates the EpisodeRound nodes in the graph.
func (*EpisodeRoundMutation) AddCategoryIDs ¶
func (m *EpisodeRoundMutation) AddCategoryIDs(ids ...int)
AddCategoryIDs adds the "categories" edge to the ChallengeGroup entity by ids.
func (*EpisodeRoundMutation) AddEpisodeIDs ¶
func (m *EpisodeRoundMutation) AddEpisodeIDs(ids ...int)
AddEpisodeIDs adds the "episode" edge to the Episode entity by ids.
func (*EpisodeRoundMutation) AddField ¶
func (m *EpisodeRoundMutation) 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 (*EpisodeRoundMutation) AddedEdges ¶
func (m *EpisodeRoundMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*EpisodeRoundMutation) AddedField ¶
func (m *EpisodeRoundMutation) 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 (*EpisodeRoundMutation) AddedFields ¶
func (m *EpisodeRoundMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*EpisodeRoundMutation) AddedIDs ¶
func (m *EpisodeRoundMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*EpisodeRoundMutation) CategoriesCleared ¶
func (m *EpisodeRoundMutation) CategoriesCleared() bool
CategoriesCleared reports if the "categories" edge to the ChallengeGroup entity was cleared.
func (*EpisodeRoundMutation) CategoriesIDs ¶
func (m *EpisodeRoundMutation) CategoriesIDs() (ids []int)
CategoriesIDs returns the "categories" edge IDs in the mutation.
func (*EpisodeRoundMutation) ClearCategories ¶
func (m *EpisodeRoundMutation) ClearCategories()
ClearCategories clears the "categories" edge to the ChallengeGroup entity.
func (*EpisodeRoundMutation) ClearEdge ¶
func (m *EpisodeRoundMutation) 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 (*EpisodeRoundMutation) ClearEpisode ¶
func (m *EpisodeRoundMutation) ClearEpisode()
ClearEpisode clears the "episode" edge to the Episode entity.
func (*EpisodeRoundMutation) ClearField ¶
func (m *EpisodeRoundMutation) 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 (*EpisodeRoundMutation) ClearedEdges ¶
func (m *EpisodeRoundMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*EpisodeRoundMutation) ClearedFields ¶
func (m *EpisodeRoundMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (EpisodeRoundMutation) Client ¶
func (m EpisodeRoundMutation) 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 (*EpisodeRoundMutation) EdgeCleared ¶
func (m *EpisodeRoundMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*EpisodeRoundMutation) EpisodeCleared ¶
func (m *EpisodeRoundMutation) EpisodeCleared() bool
EpisodeCleared reports if the "episode" edge to the Episode entity was cleared.
func (*EpisodeRoundMutation) EpisodeIDs ¶
func (m *EpisodeRoundMutation) EpisodeIDs() (ids []int)
EpisodeIDs returns the "episode" edge IDs in the mutation.
func (*EpisodeRoundMutation) Field ¶
func (m *EpisodeRoundMutation) 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 (*EpisodeRoundMutation) FieldCleared ¶
func (m *EpisodeRoundMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*EpisodeRoundMutation) Fields ¶
func (m *EpisodeRoundMutation) 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 (*EpisodeRoundMutation) ID ¶
func (m *EpisodeRoundMutation) 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 (*EpisodeRoundMutation) IDs ¶
func (m *EpisodeRoundMutation) 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 (*EpisodeRoundMutation) OldField ¶
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 (*EpisodeRoundMutation) OldRound ¶
func (m *EpisodeRoundMutation) OldRound(ctx context.Context) (v episoderound.Round, err error)
OldRound returns the old "round" field's value of the EpisodeRound entity. If the EpisodeRound 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 (*EpisodeRoundMutation) Op ¶
func (m *EpisodeRoundMutation) Op() Op
Op returns the operation name.
func (*EpisodeRoundMutation) RemoveCategoryIDs ¶
func (m *EpisodeRoundMutation) RemoveCategoryIDs(ids ...int)
RemoveCategoryIDs removes the "categories" edge to the ChallengeGroup entity by IDs.
func (*EpisodeRoundMutation) RemoveEpisodeIDs ¶
func (m *EpisodeRoundMutation) RemoveEpisodeIDs(ids ...int)
RemoveEpisodeIDs removes the "episode" edge to the Episode entity by IDs.
func (*EpisodeRoundMutation) RemovedCategoriesIDs ¶
func (m *EpisodeRoundMutation) RemovedCategoriesIDs() (ids []int)
RemovedCategories returns the removed IDs of the "categories" edge to the ChallengeGroup entity.
func (*EpisodeRoundMutation) RemovedEdges ¶
func (m *EpisodeRoundMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*EpisodeRoundMutation) RemovedEpisodeIDs ¶
func (m *EpisodeRoundMutation) RemovedEpisodeIDs() (ids []int)
RemovedEpisode returns the removed IDs of the "episode" edge to the Episode entity.
func (*EpisodeRoundMutation) RemovedIDs ¶
func (m *EpisodeRoundMutation) 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 (*EpisodeRoundMutation) ResetCategories ¶
func (m *EpisodeRoundMutation) ResetCategories()
ResetCategories resets all changes to the "categories" edge.
func (*EpisodeRoundMutation) ResetEdge ¶
func (m *EpisodeRoundMutation) 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 (*EpisodeRoundMutation) ResetEpisode ¶
func (m *EpisodeRoundMutation) ResetEpisode()
ResetEpisode resets all changes to the "episode" edge.
func (*EpisodeRoundMutation) ResetField ¶
func (m *EpisodeRoundMutation) 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 (*EpisodeRoundMutation) ResetRound ¶
func (m *EpisodeRoundMutation) ResetRound()
ResetRound resets all changes to the "round" field.
func (*EpisodeRoundMutation) Round ¶
func (m *EpisodeRoundMutation) Round() (r episoderound.Round, exists bool)
Round returns the value of the "round" field in the mutation.
func (*EpisodeRoundMutation) SetField ¶
func (m *EpisodeRoundMutation) 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 (*EpisodeRoundMutation) SetOp ¶
func (m *EpisodeRoundMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*EpisodeRoundMutation) SetRound ¶
func (m *EpisodeRoundMutation) SetRound(e episoderound.Round)
SetRound sets the "round" field.
func (EpisodeRoundMutation) Tx ¶
func (m EpisodeRoundMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*EpisodeRoundMutation) Type ¶
func (m *EpisodeRoundMutation) Type() string
Type returns the node type of this mutation (EpisodeRound).
func (*EpisodeRoundMutation) Where ¶
func (m *EpisodeRoundMutation) Where(ps ...predicate.EpisodeRound)
Where appends a list predicates to the EpisodeRoundMutation builder.
func (*EpisodeRoundMutation) WhereP ¶
func (m *EpisodeRoundMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the EpisodeRoundMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type EpisodeRoundQuery ¶
type EpisodeRoundQuery struct {
// contains filtered or unexported fields
}
EpisodeRoundQuery is the builder for querying EpisodeRound entities.
func (*EpisodeRoundQuery) Aggregate ¶
func (erq *EpisodeRoundQuery) Aggregate(fns ...AggregateFunc) *EpisodeRoundSelect
Aggregate returns a EpisodeRoundSelect configured with the given aggregations.
func (*EpisodeRoundQuery) All ¶
func (erq *EpisodeRoundQuery) All(ctx context.Context) ([]*EpisodeRound, error)
All executes the query and returns a list of EpisodeRounds.
func (*EpisodeRoundQuery) AllX ¶
func (erq *EpisodeRoundQuery) AllX(ctx context.Context) []*EpisodeRound
AllX is like All, but panics if an error occurs.
func (*EpisodeRoundQuery) Clone ¶
func (erq *EpisodeRoundQuery) Clone() *EpisodeRoundQuery
Clone returns a duplicate of the EpisodeRoundQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*EpisodeRoundQuery) Count ¶
func (erq *EpisodeRoundQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*EpisodeRoundQuery) CountX ¶
func (erq *EpisodeRoundQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*EpisodeRoundQuery) Exist ¶
func (erq *EpisodeRoundQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*EpisodeRoundQuery) ExistX ¶
func (erq *EpisodeRoundQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*EpisodeRoundQuery) First ¶
func (erq *EpisodeRoundQuery) First(ctx context.Context) (*EpisodeRound, error)
First returns the first EpisodeRound entity from the query. Returns a *NotFoundError when no EpisodeRound was found.
func (*EpisodeRoundQuery) FirstID ¶
func (erq *EpisodeRoundQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first EpisodeRound ID from the query. Returns a *NotFoundError when no EpisodeRound ID was found.
func (*EpisodeRoundQuery) FirstIDX ¶
func (erq *EpisodeRoundQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*EpisodeRoundQuery) FirstX ¶
func (erq *EpisodeRoundQuery) FirstX(ctx context.Context) *EpisodeRound
FirstX is like First, but panics if an error occurs.
func (*EpisodeRoundQuery) GroupBy ¶
func (erq *EpisodeRoundQuery) GroupBy(field string, fields ...string) *EpisodeRoundGroupBy
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 { Round episoderound.Round `json:"round,omitempty"` Count int `json:"count,omitempty"` } client.EpisodeRound.Query(). GroupBy(episoderound.FieldRound). Aggregate(ent.Count()). Scan(ctx, &v)
func (*EpisodeRoundQuery) IDs ¶
func (erq *EpisodeRoundQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of EpisodeRound IDs.
func (*EpisodeRoundQuery) IDsX ¶
func (erq *EpisodeRoundQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*EpisodeRoundQuery) Limit ¶
func (erq *EpisodeRoundQuery) Limit(limit int) *EpisodeRoundQuery
Limit the number of records to be returned by this query.
func (*EpisodeRoundQuery) Offset ¶
func (erq *EpisodeRoundQuery) Offset(offset int) *EpisodeRoundQuery
Offset to start from.
func (*EpisodeRoundQuery) Only ¶
func (erq *EpisodeRoundQuery) Only(ctx context.Context) (*EpisodeRound, error)
Only returns a single EpisodeRound entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one EpisodeRound entity is found. Returns a *NotFoundError when no EpisodeRound entities are found.
func (*EpisodeRoundQuery) OnlyID ¶
func (erq *EpisodeRoundQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only EpisodeRound ID in the query. Returns a *NotSingularError when more than one EpisodeRound ID is found. Returns a *NotFoundError when no entities are found.
func (*EpisodeRoundQuery) OnlyIDX ¶
func (erq *EpisodeRoundQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*EpisodeRoundQuery) OnlyX ¶
func (erq *EpisodeRoundQuery) OnlyX(ctx context.Context) *EpisodeRound
OnlyX is like Only, but panics if an error occurs.
func (*EpisodeRoundQuery) Order ¶
func (erq *EpisodeRoundQuery) Order(o ...episoderound.OrderOption) *EpisodeRoundQuery
Order specifies how the records should be ordered.
func (*EpisodeRoundQuery) QueryCategories ¶
func (erq *EpisodeRoundQuery) QueryCategories() *ChallengeGroupQuery
QueryCategories chains the current query on the "categories" edge.
func (*EpisodeRoundQuery) QueryEpisode ¶
func (erq *EpisodeRoundQuery) QueryEpisode() *EpisodeQuery
QueryEpisode chains the current query on the "episode" edge.
func (*EpisodeRoundQuery) Select ¶
func (erq *EpisodeRoundQuery) Select(fields ...string) *EpisodeRoundSelect
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 { Round episoderound.Round `json:"round,omitempty"` } client.EpisodeRound.Query(). Select(episoderound.FieldRound). Scan(ctx, &v)
func (*EpisodeRoundQuery) Unique ¶
func (erq *EpisodeRoundQuery) Unique(unique bool) *EpisodeRoundQuery
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 (*EpisodeRoundQuery) Where ¶
func (erq *EpisodeRoundQuery) Where(ps ...predicate.EpisodeRound) *EpisodeRoundQuery
Where adds a new predicate for the EpisodeRoundQuery builder.
func (*EpisodeRoundQuery) WithCategories ¶
func (erq *EpisodeRoundQuery) WithCategories(opts ...func(*ChallengeGroupQuery)) *EpisodeRoundQuery
WithCategories tells the query-builder to eager-load the nodes that are connected to the "categories" edge. The optional arguments are used to configure the query builder of the edge.
func (*EpisodeRoundQuery) WithEpisode ¶
func (erq *EpisodeRoundQuery) WithEpisode(opts ...func(*EpisodeQuery)) *EpisodeRoundQuery
WithEpisode tells the query-builder to eager-load the nodes that are connected to the "episode" edge. The optional arguments are used to configure the query builder of the edge.
type EpisodeRoundSelect ¶
type EpisodeRoundSelect struct { *EpisodeRoundQuery // contains filtered or unexported fields }
EpisodeRoundSelect is the builder for selecting fields of EpisodeRound entities.
func (*EpisodeRoundSelect) Aggregate ¶
func (ers *EpisodeRoundSelect) Aggregate(fns ...AggregateFunc) *EpisodeRoundSelect
Aggregate adds the given aggregation functions to the selector query.
func (*EpisodeRoundSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EpisodeRoundSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EpisodeRoundSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EpisodeRoundSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EpisodeRoundSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EpisodeRoundSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EpisodeRoundSelect) Scan ¶
func (ers *EpisodeRoundSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EpisodeRoundSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EpisodeRoundUpdate ¶
type EpisodeRoundUpdate struct {
// contains filtered or unexported fields
}
EpisodeRoundUpdate is the builder for updating EpisodeRound entities.
func (*EpisodeRoundUpdate) AddCategories ¶
func (eru *EpisodeRoundUpdate) AddCategories(c ...*ChallengeGroup) *EpisodeRoundUpdate
AddCategories adds the "categories" edges to the ChallengeGroup entity.
func (*EpisodeRoundUpdate) AddCategoryIDs ¶
func (eru *EpisodeRoundUpdate) AddCategoryIDs(ids ...int) *EpisodeRoundUpdate
AddCategoryIDs adds the "categories" edge to the ChallengeGroup entity by IDs.
func (*EpisodeRoundUpdate) AddEpisode ¶
func (eru *EpisodeRoundUpdate) AddEpisode(e ...*Episode) *EpisodeRoundUpdate
AddEpisode adds the "episode" edges to the Episode entity.
func (*EpisodeRoundUpdate) AddEpisodeIDs ¶
func (eru *EpisodeRoundUpdate) AddEpisodeIDs(ids ...int) *EpisodeRoundUpdate
AddEpisodeIDs adds the "episode" edge to the Episode entity by IDs.
func (*EpisodeRoundUpdate) ClearCategories ¶
func (eru *EpisodeRoundUpdate) ClearCategories() *EpisodeRoundUpdate
ClearCategories clears all "categories" edges to the ChallengeGroup entity.
func (*EpisodeRoundUpdate) ClearEpisode ¶
func (eru *EpisodeRoundUpdate) ClearEpisode() *EpisodeRoundUpdate
ClearEpisode clears all "episode" edges to the Episode entity.
func (*EpisodeRoundUpdate) Exec ¶
func (eru *EpisodeRoundUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*EpisodeRoundUpdate) ExecX ¶
func (eru *EpisodeRoundUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EpisodeRoundUpdate) Mutation ¶
func (eru *EpisodeRoundUpdate) Mutation() *EpisodeRoundMutation
Mutation returns the EpisodeRoundMutation object of the builder.
func (*EpisodeRoundUpdate) RemoveCategories ¶
func (eru *EpisodeRoundUpdate) RemoveCategories(c ...*ChallengeGroup) *EpisodeRoundUpdate
RemoveCategories removes "categories" edges to ChallengeGroup entities.
func (*EpisodeRoundUpdate) RemoveCategoryIDs ¶
func (eru *EpisodeRoundUpdate) RemoveCategoryIDs(ids ...int) *EpisodeRoundUpdate
RemoveCategoryIDs removes the "categories" edge to ChallengeGroup entities by IDs.
func (*EpisodeRoundUpdate) RemoveEpisode ¶
func (eru *EpisodeRoundUpdate) RemoveEpisode(e ...*Episode) *EpisodeRoundUpdate
RemoveEpisode removes "episode" edges to Episode entities.
func (*EpisodeRoundUpdate) RemoveEpisodeIDs ¶
func (eru *EpisodeRoundUpdate) RemoveEpisodeIDs(ids ...int) *EpisodeRoundUpdate
RemoveEpisodeIDs removes the "episode" edge to Episode entities by IDs.
func (*EpisodeRoundUpdate) Save ¶
func (eru *EpisodeRoundUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*EpisodeRoundUpdate) SaveX ¶
func (eru *EpisodeRoundUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*EpisodeRoundUpdate) SetNillableRound ¶
func (eru *EpisodeRoundUpdate) SetNillableRound(e *episoderound.Round) *EpisodeRoundUpdate
SetNillableRound sets the "round" field if the given value is not nil.
func (*EpisodeRoundUpdate) SetRound ¶
func (eru *EpisodeRoundUpdate) SetRound(e episoderound.Round) *EpisodeRoundUpdate
SetRound sets the "round" field.
func (*EpisodeRoundUpdate) Where ¶
func (eru *EpisodeRoundUpdate) Where(ps ...predicate.EpisodeRound) *EpisodeRoundUpdate
Where appends a list predicates to the EpisodeRoundUpdate builder.
type EpisodeRoundUpdateOne ¶
type EpisodeRoundUpdateOne struct {
// contains filtered or unexported fields
}
EpisodeRoundUpdateOne is the builder for updating a single EpisodeRound entity.
func (*EpisodeRoundUpdateOne) AddCategories ¶
func (eruo *EpisodeRoundUpdateOne) AddCategories(c ...*ChallengeGroup) *EpisodeRoundUpdateOne
AddCategories adds the "categories" edges to the ChallengeGroup entity.
func (*EpisodeRoundUpdateOne) AddCategoryIDs ¶
func (eruo *EpisodeRoundUpdateOne) AddCategoryIDs(ids ...int) *EpisodeRoundUpdateOne
AddCategoryIDs adds the "categories" edge to the ChallengeGroup entity by IDs.
func (*EpisodeRoundUpdateOne) AddEpisode ¶
func (eruo *EpisodeRoundUpdateOne) AddEpisode(e ...*Episode) *EpisodeRoundUpdateOne
AddEpisode adds the "episode" edges to the Episode entity.
func (*EpisodeRoundUpdateOne) AddEpisodeIDs ¶
func (eruo *EpisodeRoundUpdateOne) AddEpisodeIDs(ids ...int) *EpisodeRoundUpdateOne
AddEpisodeIDs adds the "episode" edge to the Episode entity by IDs.
func (*EpisodeRoundUpdateOne) ClearCategories ¶
func (eruo *EpisodeRoundUpdateOne) ClearCategories() *EpisodeRoundUpdateOne
ClearCategories clears all "categories" edges to the ChallengeGroup entity.
func (*EpisodeRoundUpdateOne) ClearEpisode ¶
func (eruo *EpisodeRoundUpdateOne) ClearEpisode() *EpisodeRoundUpdateOne
ClearEpisode clears all "episode" edges to the Episode entity.
func (*EpisodeRoundUpdateOne) Exec ¶
func (eruo *EpisodeRoundUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*EpisodeRoundUpdateOne) ExecX ¶
func (eruo *EpisodeRoundUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EpisodeRoundUpdateOne) Mutation ¶
func (eruo *EpisodeRoundUpdateOne) Mutation() *EpisodeRoundMutation
Mutation returns the EpisodeRoundMutation object of the builder.
func (*EpisodeRoundUpdateOne) RemoveCategories ¶
func (eruo *EpisodeRoundUpdateOne) RemoveCategories(c ...*ChallengeGroup) *EpisodeRoundUpdateOne
RemoveCategories removes "categories" edges to ChallengeGroup entities.
func (*EpisodeRoundUpdateOne) RemoveCategoryIDs ¶
func (eruo *EpisodeRoundUpdateOne) RemoveCategoryIDs(ids ...int) *EpisodeRoundUpdateOne
RemoveCategoryIDs removes the "categories" edge to ChallengeGroup entities by IDs.
func (*EpisodeRoundUpdateOne) RemoveEpisode ¶
func (eruo *EpisodeRoundUpdateOne) RemoveEpisode(e ...*Episode) *EpisodeRoundUpdateOne
RemoveEpisode removes "episode" edges to Episode entities.
func (*EpisodeRoundUpdateOne) RemoveEpisodeIDs ¶
func (eruo *EpisodeRoundUpdateOne) RemoveEpisodeIDs(ids ...int) *EpisodeRoundUpdateOne
RemoveEpisodeIDs removes the "episode" edge to Episode entities by IDs.
func (*EpisodeRoundUpdateOne) Save ¶
func (eruo *EpisodeRoundUpdateOne) Save(ctx context.Context) (*EpisodeRound, error)
Save executes the query and returns the updated EpisodeRound entity.
func (*EpisodeRoundUpdateOne) SaveX ¶
func (eruo *EpisodeRoundUpdateOne) SaveX(ctx context.Context) *EpisodeRound
SaveX is like Save, but panics if an error occurs.
func (*EpisodeRoundUpdateOne) Select ¶
func (eruo *EpisodeRoundUpdateOne) Select(field string, fields ...string) *EpisodeRoundUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*EpisodeRoundUpdateOne) SetNillableRound ¶
func (eruo *EpisodeRoundUpdateOne) SetNillableRound(e *episoderound.Round) *EpisodeRoundUpdateOne
SetNillableRound sets the "round" field if the given value is not nil.
func (*EpisodeRoundUpdateOne) SetRound ¶
func (eruo *EpisodeRoundUpdateOne) SetRound(e episoderound.Round) *EpisodeRoundUpdateOne
SetRound sets the "round" field.
func (*EpisodeRoundUpdateOne) Where ¶
func (eruo *EpisodeRoundUpdateOne) Where(ps ...predicate.EpisodeRound) *EpisodeRoundUpdateOne
Where appends a list predicates to the EpisodeRoundUpdate builder.
type EpisodeRounds ¶
type EpisodeRounds []*EpisodeRound
EpisodeRounds is a parsable slice of EpisodeRound.
type EpisodeSelect ¶
type EpisodeSelect struct { *EpisodeQuery // contains filtered or unexported fields }
EpisodeSelect is the builder for selecting fields of Episode entities.
func (*EpisodeSelect) Aggregate ¶
func (es *EpisodeSelect) Aggregate(fns ...AggregateFunc) *EpisodeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*EpisodeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EpisodeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EpisodeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EpisodeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EpisodeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EpisodeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EpisodeSelect) Scan ¶
func (es *EpisodeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EpisodeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EpisodeUpdate ¶
type EpisodeUpdate struct {
// contains filtered or unexported fields
}
EpisodeUpdate is the builder for updating Episode entities.
func (*EpisodeUpdate) AddRoundIDs ¶
func (eu *EpisodeUpdate) AddRoundIDs(ids ...int) *EpisodeUpdate
AddRoundIDs adds the "rounds" edge to the EpisodeRound entity by IDs.
func (*EpisodeUpdate) AddRounds ¶
func (eu *EpisodeUpdate) AddRounds(e ...*EpisodeRound) *EpisodeUpdate
AddRounds adds the "rounds" edges to the EpisodeRound entity.
func (*EpisodeUpdate) ClearRounds ¶
func (eu *EpisodeUpdate) ClearRounds() *EpisodeUpdate
ClearRounds clears all "rounds" edges to the EpisodeRound entity.
func (*EpisodeUpdate) Exec ¶
func (eu *EpisodeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*EpisodeUpdate) ExecX ¶
func (eu *EpisodeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EpisodeUpdate) Mutation ¶
func (eu *EpisodeUpdate) Mutation() *EpisodeMutation
Mutation returns the EpisodeMutation object of the builder.
func (*EpisodeUpdate) RemoveRoundIDs ¶
func (eu *EpisodeUpdate) RemoveRoundIDs(ids ...int) *EpisodeUpdate
RemoveRoundIDs removes the "rounds" edge to EpisodeRound entities by IDs.
func (*EpisodeUpdate) RemoveRounds ¶
func (eu *EpisodeUpdate) RemoveRounds(e ...*EpisodeRound) *EpisodeUpdate
RemoveRounds removes "rounds" edges to EpisodeRound entities.
func (*EpisodeUpdate) Save ¶
func (eu *EpisodeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*EpisodeUpdate) SaveX ¶
func (eu *EpisodeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*EpisodeUpdate) SetAired ¶
func (eu *EpisodeUpdate) SetAired(t time.Time) *EpisodeUpdate
SetAired sets the "aired" field.
func (*EpisodeUpdate) SetDifficulty ¶
func (eu *EpisodeUpdate) SetDifficulty(e episode.Difficulty) *EpisodeUpdate
SetDifficulty sets the "difficulty" field.
func (*EpisodeUpdate) SetNillableAired ¶
func (eu *EpisodeUpdate) SetNillableAired(t *time.Time) *EpisodeUpdate
SetNillableAired sets the "aired" field if the given value is not nil.
func (*EpisodeUpdate) SetNillableDifficulty ¶
func (eu *EpisodeUpdate) SetNillableDifficulty(e *episode.Difficulty) *EpisodeUpdate
SetNillableDifficulty sets the "difficulty" field if the given value is not nil.
func (*EpisodeUpdate) Where ¶
func (eu *EpisodeUpdate) Where(ps ...predicate.Episode) *EpisodeUpdate
Where appends a list predicates to the EpisodeUpdate builder.
type EpisodeUpdateOne ¶
type EpisodeUpdateOne struct {
// contains filtered or unexported fields
}
EpisodeUpdateOne is the builder for updating a single Episode entity.
func (*EpisodeUpdateOne) AddRoundIDs ¶
func (euo *EpisodeUpdateOne) AddRoundIDs(ids ...int) *EpisodeUpdateOne
AddRoundIDs adds the "rounds" edge to the EpisodeRound entity by IDs.
func (*EpisodeUpdateOne) AddRounds ¶
func (euo *EpisodeUpdateOne) AddRounds(e ...*EpisodeRound) *EpisodeUpdateOne
AddRounds adds the "rounds" edges to the EpisodeRound entity.
func (*EpisodeUpdateOne) ClearRounds ¶
func (euo *EpisodeUpdateOne) ClearRounds() *EpisodeUpdateOne
ClearRounds clears all "rounds" edges to the EpisodeRound entity.
func (*EpisodeUpdateOne) Exec ¶
func (euo *EpisodeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*EpisodeUpdateOne) ExecX ¶
func (euo *EpisodeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EpisodeUpdateOne) Mutation ¶
func (euo *EpisodeUpdateOne) Mutation() *EpisodeMutation
Mutation returns the EpisodeMutation object of the builder.
func (*EpisodeUpdateOne) RemoveRoundIDs ¶
func (euo *EpisodeUpdateOne) RemoveRoundIDs(ids ...int) *EpisodeUpdateOne
RemoveRoundIDs removes the "rounds" edge to EpisodeRound entities by IDs.
func (*EpisodeUpdateOne) RemoveRounds ¶
func (euo *EpisodeUpdateOne) RemoveRounds(e ...*EpisodeRound) *EpisodeUpdateOne
RemoveRounds removes "rounds" edges to EpisodeRound entities.
func (*EpisodeUpdateOne) Save ¶
func (euo *EpisodeUpdateOne) Save(ctx context.Context) (*Episode, error)
Save executes the query and returns the updated Episode entity.
func (*EpisodeUpdateOne) SaveX ¶
func (euo *EpisodeUpdateOne) SaveX(ctx context.Context) *Episode
SaveX is like Save, but panics if an error occurs.
func (*EpisodeUpdateOne) Select ¶
func (euo *EpisodeUpdateOne) Select(field string, fields ...string) *EpisodeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*EpisodeUpdateOne) SetAired ¶
func (euo *EpisodeUpdateOne) SetAired(t time.Time) *EpisodeUpdateOne
SetAired sets the "aired" field.
func (*EpisodeUpdateOne) SetDifficulty ¶
func (euo *EpisodeUpdateOne) SetDifficulty(e episode.Difficulty) *EpisodeUpdateOne
SetDifficulty sets the "difficulty" field.
func (*EpisodeUpdateOne) SetNillableAired ¶
func (euo *EpisodeUpdateOne) SetNillableAired(t *time.Time) *EpisodeUpdateOne
SetNillableAired sets the "aired" field if the given value is not nil.
func (*EpisodeUpdateOne) SetNillableDifficulty ¶
func (euo *EpisodeUpdateOne) SetNillableDifficulty(e *episode.Difficulty) *EpisodeUpdateOne
SetNillableDifficulty sets the "difficulty" field if the given value is not nil.
func (*EpisodeUpdateOne) Where ¶
func (euo *EpisodeUpdateOne) Where(ps ...predicate.Episode) *EpisodeUpdateOne
Where appends a list predicates to the EpisodeUpdate builder.
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 MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
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 OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
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 RollbackFunc ¶
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.
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 ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Category is the client for interacting with the Category builders. Category *CategoryClient // Challenge is the client for interacting with the Challenge builders. Challenge *ChallengeClient // ChallengeGroup is the client for interacting with the ChallengeGroup builders. ChallengeGroup *ChallengeGroupClient // Episode is the client for interacting with the Episode builders. Episode *EpisodeClient // EpisodeRound is the client for interacting with the EpisodeRound builders. EpisodeRound *EpisodeRoundClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
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.
Source Files ¶
- category.go
- category_create.go
- category_delete.go
- category_query.go
- category_update.go
- challenge.go
- challenge_create.go
- challenge_delete.go
- challenge_query.go
- challenge_update.go
- challengegroup.go
- challengegroup_create.go
- challengegroup_delete.go
- challengegroup_query.go
- challengegroup_update.go
- client.go
- ent.go
- episode.go
- episode_create.go
- episode_delete.go
- episode_query.go
- episode_update.go
- episoderound.go
- episoderound_create.go
- episoderound_delete.go
- episoderound_query.go
- episoderound_update.go
- generate.go
- mutation.go
- runtime.go
- tx.go