Documentation
¶
Index ¶
- Constants
- 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 Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hero
- type HeroClient
- func (c *HeroClient) Create() *HeroCreate
- func (c *HeroClient) CreateBulk(builders ...*HeroCreate) *HeroCreateBulk
- func (c *HeroClient) Delete() *HeroDelete
- func (c *HeroClient) DeleteOne(h *Hero) *HeroDeleteOne
- func (c *HeroClient) DeleteOneID(id int) *HeroDeleteOne
- func (c *HeroClient) Get(ctx context.Context, id int) (*Hero, error)
- func (c *HeroClient) GetX(ctx context.Context, id int) *Hero
- func (c *HeroClient) Hooks() []Hook
- func (c *HeroClient) Query() *HeroQuery
- func (c *HeroClient) Update() *HeroUpdate
- func (c *HeroClient) UpdateOne(h *Hero) *HeroUpdateOne
- func (c *HeroClient) UpdateOneID(id int) *HeroUpdateOne
- func (c *HeroClient) Use(hooks ...Hook)
- type HeroCreate
- func (hc *HeroCreate) Exec(ctx context.Context) error
- func (hc *HeroCreate) ExecX(ctx context.Context)
- func (hc *HeroCreate) Mutation() *HeroMutation
- func (hc *HeroCreate) Save(ctx context.Context) (*Hero, error)
- func (hc *HeroCreate) SaveX(ctx context.Context) *Hero
- func (hc *HeroCreate) SetCreateTime(t time.Time) *HeroCreate
- func (hc *HeroCreate) SetHeroID(i int) *HeroCreate
- func (hc *HeroCreate) SetLocalizedName(s string) *HeroCreate
- func (hc *HeroCreate) SetName(s string) *HeroCreate
- func (hc *HeroCreate) SetNillableCreateTime(t *time.Time) *HeroCreate
- func (hc *HeroCreate) SetNillableUpdateTime(t *time.Time) *HeroCreate
- func (hc *HeroCreate) SetUpdateTime(t time.Time) *HeroCreate
- type HeroCreateBulk
- type HeroDelete
- type HeroDeleteOne
- type HeroGroupBy
- func (hgb *HeroGroupBy) Aggregate(fns ...AggregateFunc) *HeroGroupBy
- func (s *HeroGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *HeroGroupBy) BoolX(ctx context.Context) bool
- func (s *HeroGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *HeroGroupBy) BoolsX(ctx context.Context) []bool
- func (s *HeroGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *HeroGroupBy) Float64X(ctx context.Context) float64
- func (s *HeroGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *HeroGroupBy) Float64sX(ctx context.Context) []float64
- func (s *HeroGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *HeroGroupBy) IntX(ctx context.Context) int
- func (s *HeroGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *HeroGroupBy) IntsX(ctx context.Context) []int
- func (hgb *HeroGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *HeroGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *HeroGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *HeroGroupBy) StringX(ctx context.Context) string
- func (s *HeroGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *HeroGroupBy) StringsX(ctx context.Context) []string
- type HeroMutation
- func (m *HeroMutation) AddField(name string, value ent.Value) error
- func (m *HeroMutation) AddHeroID(i int)
- func (m *HeroMutation) AddedEdges() []string
- func (m *HeroMutation) AddedField(name string) (ent.Value, bool)
- func (m *HeroMutation) AddedFields() []string
- func (m *HeroMutation) AddedHeroID() (r int, exists bool)
- func (m *HeroMutation) AddedIDs(name string) []ent.Value
- func (m *HeroMutation) ClearEdge(name string) error
- func (m *HeroMutation) ClearField(name string) error
- func (m *HeroMutation) ClearedEdges() []string
- func (m *HeroMutation) ClearedFields() []string
- func (m HeroMutation) Client() *Client
- func (m *HeroMutation) CreateTime() (r time.Time, exists bool)
- func (m *HeroMutation) EdgeCleared(name string) bool
- func (m *HeroMutation) Field(name string) (ent.Value, bool)
- func (m *HeroMutation) FieldCleared(name string) bool
- func (m *HeroMutation) Fields() []string
- func (m *HeroMutation) HeroID() (r int, exists bool)
- func (m *HeroMutation) ID() (id int, exists bool)
- func (m *HeroMutation) IDs(ctx context.Context) ([]int, error)
- func (m *HeroMutation) LocalizedName() (r string, exists bool)
- func (m *HeroMutation) Name() (r string, exists bool)
- func (m *HeroMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *HeroMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *HeroMutation) OldHeroID(ctx context.Context) (v int, err error)
- func (m *HeroMutation) OldLocalizedName(ctx context.Context) (v string, err error)
- func (m *HeroMutation) OldName(ctx context.Context) (v string, err error)
- func (m *HeroMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *HeroMutation) Op() Op
- func (m *HeroMutation) RemovedEdges() []string
- func (m *HeroMutation) RemovedIDs(name string) []ent.Value
- func (m *HeroMutation) ResetCreateTime()
- func (m *HeroMutation) ResetEdge(name string) error
- func (m *HeroMutation) ResetField(name string) error
- func (m *HeroMutation) ResetHeroID()
- func (m *HeroMutation) ResetLocalizedName()
- func (m *HeroMutation) ResetName()
- func (m *HeroMutation) ResetUpdateTime()
- func (m *HeroMutation) SetCreateTime(t time.Time)
- func (m *HeroMutation) SetField(name string, value ent.Value) error
- func (m *HeroMutation) SetHeroID(i int)
- func (m *HeroMutation) SetLocalizedName(s string)
- func (m *HeroMutation) SetName(s string)
- func (m *HeroMutation) SetUpdateTime(t time.Time)
- func (m HeroMutation) Tx() (*Tx, error)
- func (m *HeroMutation) Type() string
- func (m *HeroMutation) UpdateTime() (r time.Time, exists bool)
- func (m *HeroMutation) Where(ps ...predicate.Hero)
- type HeroQuery
- func (hq *HeroQuery) All(ctx context.Context) ([]*Hero, error)
- func (hq *HeroQuery) AllX(ctx context.Context) []*Hero
- func (hq *HeroQuery) Clone() *HeroQuery
- func (hq *HeroQuery) Count(ctx context.Context) (int, error)
- func (hq *HeroQuery) CountX(ctx context.Context) int
- func (hq *HeroQuery) Exist(ctx context.Context) (bool, error)
- func (hq *HeroQuery) ExistX(ctx context.Context) bool
- func (hq *HeroQuery) First(ctx context.Context) (*Hero, error)
- func (hq *HeroQuery) FirstID(ctx context.Context) (id int, err error)
- func (hq *HeroQuery) FirstIDX(ctx context.Context) int
- func (hq *HeroQuery) FirstX(ctx context.Context) *Hero
- func (hq *HeroQuery) GroupBy(field string, fields ...string) *HeroGroupBy
- func (hq *HeroQuery) IDs(ctx context.Context) ([]int, error)
- func (hq *HeroQuery) IDsX(ctx context.Context) []int
- func (hq *HeroQuery) Limit(limit int) *HeroQuery
- func (hq *HeroQuery) Offset(offset int) *HeroQuery
- func (hq *HeroQuery) Only(ctx context.Context) (*Hero, error)
- func (hq *HeroQuery) OnlyID(ctx context.Context) (id int, err error)
- func (hq *HeroQuery) OnlyIDX(ctx context.Context) int
- func (hq *HeroQuery) OnlyX(ctx context.Context) *Hero
- func (hq *HeroQuery) Order(o ...OrderFunc) *HeroQuery
- func (hq *HeroQuery) Select(fields ...string) *HeroSelect
- func (hq *HeroQuery) Unique(unique bool) *HeroQuery
- func (hq *HeroQuery) Where(ps ...predicate.Hero) *HeroQuery
- type HeroSelect
- func (s *HeroSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *HeroSelect) BoolX(ctx context.Context) bool
- func (s *HeroSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *HeroSelect) BoolsX(ctx context.Context) []bool
- func (s *HeroSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *HeroSelect) Float64X(ctx context.Context) float64
- func (s *HeroSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *HeroSelect) Float64sX(ctx context.Context) []float64
- func (s *HeroSelect) Int(ctx context.Context) (_ int, err error)
- func (s *HeroSelect) IntX(ctx context.Context) int
- func (s *HeroSelect) Ints(ctx context.Context) ([]int, error)
- func (s *HeroSelect) IntsX(ctx context.Context) []int
- func (hs *HeroSelect) Scan(ctx context.Context, v interface{}) error
- func (s *HeroSelect) ScanX(ctx context.Context, v interface{})
- func (s *HeroSelect) String(ctx context.Context) (_ string, err error)
- func (s *HeroSelect) StringX(ctx context.Context) string
- func (s *HeroSelect) Strings(ctx context.Context) ([]string, error)
- func (s *HeroSelect) StringsX(ctx context.Context) []string
- type HeroUpdate
- func (hu *HeroUpdate) AddHeroID(i int) *HeroUpdate
- func (hu *HeroUpdate) Exec(ctx context.Context) error
- func (hu *HeroUpdate) ExecX(ctx context.Context)
- func (hu *HeroUpdate) Mutation() *HeroMutation
- func (hu *HeroUpdate) Save(ctx context.Context) (int, error)
- func (hu *HeroUpdate) SaveX(ctx context.Context) int
- func (hu *HeroUpdate) SetHeroID(i int) *HeroUpdate
- func (hu *HeroUpdate) SetLocalizedName(s string) *HeroUpdate
- func (hu *HeroUpdate) SetName(s string) *HeroUpdate
- func (hu *HeroUpdate) SetUpdateTime(t time.Time) *HeroUpdate
- func (hu *HeroUpdate) Where(ps ...predicate.Hero) *HeroUpdate
- type HeroUpdateOne
- func (huo *HeroUpdateOne) AddHeroID(i int) *HeroUpdateOne
- func (huo *HeroUpdateOne) Exec(ctx context.Context) error
- func (huo *HeroUpdateOne) ExecX(ctx context.Context)
- func (huo *HeroUpdateOne) Mutation() *HeroMutation
- func (huo *HeroUpdateOne) Save(ctx context.Context) (*Hero, error)
- func (huo *HeroUpdateOne) SaveX(ctx context.Context) *Hero
- func (huo *HeroUpdateOne) Select(field string, fields ...string) *HeroUpdateOne
- func (huo *HeroUpdateOne) SetHeroID(i int) *HeroUpdateOne
- func (huo *HeroUpdateOne) SetLocalizedName(s string) *HeroUpdateOne
- func (huo *HeroUpdateOne) SetName(s string) *HeroUpdateOne
- func (huo *HeroUpdateOne) SetUpdateTime(t time.Time) *HeroUpdateOne
- type Heros
- type Hook
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Subscription
- type SubscriptionClient
- func (c *SubscriptionClient) Create() *SubscriptionCreate
- func (c *SubscriptionClient) CreateBulk(builders ...*SubscriptionCreate) *SubscriptionCreateBulk
- func (c *SubscriptionClient) Delete() *SubscriptionDelete
- func (c *SubscriptionClient) DeleteOne(s *Subscription) *SubscriptionDeleteOne
- func (c *SubscriptionClient) DeleteOneID(id int) *SubscriptionDeleteOne
- func (c *SubscriptionClient) Get(ctx context.Context, id int) (*Subscription, error)
- func (c *SubscriptionClient) GetX(ctx context.Context, id int) *Subscription
- func (c *SubscriptionClient) Hooks() []Hook
- func (c *SubscriptionClient) Query() *SubscriptionQuery
- func (c *SubscriptionClient) Update() *SubscriptionUpdate
- func (c *SubscriptionClient) UpdateOne(s *Subscription) *SubscriptionUpdateOne
- func (c *SubscriptionClient) UpdateOneID(id int) *SubscriptionUpdateOne
- func (c *SubscriptionClient) Use(hooks ...Hook)
- type SubscriptionCreate
- func (sc *SubscriptionCreate) Exec(ctx context.Context) error
- func (sc *SubscriptionCreate) ExecX(ctx context.Context)
- func (sc *SubscriptionCreate) Mutation() *SubscriptionMutation
- func (sc *SubscriptionCreate) Save(ctx context.Context) (*Subscription, error)
- func (sc *SubscriptionCreate) SaveX(ctx context.Context) *Subscription
- func (sc *SubscriptionCreate) SetAlias(s string) *SubscriptionCreate
- func (sc *SubscriptionCreate) SetCreateTime(t time.Time) *SubscriptionCreate
- func (sc *SubscriptionCreate) SetGroupID(i int) *SubscriptionCreate
- func (sc *SubscriptionCreate) SetNillableCreateTime(t *time.Time) *SubscriptionCreate
- func (sc *SubscriptionCreate) SetNillableUpdateTime(t *time.Time) *SubscriptionCreate
- func (sc *SubscriptionCreate) SetSteamID(s string) *SubscriptionCreate
- func (sc *SubscriptionCreate) SetUpdateTime(t time.Time) *SubscriptionCreate
- type SubscriptionCreateBulk
- type SubscriptionDelete
- type SubscriptionDeleteOne
- type SubscriptionGroupBy
- func (sgb *SubscriptionGroupBy) Aggregate(fns ...AggregateFunc) *SubscriptionGroupBy
- func (s *SubscriptionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SubscriptionGroupBy) BoolX(ctx context.Context) bool
- func (s *SubscriptionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SubscriptionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SubscriptionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SubscriptionGroupBy) Float64X(ctx context.Context) float64
- func (s *SubscriptionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SubscriptionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SubscriptionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SubscriptionGroupBy) IntX(ctx context.Context) int
- func (s *SubscriptionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SubscriptionGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SubscriptionGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *SubscriptionGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *SubscriptionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SubscriptionGroupBy) StringX(ctx context.Context) string
- func (s *SubscriptionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SubscriptionGroupBy) StringsX(ctx context.Context) []string
- type SubscriptionMatch
- type SubscriptionMatchClient
- func (c *SubscriptionMatchClient) Create() *SubscriptionMatchCreate
- func (c *SubscriptionMatchClient) CreateBulk(builders ...*SubscriptionMatchCreate) *SubscriptionMatchCreateBulk
- func (c *SubscriptionMatchClient) Delete() *SubscriptionMatchDelete
- func (c *SubscriptionMatchClient) DeleteOne(sm *SubscriptionMatch) *SubscriptionMatchDeleteOne
- func (c *SubscriptionMatchClient) DeleteOneID(id int) *SubscriptionMatchDeleteOne
- func (c *SubscriptionMatchClient) Get(ctx context.Context, id int) (*SubscriptionMatch, error)
- func (c *SubscriptionMatchClient) GetX(ctx context.Context, id int) *SubscriptionMatch
- func (c *SubscriptionMatchClient) Hooks() []Hook
- func (c *SubscriptionMatchClient) Query() *SubscriptionMatchQuery
- func (c *SubscriptionMatchClient) Update() *SubscriptionMatchUpdate
- func (c *SubscriptionMatchClient) UpdateOne(sm *SubscriptionMatch) *SubscriptionMatchUpdateOne
- func (c *SubscriptionMatchClient) UpdateOneID(id int) *SubscriptionMatchUpdateOne
- func (c *SubscriptionMatchClient) Use(hooks ...Hook)
- type SubscriptionMatchCreate
- func (smc *SubscriptionMatchCreate) Exec(ctx context.Context) error
- func (smc *SubscriptionMatchCreate) ExecX(ctx context.Context)
- func (smc *SubscriptionMatchCreate) Mutation() *SubscriptionMatchMutation
- func (smc *SubscriptionMatchCreate) Save(ctx context.Context) (*SubscriptionMatch, error)
- func (smc *SubscriptionMatchCreate) SaveX(ctx context.Context) *SubscriptionMatch
- func (smc *SubscriptionMatchCreate) SetAssists(i int) *SubscriptionMatchCreate
- func (smc *SubscriptionMatchCreate) SetCreateTime(t time.Time) *SubscriptionMatchCreate
- func (smc *SubscriptionMatchCreate) SetDeaths(i int) *SubscriptionMatchCreate
- func (smc *SubscriptionMatchCreate) SetDuration(i int) *SubscriptionMatchCreate
- func (smc *SubscriptionMatchCreate) SetGameMode(i int) *SubscriptionMatchCreate
- func (smc *SubscriptionMatchCreate) SetHeroID(i int) *SubscriptionMatchCreate
- func (smc *SubscriptionMatchCreate) SetKills(i int) *SubscriptionMatchCreate
- func (smc *SubscriptionMatchCreate) SetLeaverStatus(i int) *SubscriptionMatchCreate
- func (smc *SubscriptionMatchCreate) SetLobbyType(i int) *SubscriptionMatchCreate
- func (smc *SubscriptionMatchCreate) SetMatchID(i int64) *SubscriptionMatchCreate
- func (smc *SubscriptionMatchCreate) SetNillableCreateTime(t *time.Time) *SubscriptionMatchCreate
- func (smc *SubscriptionMatchCreate) SetNillableSkill(i *int) *SubscriptionMatchCreate
- func (smc *SubscriptionMatchCreate) SetNillableUpdateTime(t *time.Time) *SubscriptionMatchCreate
- func (smc *SubscriptionMatchCreate) SetPartySize(i int) *SubscriptionMatchCreate
- func (smc *SubscriptionMatchCreate) SetPlayerID(s string) *SubscriptionMatchCreate
- func (smc *SubscriptionMatchCreate) SetPlayerSlot(i int) *SubscriptionMatchCreate
- func (smc *SubscriptionMatchCreate) SetRadiantWin(b bool) *SubscriptionMatchCreate
- func (smc *SubscriptionMatchCreate) SetSkill(i int) *SubscriptionMatchCreate
- func (smc *SubscriptionMatchCreate) SetStartTime(i int) *SubscriptionMatchCreate
- func (smc *SubscriptionMatchCreate) SetUpdateTime(t time.Time) *SubscriptionMatchCreate
- func (smc *SubscriptionMatchCreate) SetVersion(i int) *SubscriptionMatchCreate
- type SubscriptionMatchCreateBulk
- func (smcb *SubscriptionMatchCreateBulk) Exec(ctx context.Context) error
- func (smcb *SubscriptionMatchCreateBulk) ExecX(ctx context.Context)
- func (smcb *SubscriptionMatchCreateBulk) Save(ctx context.Context) ([]*SubscriptionMatch, error)
- func (smcb *SubscriptionMatchCreateBulk) SaveX(ctx context.Context) []*SubscriptionMatch
- type SubscriptionMatchDelete
- type SubscriptionMatchDeleteOne
- type SubscriptionMatchGroupBy
- func (smgb *SubscriptionMatchGroupBy) Aggregate(fns ...AggregateFunc) *SubscriptionMatchGroupBy
- func (s *SubscriptionMatchGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SubscriptionMatchGroupBy) BoolX(ctx context.Context) bool
- func (s *SubscriptionMatchGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SubscriptionMatchGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SubscriptionMatchGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SubscriptionMatchGroupBy) Float64X(ctx context.Context) float64
- func (s *SubscriptionMatchGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SubscriptionMatchGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SubscriptionMatchGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SubscriptionMatchGroupBy) IntX(ctx context.Context) int
- func (s *SubscriptionMatchGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SubscriptionMatchGroupBy) IntsX(ctx context.Context) []int
- func (smgb *SubscriptionMatchGroupBy) Scan(ctx context.Context, v interface{}) error
- func (s *SubscriptionMatchGroupBy) ScanX(ctx context.Context, v interface{})
- func (s *SubscriptionMatchGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SubscriptionMatchGroupBy) StringX(ctx context.Context) string
- func (s *SubscriptionMatchGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SubscriptionMatchGroupBy) StringsX(ctx context.Context) []string
- type SubscriptionMatchMutation
- func (m *SubscriptionMatchMutation) AddAssists(i int)
- func (m *SubscriptionMatchMutation) AddDeaths(i int)
- func (m *SubscriptionMatchMutation) AddDuration(i int)
- func (m *SubscriptionMatchMutation) AddField(name string, value ent.Value) error
- func (m *SubscriptionMatchMutation) AddGameMode(i int)
- func (m *SubscriptionMatchMutation) AddHeroID(i int)
- func (m *SubscriptionMatchMutation) AddKills(i int)
- func (m *SubscriptionMatchMutation) AddLeaverStatus(i int)
- func (m *SubscriptionMatchMutation) AddLobbyType(i int)
- func (m *SubscriptionMatchMutation) AddMatchID(i int64)
- func (m *SubscriptionMatchMutation) AddPartySize(i int)
- func (m *SubscriptionMatchMutation) AddPlayerSlot(i int)
- func (m *SubscriptionMatchMutation) AddSkill(i int)
- func (m *SubscriptionMatchMutation) AddStartTime(i int)
- func (m *SubscriptionMatchMutation) AddVersion(i int)
- func (m *SubscriptionMatchMutation) AddedAssists() (r int, exists bool)
- func (m *SubscriptionMatchMutation) AddedDeaths() (r int, exists bool)
- func (m *SubscriptionMatchMutation) AddedDuration() (r int, exists bool)
- func (m *SubscriptionMatchMutation) AddedEdges() []string
- func (m *SubscriptionMatchMutation) AddedField(name string) (ent.Value, bool)
- func (m *SubscriptionMatchMutation) AddedFields() []string
- func (m *SubscriptionMatchMutation) AddedGameMode() (r int, exists bool)
- func (m *SubscriptionMatchMutation) AddedHeroID() (r int, exists bool)
- func (m *SubscriptionMatchMutation) AddedIDs(name string) []ent.Value
- func (m *SubscriptionMatchMutation) AddedKills() (r int, exists bool)
- func (m *SubscriptionMatchMutation) AddedLeaverStatus() (r int, exists bool)
- func (m *SubscriptionMatchMutation) AddedLobbyType() (r int, exists bool)
- func (m *SubscriptionMatchMutation) AddedMatchID() (r int64, exists bool)
- func (m *SubscriptionMatchMutation) AddedPartySize() (r int, exists bool)
- func (m *SubscriptionMatchMutation) AddedPlayerSlot() (r int, exists bool)
- func (m *SubscriptionMatchMutation) AddedSkill() (r int, exists bool)
- func (m *SubscriptionMatchMutation) AddedStartTime() (r int, exists bool)
- func (m *SubscriptionMatchMutation) AddedVersion() (r int, exists bool)
- func (m *SubscriptionMatchMutation) Assists() (r int, exists bool)
- func (m *SubscriptionMatchMutation) ClearEdge(name string) error
- func (m *SubscriptionMatchMutation) ClearField(name string) error
- func (m *SubscriptionMatchMutation) ClearSkill()
- func (m *SubscriptionMatchMutation) ClearedEdges() []string
- func (m *SubscriptionMatchMutation) ClearedFields() []string
- func (m SubscriptionMatchMutation) Client() *Client
- func (m *SubscriptionMatchMutation) CreateTime() (r time.Time, exists bool)
- func (m *SubscriptionMatchMutation) Deaths() (r int, exists bool)
- func (m *SubscriptionMatchMutation) Duration() (r int, exists bool)
- func (m *SubscriptionMatchMutation) EdgeCleared(name string) bool
- func (m *SubscriptionMatchMutation) Field(name string) (ent.Value, bool)
- func (m *SubscriptionMatchMutation) FieldCleared(name string) bool
- func (m *SubscriptionMatchMutation) Fields() []string
- func (m *SubscriptionMatchMutation) GameMode() (r int, exists bool)
- func (m *SubscriptionMatchMutation) HeroID() (r int, exists bool)
- func (m *SubscriptionMatchMutation) ID() (id int, exists bool)
- func (m *SubscriptionMatchMutation) IDs(ctx context.Context) ([]int, error)
- func (m *SubscriptionMatchMutation) Kills() (r int, exists bool)
- func (m *SubscriptionMatchMutation) LeaverStatus() (r int, exists bool)
- func (m *SubscriptionMatchMutation) LobbyType() (r int, exists bool)
- func (m *SubscriptionMatchMutation) MatchID() (r int64, exists bool)
- func (m *SubscriptionMatchMutation) OldAssists(ctx context.Context) (v int, err error)
- func (m *SubscriptionMatchMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *SubscriptionMatchMutation) OldDeaths(ctx context.Context) (v int, err error)
- func (m *SubscriptionMatchMutation) OldDuration(ctx context.Context) (v int, err error)
- func (m *SubscriptionMatchMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SubscriptionMatchMutation) OldGameMode(ctx context.Context) (v int, err error)
- func (m *SubscriptionMatchMutation) OldHeroID(ctx context.Context) (v int, err error)
- func (m *SubscriptionMatchMutation) OldKills(ctx context.Context) (v int, err error)
- func (m *SubscriptionMatchMutation) OldLeaverStatus(ctx context.Context) (v int, err error)
- func (m *SubscriptionMatchMutation) OldLobbyType(ctx context.Context) (v int, err error)
- func (m *SubscriptionMatchMutation) OldMatchID(ctx context.Context) (v int64, err error)
- func (m *SubscriptionMatchMutation) OldPartySize(ctx context.Context) (v int, err error)
- func (m *SubscriptionMatchMutation) OldPlayerID(ctx context.Context) (v string, err error)
- func (m *SubscriptionMatchMutation) OldPlayerSlot(ctx context.Context) (v int, err error)
- func (m *SubscriptionMatchMutation) OldRadiantWin(ctx context.Context) (v bool, err error)
- func (m *SubscriptionMatchMutation) OldSkill(ctx context.Context) (v *int, err error)
- func (m *SubscriptionMatchMutation) OldStartTime(ctx context.Context) (v int, err error)
- func (m *SubscriptionMatchMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *SubscriptionMatchMutation) OldVersion(ctx context.Context) (v int, err error)
- func (m *SubscriptionMatchMutation) Op() Op
- func (m *SubscriptionMatchMutation) PartySize() (r int, exists bool)
- func (m *SubscriptionMatchMutation) PlayerID() (r string, exists bool)
- func (m *SubscriptionMatchMutation) PlayerSlot() (r int, exists bool)
- func (m *SubscriptionMatchMutation) RadiantWin() (r bool, exists bool)
- func (m *SubscriptionMatchMutation) RemovedEdges() []string
- func (m *SubscriptionMatchMutation) RemovedIDs(name string) []ent.Value
- func (m *SubscriptionMatchMutation) ResetAssists()
- func (m *SubscriptionMatchMutation) ResetCreateTime()
- func (m *SubscriptionMatchMutation) ResetDeaths()
- func (m *SubscriptionMatchMutation) ResetDuration()
- func (m *SubscriptionMatchMutation) ResetEdge(name string) error
- func (m *SubscriptionMatchMutation) ResetField(name string) error
- func (m *SubscriptionMatchMutation) ResetGameMode()
- func (m *SubscriptionMatchMutation) ResetHeroID()
- func (m *SubscriptionMatchMutation) ResetKills()
- func (m *SubscriptionMatchMutation) ResetLeaverStatus()
- func (m *SubscriptionMatchMutation) ResetLobbyType()
- func (m *SubscriptionMatchMutation) ResetMatchID()
- func (m *SubscriptionMatchMutation) ResetPartySize()
- func (m *SubscriptionMatchMutation) ResetPlayerID()
- func (m *SubscriptionMatchMutation) ResetPlayerSlot()
- func (m *SubscriptionMatchMutation) ResetRadiantWin()
- func (m *SubscriptionMatchMutation) ResetSkill()
- func (m *SubscriptionMatchMutation) ResetStartTime()
- func (m *SubscriptionMatchMutation) ResetUpdateTime()
- func (m *SubscriptionMatchMutation) ResetVersion()
- func (m *SubscriptionMatchMutation) SetAssists(i int)
- func (m *SubscriptionMatchMutation) SetCreateTime(t time.Time)
- func (m *SubscriptionMatchMutation) SetDeaths(i int)
- func (m *SubscriptionMatchMutation) SetDuration(i int)
- func (m *SubscriptionMatchMutation) SetField(name string, value ent.Value) error
- func (m *SubscriptionMatchMutation) SetGameMode(i int)
- func (m *SubscriptionMatchMutation) SetHeroID(i int)
- func (m *SubscriptionMatchMutation) SetKills(i int)
- func (m *SubscriptionMatchMutation) SetLeaverStatus(i int)
- func (m *SubscriptionMatchMutation) SetLobbyType(i int)
- func (m *SubscriptionMatchMutation) SetMatchID(i int64)
- func (m *SubscriptionMatchMutation) SetPartySize(i int)
- func (m *SubscriptionMatchMutation) SetPlayerID(s string)
- func (m *SubscriptionMatchMutation) SetPlayerSlot(i int)
- func (m *SubscriptionMatchMutation) SetRadiantWin(b bool)
- func (m *SubscriptionMatchMutation) SetSkill(i int)
- func (m *SubscriptionMatchMutation) SetStartTime(i int)
- func (m *SubscriptionMatchMutation) SetUpdateTime(t time.Time)
- func (m *SubscriptionMatchMutation) SetVersion(i int)
- func (m *SubscriptionMatchMutation) Skill() (r int, exists bool)
- func (m *SubscriptionMatchMutation) SkillCleared() bool
- func (m *SubscriptionMatchMutation) StartTime() (r int, exists bool)
- func (m SubscriptionMatchMutation) Tx() (*Tx, error)
- func (m *SubscriptionMatchMutation) Type() string
- func (m *SubscriptionMatchMutation) UpdateTime() (r time.Time, exists bool)
- func (m *SubscriptionMatchMutation) Version() (r int, exists bool)
- func (m *SubscriptionMatchMutation) Where(ps ...predicate.SubscriptionMatch)
- type SubscriptionMatchQuery
- func (smq *SubscriptionMatchQuery) All(ctx context.Context) ([]*SubscriptionMatch, error)
- func (smq *SubscriptionMatchQuery) AllX(ctx context.Context) []*SubscriptionMatch
- func (smq *SubscriptionMatchQuery) Clone() *SubscriptionMatchQuery
- func (smq *SubscriptionMatchQuery) Count(ctx context.Context) (int, error)
- func (smq *SubscriptionMatchQuery) CountX(ctx context.Context) int
- func (smq *SubscriptionMatchQuery) Exist(ctx context.Context) (bool, error)
- func (smq *SubscriptionMatchQuery) ExistX(ctx context.Context) bool
- func (smq *SubscriptionMatchQuery) First(ctx context.Context) (*SubscriptionMatch, error)
- func (smq *SubscriptionMatchQuery) FirstID(ctx context.Context) (id int, err error)
- func (smq *SubscriptionMatchQuery) FirstIDX(ctx context.Context) int
- func (smq *SubscriptionMatchQuery) FirstX(ctx context.Context) *SubscriptionMatch
- func (smq *SubscriptionMatchQuery) GroupBy(field string, fields ...string) *SubscriptionMatchGroupBy
- func (smq *SubscriptionMatchQuery) IDs(ctx context.Context) ([]int, error)
- func (smq *SubscriptionMatchQuery) IDsX(ctx context.Context) []int
- func (smq *SubscriptionMatchQuery) Limit(limit int) *SubscriptionMatchQuery
- func (smq *SubscriptionMatchQuery) Offset(offset int) *SubscriptionMatchQuery
- func (smq *SubscriptionMatchQuery) Only(ctx context.Context) (*SubscriptionMatch, error)
- func (smq *SubscriptionMatchQuery) OnlyID(ctx context.Context) (id int, err error)
- func (smq *SubscriptionMatchQuery) OnlyIDX(ctx context.Context) int
- func (smq *SubscriptionMatchQuery) OnlyX(ctx context.Context) *SubscriptionMatch
- func (smq *SubscriptionMatchQuery) Order(o ...OrderFunc) *SubscriptionMatchQuery
- func (smq *SubscriptionMatchQuery) Select(fields ...string) *SubscriptionMatchSelect
- func (smq *SubscriptionMatchQuery) Unique(unique bool) *SubscriptionMatchQuery
- func (smq *SubscriptionMatchQuery) Where(ps ...predicate.SubscriptionMatch) *SubscriptionMatchQuery
- type SubscriptionMatchSelect
- func (s *SubscriptionMatchSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SubscriptionMatchSelect) BoolX(ctx context.Context) bool
- func (s *SubscriptionMatchSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SubscriptionMatchSelect) BoolsX(ctx context.Context) []bool
- func (s *SubscriptionMatchSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SubscriptionMatchSelect) Float64X(ctx context.Context) float64
- func (s *SubscriptionMatchSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SubscriptionMatchSelect) Float64sX(ctx context.Context) []float64
- func (s *SubscriptionMatchSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SubscriptionMatchSelect) IntX(ctx context.Context) int
- func (s *SubscriptionMatchSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SubscriptionMatchSelect) IntsX(ctx context.Context) []int
- func (sms *SubscriptionMatchSelect) Scan(ctx context.Context, v interface{}) error
- func (s *SubscriptionMatchSelect) ScanX(ctx context.Context, v interface{})
- func (s *SubscriptionMatchSelect) String(ctx context.Context) (_ string, err error)
- func (s *SubscriptionMatchSelect) StringX(ctx context.Context) string
- func (s *SubscriptionMatchSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SubscriptionMatchSelect) StringsX(ctx context.Context) []string
- type SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) AddAssists(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) AddDeaths(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) AddDuration(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) AddGameMode(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) AddHeroID(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) AddKills(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) AddLeaverStatus(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) AddLobbyType(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) AddMatchID(i int64) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) AddPartySize(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) AddPlayerSlot(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) AddSkill(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) AddStartTime(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) AddVersion(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) ClearSkill() *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) Exec(ctx context.Context) error
- func (smu *SubscriptionMatchUpdate) ExecX(ctx context.Context)
- func (smu *SubscriptionMatchUpdate) Mutation() *SubscriptionMatchMutation
- func (smu *SubscriptionMatchUpdate) Save(ctx context.Context) (int, error)
- func (smu *SubscriptionMatchUpdate) SaveX(ctx context.Context) int
- func (smu *SubscriptionMatchUpdate) SetAssists(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) SetDeaths(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) SetDuration(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) SetGameMode(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) SetHeroID(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) SetKills(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) SetLeaverStatus(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) SetLobbyType(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) SetMatchID(i int64) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) SetNillableSkill(i *int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) SetPartySize(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) SetPlayerID(s string) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) SetPlayerSlot(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) SetRadiantWin(b bool) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) SetSkill(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) SetStartTime(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) SetUpdateTime(t time.Time) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) SetVersion(i int) *SubscriptionMatchUpdate
- func (smu *SubscriptionMatchUpdate) Where(ps ...predicate.SubscriptionMatch) *SubscriptionMatchUpdate
- type SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) AddAssists(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) AddDeaths(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) AddDuration(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) AddGameMode(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) AddHeroID(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) AddKills(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) AddLeaverStatus(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) AddLobbyType(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) AddMatchID(i int64) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) AddPartySize(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) AddPlayerSlot(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) AddSkill(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) AddStartTime(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) AddVersion(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) ClearSkill() *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) Exec(ctx context.Context) error
- func (smuo *SubscriptionMatchUpdateOne) ExecX(ctx context.Context)
- func (smuo *SubscriptionMatchUpdateOne) Mutation() *SubscriptionMatchMutation
- func (smuo *SubscriptionMatchUpdateOne) Save(ctx context.Context) (*SubscriptionMatch, error)
- func (smuo *SubscriptionMatchUpdateOne) SaveX(ctx context.Context) *SubscriptionMatch
- func (smuo *SubscriptionMatchUpdateOne) Select(field string, fields ...string) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) SetAssists(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) SetDeaths(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) SetDuration(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) SetGameMode(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) SetHeroID(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) SetKills(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) SetLeaverStatus(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) SetLobbyType(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) SetMatchID(i int64) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) SetNillableSkill(i *int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) SetPartySize(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) SetPlayerID(s string) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) SetPlayerSlot(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) SetRadiantWin(b bool) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) SetSkill(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) SetStartTime(i int) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) SetUpdateTime(t time.Time) *SubscriptionMatchUpdateOne
- func (smuo *SubscriptionMatchUpdateOne) SetVersion(i int) *SubscriptionMatchUpdateOne
- type SubscriptionMatches
- type SubscriptionMutation
- func (m *SubscriptionMutation) AddField(name string, value ent.Value) error
- func (m *SubscriptionMutation) AddGroupID(i int)
- func (m *SubscriptionMutation) AddedEdges() []string
- func (m *SubscriptionMutation) AddedField(name string) (ent.Value, bool)
- func (m *SubscriptionMutation) AddedFields() []string
- func (m *SubscriptionMutation) AddedGroupID() (r int, exists bool)
- func (m *SubscriptionMutation) AddedIDs(name string) []ent.Value
- func (m *SubscriptionMutation) Alias() (r string, exists bool)
- func (m *SubscriptionMutation) ClearEdge(name string) error
- func (m *SubscriptionMutation) ClearField(name string) error
- func (m *SubscriptionMutation) ClearedEdges() []string
- func (m *SubscriptionMutation) ClearedFields() []string
- func (m SubscriptionMutation) Client() *Client
- func (m *SubscriptionMutation) CreateTime() (r time.Time, exists bool)
- func (m *SubscriptionMutation) EdgeCleared(name string) bool
- func (m *SubscriptionMutation) Field(name string) (ent.Value, bool)
- func (m *SubscriptionMutation) FieldCleared(name string) bool
- func (m *SubscriptionMutation) Fields() []string
- func (m *SubscriptionMutation) GroupID() (r int, exists bool)
- func (m *SubscriptionMutation) ID() (id int, exists bool)
- func (m *SubscriptionMutation) IDs(ctx context.Context) ([]int, error)
- func (m *SubscriptionMutation) OldAlias(ctx context.Context) (v string, err error)
- func (m *SubscriptionMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *SubscriptionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SubscriptionMutation) OldGroupID(ctx context.Context) (v int, err error)
- func (m *SubscriptionMutation) OldSteamID(ctx context.Context) (v string, err error)
- func (m *SubscriptionMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *SubscriptionMutation) Op() Op
- func (m *SubscriptionMutation) RemovedEdges() []string
- func (m *SubscriptionMutation) RemovedIDs(name string) []ent.Value
- func (m *SubscriptionMutation) ResetAlias()
- func (m *SubscriptionMutation) ResetCreateTime()
- func (m *SubscriptionMutation) ResetEdge(name string) error
- func (m *SubscriptionMutation) ResetField(name string) error
- func (m *SubscriptionMutation) ResetGroupID()
- func (m *SubscriptionMutation) ResetSteamID()
- func (m *SubscriptionMutation) ResetUpdateTime()
- func (m *SubscriptionMutation) SetAlias(s string)
- func (m *SubscriptionMutation) SetCreateTime(t time.Time)
- func (m *SubscriptionMutation) SetField(name string, value ent.Value) error
- func (m *SubscriptionMutation) SetGroupID(i int)
- func (m *SubscriptionMutation) SetSteamID(s string)
- func (m *SubscriptionMutation) SetUpdateTime(t time.Time)
- func (m *SubscriptionMutation) SteamID() (r string, exists bool)
- func (m SubscriptionMutation) Tx() (*Tx, error)
- func (m *SubscriptionMutation) Type() string
- func (m *SubscriptionMutation) UpdateTime() (r time.Time, exists bool)
- func (m *SubscriptionMutation) Where(ps ...predicate.Subscription)
- type SubscriptionQuery
- func (sq *SubscriptionQuery) All(ctx context.Context) ([]*Subscription, error)
- func (sq *SubscriptionQuery) AllX(ctx context.Context) []*Subscription
- func (sq *SubscriptionQuery) Clone() *SubscriptionQuery
- func (sq *SubscriptionQuery) Count(ctx context.Context) (int, error)
- func (sq *SubscriptionQuery) CountX(ctx context.Context) int
- func (sq *SubscriptionQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SubscriptionQuery) ExistX(ctx context.Context) bool
- func (sq *SubscriptionQuery) First(ctx context.Context) (*Subscription, error)
- func (sq *SubscriptionQuery) FirstID(ctx context.Context) (id int, err error)
- func (sq *SubscriptionQuery) FirstIDX(ctx context.Context) int
- func (sq *SubscriptionQuery) FirstX(ctx context.Context) *Subscription
- func (sq *SubscriptionQuery) GroupBy(field string, fields ...string) *SubscriptionGroupBy
- func (sq *SubscriptionQuery) IDs(ctx context.Context) ([]int, error)
- func (sq *SubscriptionQuery) IDsX(ctx context.Context) []int
- func (sq *SubscriptionQuery) Limit(limit int) *SubscriptionQuery
- func (sq *SubscriptionQuery) Offset(offset int) *SubscriptionQuery
- func (sq *SubscriptionQuery) Only(ctx context.Context) (*Subscription, error)
- func (sq *SubscriptionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (sq *SubscriptionQuery) OnlyIDX(ctx context.Context) int
- func (sq *SubscriptionQuery) OnlyX(ctx context.Context) *Subscription
- func (sq *SubscriptionQuery) Order(o ...OrderFunc) *SubscriptionQuery
- func (sq *SubscriptionQuery) Select(fields ...string) *SubscriptionSelect
- func (sq *SubscriptionQuery) Unique(unique bool) *SubscriptionQuery
- func (sq *SubscriptionQuery) Where(ps ...predicate.Subscription) *SubscriptionQuery
- type SubscriptionSelect
- func (s *SubscriptionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SubscriptionSelect) BoolX(ctx context.Context) bool
- func (s *SubscriptionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SubscriptionSelect) BoolsX(ctx context.Context) []bool
- func (s *SubscriptionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SubscriptionSelect) Float64X(ctx context.Context) float64
- func (s *SubscriptionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SubscriptionSelect) Float64sX(ctx context.Context) []float64
- func (s *SubscriptionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SubscriptionSelect) IntX(ctx context.Context) int
- func (s *SubscriptionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SubscriptionSelect) IntsX(ctx context.Context) []int
- func (ss *SubscriptionSelect) Scan(ctx context.Context, v interface{}) error
- func (s *SubscriptionSelect) ScanX(ctx context.Context, v interface{})
- func (s *SubscriptionSelect) String(ctx context.Context) (_ string, err error)
- func (s *SubscriptionSelect) StringX(ctx context.Context) string
- func (s *SubscriptionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SubscriptionSelect) StringsX(ctx context.Context) []string
- type SubscriptionUpdate
- func (su *SubscriptionUpdate) AddGroupID(i int) *SubscriptionUpdate
- func (su *SubscriptionUpdate) Exec(ctx context.Context) error
- func (su *SubscriptionUpdate) ExecX(ctx context.Context)
- func (su *SubscriptionUpdate) Mutation() *SubscriptionMutation
- func (su *SubscriptionUpdate) Save(ctx context.Context) (int, error)
- func (su *SubscriptionUpdate) SaveX(ctx context.Context) int
- func (su *SubscriptionUpdate) SetAlias(s string) *SubscriptionUpdate
- func (su *SubscriptionUpdate) SetGroupID(i int) *SubscriptionUpdate
- func (su *SubscriptionUpdate) SetSteamID(s string) *SubscriptionUpdate
- func (su *SubscriptionUpdate) SetUpdateTime(t time.Time) *SubscriptionUpdate
- func (su *SubscriptionUpdate) Where(ps ...predicate.Subscription) *SubscriptionUpdate
- type SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) AddGroupID(i int) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) Exec(ctx context.Context) error
- func (suo *SubscriptionUpdateOne) ExecX(ctx context.Context)
- func (suo *SubscriptionUpdateOne) Mutation() *SubscriptionMutation
- func (suo *SubscriptionUpdateOne) Save(ctx context.Context) (*Subscription, error)
- func (suo *SubscriptionUpdateOne) SaveX(ctx context.Context) *Subscription
- func (suo *SubscriptionUpdateOne) Select(field string, fields ...string) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) SetAlias(s string) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) SetGroupID(i int) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) SetSteamID(s string) *SubscriptionUpdateOne
- func (suo *SubscriptionUpdateOne) SetUpdateTime(t time.Time) *SubscriptionUpdateOne
- type Subscriptions
- 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. TypeHero = "Hero" TypeSubscription = "Subscription" TypeSubscriptionMatch = "SubscriptionMatch" )
Variables ¶
This section is empty.
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 Client ¶
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// Hero is the client for interacting with the Hero builders.
Hero *HeroClient
// Subscription is the client for interacting with the Subscription builders.
Subscription *SubscriptionClient
// SubscriptionMatch is the client for interacting with the SubscriptionMatch builders.
SubscriptionMatch *SubscriptionMatchClient
// 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(). Hero. Query(). Count(ctx)
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 Hero ¶
type Hero struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreateTime holds the value of the "create_time" field.
CreateTime time.Time `json:"create_time,omitempty"`
// UpdateTime holds the value of the "update_time" field.
UpdateTime time.Time `json:"update_time,omitempty"`
// HeroID holds the value of the "hero_id" field.
HeroID int `json:"hero_id,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// LocalizedName holds the value of the "localized_name" field.
LocalizedName string `json:"localized_name,omitempty"`
// contains filtered or unexported fields
}
Hero is the model entity for the Hero schema.
func (*Hero) Unwrap ¶
Unwrap unwraps the Hero 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 (*Hero) Update ¶
func (h *Hero) Update() *HeroUpdateOne
Update returns a builder for updating this Hero. Note that you need to call Hero.Unwrap() before calling this method if this Hero was returned from a transaction, and the transaction was committed or rolled back.
type HeroClient ¶
type HeroClient struct {
// contains filtered or unexported fields
}
HeroClient is a client for the Hero schema.
func NewHeroClient ¶
func NewHeroClient(c config) *HeroClient
NewHeroClient returns a client for the Hero from the given config.
func (*HeroClient) Create ¶
func (c *HeroClient) Create() *HeroCreate
Create returns a builder for creating a Hero entity.
func (*HeroClient) CreateBulk ¶
func (c *HeroClient) CreateBulk(builders ...*HeroCreate) *HeroCreateBulk
CreateBulk returns a builder for creating a bulk of Hero entities.
func (*HeroClient) Delete ¶
func (c *HeroClient) Delete() *HeroDelete
Delete returns a delete builder for Hero.
func (*HeroClient) DeleteOne ¶
func (c *HeroClient) DeleteOne(h *Hero) *HeroDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*HeroClient) DeleteOneID ¶
func (c *HeroClient) DeleteOneID(id int) *HeroDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*HeroClient) GetX ¶
func (c *HeroClient) GetX(ctx context.Context, id int) *Hero
GetX is like Get, but panics if an error occurs.
func (*HeroClient) Query ¶
func (c *HeroClient) Query() *HeroQuery
Query returns a query builder for Hero.
func (*HeroClient) Update ¶
func (c *HeroClient) Update() *HeroUpdate
Update returns an update builder for Hero.
func (*HeroClient) UpdateOne ¶
func (c *HeroClient) UpdateOne(h *Hero) *HeroUpdateOne
UpdateOne returns an update builder for the given entity.
func (*HeroClient) UpdateOneID ¶
func (c *HeroClient) UpdateOneID(id int) *HeroUpdateOne
UpdateOneID returns an update builder for the given id.
func (*HeroClient) Use ¶
func (c *HeroClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `hero.Hooks(f(g(h())))`.
type HeroCreate ¶
type HeroCreate struct {
// contains filtered or unexported fields
}
HeroCreate is the builder for creating a Hero entity.
func (*HeroCreate) Exec ¶
func (hc *HeroCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*HeroCreate) ExecX ¶
func (hc *HeroCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HeroCreate) Mutation ¶
func (hc *HeroCreate) Mutation() *HeroMutation
Mutation returns the HeroMutation object of the builder.
func (*HeroCreate) Save ¶
func (hc *HeroCreate) Save(ctx context.Context) (*Hero, error)
Save creates the Hero in the database.
func (*HeroCreate) SaveX ¶
func (hc *HeroCreate) SaveX(ctx context.Context) *Hero
SaveX calls Save and panics if Save returns an error.
func (*HeroCreate) SetCreateTime ¶
func (hc *HeroCreate) SetCreateTime(t time.Time) *HeroCreate
SetCreateTime sets the "create_time" field.
func (*HeroCreate) SetHeroID ¶
func (hc *HeroCreate) SetHeroID(i int) *HeroCreate
SetHeroID sets the "hero_id" field.
func (*HeroCreate) SetLocalizedName ¶
func (hc *HeroCreate) SetLocalizedName(s string) *HeroCreate
SetLocalizedName sets the "localized_name" field.
func (*HeroCreate) SetName ¶
func (hc *HeroCreate) SetName(s string) *HeroCreate
SetName sets the "name" field.
func (*HeroCreate) SetNillableCreateTime ¶
func (hc *HeroCreate) SetNillableCreateTime(t *time.Time) *HeroCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*HeroCreate) SetNillableUpdateTime ¶
func (hc *HeroCreate) SetNillableUpdateTime(t *time.Time) *HeroCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*HeroCreate) SetUpdateTime ¶
func (hc *HeroCreate) SetUpdateTime(t time.Time) *HeroCreate
SetUpdateTime sets the "update_time" field.
type HeroCreateBulk ¶
type HeroCreateBulk struct {
// contains filtered or unexported fields
}
HeroCreateBulk is the builder for creating many Hero entities in bulk.
func (*HeroCreateBulk) Exec ¶
func (hcb *HeroCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*HeroCreateBulk) ExecX ¶
func (hcb *HeroCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type HeroDelete ¶
type HeroDelete struct {
// contains filtered or unexported fields
}
HeroDelete is the builder for deleting a Hero entity.
func (*HeroDelete) Exec ¶
func (hd *HeroDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*HeroDelete) ExecX ¶
func (hd *HeroDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*HeroDelete) Where ¶
func (hd *HeroDelete) Where(ps ...predicate.Hero) *HeroDelete
Where appends a list predicates to the HeroDelete builder.
type HeroDeleteOne ¶
type HeroDeleteOne struct {
// contains filtered or unexported fields
}
HeroDeleteOne is the builder for deleting a single Hero entity.
func (*HeroDeleteOne) Exec ¶
func (hdo *HeroDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*HeroDeleteOne) ExecX ¶
func (hdo *HeroDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type HeroGroupBy ¶
type HeroGroupBy struct {
// contains filtered or unexported fields
}
HeroGroupBy is the group-by builder for Hero entities.
func (*HeroGroupBy) Aggregate ¶
func (hgb *HeroGroupBy) Aggregate(fns ...AggregateFunc) *HeroGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*HeroGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*HeroGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*HeroGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*HeroGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*HeroGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*HeroGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*HeroGroupBy) Scan ¶
func (hgb *HeroGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*HeroGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type HeroMutation ¶
type HeroMutation struct {
// contains filtered or unexported fields
}
HeroMutation represents an operation that mutates the Hero nodes in the graph.
func (*HeroMutation) AddField ¶
func (m *HeroMutation) 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 (*HeroMutation) AddHeroID ¶
func (m *HeroMutation) AddHeroID(i int)
AddHeroID adds i to the "hero_id" field.
func (*HeroMutation) AddedEdges ¶
func (m *HeroMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*HeroMutation) AddedField ¶
func (m *HeroMutation) 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 (*HeroMutation) AddedFields ¶
func (m *HeroMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*HeroMutation) AddedHeroID ¶
func (m *HeroMutation) AddedHeroID() (r int, exists bool)
AddedHeroID returns the value that was added to the "hero_id" field in this mutation.
func (*HeroMutation) AddedIDs ¶
func (m *HeroMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*HeroMutation) ClearEdge ¶
func (m *HeroMutation) 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 (*HeroMutation) ClearField ¶
func (m *HeroMutation) 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 (*HeroMutation) ClearedEdges ¶
func (m *HeroMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*HeroMutation) ClearedFields ¶
func (m *HeroMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (HeroMutation) Client ¶
func (m HeroMutation) 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 (*HeroMutation) CreateTime ¶
func (m *HeroMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*HeroMutation) EdgeCleared ¶
func (m *HeroMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*HeroMutation) Field ¶
func (m *HeroMutation) 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 (*HeroMutation) FieldCleared ¶
func (m *HeroMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*HeroMutation) Fields ¶
func (m *HeroMutation) 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 (*HeroMutation) HeroID ¶
func (m *HeroMutation) HeroID() (r int, exists bool)
HeroID returns the value of the "hero_id" field in the mutation.
func (*HeroMutation) ID ¶
func (m *HeroMutation) 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 (*HeroMutation) IDs ¶
func (m *HeroMutation) 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 (*HeroMutation) LocalizedName ¶
func (m *HeroMutation) LocalizedName() (r string, exists bool)
LocalizedName returns the value of the "localized_name" field in the mutation.
func (*HeroMutation) Name ¶
func (m *HeroMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*HeroMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Hero entity. If the Hero 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 (*HeroMutation) 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 (*HeroMutation) OldHeroID ¶
func (m *HeroMutation) OldHeroID(ctx context.Context) (v int, err error)
OldHeroID returns the old "hero_id" field's value of the Hero entity. If the Hero 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 (*HeroMutation) OldLocalizedName ¶
func (m *HeroMutation) OldLocalizedName(ctx context.Context) (v string, err error)
OldLocalizedName returns the old "localized_name" field's value of the Hero entity. If the Hero 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 (*HeroMutation) OldName ¶
func (m *HeroMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Hero entity. If the Hero 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 (*HeroMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Hero entity. If the Hero 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 (*HeroMutation) RemovedEdges ¶
func (m *HeroMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*HeroMutation) RemovedIDs ¶
func (m *HeroMutation) 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 (*HeroMutation) ResetCreateTime ¶
func (m *HeroMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*HeroMutation) ResetEdge ¶
func (m *HeroMutation) 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 (*HeroMutation) ResetField ¶
func (m *HeroMutation) 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 (*HeroMutation) ResetHeroID ¶
func (m *HeroMutation) ResetHeroID()
ResetHeroID resets all changes to the "hero_id" field.
func (*HeroMutation) ResetLocalizedName ¶
func (m *HeroMutation) ResetLocalizedName()
ResetLocalizedName resets all changes to the "localized_name" field.
func (*HeroMutation) ResetName ¶
func (m *HeroMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*HeroMutation) ResetUpdateTime ¶
func (m *HeroMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*HeroMutation) SetCreateTime ¶
func (m *HeroMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*HeroMutation) SetField ¶
func (m *HeroMutation) 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 (*HeroMutation) SetHeroID ¶
func (m *HeroMutation) SetHeroID(i int)
SetHeroID sets the "hero_id" field.
func (*HeroMutation) SetLocalizedName ¶
func (m *HeroMutation) SetLocalizedName(s string)
SetLocalizedName sets the "localized_name" field.
func (*HeroMutation) SetName ¶
func (m *HeroMutation) SetName(s string)
SetName sets the "name" field.
func (*HeroMutation) SetUpdateTime ¶
func (m *HeroMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (HeroMutation) Tx ¶
func (m HeroMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*HeroMutation) Type ¶
func (m *HeroMutation) Type() string
Type returns the node type of this mutation (Hero).
func (*HeroMutation) UpdateTime ¶
func (m *HeroMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*HeroMutation) Where ¶
func (m *HeroMutation) Where(ps ...predicate.Hero)
Where appends a list predicates to the HeroMutation builder.
type HeroQuery ¶
type HeroQuery struct {
// contains filtered or unexported fields
}
HeroQuery is the builder for querying Hero entities.
func (*HeroQuery) Clone ¶
Clone returns a duplicate of the HeroQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*HeroQuery) First ¶
First returns the first Hero entity from the query. Returns a *NotFoundError when no Hero was found.
func (*HeroQuery) FirstID ¶
FirstID returns the first Hero ID from the query. Returns a *NotFoundError when no Hero ID was found.
func (*HeroQuery) GroupBy ¶
func (hq *HeroQuery) GroupBy(field string, fields ...string) *HeroGroupBy
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 {
CreateTime time.Time `json:"create_time,omitempty"`
Count int `json:"count,omitempty"`
}
client.Hero.Query().
GroupBy(hero.FieldCreateTime).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*HeroQuery) Only ¶
Only returns a single Hero entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Hero entity is found. Returns a *NotFoundError when no Hero entities are found.
func (*HeroQuery) OnlyID ¶
OnlyID is like Only, but returns the only Hero ID in the query. Returns a *NotSingularError when more than one Hero ID is found. Returns a *NotFoundError when no entities are found.
func (*HeroQuery) Select ¶
func (hq *HeroQuery) Select(fields ...string) *HeroSelect
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 {
CreateTime time.Time `json:"create_time,omitempty"`
}
client.Hero.Query().
Select(hero.FieldCreateTime).
Scan(ctx, &v)
type HeroSelect ¶
type HeroSelect struct {
*HeroQuery
// contains filtered or unexported fields
}
HeroSelect is the builder for selecting fields of Hero entities.
func (*HeroSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*HeroSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*HeroSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*HeroSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*HeroSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*HeroSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*HeroSelect) Scan ¶
func (hs *HeroSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*HeroSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type HeroUpdate ¶
type HeroUpdate struct {
// contains filtered or unexported fields
}
HeroUpdate is the builder for updating Hero entities.
func (*HeroUpdate) AddHeroID ¶
func (hu *HeroUpdate) AddHeroID(i int) *HeroUpdate
AddHeroID adds i to the "hero_id" field.
func (*HeroUpdate) Exec ¶
func (hu *HeroUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*HeroUpdate) ExecX ¶
func (hu *HeroUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HeroUpdate) Mutation ¶
func (hu *HeroUpdate) Mutation() *HeroMutation
Mutation returns the HeroMutation object of the builder.
func (*HeroUpdate) Save ¶
func (hu *HeroUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*HeroUpdate) SaveX ¶
func (hu *HeroUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*HeroUpdate) SetHeroID ¶
func (hu *HeroUpdate) SetHeroID(i int) *HeroUpdate
SetHeroID sets the "hero_id" field.
func (*HeroUpdate) SetLocalizedName ¶
func (hu *HeroUpdate) SetLocalizedName(s string) *HeroUpdate
SetLocalizedName sets the "localized_name" field.
func (*HeroUpdate) SetName ¶
func (hu *HeroUpdate) SetName(s string) *HeroUpdate
SetName sets the "name" field.
func (*HeroUpdate) SetUpdateTime ¶
func (hu *HeroUpdate) SetUpdateTime(t time.Time) *HeroUpdate
SetUpdateTime sets the "update_time" field.
func (*HeroUpdate) Where ¶
func (hu *HeroUpdate) Where(ps ...predicate.Hero) *HeroUpdate
Where appends a list predicates to the HeroUpdate builder.
type HeroUpdateOne ¶
type HeroUpdateOne struct {
// contains filtered or unexported fields
}
HeroUpdateOne is the builder for updating a single Hero entity.
func (*HeroUpdateOne) AddHeroID ¶
func (huo *HeroUpdateOne) AddHeroID(i int) *HeroUpdateOne
AddHeroID adds i to the "hero_id" field.
func (*HeroUpdateOne) Exec ¶
func (huo *HeroUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*HeroUpdateOne) ExecX ¶
func (huo *HeroUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HeroUpdateOne) Mutation ¶
func (huo *HeroUpdateOne) Mutation() *HeroMutation
Mutation returns the HeroMutation object of the builder.
func (*HeroUpdateOne) Save ¶
func (huo *HeroUpdateOne) Save(ctx context.Context) (*Hero, error)
Save executes the query and returns the updated Hero entity.
func (*HeroUpdateOne) SaveX ¶
func (huo *HeroUpdateOne) SaveX(ctx context.Context) *Hero
SaveX is like Save, but panics if an error occurs.
func (*HeroUpdateOne) Select ¶
func (huo *HeroUpdateOne) Select(field string, fields ...string) *HeroUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*HeroUpdateOne) SetHeroID ¶
func (huo *HeroUpdateOne) SetHeroID(i int) *HeroUpdateOne
SetHeroID sets the "hero_id" field.
func (*HeroUpdateOne) SetLocalizedName ¶
func (huo *HeroUpdateOne) SetLocalizedName(s string) *HeroUpdateOne
SetLocalizedName sets the "localized_name" field.
func (*HeroUpdateOne) SetName ¶
func (huo *HeroUpdateOne) SetName(s string) *HeroUpdateOne
SetName sets the "name" field.
func (*HeroUpdateOne) SetUpdateTime ¶
func (huo *HeroUpdateOne) SetUpdateTime(t time.Time) *HeroUpdateOne
SetUpdateTime sets the "update_time" field.
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 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 Subscription ¶
type Subscription struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreateTime holds the value of the "create_time" field.
CreateTime time.Time `json:"create_time,omitempty"`
// UpdateTime holds the value of the "update_time" field.
UpdateTime time.Time `json:"update_time,omitempty"`
// GroupID holds the value of the "group_id" field.
GroupID int `json:"group_id,omitempty"`
// SteamID holds the value of the "steam_id" field.
SteamID string `json:"steam_id,omitempty"`
// Alias holds the value of the "alias" field.
Alias string `json:"alias,omitempty"`
// contains filtered or unexported fields
}
Subscription is the model entity for the Subscription schema.
func (*Subscription) String ¶
func (s *Subscription) String() string
String implements the fmt.Stringer.
func (*Subscription) Unwrap ¶
func (s *Subscription) Unwrap() *Subscription
Unwrap unwraps the Subscription 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 (*Subscription) Update ¶
func (s *Subscription) Update() *SubscriptionUpdateOne
Update returns a builder for updating this Subscription. Note that you need to call Subscription.Unwrap() before calling this method if this Subscription was returned from a transaction, and the transaction was committed or rolled back.
type SubscriptionClient ¶
type SubscriptionClient struct {
// contains filtered or unexported fields
}
SubscriptionClient is a client for the Subscription schema.
func NewSubscriptionClient ¶
func NewSubscriptionClient(c config) *SubscriptionClient
NewSubscriptionClient returns a client for the Subscription from the given config.
func (*SubscriptionClient) Create ¶
func (c *SubscriptionClient) Create() *SubscriptionCreate
Create returns a builder for creating a Subscription entity.
func (*SubscriptionClient) CreateBulk ¶
func (c *SubscriptionClient) CreateBulk(builders ...*SubscriptionCreate) *SubscriptionCreateBulk
CreateBulk returns a builder for creating a bulk of Subscription entities.
func (*SubscriptionClient) Delete ¶
func (c *SubscriptionClient) Delete() *SubscriptionDelete
Delete returns a delete builder for Subscription.
func (*SubscriptionClient) DeleteOne ¶
func (c *SubscriptionClient) DeleteOne(s *Subscription) *SubscriptionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SubscriptionClient) DeleteOneID ¶
func (c *SubscriptionClient) DeleteOneID(id int) *SubscriptionDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*SubscriptionClient) Get ¶
func (c *SubscriptionClient) Get(ctx context.Context, id int) (*Subscription, error)
Get returns a Subscription entity by its id.
func (*SubscriptionClient) GetX ¶
func (c *SubscriptionClient) GetX(ctx context.Context, id int) *Subscription
GetX is like Get, but panics if an error occurs.
func (*SubscriptionClient) Hooks ¶
func (c *SubscriptionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SubscriptionClient) Query ¶
func (c *SubscriptionClient) Query() *SubscriptionQuery
Query returns a query builder for Subscription.
func (*SubscriptionClient) Update ¶
func (c *SubscriptionClient) Update() *SubscriptionUpdate
Update returns an update builder for Subscription.
func (*SubscriptionClient) UpdateOne ¶
func (c *SubscriptionClient) UpdateOne(s *Subscription) *SubscriptionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SubscriptionClient) UpdateOneID ¶
func (c *SubscriptionClient) UpdateOneID(id int) *SubscriptionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SubscriptionClient) Use ¶
func (c *SubscriptionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `subscription.Hooks(f(g(h())))`.
type SubscriptionCreate ¶
type SubscriptionCreate struct {
// contains filtered or unexported fields
}
SubscriptionCreate is the builder for creating a Subscription entity.
func (*SubscriptionCreate) Exec ¶
func (sc *SubscriptionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscriptionCreate) ExecX ¶
func (sc *SubscriptionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionCreate) Mutation ¶
func (sc *SubscriptionCreate) Mutation() *SubscriptionMutation
Mutation returns the SubscriptionMutation object of the builder.
func (*SubscriptionCreate) Save ¶
func (sc *SubscriptionCreate) Save(ctx context.Context) (*Subscription, error)
Save creates the Subscription in the database.
func (*SubscriptionCreate) SaveX ¶
func (sc *SubscriptionCreate) SaveX(ctx context.Context) *Subscription
SaveX calls Save and panics if Save returns an error.
func (*SubscriptionCreate) SetAlias ¶
func (sc *SubscriptionCreate) SetAlias(s string) *SubscriptionCreate
SetAlias sets the "alias" field.
func (*SubscriptionCreate) SetCreateTime ¶
func (sc *SubscriptionCreate) SetCreateTime(t time.Time) *SubscriptionCreate
SetCreateTime sets the "create_time" field.
func (*SubscriptionCreate) SetGroupID ¶
func (sc *SubscriptionCreate) SetGroupID(i int) *SubscriptionCreate
SetGroupID sets the "group_id" field.
func (*SubscriptionCreate) SetNillableCreateTime ¶
func (sc *SubscriptionCreate) SetNillableCreateTime(t *time.Time) *SubscriptionCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*SubscriptionCreate) SetNillableUpdateTime ¶
func (sc *SubscriptionCreate) SetNillableUpdateTime(t *time.Time) *SubscriptionCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*SubscriptionCreate) SetSteamID ¶
func (sc *SubscriptionCreate) SetSteamID(s string) *SubscriptionCreate
SetSteamID sets the "steam_id" field.
func (*SubscriptionCreate) SetUpdateTime ¶
func (sc *SubscriptionCreate) SetUpdateTime(t time.Time) *SubscriptionCreate
SetUpdateTime sets the "update_time" field.
type SubscriptionCreateBulk ¶
type SubscriptionCreateBulk struct {
// contains filtered or unexported fields
}
SubscriptionCreateBulk is the builder for creating many Subscription entities in bulk.
func (*SubscriptionCreateBulk) Exec ¶
func (scb *SubscriptionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscriptionCreateBulk) ExecX ¶
func (scb *SubscriptionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionCreateBulk) Save ¶
func (scb *SubscriptionCreateBulk) Save(ctx context.Context) ([]*Subscription, error)
Save creates the Subscription entities in the database.
func (*SubscriptionCreateBulk) SaveX ¶
func (scb *SubscriptionCreateBulk) SaveX(ctx context.Context) []*Subscription
SaveX is like Save, but panics if an error occurs.
type SubscriptionDelete ¶
type SubscriptionDelete struct {
// contains filtered or unexported fields
}
SubscriptionDelete is the builder for deleting a Subscription entity.
func (*SubscriptionDelete) Exec ¶
func (sd *SubscriptionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SubscriptionDelete) ExecX ¶
func (sd *SubscriptionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionDelete) Where ¶
func (sd *SubscriptionDelete) Where(ps ...predicate.Subscription) *SubscriptionDelete
Where appends a list predicates to the SubscriptionDelete builder.
type SubscriptionDeleteOne ¶
type SubscriptionDeleteOne struct {
// contains filtered or unexported fields
}
SubscriptionDeleteOne is the builder for deleting a single Subscription entity.
func (*SubscriptionDeleteOne) Exec ¶
func (sdo *SubscriptionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SubscriptionDeleteOne) ExecX ¶
func (sdo *SubscriptionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SubscriptionGroupBy ¶
type SubscriptionGroupBy struct {
// contains filtered or unexported fields
}
SubscriptionGroupBy is the group-by builder for Subscription entities.
func (*SubscriptionGroupBy) Aggregate ¶
func (sgb *SubscriptionGroupBy) Aggregate(fns ...AggregateFunc) *SubscriptionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SubscriptionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SubscriptionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SubscriptionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SubscriptionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SubscriptionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SubscriptionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SubscriptionGroupBy) Scan ¶
func (sgb *SubscriptionGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*SubscriptionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SubscriptionMatch ¶
type SubscriptionMatch struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// CreateTime holds the value of the "create_time" field.
CreateTime time.Time `json:"create_time,omitempty"`
// UpdateTime holds the value of the "update_time" field.
UpdateTime time.Time `json:"update_time,omitempty"`
// MatchID holds the value of the "match_id" field.
MatchID int64 `json:"match_id,omitempty"`
// PlayerID holds the value of the "player_id" field.
PlayerID string `json:"player_id,omitempty"`
// PlayerSlot holds the value of the "player_slot" field.
PlayerSlot int `json:"player_slot,omitempty"`
// RadiantWin holds the value of the "radiant_win" field.
RadiantWin bool `json:"radiant_win,omitempty"`
// Duration holds the value of the "duration" field.
Duration int `json:"duration,omitempty"`
// GameMode holds the value of the "game_mode" field.
GameMode int `json:"game_mode,omitempty"`
// LobbyType holds the value of the "lobby_type" field.
LobbyType int `json:"lobby_type,omitempty"`
// HeroID holds the value of the "hero_id" field.
HeroID int `json:"hero_id,omitempty"`
// StartTime holds the value of the "start_time" field.
StartTime int `json:"start_time,omitempty"`
// Version holds the value of the "version" field.
Version int `json:"version,omitempty"`
// Kills holds the value of the "kills" field.
Kills int `json:"kills,omitempty"`
// Deaths holds the value of the "deaths" field.
Deaths int `json:"deaths,omitempty"`
// Assists holds the value of the "assists" field.
Assists int `json:"assists,omitempty"`
// Skill holds the value of the "skill" field.
Skill *int `json:"skill,omitempty"`
// LeaverStatus holds the value of the "leaver_status" field.
LeaverStatus int `json:"leaver_status,omitempty"`
// PartySize holds the value of the "party_size" field.
PartySize int `json:"party_size,omitempty"`
// contains filtered or unexported fields
}
SubscriptionMatch is the model entity for the SubscriptionMatch schema.
func (*SubscriptionMatch) String ¶
func (sm *SubscriptionMatch) String() string
String implements the fmt.Stringer.
func (*SubscriptionMatch) Unwrap ¶
func (sm *SubscriptionMatch) Unwrap() *SubscriptionMatch
Unwrap unwraps the SubscriptionMatch 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 (*SubscriptionMatch) Update ¶
func (sm *SubscriptionMatch) Update() *SubscriptionMatchUpdateOne
Update returns a builder for updating this SubscriptionMatch. Note that you need to call SubscriptionMatch.Unwrap() before calling this method if this SubscriptionMatch was returned from a transaction, and the transaction was committed or rolled back.
type SubscriptionMatchClient ¶
type SubscriptionMatchClient struct {
// contains filtered or unexported fields
}
SubscriptionMatchClient is a client for the SubscriptionMatch schema.
func NewSubscriptionMatchClient ¶
func NewSubscriptionMatchClient(c config) *SubscriptionMatchClient
NewSubscriptionMatchClient returns a client for the SubscriptionMatch from the given config.
func (*SubscriptionMatchClient) Create ¶
func (c *SubscriptionMatchClient) Create() *SubscriptionMatchCreate
Create returns a builder for creating a SubscriptionMatch entity.
func (*SubscriptionMatchClient) CreateBulk ¶
func (c *SubscriptionMatchClient) CreateBulk(builders ...*SubscriptionMatchCreate) *SubscriptionMatchCreateBulk
CreateBulk returns a builder for creating a bulk of SubscriptionMatch entities.
func (*SubscriptionMatchClient) Delete ¶
func (c *SubscriptionMatchClient) Delete() *SubscriptionMatchDelete
Delete returns a delete builder for SubscriptionMatch.
func (*SubscriptionMatchClient) DeleteOne ¶
func (c *SubscriptionMatchClient) DeleteOne(sm *SubscriptionMatch) *SubscriptionMatchDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SubscriptionMatchClient) DeleteOneID ¶
func (c *SubscriptionMatchClient) DeleteOneID(id int) *SubscriptionMatchDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*SubscriptionMatchClient) Get ¶
func (c *SubscriptionMatchClient) Get(ctx context.Context, id int) (*SubscriptionMatch, error)
Get returns a SubscriptionMatch entity by its id.
func (*SubscriptionMatchClient) GetX ¶
func (c *SubscriptionMatchClient) GetX(ctx context.Context, id int) *SubscriptionMatch
GetX is like Get, but panics if an error occurs.
func (*SubscriptionMatchClient) Hooks ¶
func (c *SubscriptionMatchClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SubscriptionMatchClient) Query ¶
func (c *SubscriptionMatchClient) Query() *SubscriptionMatchQuery
Query returns a query builder for SubscriptionMatch.
func (*SubscriptionMatchClient) Update ¶
func (c *SubscriptionMatchClient) Update() *SubscriptionMatchUpdate
Update returns an update builder for SubscriptionMatch.
func (*SubscriptionMatchClient) UpdateOne ¶
func (c *SubscriptionMatchClient) UpdateOne(sm *SubscriptionMatch) *SubscriptionMatchUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SubscriptionMatchClient) UpdateOneID ¶
func (c *SubscriptionMatchClient) UpdateOneID(id int) *SubscriptionMatchUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SubscriptionMatchClient) Use ¶
func (c *SubscriptionMatchClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `subscriptionmatch.Hooks(f(g(h())))`.
type SubscriptionMatchCreate ¶
type SubscriptionMatchCreate struct {
// contains filtered or unexported fields
}
SubscriptionMatchCreate is the builder for creating a SubscriptionMatch entity.
func (*SubscriptionMatchCreate) Exec ¶
func (smc *SubscriptionMatchCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscriptionMatchCreate) ExecX ¶
func (smc *SubscriptionMatchCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionMatchCreate) Mutation ¶
func (smc *SubscriptionMatchCreate) Mutation() *SubscriptionMatchMutation
Mutation returns the SubscriptionMatchMutation object of the builder.
func (*SubscriptionMatchCreate) Save ¶
func (smc *SubscriptionMatchCreate) Save(ctx context.Context) (*SubscriptionMatch, error)
Save creates the SubscriptionMatch in the database.
func (*SubscriptionMatchCreate) SaveX ¶
func (smc *SubscriptionMatchCreate) SaveX(ctx context.Context) *SubscriptionMatch
SaveX calls Save and panics if Save returns an error.
func (*SubscriptionMatchCreate) SetAssists ¶
func (smc *SubscriptionMatchCreate) SetAssists(i int) *SubscriptionMatchCreate
SetAssists sets the "assists" field.
func (*SubscriptionMatchCreate) SetCreateTime ¶
func (smc *SubscriptionMatchCreate) SetCreateTime(t time.Time) *SubscriptionMatchCreate
SetCreateTime sets the "create_time" field.
func (*SubscriptionMatchCreate) SetDeaths ¶
func (smc *SubscriptionMatchCreate) SetDeaths(i int) *SubscriptionMatchCreate
SetDeaths sets the "deaths" field.
func (*SubscriptionMatchCreate) SetDuration ¶
func (smc *SubscriptionMatchCreate) SetDuration(i int) *SubscriptionMatchCreate
SetDuration sets the "duration" field.
func (*SubscriptionMatchCreate) SetGameMode ¶
func (smc *SubscriptionMatchCreate) SetGameMode(i int) *SubscriptionMatchCreate
SetGameMode sets the "game_mode" field.
func (*SubscriptionMatchCreate) SetHeroID ¶
func (smc *SubscriptionMatchCreate) SetHeroID(i int) *SubscriptionMatchCreate
SetHeroID sets the "hero_id" field.
func (*SubscriptionMatchCreate) SetKills ¶
func (smc *SubscriptionMatchCreate) SetKills(i int) *SubscriptionMatchCreate
SetKills sets the "kills" field.
func (*SubscriptionMatchCreate) SetLeaverStatus ¶
func (smc *SubscriptionMatchCreate) SetLeaverStatus(i int) *SubscriptionMatchCreate
SetLeaverStatus sets the "leaver_status" field.
func (*SubscriptionMatchCreate) SetLobbyType ¶
func (smc *SubscriptionMatchCreate) SetLobbyType(i int) *SubscriptionMatchCreate
SetLobbyType sets the "lobby_type" field.
func (*SubscriptionMatchCreate) SetMatchID ¶
func (smc *SubscriptionMatchCreate) SetMatchID(i int64) *SubscriptionMatchCreate
SetMatchID sets the "match_id" field.
func (*SubscriptionMatchCreate) SetNillableCreateTime ¶
func (smc *SubscriptionMatchCreate) SetNillableCreateTime(t *time.Time) *SubscriptionMatchCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*SubscriptionMatchCreate) SetNillableSkill ¶
func (smc *SubscriptionMatchCreate) SetNillableSkill(i *int) *SubscriptionMatchCreate
SetNillableSkill sets the "skill" field if the given value is not nil.
func (*SubscriptionMatchCreate) SetNillableUpdateTime ¶
func (smc *SubscriptionMatchCreate) SetNillableUpdateTime(t *time.Time) *SubscriptionMatchCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*SubscriptionMatchCreate) SetPartySize ¶
func (smc *SubscriptionMatchCreate) SetPartySize(i int) *SubscriptionMatchCreate
SetPartySize sets the "party_size" field.
func (*SubscriptionMatchCreate) SetPlayerID ¶
func (smc *SubscriptionMatchCreate) SetPlayerID(s string) *SubscriptionMatchCreate
SetPlayerID sets the "player_id" field.
func (*SubscriptionMatchCreate) SetPlayerSlot ¶
func (smc *SubscriptionMatchCreate) SetPlayerSlot(i int) *SubscriptionMatchCreate
SetPlayerSlot sets the "player_slot" field.
func (*SubscriptionMatchCreate) SetRadiantWin ¶
func (smc *SubscriptionMatchCreate) SetRadiantWin(b bool) *SubscriptionMatchCreate
SetRadiantWin sets the "radiant_win" field.
func (*SubscriptionMatchCreate) SetSkill ¶
func (smc *SubscriptionMatchCreate) SetSkill(i int) *SubscriptionMatchCreate
SetSkill sets the "skill" field.
func (*SubscriptionMatchCreate) SetStartTime ¶
func (smc *SubscriptionMatchCreate) SetStartTime(i int) *SubscriptionMatchCreate
SetStartTime sets the "start_time" field.
func (*SubscriptionMatchCreate) SetUpdateTime ¶
func (smc *SubscriptionMatchCreate) SetUpdateTime(t time.Time) *SubscriptionMatchCreate
SetUpdateTime sets the "update_time" field.
func (*SubscriptionMatchCreate) SetVersion ¶
func (smc *SubscriptionMatchCreate) SetVersion(i int) *SubscriptionMatchCreate
SetVersion sets the "version" field.
type SubscriptionMatchCreateBulk ¶
type SubscriptionMatchCreateBulk struct {
// contains filtered or unexported fields
}
SubscriptionMatchCreateBulk is the builder for creating many SubscriptionMatch entities in bulk.
func (*SubscriptionMatchCreateBulk) Exec ¶
func (smcb *SubscriptionMatchCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscriptionMatchCreateBulk) ExecX ¶
func (smcb *SubscriptionMatchCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionMatchCreateBulk) Save ¶
func (smcb *SubscriptionMatchCreateBulk) Save(ctx context.Context) ([]*SubscriptionMatch, error)
Save creates the SubscriptionMatch entities in the database.
func (*SubscriptionMatchCreateBulk) SaveX ¶
func (smcb *SubscriptionMatchCreateBulk) SaveX(ctx context.Context) []*SubscriptionMatch
SaveX is like Save, but panics if an error occurs.
type SubscriptionMatchDelete ¶
type SubscriptionMatchDelete struct {
// contains filtered or unexported fields
}
SubscriptionMatchDelete is the builder for deleting a SubscriptionMatch entity.
func (*SubscriptionMatchDelete) Exec ¶
func (smd *SubscriptionMatchDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SubscriptionMatchDelete) ExecX ¶
func (smd *SubscriptionMatchDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionMatchDelete) Where ¶
func (smd *SubscriptionMatchDelete) Where(ps ...predicate.SubscriptionMatch) *SubscriptionMatchDelete
Where appends a list predicates to the SubscriptionMatchDelete builder.
type SubscriptionMatchDeleteOne ¶
type SubscriptionMatchDeleteOne struct {
// contains filtered or unexported fields
}
SubscriptionMatchDeleteOne is the builder for deleting a single SubscriptionMatch entity.
func (*SubscriptionMatchDeleteOne) Exec ¶
func (smdo *SubscriptionMatchDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SubscriptionMatchDeleteOne) ExecX ¶
func (smdo *SubscriptionMatchDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SubscriptionMatchGroupBy ¶
type SubscriptionMatchGroupBy struct {
// contains filtered or unexported fields
}
SubscriptionMatchGroupBy is the group-by builder for SubscriptionMatch entities.
func (*SubscriptionMatchGroupBy) Aggregate ¶
func (smgb *SubscriptionMatchGroupBy) Aggregate(fns ...AggregateFunc) *SubscriptionMatchGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SubscriptionMatchGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SubscriptionMatchGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SubscriptionMatchGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SubscriptionMatchGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*SubscriptionMatchGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SubscriptionMatchGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*SubscriptionMatchGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SubscriptionMatchGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SubscriptionMatchGroupBy) Scan ¶
func (smgb *SubscriptionMatchGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*SubscriptionMatchGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SubscriptionMatchMutation ¶
type SubscriptionMatchMutation struct {
// contains filtered or unexported fields
}
SubscriptionMatchMutation represents an operation that mutates the SubscriptionMatch nodes in the graph.
func (*SubscriptionMatchMutation) AddAssists ¶
func (m *SubscriptionMatchMutation) AddAssists(i int)
AddAssists adds i to the "assists" field.
func (*SubscriptionMatchMutation) AddDeaths ¶
func (m *SubscriptionMatchMutation) AddDeaths(i int)
AddDeaths adds i to the "deaths" field.
func (*SubscriptionMatchMutation) AddDuration ¶
func (m *SubscriptionMatchMutation) AddDuration(i int)
AddDuration adds i to the "duration" field.
func (*SubscriptionMatchMutation) AddField ¶
func (m *SubscriptionMatchMutation) 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 (*SubscriptionMatchMutation) AddGameMode ¶
func (m *SubscriptionMatchMutation) AddGameMode(i int)
AddGameMode adds i to the "game_mode" field.
func (*SubscriptionMatchMutation) AddHeroID ¶
func (m *SubscriptionMatchMutation) AddHeroID(i int)
AddHeroID adds i to the "hero_id" field.
func (*SubscriptionMatchMutation) AddKills ¶
func (m *SubscriptionMatchMutation) AddKills(i int)
AddKills adds i to the "kills" field.
func (*SubscriptionMatchMutation) AddLeaverStatus ¶
func (m *SubscriptionMatchMutation) AddLeaverStatus(i int)
AddLeaverStatus adds i to the "leaver_status" field.
func (*SubscriptionMatchMutation) AddLobbyType ¶
func (m *SubscriptionMatchMutation) AddLobbyType(i int)
AddLobbyType adds i to the "lobby_type" field.
func (*SubscriptionMatchMutation) AddMatchID ¶
func (m *SubscriptionMatchMutation) AddMatchID(i int64)
AddMatchID adds i to the "match_id" field.
func (*SubscriptionMatchMutation) AddPartySize ¶
func (m *SubscriptionMatchMutation) AddPartySize(i int)
AddPartySize adds i to the "party_size" field.
func (*SubscriptionMatchMutation) AddPlayerSlot ¶
func (m *SubscriptionMatchMutation) AddPlayerSlot(i int)
AddPlayerSlot adds i to the "player_slot" field.
func (*SubscriptionMatchMutation) AddSkill ¶
func (m *SubscriptionMatchMutation) AddSkill(i int)
AddSkill adds i to the "skill" field.
func (*SubscriptionMatchMutation) AddStartTime ¶
func (m *SubscriptionMatchMutation) AddStartTime(i int)
AddStartTime adds i to the "start_time" field.
func (*SubscriptionMatchMutation) AddVersion ¶
func (m *SubscriptionMatchMutation) AddVersion(i int)
AddVersion adds i to the "version" field.
func (*SubscriptionMatchMutation) AddedAssists ¶
func (m *SubscriptionMatchMutation) AddedAssists() (r int, exists bool)
AddedAssists returns the value that was added to the "assists" field in this mutation.
func (*SubscriptionMatchMutation) AddedDeaths ¶
func (m *SubscriptionMatchMutation) AddedDeaths() (r int, exists bool)
AddedDeaths returns the value that was added to the "deaths" field in this mutation.
func (*SubscriptionMatchMutation) AddedDuration ¶
func (m *SubscriptionMatchMutation) AddedDuration() (r int, exists bool)
AddedDuration returns the value that was added to the "duration" field in this mutation.
func (*SubscriptionMatchMutation) AddedEdges ¶
func (m *SubscriptionMatchMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SubscriptionMatchMutation) AddedField ¶
func (m *SubscriptionMatchMutation) 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 (*SubscriptionMatchMutation) AddedFields ¶
func (m *SubscriptionMatchMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SubscriptionMatchMutation) AddedGameMode ¶
func (m *SubscriptionMatchMutation) AddedGameMode() (r int, exists bool)
AddedGameMode returns the value that was added to the "game_mode" field in this mutation.
func (*SubscriptionMatchMutation) AddedHeroID ¶
func (m *SubscriptionMatchMutation) AddedHeroID() (r int, exists bool)
AddedHeroID returns the value that was added to the "hero_id" field in this mutation.
func (*SubscriptionMatchMutation) AddedIDs ¶
func (m *SubscriptionMatchMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SubscriptionMatchMutation) AddedKills ¶
func (m *SubscriptionMatchMutation) AddedKills() (r int, exists bool)
AddedKills returns the value that was added to the "kills" field in this mutation.
func (*SubscriptionMatchMutation) AddedLeaverStatus ¶
func (m *SubscriptionMatchMutation) AddedLeaverStatus() (r int, exists bool)
AddedLeaverStatus returns the value that was added to the "leaver_status" field in this mutation.
func (*SubscriptionMatchMutation) AddedLobbyType ¶
func (m *SubscriptionMatchMutation) AddedLobbyType() (r int, exists bool)
AddedLobbyType returns the value that was added to the "lobby_type" field in this mutation.
func (*SubscriptionMatchMutation) AddedMatchID ¶
func (m *SubscriptionMatchMutation) AddedMatchID() (r int64, exists bool)
AddedMatchID returns the value that was added to the "match_id" field in this mutation.
func (*SubscriptionMatchMutation) AddedPartySize ¶
func (m *SubscriptionMatchMutation) AddedPartySize() (r int, exists bool)
AddedPartySize returns the value that was added to the "party_size" field in this mutation.
func (*SubscriptionMatchMutation) AddedPlayerSlot ¶
func (m *SubscriptionMatchMutation) AddedPlayerSlot() (r int, exists bool)
AddedPlayerSlot returns the value that was added to the "player_slot" field in this mutation.
func (*SubscriptionMatchMutation) AddedSkill ¶
func (m *SubscriptionMatchMutation) AddedSkill() (r int, exists bool)
AddedSkill returns the value that was added to the "skill" field in this mutation.
func (*SubscriptionMatchMutation) AddedStartTime ¶
func (m *SubscriptionMatchMutation) AddedStartTime() (r int, exists bool)
AddedStartTime returns the value that was added to the "start_time" field in this mutation.
func (*SubscriptionMatchMutation) AddedVersion ¶
func (m *SubscriptionMatchMutation) AddedVersion() (r int, exists bool)
AddedVersion returns the value that was added to the "version" field in this mutation.
func (*SubscriptionMatchMutation) Assists ¶
func (m *SubscriptionMatchMutation) Assists() (r int, exists bool)
Assists returns the value of the "assists" field in the mutation.
func (*SubscriptionMatchMutation) ClearEdge ¶
func (m *SubscriptionMatchMutation) 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 (*SubscriptionMatchMutation) ClearField ¶
func (m *SubscriptionMatchMutation) 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 (*SubscriptionMatchMutation) ClearSkill ¶
func (m *SubscriptionMatchMutation) ClearSkill()
ClearSkill clears the value of the "skill" field.
func (*SubscriptionMatchMutation) ClearedEdges ¶
func (m *SubscriptionMatchMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SubscriptionMatchMutation) ClearedFields ¶
func (m *SubscriptionMatchMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SubscriptionMatchMutation) Client ¶
func (m SubscriptionMatchMutation) 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 (*SubscriptionMatchMutation) CreateTime ¶
func (m *SubscriptionMatchMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*SubscriptionMatchMutation) Deaths ¶
func (m *SubscriptionMatchMutation) Deaths() (r int, exists bool)
Deaths returns the value of the "deaths" field in the mutation.
func (*SubscriptionMatchMutation) Duration ¶
func (m *SubscriptionMatchMutation) Duration() (r int, exists bool)
Duration returns the value of the "duration" field in the mutation.
func (*SubscriptionMatchMutation) EdgeCleared ¶
func (m *SubscriptionMatchMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SubscriptionMatchMutation) Field ¶
func (m *SubscriptionMatchMutation) 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 (*SubscriptionMatchMutation) FieldCleared ¶
func (m *SubscriptionMatchMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SubscriptionMatchMutation) Fields ¶
func (m *SubscriptionMatchMutation) 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 (*SubscriptionMatchMutation) GameMode ¶
func (m *SubscriptionMatchMutation) GameMode() (r int, exists bool)
GameMode returns the value of the "game_mode" field in the mutation.
func (*SubscriptionMatchMutation) HeroID ¶
func (m *SubscriptionMatchMutation) HeroID() (r int, exists bool)
HeroID returns the value of the "hero_id" field in the mutation.
func (*SubscriptionMatchMutation) ID ¶
func (m *SubscriptionMatchMutation) 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 (*SubscriptionMatchMutation) IDs ¶
func (m *SubscriptionMatchMutation) 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 (*SubscriptionMatchMutation) Kills ¶
func (m *SubscriptionMatchMutation) Kills() (r int, exists bool)
Kills returns the value of the "kills" field in the mutation.
func (*SubscriptionMatchMutation) LeaverStatus ¶
func (m *SubscriptionMatchMutation) LeaverStatus() (r int, exists bool)
LeaverStatus returns the value of the "leaver_status" field in the mutation.
func (*SubscriptionMatchMutation) LobbyType ¶
func (m *SubscriptionMatchMutation) LobbyType() (r int, exists bool)
LobbyType returns the value of the "lobby_type" field in the mutation.
func (*SubscriptionMatchMutation) MatchID ¶
func (m *SubscriptionMatchMutation) MatchID() (r int64, exists bool)
MatchID returns the value of the "match_id" field in the mutation.
func (*SubscriptionMatchMutation) OldAssists ¶
func (m *SubscriptionMatchMutation) OldAssists(ctx context.Context) (v int, err error)
OldAssists returns the old "assists" field's value of the SubscriptionMatch entity. If the SubscriptionMatch 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 (*SubscriptionMatchMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the SubscriptionMatch entity. If the SubscriptionMatch 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 (*SubscriptionMatchMutation) OldDeaths ¶
func (m *SubscriptionMatchMutation) OldDeaths(ctx context.Context) (v int, err error)
OldDeaths returns the old "deaths" field's value of the SubscriptionMatch entity. If the SubscriptionMatch 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 (*SubscriptionMatchMutation) OldDuration ¶
func (m *SubscriptionMatchMutation) OldDuration(ctx context.Context) (v int, err error)
OldDuration returns the old "duration" field's value of the SubscriptionMatch entity. If the SubscriptionMatch 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 (*SubscriptionMatchMutation) 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 (*SubscriptionMatchMutation) OldGameMode ¶
func (m *SubscriptionMatchMutation) OldGameMode(ctx context.Context) (v int, err error)
OldGameMode returns the old "game_mode" field's value of the SubscriptionMatch entity. If the SubscriptionMatch 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 (*SubscriptionMatchMutation) OldHeroID ¶
func (m *SubscriptionMatchMutation) OldHeroID(ctx context.Context) (v int, err error)
OldHeroID returns the old "hero_id" field's value of the SubscriptionMatch entity. If the SubscriptionMatch 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 (*SubscriptionMatchMutation) OldKills ¶
func (m *SubscriptionMatchMutation) OldKills(ctx context.Context) (v int, err error)
OldKills returns the old "kills" field's value of the SubscriptionMatch entity. If the SubscriptionMatch 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 (*SubscriptionMatchMutation) OldLeaverStatus ¶
func (m *SubscriptionMatchMutation) OldLeaverStatus(ctx context.Context) (v int, err error)
OldLeaverStatus returns the old "leaver_status" field's value of the SubscriptionMatch entity. If the SubscriptionMatch 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 (*SubscriptionMatchMutation) OldLobbyType ¶
func (m *SubscriptionMatchMutation) OldLobbyType(ctx context.Context) (v int, err error)
OldLobbyType returns the old "lobby_type" field's value of the SubscriptionMatch entity. If the SubscriptionMatch 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 (*SubscriptionMatchMutation) OldMatchID ¶
func (m *SubscriptionMatchMutation) OldMatchID(ctx context.Context) (v int64, err error)
OldMatchID returns the old "match_id" field's value of the SubscriptionMatch entity. If the SubscriptionMatch 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 (*SubscriptionMatchMutation) OldPartySize ¶
func (m *SubscriptionMatchMutation) OldPartySize(ctx context.Context) (v int, err error)
OldPartySize returns the old "party_size" field's value of the SubscriptionMatch entity. If the SubscriptionMatch 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 (*SubscriptionMatchMutation) OldPlayerID ¶
func (m *SubscriptionMatchMutation) OldPlayerID(ctx context.Context) (v string, err error)
OldPlayerID returns the old "player_id" field's value of the SubscriptionMatch entity. If the SubscriptionMatch 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 (*SubscriptionMatchMutation) OldPlayerSlot ¶
func (m *SubscriptionMatchMutation) OldPlayerSlot(ctx context.Context) (v int, err error)
OldPlayerSlot returns the old "player_slot" field's value of the SubscriptionMatch entity. If the SubscriptionMatch 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 (*SubscriptionMatchMutation) OldRadiantWin ¶
func (m *SubscriptionMatchMutation) OldRadiantWin(ctx context.Context) (v bool, err error)
OldRadiantWin returns the old "radiant_win" field's value of the SubscriptionMatch entity. If the SubscriptionMatch 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 (*SubscriptionMatchMutation) OldSkill ¶
func (m *SubscriptionMatchMutation) OldSkill(ctx context.Context) (v *int, err error)
OldSkill returns the old "skill" field's value of the SubscriptionMatch entity. If the SubscriptionMatch 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 (*SubscriptionMatchMutation) OldStartTime ¶
func (m *SubscriptionMatchMutation) OldStartTime(ctx context.Context) (v int, err error)
OldStartTime returns the old "start_time" field's value of the SubscriptionMatch entity. If the SubscriptionMatch 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 (*SubscriptionMatchMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the SubscriptionMatch entity. If the SubscriptionMatch 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 (*SubscriptionMatchMutation) OldVersion ¶
func (m *SubscriptionMatchMutation) OldVersion(ctx context.Context) (v int, err error)
OldVersion returns the old "version" field's value of the SubscriptionMatch entity. If the SubscriptionMatch 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 (*SubscriptionMatchMutation) Op ¶
func (m *SubscriptionMatchMutation) Op() Op
Op returns the operation name.
func (*SubscriptionMatchMutation) PartySize ¶
func (m *SubscriptionMatchMutation) PartySize() (r int, exists bool)
PartySize returns the value of the "party_size" field in the mutation.
func (*SubscriptionMatchMutation) PlayerID ¶
func (m *SubscriptionMatchMutation) PlayerID() (r string, exists bool)
PlayerID returns the value of the "player_id" field in the mutation.
func (*SubscriptionMatchMutation) PlayerSlot ¶
func (m *SubscriptionMatchMutation) PlayerSlot() (r int, exists bool)
PlayerSlot returns the value of the "player_slot" field in the mutation.
func (*SubscriptionMatchMutation) RadiantWin ¶
func (m *SubscriptionMatchMutation) RadiantWin() (r bool, exists bool)
RadiantWin returns the value of the "radiant_win" field in the mutation.
func (*SubscriptionMatchMutation) RemovedEdges ¶
func (m *SubscriptionMatchMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SubscriptionMatchMutation) RemovedIDs ¶
func (m *SubscriptionMatchMutation) 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 (*SubscriptionMatchMutation) ResetAssists ¶
func (m *SubscriptionMatchMutation) ResetAssists()
ResetAssists resets all changes to the "assists" field.
func (*SubscriptionMatchMutation) ResetCreateTime ¶
func (m *SubscriptionMatchMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*SubscriptionMatchMutation) ResetDeaths ¶
func (m *SubscriptionMatchMutation) ResetDeaths()
ResetDeaths resets all changes to the "deaths" field.
func (*SubscriptionMatchMutation) ResetDuration ¶
func (m *SubscriptionMatchMutation) ResetDuration()
ResetDuration resets all changes to the "duration" field.
func (*SubscriptionMatchMutation) ResetEdge ¶
func (m *SubscriptionMatchMutation) 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 (*SubscriptionMatchMutation) ResetField ¶
func (m *SubscriptionMatchMutation) 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 (*SubscriptionMatchMutation) ResetGameMode ¶
func (m *SubscriptionMatchMutation) ResetGameMode()
ResetGameMode resets all changes to the "game_mode" field.
func (*SubscriptionMatchMutation) ResetHeroID ¶
func (m *SubscriptionMatchMutation) ResetHeroID()
ResetHeroID resets all changes to the "hero_id" field.
func (*SubscriptionMatchMutation) ResetKills ¶
func (m *SubscriptionMatchMutation) ResetKills()
ResetKills resets all changes to the "kills" field.
func (*SubscriptionMatchMutation) ResetLeaverStatus ¶
func (m *SubscriptionMatchMutation) ResetLeaverStatus()
ResetLeaverStatus resets all changes to the "leaver_status" field.
func (*SubscriptionMatchMutation) ResetLobbyType ¶
func (m *SubscriptionMatchMutation) ResetLobbyType()
ResetLobbyType resets all changes to the "lobby_type" field.
func (*SubscriptionMatchMutation) ResetMatchID ¶
func (m *SubscriptionMatchMutation) ResetMatchID()
ResetMatchID resets all changes to the "match_id" field.
func (*SubscriptionMatchMutation) ResetPartySize ¶
func (m *SubscriptionMatchMutation) ResetPartySize()
ResetPartySize resets all changes to the "party_size" field.
func (*SubscriptionMatchMutation) ResetPlayerID ¶
func (m *SubscriptionMatchMutation) ResetPlayerID()
ResetPlayerID resets all changes to the "player_id" field.
func (*SubscriptionMatchMutation) ResetPlayerSlot ¶
func (m *SubscriptionMatchMutation) ResetPlayerSlot()
ResetPlayerSlot resets all changes to the "player_slot" field.
func (*SubscriptionMatchMutation) ResetRadiantWin ¶
func (m *SubscriptionMatchMutation) ResetRadiantWin()
ResetRadiantWin resets all changes to the "radiant_win" field.
func (*SubscriptionMatchMutation) ResetSkill ¶
func (m *SubscriptionMatchMutation) ResetSkill()
ResetSkill resets all changes to the "skill" field.
func (*SubscriptionMatchMutation) ResetStartTime ¶
func (m *SubscriptionMatchMutation) ResetStartTime()
ResetStartTime resets all changes to the "start_time" field.
func (*SubscriptionMatchMutation) ResetUpdateTime ¶
func (m *SubscriptionMatchMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*SubscriptionMatchMutation) ResetVersion ¶
func (m *SubscriptionMatchMutation) ResetVersion()
ResetVersion resets all changes to the "version" field.
func (*SubscriptionMatchMutation) SetAssists ¶
func (m *SubscriptionMatchMutation) SetAssists(i int)
SetAssists sets the "assists" field.
func (*SubscriptionMatchMutation) SetCreateTime ¶
func (m *SubscriptionMatchMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*SubscriptionMatchMutation) SetDeaths ¶
func (m *SubscriptionMatchMutation) SetDeaths(i int)
SetDeaths sets the "deaths" field.
func (*SubscriptionMatchMutation) SetDuration ¶
func (m *SubscriptionMatchMutation) SetDuration(i int)
SetDuration sets the "duration" field.
func (*SubscriptionMatchMutation) SetField ¶
func (m *SubscriptionMatchMutation) 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 (*SubscriptionMatchMutation) SetGameMode ¶
func (m *SubscriptionMatchMutation) SetGameMode(i int)
SetGameMode sets the "game_mode" field.
func (*SubscriptionMatchMutation) SetHeroID ¶
func (m *SubscriptionMatchMutation) SetHeroID(i int)
SetHeroID sets the "hero_id" field.
func (*SubscriptionMatchMutation) SetKills ¶
func (m *SubscriptionMatchMutation) SetKills(i int)
SetKills sets the "kills" field.
func (*SubscriptionMatchMutation) SetLeaverStatus ¶
func (m *SubscriptionMatchMutation) SetLeaverStatus(i int)
SetLeaverStatus sets the "leaver_status" field.
func (*SubscriptionMatchMutation) SetLobbyType ¶
func (m *SubscriptionMatchMutation) SetLobbyType(i int)
SetLobbyType sets the "lobby_type" field.
func (*SubscriptionMatchMutation) SetMatchID ¶
func (m *SubscriptionMatchMutation) SetMatchID(i int64)
SetMatchID sets the "match_id" field.
func (*SubscriptionMatchMutation) SetPartySize ¶
func (m *SubscriptionMatchMutation) SetPartySize(i int)
SetPartySize sets the "party_size" field.
func (*SubscriptionMatchMutation) SetPlayerID ¶
func (m *SubscriptionMatchMutation) SetPlayerID(s string)
SetPlayerID sets the "player_id" field.
func (*SubscriptionMatchMutation) SetPlayerSlot ¶
func (m *SubscriptionMatchMutation) SetPlayerSlot(i int)
SetPlayerSlot sets the "player_slot" field.
func (*SubscriptionMatchMutation) SetRadiantWin ¶
func (m *SubscriptionMatchMutation) SetRadiantWin(b bool)
SetRadiantWin sets the "radiant_win" field.
func (*SubscriptionMatchMutation) SetSkill ¶
func (m *SubscriptionMatchMutation) SetSkill(i int)
SetSkill sets the "skill" field.
func (*SubscriptionMatchMutation) SetStartTime ¶
func (m *SubscriptionMatchMutation) SetStartTime(i int)
SetStartTime sets the "start_time" field.
func (*SubscriptionMatchMutation) SetUpdateTime ¶
func (m *SubscriptionMatchMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*SubscriptionMatchMutation) SetVersion ¶
func (m *SubscriptionMatchMutation) SetVersion(i int)
SetVersion sets the "version" field.
func (*SubscriptionMatchMutation) Skill ¶
func (m *SubscriptionMatchMutation) Skill() (r int, exists bool)
Skill returns the value of the "skill" field in the mutation.
func (*SubscriptionMatchMutation) SkillCleared ¶
func (m *SubscriptionMatchMutation) SkillCleared() bool
SkillCleared returns if the "skill" field was cleared in this mutation.
func (*SubscriptionMatchMutation) StartTime ¶
func (m *SubscriptionMatchMutation) StartTime() (r int, exists bool)
StartTime returns the value of the "start_time" field in the mutation.
func (SubscriptionMatchMutation) Tx ¶
func (m SubscriptionMatchMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SubscriptionMatchMutation) Type ¶
func (m *SubscriptionMatchMutation) Type() string
Type returns the node type of this mutation (SubscriptionMatch).
func (*SubscriptionMatchMutation) UpdateTime ¶
func (m *SubscriptionMatchMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*SubscriptionMatchMutation) Version ¶
func (m *SubscriptionMatchMutation) Version() (r int, exists bool)
Version returns the value of the "version" field in the mutation.
func (*SubscriptionMatchMutation) Where ¶
func (m *SubscriptionMatchMutation) Where(ps ...predicate.SubscriptionMatch)
Where appends a list predicates to the SubscriptionMatchMutation builder.
type SubscriptionMatchQuery ¶
type SubscriptionMatchQuery struct {
// contains filtered or unexported fields
}
SubscriptionMatchQuery is the builder for querying SubscriptionMatch entities.
func (*SubscriptionMatchQuery) All ¶
func (smq *SubscriptionMatchQuery) All(ctx context.Context) ([]*SubscriptionMatch, error)
All executes the query and returns a list of SubscriptionMatches.
func (*SubscriptionMatchQuery) AllX ¶
func (smq *SubscriptionMatchQuery) AllX(ctx context.Context) []*SubscriptionMatch
AllX is like All, but panics if an error occurs.
func (*SubscriptionMatchQuery) Clone ¶
func (smq *SubscriptionMatchQuery) Clone() *SubscriptionMatchQuery
Clone returns a duplicate of the SubscriptionMatchQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SubscriptionMatchQuery) Count ¶
func (smq *SubscriptionMatchQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SubscriptionMatchQuery) CountX ¶
func (smq *SubscriptionMatchQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SubscriptionMatchQuery) Exist ¶
func (smq *SubscriptionMatchQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SubscriptionMatchQuery) ExistX ¶
func (smq *SubscriptionMatchQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SubscriptionMatchQuery) First ¶
func (smq *SubscriptionMatchQuery) First(ctx context.Context) (*SubscriptionMatch, error)
First returns the first SubscriptionMatch entity from the query. Returns a *NotFoundError when no SubscriptionMatch was found.
func (*SubscriptionMatchQuery) FirstID ¶
func (smq *SubscriptionMatchQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first SubscriptionMatch ID from the query. Returns a *NotFoundError when no SubscriptionMatch ID was found.
func (*SubscriptionMatchQuery) FirstIDX ¶
func (smq *SubscriptionMatchQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*SubscriptionMatchQuery) FirstX ¶
func (smq *SubscriptionMatchQuery) FirstX(ctx context.Context) *SubscriptionMatch
FirstX is like First, but panics if an error occurs.
func (*SubscriptionMatchQuery) GroupBy ¶
func (smq *SubscriptionMatchQuery) GroupBy(field string, fields ...string) *SubscriptionMatchGroupBy
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 {
CreateTime time.Time `json:"create_time,omitempty"`
Count int `json:"count,omitempty"`
}
client.SubscriptionMatch.Query().
GroupBy(subscriptionmatch.FieldCreateTime).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*SubscriptionMatchQuery) IDs ¶
func (smq *SubscriptionMatchQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of SubscriptionMatch IDs.
func (*SubscriptionMatchQuery) IDsX ¶
func (smq *SubscriptionMatchQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SubscriptionMatchQuery) Limit ¶
func (smq *SubscriptionMatchQuery) Limit(limit int) *SubscriptionMatchQuery
Limit adds a limit step to the query.
func (*SubscriptionMatchQuery) Offset ¶
func (smq *SubscriptionMatchQuery) Offset(offset int) *SubscriptionMatchQuery
Offset adds an offset step to the query.
func (*SubscriptionMatchQuery) Only ¶
func (smq *SubscriptionMatchQuery) Only(ctx context.Context) (*SubscriptionMatch, error)
Only returns a single SubscriptionMatch entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SubscriptionMatch entity is found. Returns a *NotFoundError when no SubscriptionMatch entities are found.
func (*SubscriptionMatchQuery) OnlyID ¶
func (smq *SubscriptionMatchQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only SubscriptionMatch ID in the query. Returns a *NotSingularError when more than one SubscriptionMatch ID is found. Returns a *NotFoundError when no entities are found.
func (*SubscriptionMatchQuery) OnlyIDX ¶
func (smq *SubscriptionMatchQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SubscriptionMatchQuery) OnlyX ¶
func (smq *SubscriptionMatchQuery) OnlyX(ctx context.Context) *SubscriptionMatch
OnlyX is like Only, but panics if an error occurs.
func (*SubscriptionMatchQuery) Order ¶
func (smq *SubscriptionMatchQuery) Order(o ...OrderFunc) *SubscriptionMatchQuery
Order adds an order step to the query.
func (*SubscriptionMatchQuery) Select ¶
func (smq *SubscriptionMatchQuery) Select(fields ...string) *SubscriptionMatchSelect
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 {
CreateTime time.Time `json:"create_time,omitempty"`
}
client.SubscriptionMatch.Query().
Select(subscriptionmatch.FieldCreateTime).
Scan(ctx, &v)
func (*SubscriptionMatchQuery) Unique ¶
func (smq *SubscriptionMatchQuery) Unique(unique bool) *SubscriptionMatchQuery
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 (*SubscriptionMatchQuery) Where ¶
func (smq *SubscriptionMatchQuery) Where(ps ...predicate.SubscriptionMatch) *SubscriptionMatchQuery
Where adds a new predicate for the SubscriptionMatchQuery builder.
type SubscriptionMatchSelect ¶
type SubscriptionMatchSelect struct {
*SubscriptionMatchQuery
// contains filtered or unexported fields
}
SubscriptionMatchSelect is the builder for selecting fields of SubscriptionMatch entities.
func (*SubscriptionMatchSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SubscriptionMatchSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SubscriptionMatchSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SubscriptionMatchSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SubscriptionMatchSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*SubscriptionMatchSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SubscriptionMatchSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SubscriptionMatchSelect) Scan ¶
func (sms *SubscriptionMatchSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*SubscriptionMatchSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SubscriptionMatchUpdate ¶
type SubscriptionMatchUpdate struct {
// contains filtered or unexported fields
}
SubscriptionMatchUpdate is the builder for updating SubscriptionMatch entities.
func (*SubscriptionMatchUpdate) AddAssists ¶
func (smu *SubscriptionMatchUpdate) AddAssists(i int) *SubscriptionMatchUpdate
AddAssists adds i to the "assists" field.
func (*SubscriptionMatchUpdate) AddDeaths ¶
func (smu *SubscriptionMatchUpdate) AddDeaths(i int) *SubscriptionMatchUpdate
AddDeaths adds i to the "deaths" field.
func (*SubscriptionMatchUpdate) AddDuration ¶
func (smu *SubscriptionMatchUpdate) AddDuration(i int) *SubscriptionMatchUpdate
AddDuration adds i to the "duration" field.
func (*SubscriptionMatchUpdate) AddGameMode ¶
func (smu *SubscriptionMatchUpdate) AddGameMode(i int) *SubscriptionMatchUpdate
AddGameMode adds i to the "game_mode" field.
func (*SubscriptionMatchUpdate) AddHeroID ¶
func (smu *SubscriptionMatchUpdate) AddHeroID(i int) *SubscriptionMatchUpdate
AddHeroID adds i to the "hero_id" field.
func (*SubscriptionMatchUpdate) AddKills ¶
func (smu *SubscriptionMatchUpdate) AddKills(i int) *SubscriptionMatchUpdate
AddKills adds i to the "kills" field.
func (*SubscriptionMatchUpdate) AddLeaverStatus ¶
func (smu *SubscriptionMatchUpdate) AddLeaverStatus(i int) *SubscriptionMatchUpdate
AddLeaverStatus adds i to the "leaver_status" field.
func (*SubscriptionMatchUpdate) AddLobbyType ¶
func (smu *SubscriptionMatchUpdate) AddLobbyType(i int) *SubscriptionMatchUpdate
AddLobbyType adds i to the "lobby_type" field.
func (*SubscriptionMatchUpdate) AddMatchID ¶
func (smu *SubscriptionMatchUpdate) AddMatchID(i int64) *SubscriptionMatchUpdate
AddMatchID adds i to the "match_id" field.
func (*SubscriptionMatchUpdate) AddPartySize ¶
func (smu *SubscriptionMatchUpdate) AddPartySize(i int) *SubscriptionMatchUpdate
AddPartySize adds i to the "party_size" field.
func (*SubscriptionMatchUpdate) AddPlayerSlot ¶
func (smu *SubscriptionMatchUpdate) AddPlayerSlot(i int) *SubscriptionMatchUpdate
AddPlayerSlot adds i to the "player_slot" field.
func (*SubscriptionMatchUpdate) AddSkill ¶
func (smu *SubscriptionMatchUpdate) AddSkill(i int) *SubscriptionMatchUpdate
AddSkill adds i to the "skill" field.
func (*SubscriptionMatchUpdate) AddStartTime ¶
func (smu *SubscriptionMatchUpdate) AddStartTime(i int) *SubscriptionMatchUpdate
AddStartTime adds i to the "start_time" field.
func (*SubscriptionMatchUpdate) AddVersion ¶
func (smu *SubscriptionMatchUpdate) AddVersion(i int) *SubscriptionMatchUpdate
AddVersion adds i to the "version" field.
func (*SubscriptionMatchUpdate) ClearSkill ¶
func (smu *SubscriptionMatchUpdate) ClearSkill() *SubscriptionMatchUpdate
ClearSkill clears the value of the "skill" field.
func (*SubscriptionMatchUpdate) Exec ¶
func (smu *SubscriptionMatchUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscriptionMatchUpdate) ExecX ¶
func (smu *SubscriptionMatchUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionMatchUpdate) Mutation ¶
func (smu *SubscriptionMatchUpdate) Mutation() *SubscriptionMatchMutation
Mutation returns the SubscriptionMatchMutation object of the builder.
func (*SubscriptionMatchUpdate) Save ¶
func (smu *SubscriptionMatchUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SubscriptionMatchUpdate) SaveX ¶
func (smu *SubscriptionMatchUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SubscriptionMatchUpdate) SetAssists ¶
func (smu *SubscriptionMatchUpdate) SetAssists(i int) *SubscriptionMatchUpdate
SetAssists sets the "assists" field.
func (*SubscriptionMatchUpdate) SetDeaths ¶
func (smu *SubscriptionMatchUpdate) SetDeaths(i int) *SubscriptionMatchUpdate
SetDeaths sets the "deaths" field.
func (*SubscriptionMatchUpdate) SetDuration ¶
func (smu *SubscriptionMatchUpdate) SetDuration(i int) *SubscriptionMatchUpdate
SetDuration sets the "duration" field.
func (*SubscriptionMatchUpdate) SetGameMode ¶
func (smu *SubscriptionMatchUpdate) SetGameMode(i int) *SubscriptionMatchUpdate
SetGameMode sets the "game_mode" field.
func (*SubscriptionMatchUpdate) SetHeroID ¶
func (smu *SubscriptionMatchUpdate) SetHeroID(i int) *SubscriptionMatchUpdate
SetHeroID sets the "hero_id" field.
func (*SubscriptionMatchUpdate) SetKills ¶
func (smu *SubscriptionMatchUpdate) SetKills(i int) *SubscriptionMatchUpdate
SetKills sets the "kills" field.
func (*SubscriptionMatchUpdate) SetLeaverStatus ¶
func (smu *SubscriptionMatchUpdate) SetLeaverStatus(i int) *SubscriptionMatchUpdate
SetLeaverStatus sets the "leaver_status" field.
func (*SubscriptionMatchUpdate) SetLobbyType ¶
func (smu *SubscriptionMatchUpdate) SetLobbyType(i int) *SubscriptionMatchUpdate
SetLobbyType sets the "lobby_type" field.
func (*SubscriptionMatchUpdate) SetMatchID ¶
func (smu *SubscriptionMatchUpdate) SetMatchID(i int64) *SubscriptionMatchUpdate
SetMatchID sets the "match_id" field.
func (*SubscriptionMatchUpdate) SetNillableSkill ¶
func (smu *SubscriptionMatchUpdate) SetNillableSkill(i *int) *SubscriptionMatchUpdate
SetNillableSkill sets the "skill" field if the given value is not nil.
func (*SubscriptionMatchUpdate) SetPartySize ¶
func (smu *SubscriptionMatchUpdate) SetPartySize(i int) *SubscriptionMatchUpdate
SetPartySize sets the "party_size" field.
func (*SubscriptionMatchUpdate) SetPlayerID ¶
func (smu *SubscriptionMatchUpdate) SetPlayerID(s string) *SubscriptionMatchUpdate
SetPlayerID sets the "player_id" field.
func (*SubscriptionMatchUpdate) SetPlayerSlot ¶
func (smu *SubscriptionMatchUpdate) SetPlayerSlot(i int) *SubscriptionMatchUpdate
SetPlayerSlot sets the "player_slot" field.
func (*SubscriptionMatchUpdate) SetRadiantWin ¶
func (smu *SubscriptionMatchUpdate) SetRadiantWin(b bool) *SubscriptionMatchUpdate
SetRadiantWin sets the "radiant_win" field.
func (*SubscriptionMatchUpdate) SetSkill ¶
func (smu *SubscriptionMatchUpdate) SetSkill(i int) *SubscriptionMatchUpdate
SetSkill sets the "skill" field.
func (*SubscriptionMatchUpdate) SetStartTime ¶
func (smu *SubscriptionMatchUpdate) SetStartTime(i int) *SubscriptionMatchUpdate
SetStartTime sets the "start_time" field.
func (*SubscriptionMatchUpdate) SetUpdateTime ¶
func (smu *SubscriptionMatchUpdate) SetUpdateTime(t time.Time) *SubscriptionMatchUpdate
SetUpdateTime sets the "update_time" field.
func (*SubscriptionMatchUpdate) SetVersion ¶
func (smu *SubscriptionMatchUpdate) SetVersion(i int) *SubscriptionMatchUpdate
SetVersion sets the "version" field.
func (*SubscriptionMatchUpdate) Where ¶
func (smu *SubscriptionMatchUpdate) Where(ps ...predicate.SubscriptionMatch) *SubscriptionMatchUpdate
Where appends a list predicates to the SubscriptionMatchUpdate builder.
type SubscriptionMatchUpdateOne ¶
type SubscriptionMatchUpdateOne struct {
// contains filtered or unexported fields
}
SubscriptionMatchUpdateOne is the builder for updating a single SubscriptionMatch entity.
func (*SubscriptionMatchUpdateOne) AddAssists ¶
func (smuo *SubscriptionMatchUpdateOne) AddAssists(i int) *SubscriptionMatchUpdateOne
AddAssists adds i to the "assists" field.
func (*SubscriptionMatchUpdateOne) AddDeaths ¶
func (smuo *SubscriptionMatchUpdateOne) AddDeaths(i int) *SubscriptionMatchUpdateOne
AddDeaths adds i to the "deaths" field.
func (*SubscriptionMatchUpdateOne) AddDuration ¶
func (smuo *SubscriptionMatchUpdateOne) AddDuration(i int) *SubscriptionMatchUpdateOne
AddDuration adds i to the "duration" field.
func (*SubscriptionMatchUpdateOne) AddGameMode ¶
func (smuo *SubscriptionMatchUpdateOne) AddGameMode(i int) *SubscriptionMatchUpdateOne
AddGameMode adds i to the "game_mode" field.
func (*SubscriptionMatchUpdateOne) AddHeroID ¶
func (smuo *SubscriptionMatchUpdateOne) AddHeroID(i int) *SubscriptionMatchUpdateOne
AddHeroID adds i to the "hero_id" field.
func (*SubscriptionMatchUpdateOne) AddKills ¶
func (smuo *SubscriptionMatchUpdateOne) AddKills(i int) *SubscriptionMatchUpdateOne
AddKills adds i to the "kills" field.
func (*SubscriptionMatchUpdateOne) AddLeaverStatus ¶
func (smuo *SubscriptionMatchUpdateOne) AddLeaverStatus(i int) *SubscriptionMatchUpdateOne
AddLeaverStatus adds i to the "leaver_status" field.
func (*SubscriptionMatchUpdateOne) AddLobbyType ¶
func (smuo *SubscriptionMatchUpdateOne) AddLobbyType(i int) *SubscriptionMatchUpdateOne
AddLobbyType adds i to the "lobby_type" field.
func (*SubscriptionMatchUpdateOne) AddMatchID ¶
func (smuo *SubscriptionMatchUpdateOne) AddMatchID(i int64) *SubscriptionMatchUpdateOne
AddMatchID adds i to the "match_id" field.
func (*SubscriptionMatchUpdateOne) AddPartySize ¶
func (smuo *SubscriptionMatchUpdateOne) AddPartySize(i int) *SubscriptionMatchUpdateOne
AddPartySize adds i to the "party_size" field.
func (*SubscriptionMatchUpdateOne) AddPlayerSlot ¶
func (smuo *SubscriptionMatchUpdateOne) AddPlayerSlot(i int) *SubscriptionMatchUpdateOne
AddPlayerSlot adds i to the "player_slot" field.
func (*SubscriptionMatchUpdateOne) AddSkill ¶
func (smuo *SubscriptionMatchUpdateOne) AddSkill(i int) *SubscriptionMatchUpdateOne
AddSkill adds i to the "skill" field.
func (*SubscriptionMatchUpdateOne) AddStartTime ¶
func (smuo *SubscriptionMatchUpdateOne) AddStartTime(i int) *SubscriptionMatchUpdateOne
AddStartTime adds i to the "start_time" field.
func (*SubscriptionMatchUpdateOne) AddVersion ¶
func (smuo *SubscriptionMatchUpdateOne) AddVersion(i int) *SubscriptionMatchUpdateOne
AddVersion adds i to the "version" field.
func (*SubscriptionMatchUpdateOne) ClearSkill ¶
func (smuo *SubscriptionMatchUpdateOne) ClearSkill() *SubscriptionMatchUpdateOne
ClearSkill clears the value of the "skill" field.
func (*SubscriptionMatchUpdateOne) Exec ¶
func (smuo *SubscriptionMatchUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SubscriptionMatchUpdateOne) ExecX ¶
func (smuo *SubscriptionMatchUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionMatchUpdateOne) Mutation ¶
func (smuo *SubscriptionMatchUpdateOne) Mutation() *SubscriptionMatchMutation
Mutation returns the SubscriptionMatchMutation object of the builder.
func (*SubscriptionMatchUpdateOne) Save ¶
func (smuo *SubscriptionMatchUpdateOne) Save(ctx context.Context) (*SubscriptionMatch, error)
Save executes the query and returns the updated SubscriptionMatch entity.
func (*SubscriptionMatchUpdateOne) SaveX ¶
func (smuo *SubscriptionMatchUpdateOne) SaveX(ctx context.Context) *SubscriptionMatch
SaveX is like Save, but panics if an error occurs.
func (*SubscriptionMatchUpdateOne) Select ¶
func (smuo *SubscriptionMatchUpdateOne) Select(field string, fields ...string) *SubscriptionMatchUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SubscriptionMatchUpdateOne) SetAssists ¶
func (smuo *SubscriptionMatchUpdateOne) SetAssists(i int) *SubscriptionMatchUpdateOne
SetAssists sets the "assists" field.
func (*SubscriptionMatchUpdateOne) SetDeaths ¶
func (smuo *SubscriptionMatchUpdateOne) SetDeaths(i int) *SubscriptionMatchUpdateOne
SetDeaths sets the "deaths" field.
func (*SubscriptionMatchUpdateOne) SetDuration ¶
func (smuo *SubscriptionMatchUpdateOne) SetDuration(i int) *SubscriptionMatchUpdateOne
SetDuration sets the "duration" field.
func (*SubscriptionMatchUpdateOne) SetGameMode ¶
func (smuo *SubscriptionMatchUpdateOne) SetGameMode(i int) *SubscriptionMatchUpdateOne
SetGameMode sets the "game_mode" field.
func (*SubscriptionMatchUpdateOne) SetHeroID ¶
func (smuo *SubscriptionMatchUpdateOne) SetHeroID(i int) *SubscriptionMatchUpdateOne
SetHeroID sets the "hero_id" field.
func (*SubscriptionMatchUpdateOne) SetKills ¶
func (smuo *SubscriptionMatchUpdateOne) SetKills(i int) *SubscriptionMatchUpdateOne
SetKills sets the "kills" field.
func (*SubscriptionMatchUpdateOne) SetLeaverStatus ¶
func (smuo *SubscriptionMatchUpdateOne) SetLeaverStatus(i int) *SubscriptionMatchUpdateOne
SetLeaverStatus sets the "leaver_status" field.
func (*SubscriptionMatchUpdateOne) SetLobbyType ¶
func (smuo *SubscriptionMatchUpdateOne) SetLobbyType(i int) *SubscriptionMatchUpdateOne
SetLobbyType sets the "lobby_type" field.
func (*SubscriptionMatchUpdateOne) SetMatchID ¶
func (smuo *SubscriptionMatchUpdateOne) SetMatchID(i int64) *SubscriptionMatchUpdateOne
SetMatchID sets the "match_id" field.
func (*SubscriptionMatchUpdateOne) SetNillableSkill ¶
func (smuo *SubscriptionMatchUpdateOne) SetNillableSkill(i *int) *SubscriptionMatchUpdateOne
SetNillableSkill sets the "skill" field if the given value is not nil.
func (*SubscriptionMatchUpdateOne) SetPartySize ¶
func (smuo *SubscriptionMatchUpdateOne) SetPartySize(i int) *SubscriptionMatchUpdateOne
SetPartySize sets the "party_size" field.
func (*SubscriptionMatchUpdateOne) SetPlayerID ¶
func (smuo *SubscriptionMatchUpdateOne) SetPlayerID(s string) *SubscriptionMatchUpdateOne
SetPlayerID sets the "player_id" field.
func (*SubscriptionMatchUpdateOne) SetPlayerSlot ¶
func (smuo *SubscriptionMatchUpdateOne) SetPlayerSlot(i int) *SubscriptionMatchUpdateOne
SetPlayerSlot sets the "player_slot" field.
func (*SubscriptionMatchUpdateOne) SetRadiantWin ¶
func (smuo *SubscriptionMatchUpdateOne) SetRadiantWin(b bool) *SubscriptionMatchUpdateOne
SetRadiantWin sets the "radiant_win" field.
func (*SubscriptionMatchUpdateOne) SetSkill ¶
func (smuo *SubscriptionMatchUpdateOne) SetSkill(i int) *SubscriptionMatchUpdateOne
SetSkill sets the "skill" field.
func (*SubscriptionMatchUpdateOne) SetStartTime ¶
func (smuo *SubscriptionMatchUpdateOne) SetStartTime(i int) *SubscriptionMatchUpdateOne
SetStartTime sets the "start_time" field.
func (*SubscriptionMatchUpdateOne) SetUpdateTime ¶
func (smuo *SubscriptionMatchUpdateOne) SetUpdateTime(t time.Time) *SubscriptionMatchUpdateOne
SetUpdateTime sets the "update_time" field.
func (*SubscriptionMatchUpdateOne) SetVersion ¶
func (smuo *SubscriptionMatchUpdateOne) SetVersion(i int) *SubscriptionMatchUpdateOne
SetVersion sets the "version" field.
type SubscriptionMatches ¶
type SubscriptionMatches []*SubscriptionMatch
SubscriptionMatches is a parsable slice of SubscriptionMatch.
type SubscriptionMutation ¶
type SubscriptionMutation struct {
// contains filtered or unexported fields
}
SubscriptionMutation represents an operation that mutates the Subscription nodes in the graph.
func (*SubscriptionMutation) AddField ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) AddGroupID ¶
func (m *SubscriptionMutation) AddGroupID(i int)
AddGroupID adds i to the "group_id" field.
func (*SubscriptionMutation) AddedEdges ¶
func (m *SubscriptionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SubscriptionMutation) AddedField ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) AddedFields ¶
func (m *SubscriptionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SubscriptionMutation) AddedGroupID ¶
func (m *SubscriptionMutation) AddedGroupID() (r int, exists bool)
AddedGroupID returns the value that was added to the "group_id" field in this mutation.
func (*SubscriptionMutation) AddedIDs ¶
func (m *SubscriptionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SubscriptionMutation) Alias ¶
func (m *SubscriptionMutation) Alias() (r string, exists bool)
Alias returns the value of the "alias" field in the mutation.
func (*SubscriptionMutation) ClearEdge ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) ClearField ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) ClearedEdges ¶
func (m *SubscriptionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SubscriptionMutation) ClearedFields ¶
func (m *SubscriptionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SubscriptionMutation) Client ¶
func (m SubscriptionMutation) 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 (*SubscriptionMutation) CreateTime ¶
func (m *SubscriptionMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*SubscriptionMutation) EdgeCleared ¶
func (m *SubscriptionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SubscriptionMutation) Field ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) FieldCleared ¶
func (m *SubscriptionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SubscriptionMutation) Fields ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) GroupID ¶
func (m *SubscriptionMutation) GroupID() (r int, exists bool)
GroupID returns the value of the "group_id" field in the mutation.
func (*SubscriptionMutation) ID ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) IDs ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) OldAlias ¶
func (m *SubscriptionMutation) OldAlias(ctx context.Context) (v string, err error)
OldAlias returns the old "alias" field's value of the Subscription entity. If the Subscription 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 (*SubscriptionMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Subscription entity. If the Subscription 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 (*SubscriptionMutation) 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 (*SubscriptionMutation) OldGroupID ¶
func (m *SubscriptionMutation) OldGroupID(ctx context.Context) (v int, err error)
OldGroupID returns the old "group_id" field's value of the Subscription entity. If the Subscription 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 (*SubscriptionMutation) OldSteamID ¶
func (m *SubscriptionMutation) OldSteamID(ctx context.Context) (v string, err error)
OldSteamID returns the old "steam_id" field's value of the Subscription entity. If the Subscription 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 (*SubscriptionMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Subscription entity. If the Subscription 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 (*SubscriptionMutation) Op ¶
func (m *SubscriptionMutation) Op() Op
Op returns the operation name.
func (*SubscriptionMutation) RemovedEdges ¶
func (m *SubscriptionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SubscriptionMutation) RemovedIDs ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) ResetAlias ¶
func (m *SubscriptionMutation) ResetAlias()
ResetAlias resets all changes to the "alias" field.
func (*SubscriptionMutation) ResetCreateTime ¶
func (m *SubscriptionMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*SubscriptionMutation) ResetEdge ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) ResetField ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) ResetGroupID ¶
func (m *SubscriptionMutation) ResetGroupID()
ResetGroupID resets all changes to the "group_id" field.
func (*SubscriptionMutation) ResetSteamID ¶
func (m *SubscriptionMutation) ResetSteamID()
ResetSteamID resets all changes to the "steam_id" field.
func (*SubscriptionMutation) ResetUpdateTime ¶
func (m *SubscriptionMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*SubscriptionMutation) SetAlias ¶
func (m *SubscriptionMutation) SetAlias(s string)
SetAlias sets the "alias" field.
func (*SubscriptionMutation) SetCreateTime ¶
func (m *SubscriptionMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*SubscriptionMutation) SetField ¶
func (m *SubscriptionMutation) 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 (*SubscriptionMutation) SetGroupID ¶
func (m *SubscriptionMutation) SetGroupID(i int)
SetGroupID sets the "group_id" field.
func (*SubscriptionMutation) SetSteamID ¶
func (m *SubscriptionMutation) SetSteamID(s string)
SetSteamID sets the "steam_id" field.
func (*SubscriptionMutation) SetUpdateTime ¶
func (m *SubscriptionMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*SubscriptionMutation) SteamID ¶
func (m *SubscriptionMutation) SteamID() (r string, exists bool)
SteamID returns the value of the "steam_id" field in the mutation.
func (SubscriptionMutation) Tx ¶
func (m SubscriptionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SubscriptionMutation) Type ¶
func (m *SubscriptionMutation) Type() string
Type returns the node type of this mutation (Subscription).
func (*SubscriptionMutation) UpdateTime ¶
func (m *SubscriptionMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*SubscriptionMutation) Where ¶
func (m *SubscriptionMutation) Where(ps ...predicate.Subscription)
Where appends a list predicates to the SubscriptionMutation builder.
type SubscriptionQuery ¶
type SubscriptionQuery struct {
// contains filtered or unexported fields
}
SubscriptionQuery is the builder for querying Subscription entities.
func (*SubscriptionQuery) All ¶
func (sq *SubscriptionQuery) All(ctx context.Context) ([]*Subscription, error)
All executes the query and returns a list of Subscriptions.
func (*SubscriptionQuery) AllX ¶
func (sq *SubscriptionQuery) AllX(ctx context.Context) []*Subscription
AllX is like All, but panics if an error occurs.
func (*SubscriptionQuery) Clone ¶
func (sq *SubscriptionQuery) Clone() *SubscriptionQuery
Clone returns a duplicate of the SubscriptionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SubscriptionQuery) Count ¶
func (sq *SubscriptionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SubscriptionQuery) CountX ¶
func (sq *SubscriptionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SubscriptionQuery) Exist ¶
func (sq *SubscriptionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SubscriptionQuery) ExistX ¶
func (sq *SubscriptionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SubscriptionQuery) First ¶
func (sq *SubscriptionQuery) First(ctx context.Context) (*Subscription, error)
First returns the first Subscription entity from the query. Returns a *NotFoundError when no Subscription was found.
func (*SubscriptionQuery) FirstID ¶
func (sq *SubscriptionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Subscription ID from the query. Returns a *NotFoundError when no Subscription ID was found.
func (*SubscriptionQuery) FirstIDX ¶
func (sq *SubscriptionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*SubscriptionQuery) FirstX ¶
func (sq *SubscriptionQuery) FirstX(ctx context.Context) *Subscription
FirstX is like First, but panics if an error occurs.
func (*SubscriptionQuery) GroupBy ¶
func (sq *SubscriptionQuery) GroupBy(field string, fields ...string) *SubscriptionGroupBy
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 {
CreateTime time.Time `json:"create_time,omitempty"`
Count int `json:"count,omitempty"`
}
client.Subscription.Query().
GroupBy(subscription.FieldCreateTime).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*SubscriptionQuery) IDs ¶
func (sq *SubscriptionQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Subscription IDs.
func (*SubscriptionQuery) IDsX ¶
func (sq *SubscriptionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SubscriptionQuery) Limit ¶
func (sq *SubscriptionQuery) Limit(limit int) *SubscriptionQuery
Limit adds a limit step to the query.
func (*SubscriptionQuery) Offset ¶
func (sq *SubscriptionQuery) Offset(offset int) *SubscriptionQuery
Offset adds an offset step to the query.
func (*SubscriptionQuery) Only ¶
func (sq *SubscriptionQuery) Only(ctx context.Context) (*Subscription, error)
Only returns a single Subscription entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Subscription entity is found. Returns a *NotFoundError when no Subscription entities are found.
func (*SubscriptionQuery) OnlyID ¶
func (sq *SubscriptionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Subscription ID in the query. Returns a *NotSingularError when more than one Subscription ID is found. Returns a *NotFoundError when no entities are found.
func (*SubscriptionQuery) OnlyIDX ¶
func (sq *SubscriptionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SubscriptionQuery) OnlyX ¶
func (sq *SubscriptionQuery) OnlyX(ctx context.Context) *Subscription
OnlyX is like Only, but panics if an error occurs.
func (*SubscriptionQuery) Order ¶
func (sq *SubscriptionQuery) Order(o ...OrderFunc) *SubscriptionQuery
Order adds an order step to the query.
func (*SubscriptionQuery) Select ¶
func (sq *SubscriptionQuery) Select(fields ...string) *SubscriptionSelect
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 {
CreateTime time.Time `json:"create_time,omitempty"`
}
client.Subscription.Query().
Select(subscription.FieldCreateTime).
Scan(ctx, &v)
func (*SubscriptionQuery) Unique ¶
func (sq *SubscriptionQuery) Unique(unique bool) *SubscriptionQuery
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 (*SubscriptionQuery) Where ¶
func (sq *SubscriptionQuery) Where(ps ...predicate.Subscription) *SubscriptionQuery
Where adds a new predicate for the SubscriptionQuery builder.
type SubscriptionSelect ¶
type SubscriptionSelect struct {
*SubscriptionQuery
// contains filtered or unexported fields
}
SubscriptionSelect is the builder for selecting fields of Subscription entities.
func (*SubscriptionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SubscriptionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SubscriptionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SubscriptionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SubscriptionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SubscriptionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SubscriptionSelect) Scan ¶
func (ss *SubscriptionSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*SubscriptionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SubscriptionUpdate ¶
type SubscriptionUpdate struct {
// contains filtered or unexported fields
}
SubscriptionUpdate is the builder for updating Subscription entities.
func (*SubscriptionUpdate) AddGroupID ¶
func (su *SubscriptionUpdate) AddGroupID(i int) *SubscriptionUpdate
AddGroupID adds i to the "group_id" field.
func (*SubscriptionUpdate) Exec ¶
func (su *SubscriptionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscriptionUpdate) ExecX ¶
func (su *SubscriptionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionUpdate) Mutation ¶
func (su *SubscriptionUpdate) Mutation() *SubscriptionMutation
Mutation returns the SubscriptionMutation object of the builder.
func (*SubscriptionUpdate) Save ¶
func (su *SubscriptionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SubscriptionUpdate) SaveX ¶
func (su *SubscriptionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SubscriptionUpdate) SetAlias ¶
func (su *SubscriptionUpdate) SetAlias(s string) *SubscriptionUpdate
SetAlias sets the "alias" field.
func (*SubscriptionUpdate) SetGroupID ¶
func (su *SubscriptionUpdate) SetGroupID(i int) *SubscriptionUpdate
SetGroupID sets the "group_id" field.
func (*SubscriptionUpdate) SetSteamID ¶
func (su *SubscriptionUpdate) SetSteamID(s string) *SubscriptionUpdate
SetSteamID sets the "steam_id" field.
func (*SubscriptionUpdate) SetUpdateTime ¶
func (su *SubscriptionUpdate) SetUpdateTime(t time.Time) *SubscriptionUpdate
SetUpdateTime sets the "update_time" field.
func (*SubscriptionUpdate) Where ¶
func (su *SubscriptionUpdate) Where(ps ...predicate.Subscription) *SubscriptionUpdate
Where appends a list predicates to the SubscriptionUpdate builder.
type SubscriptionUpdateOne ¶
type SubscriptionUpdateOne struct {
// contains filtered or unexported fields
}
SubscriptionUpdateOne is the builder for updating a single Subscription entity.
func (*SubscriptionUpdateOne) AddGroupID ¶
func (suo *SubscriptionUpdateOne) AddGroupID(i int) *SubscriptionUpdateOne
AddGroupID adds i to the "group_id" field.
func (*SubscriptionUpdateOne) Exec ¶
func (suo *SubscriptionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SubscriptionUpdateOne) ExecX ¶
func (suo *SubscriptionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionUpdateOne) Mutation ¶
func (suo *SubscriptionUpdateOne) Mutation() *SubscriptionMutation
Mutation returns the SubscriptionMutation object of the builder.
func (*SubscriptionUpdateOne) Save ¶
func (suo *SubscriptionUpdateOne) Save(ctx context.Context) (*Subscription, error)
Save executes the query and returns the updated Subscription entity.
func (*SubscriptionUpdateOne) SaveX ¶
func (suo *SubscriptionUpdateOne) SaveX(ctx context.Context) *Subscription
SaveX is like Save, but panics if an error occurs.
func (*SubscriptionUpdateOne) Select ¶
func (suo *SubscriptionUpdateOne) Select(field string, fields ...string) *SubscriptionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SubscriptionUpdateOne) SetAlias ¶
func (suo *SubscriptionUpdateOne) SetAlias(s string) *SubscriptionUpdateOne
SetAlias sets the "alias" field.
func (*SubscriptionUpdateOne) SetGroupID ¶
func (suo *SubscriptionUpdateOne) SetGroupID(i int) *SubscriptionUpdateOne
SetGroupID sets the "group_id" field.
func (*SubscriptionUpdateOne) SetSteamID ¶
func (suo *SubscriptionUpdateOne) SetSteamID(s string) *SubscriptionUpdateOne
SetSteamID sets the "steam_id" field.
func (*SubscriptionUpdateOne) SetUpdateTime ¶
func (suo *SubscriptionUpdateOne) SetUpdateTime(t time.Time) *SubscriptionUpdateOne
SetUpdateTime sets the "update_time" field.
type Subscriptions ¶
type Subscriptions []*Subscription
Subscriptions is a parsable slice of Subscription.
type Tx ¶
type Tx struct {
// Hero is the client for interacting with the Hero builders.
Hero *HeroClient
// Subscription is the client for interacting with the Subscription builders.
Subscription *SubscriptionClient
// SubscriptionMatch is the client for interacting with the SubscriptionMatch builders.
SubscriptionMatch *SubscriptionMatchClient
// 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
¶
- client.go
- config.go
- context.go
- ent.go
- generate.go
- hero.go
- hero_create.go
- hero_delete.go
- hero_query.go
- hero_update.go
- mutation.go
- runtime.go
- subscription.go
- subscription_create.go
- subscription_delete.go
- subscription_query.go
- subscription_update.go
- subscriptionmatch.go
- subscriptionmatch_create.go
- subscriptionmatch_delete.go
- subscriptionmatch_query.go
- subscriptionmatch_update.go
- tx.go