Documentation ¶
Index ¶
- Constants
- Variables
- 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
- func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)
- type AggregateFunc
- type Card
- func (c *Card) GameUsers(ctx context.Context) (result []*GameUser, err error)
- func (c Card) IsEntity()
- func (c *Card) NamedGameUsers(name string) ([]*GameUser, error)
- func (c *Card) Node(ctx context.Context) (node *Node, err error)
- func (c *Card) QueryGameUsers() *GameUserQuery
- func (c *Card) String() string
- func (c *Card) ToEdge(order *CardOrder) *CardEdge
- func (c *Card) Unwrap() *Card
- func (c *Card) Update() *CardUpdateOne
- type CardClient
- func (c *CardClient) Create() *CardCreate
- func (c *CardClient) CreateBulk(builders ...*CardCreate) *CardCreateBulk
- func (c *CardClient) Delete() *CardDelete
- func (c *CardClient) DeleteOne(ca *Card) *CardDeleteOne
- func (c *CardClient) DeleteOneID(id int64) *CardDeleteOne
- func (c *CardClient) Get(ctx context.Context, id int64) (*Card, error)
- func (c *CardClient) GetX(ctx context.Context, id int64) *Card
- func (c *CardClient) Hooks() []Hook
- func (c *CardClient) Query() *CardQuery
- func (c *CardClient) QueryGameUsers(ca *Card) *GameUserQuery
- func (c *CardClient) Update() *CardUpdate
- func (c *CardClient) UpdateOne(ca *Card) *CardUpdateOne
- func (c *CardClient) UpdateOneID(id int64) *CardUpdateOne
- func (c *CardClient) Use(hooks ...Hook)
- type CardConnection
- type CardCreate
- func (cc *CardCreate) AddGameUserIDs(ids ...int64) *CardCreate
- func (cc *CardCreate) AddGameUsers(g ...*GameUser) *CardCreate
- func (cc *CardCreate) Exec(ctx context.Context) error
- func (cc *CardCreate) ExecX(ctx context.Context)
- func (cc *CardCreate) Mutation() *CardMutation
- func (cc *CardCreate) Save(ctx context.Context) (*Card, error)
- func (cc *CardCreate) SaveX(ctx context.Context) *Card
- func (cc *CardCreate) SetCreatedAt(t time.Time) *CardCreate
- func (cc *CardCreate) SetCreatedBy(i int64) *CardCreate
- func (cc *CardCreate) SetDeletedAt(t time.Time) *CardCreate
- func (cc *CardCreate) SetID(i int64) *CardCreate
- func (c *CardCreate) SetInput(i CreateCardInput) *CardCreate
- func (cc *CardCreate) SetName(c card.Name) *CardCreate
- func (cc *CardCreate) SetNillableCreatedAt(t *time.Time) *CardCreate
- func (cc *CardCreate) SetNillableCreatedBy(i *int64) *CardCreate
- func (cc *CardCreate) SetNillableDeletedAt(t *time.Time) *CardCreate
- func (cc *CardCreate) SetNillableID(i *int64) *CardCreate
- func (cc *CardCreate) SetNillableName(c *card.Name) *CardCreate
- func (cc *CardCreate) SetNillableRed(b *bool) *CardCreate
- func (cc *CardCreate) SetNillableTale(s *string) *CardCreate
- func (cc *CardCreate) SetNillableUpdatedAt(t *time.Time) *CardCreate
- func (cc *CardCreate) SetNillableUpdatedBy(i *int64) *CardCreate
- func (cc *CardCreate) SetRed(b bool) *CardCreate
- func (cc *CardCreate) SetRole(c card.Role) *CardCreate
- func (cc *CardCreate) SetTale(s string) *CardCreate
- func (cc *CardCreate) SetUpdatedAt(t time.Time) *CardCreate
- func (cc *CardCreate) SetUpdatedBy(i int64) *CardCreate
- type CardCreateBulk
- type CardDelete
- type CardDeleteOne
- type CardEdge
- type CardEdges
- type CardGroupBy
- func (cgb *CardGroupBy) Aggregate(fns ...AggregateFunc) *CardGroupBy
- func (s *CardGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CardGroupBy) BoolX(ctx context.Context) bool
- func (s *CardGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CardGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CardGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CardGroupBy) Float64X(ctx context.Context) float64
- func (s *CardGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CardGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CardGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CardGroupBy) IntX(ctx context.Context) int
- func (s *CardGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CardGroupBy) IntsX(ctx context.Context) []int
- func (cgb *CardGroupBy) Scan(ctx context.Context, v any) error
- func (s *CardGroupBy) ScanX(ctx context.Context, v any)
- func (s *CardGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CardGroupBy) StringX(ctx context.Context) string
- func (s *CardGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CardGroupBy) StringsX(ctx context.Context) []string
- type CardMutation
- func (m *CardMutation) AddCreatedBy(i int64)
- func (m *CardMutation) AddField(name string, value ent.Value) error
- func (m *CardMutation) AddGameUserIDs(ids ...int64)
- func (m *CardMutation) AddUpdatedBy(i int64)
- func (m *CardMutation) AddedCreatedBy() (r int64, exists bool)
- func (m *CardMutation) AddedEdges() []string
- func (m *CardMutation) AddedField(name string) (ent.Value, bool)
- func (m *CardMutation) AddedFields() []string
- func (m *CardMutation) AddedIDs(name string) []ent.Value
- func (m *CardMutation) AddedUpdatedBy() (r int64, exists bool)
- func (m *CardMutation) ClearEdge(name string) error
- func (m *CardMutation) ClearField(name string) error
- func (m *CardMutation) ClearGameUsers()
- func (m *CardMutation) ClearedEdges() []string
- func (m *CardMutation) ClearedFields() []string
- func (m CardMutation) Client() *Client
- func (m *CardMutation) CreatedAt() (r time.Time, exists bool)
- func (m *CardMutation) CreatedBy() (r int64, exists bool)
- func (m *CardMutation) DeletedAt() (r time.Time, exists bool)
- func (m *CardMutation) EdgeCleared(name string) bool
- func (m *CardMutation) Field(name string) (ent.Value, bool)
- func (m *CardMutation) FieldCleared(name string) bool
- func (m *CardMutation) Fields() []string
- func (m *CardMutation) GameUsersCleared() bool
- func (m *CardMutation) GameUsersIDs() (ids []int64)
- func (m *CardMutation) ID() (id int64, exists bool)
- func (m *CardMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *CardMutation) Name() (r card.Name, exists bool)
- func (m *CardMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CardMutation) OldCreatedBy(ctx context.Context) (v int64, err error)
- func (m *CardMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *CardMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CardMutation) OldName(ctx context.Context) (v card.Name, err error)
- func (m *CardMutation) OldRed(ctx context.Context) (v bool, err error)
- func (m *CardMutation) OldRole(ctx context.Context) (v card.Role, err error)
- func (m *CardMutation) OldTale(ctx context.Context) (v string, err error)
- func (m *CardMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CardMutation) OldUpdatedBy(ctx context.Context) (v int64, err error)
- func (m *CardMutation) Op() Op
- func (m *CardMutation) Red() (r bool, exists bool)
- func (m *CardMutation) RemoveGameUserIDs(ids ...int64)
- func (m *CardMutation) RemovedEdges() []string
- func (m *CardMutation) RemovedGameUsersIDs() (ids []int64)
- func (m *CardMutation) RemovedIDs(name string) []ent.Value
- func (m *CardMutation) ResetCreatedAt()
- func (m *CardMutation) ResetCreatedBy()
- func (m *CardMutation) ResetDeletedAt()
- func (m *CardMutation) ResetEdge(name string) error
- func (m *CardMutation) ResetField(name string) error
- func (m *CardMutation) ResetGameUsers()
- func (m *CardMutation) ResetName()
- func (m *CardMutation) ResetRed()
- func (m *CardMutation) ResetRole()
- func (m *CardMutation) ResetTale()
- func (m *CardMutation) ResetUpdatedAt()
- func (m *CardMutation) ResetUpdatedBy()
- func (m *CardMutation) Role() (r card.Role, exists bool)
- func (m *CardMutation) SetCreatedAt(t time.Time)
- func (m *CardMutation) SetCreatedBy(i int64)
- func (m *CardMutation) SetDeletedAt(t time.Time)
- func (m *CardMutation) SetField(name string, value ent.Value) error
- func (m *CardMutation) SetID(id int64)
- func (m *CardMutation) SetName(c card.Name)
- func (m *CardMutation) SetRed(b bool)
- func (m *CardMutation) SetRole(c card.Role)
- func (m *CardMutation) SetTale(s string)
- func (m *CardMutation) SetUpdatedAt(t time.Time)
- func (m *CardMutation) SetUpdatedBy(i int64)
- func (m *CardMutation) Tale() (r string, exists bool)
- func (m CardMutation) Tx() (*Tx, error)
- func (m *CardMutation) Type() string
- func (m *CardMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *CardMutation) UpdatedBy() (r int64, exists bool)
- func (m *CardMutation) Where(ps ...predicate.Card)
- type CardOrder
- type CardOrderField
- type CardPaginateOption
- type CardQuery
- func (cq *CardQuery) Aggregate(fns ...AggregateFunc) *CardSelect
- func (cq *CardQuery) All(ctx context.Context) ([]*Card, error)
- func (cq *CardQuery) AllX(ctx context.Context) []*Card
- func (cq *CardQuery) Clone() *CardQuery
- func (c *CardQuery) CollectFields(ctx context.Context, satisfies ...string) (*CardQuery, error)
- func (cq *CardQuery) Count(ctx context.Context) (int, error)
- func (cq *CardQuery) CountX(ctx context.Context) int
- func (cq *CardQuery) Exist(ctx context.Context) (bool, error)
- func (cq *CardQuery) ExistX(ctx context.Context) bool
- func (cq *CardQuery) First(ctx context.Context) (*Card, error)
- func (cq *CardQuery) FirstID(ctx context.Context) (id int64, err error)
- func (cq *CardQuery) FirstIDX(ctx context.Context) int64
- func (cq *CardQuery) FirstX(ctx context.Context) *Card
- func (cq *CardQuery) GroupBy(field string, fields ...string) *CardGroupBy
- func (cq *CardQuery) IDs(ctx context.Context) ([]int64, error)
- func (cq *CardQuery) IDsX(ctx context.Context) []int64
- func (cq *CardQuery) Limit(limit int) *CardQuery
- func (cq *CardQuery) Offset(offset int) *CardQuery
- func (cq *CardQuery) Only(ctx context.Context) (*Card, error)
- func (cq *CardQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (cq *CardQuery) OnlyIDX(ctx context.Context) int64
- func (cq *CardQuery) OnlyX(ctx context.Context) *Card
- func (cq *CardQuery) Order(o ...OrderFunc) *CardQuery
- func (c *CardQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*CardConnection, error)
- func (cq *CardQuery) QueryGameUsers() *GameUserQuery
- func (cq *CardQuery) Select(fields ...string) *CardSelect
- func (cq *CardQuery) Unique(unique bool) *CardQuery
- func (cq *CardQuery) Where(ps ...predicate.Card) *CardQuery
- func (cq *CardQuery) WithGameUsers(opts ...func(*GameUserQuery)) *CardQuery
- func (cq *CardQuery) WithNamedGameUsers(name string, opts ...func(*GameUserQuery)) *CardQuery
- type CardSelect
- func (cs *CardSelect) Aggregate(fns ...AggregateFunc) *CardSelect
- func (s *CardSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CardSelect) BoolX(ctx context.Context) bool
- func (s *CardSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CardSelect) BoolsX(ctx context.Context) []bool
- func (s *CardSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CardSelect) Float64X(ctx context.Context) float64
- func (s *CardSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CardSelect) Float64sX(ctx context.Context) []float64
- func (s *CardSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CardSelect) IntX(ctx context.Context) int
- func (s *CardSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CardSelect) IntsX(ctx context.Context) []int
- func (cs *CardSelect) Scan(ctx context.Context, v any) error
- func (s *CardSelect) ScanX(ctx context.Context, v any)
- func (s *CardSelect) String(ctx context.Context) (_ string, err error)
- func (s *CardSelect) StringX(ctx context.Context) string
- func (s *CardSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CardSelect) StringsX(ctx context.Context) []string
- type CardUpdate
- func (cu *CardUpdate) AddCreatedBy(i int64) *CardUpdate
- func (cu *CardUpdate) AddGameUserIDs(ids ...int64) *CardUpdate
- func (cu *CardUpdate) AddGameUsers(g ...*GameUser) *CardUpdate
- func (cu *CardUpdate) AddUpdatedBy(i int64) *CardUpdate
- func (cu *CardUpdate) ClearGameUsers() *CardUpdate
- func (cu *CardUpdate) Exec(ctx context.Context) error
- func (cu *CardUpdate) ExecX(ctx context.Context)
- func (cu *CardUpdate) Mutation() *CardMutation
- func (cu *CardUpdate) RemoveGameUserIDs(ids ...int64) *CardUpdate
- func (cu *CardUpdate) RemoveGameUsers(g ...*GameUser) *CardUpdate
- func (cu *CardUpdate) Save(ctx context.Context) (int, error)
- func (cu *CardUpdate) SaveX(ctx context.Context) int
- func (cu *CardUpdate) SetCreatedBy(i int64) *CardUpdate
- func (cu *CardUpdate) SetDeletedAt(t time.Time) *CardUpdate
- func (c *CardUpdate) SetInput(i UpdateCardInput) *CardUpdate
- func (cu *CardUpdate) SetName(c card.Name) *CardUpdate
- func (cu *CardUpdate) SetNillableCreatedBy(i *int64) *CardUpdate
- func (cu *CardUpdate) SetNillableDeletedAt(t *time.Time) *CardUpdate
- func (cu *CardUpdate) SetNillableName(c *card.Name) *CardUpdate
- func (cu *CardUpdate) SetNillableRed(b *bool) *CardUpdate
- func (cu *CardUpdate) SetNillableTale(s *string) *CardUpdate
- func (cu *CardUpdate) SetNillableUpdatedBy(i *int64) *CardUpdate
- func (cu *CardUpdate) SetRed(b bool) *CardUpdate
- func (cu *CardUpdate) SetRole(c card.Role) *CardUpdate
- func (cu *CardUpdate) SetTale(s string) *CardUpdate
- func (cu *CardUpdate) SetUpdatedAt(t time.Time) *CardUpdate
- func (cu *CardUpdate) SetUpdatedBy(i int64) *CardUpdate
- func (cu *CardUpdate) Where(ps ...predicate.Card) *CardUpdate
- type CardUpdateOne
- func (cuo *CardUpdateOne) AddCreatedBy(i int64) *CardUpdateOne
- func (cuo *CardUpdateOne) AddGameUserIDs(ids ...int64) *CardUpdateOne
- func (cuo *CardUpdateOne) AddGameUsers(g ...*GameUser) *CardUpdateOne
- func (cuo *CardUpdateOne) AddUpdatedBy(i int64) *CardUpdateOne
- func (cuo *CardUpdateOne) ClearGameUsers() *CardUpdateOne
- func (cuo *CardUpdateOne) Exec(ctx context.Context) error
- func (cuo *CardUpdateOne) ExecX(ctx context.Context)
- func (cuo *CardUpdateOne) Mutation() *CardMutation
- func (cuo *CardUpdateOne) RemoveGameUserIDs(ids ...int64) *CardUpdateOne
- func (cuo *CardUpdateOne) RemoveGameUsers(g ...*GameUser) *CardUpdateOne
- func (cuo *CardUpdateOne) Save(ctx context.Context) (*Card, error)
- func (cuo *CardUpdateOne) SaveX(ctx context.Context) *Card
- func (cuo *CardUpdateOne) Select(field string, fields ...string) *CardUpdateOne
- func (cuo *CardUpdateOne) SetCreatedBy(i int64) *CardUpdateOne
- func (cuo *CardUpdateOne) SetDeletedAt(t time.Time) *CardUpdateOne
- func (c *CardUpdateOne) SetInput(i UpdateCardInput) *CardUpdateOne
- func (cuo *CardUpdateOne) SetName(c card.Name) *CardUpdateOne
- func (cuo *CardUpdateOne) SetNillableCreatedBy(i *int64) *CardUpdateOne
- func (cuo *CardUpdateOne) SetNillableDeletedAt(t *time.Time) *CardUpdateOne
- func (cuo *CardUpdateOne) SetNillableName(c *card.Name) *CardUpdateOne
- func (cuo *CardUpdateOne) SetNillableRed(b *bool) *CardUpdateOne
- func (cuo *CardUpdateOne) SetNillableTale(s *string) *CardUpdateOne
- func (cuo *CardUpdateOne) SetNillableUpdatedBy(i *int64) *CardUpdateOne
- func (cuo *CardUpdateOne) SetRed(b bool) *CardUpdateOne
- func (cuo *CardUpdateOne) SetRole(c card.Role) *CardUpdateOne
- func (cuo *CardUpdateOne) SetTale(s string) *CardUpdateOne
- func (cuo *CardUpdateOne) SetUpdatedAt(t time.Time) *CardUpdateOne
- func (cuo *CardUpdateOne) SetUpdatedBy(i int64) *CardUpdateOne
- type CardWhereInput
- type Cards
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Node(ctx context.Context, id int64) (*Node, error)
- func (c *Client) Noder(ctx context.Context, id int64, opts ...NodeOption) (_ Noder, err error)
- func (c *Client) Noders(ctx context.Context, ids []int64, opts ...NodeOption) ([]Noder, error)
- func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type CreateCardInput
- type CreateGameInput
- type CreateGameUserInput
- type CreateMissionInput
- type CreateRecordInput
- type CreateRoomInput
- type CreateRoomUserInput
- type CreateSquadInput
- type CreateVoteInput
- type Cursor
- type Edge
- type Field
- type Game
- func (ga *Game) GameUsers(ctx context.Context) (result []*GameUser, err error)
- func (ga Game) IsEntity()
- func (ga *Game) Missions(ctx context.Context) (result []*Mission, err error)
- func (ga *Game) NamedGameUsers(name string) ([]*GameUser, error)
- func (ga *Game) NamedMissions(name string) ([]*Mission, error)
- func (ga *Game) Node(ctx context.Context) (node *Node, err error)
- func (ga *Game) QueryGameUsers() *GameUserQuery
- func (ga *Game) QueryMissions() *MissionQuery
- func (ga *Game) QueryRoom() *RoomQuery
- func (ga *Game) Room(ctx context.Context) (*Room, error)
- func (ga *Game) String() string
- func (ga *Game) ToEdge(order *GameOrder) *GameEdge
- func (ga *Game) Unwrap() *Game
- func (ga *Game) Update() *GameUpdateOne
- type GameClient
- func (c *GameClient) Create() *GameCreate
- func (c *GameClient) CreateBulk(builders ...*GameCreate) *GameCreateBulk
- func (c *GameClient) Delete() *GameDelete
- func (c *GameClient) DeleteOne(ga *Game) *GameDeleteOne
- func (c *GameClient) DeleteOneID(id int64) *GameDeleteOne
- func (c *GameClient) Get(ctx context.Context, id int64) (*Game, error)
- func (c *GameClient) GetX(ctx context.Context, id int64) *Game
- func (c *GameClient) Hooks() []Hook
- func (c *GameClient) Query() *GameQuery
- func (c *GameClient) QueryGameUsers(ga *Game) *GameUserQuery
- func (c *GameClient) QueryMissions(ga *Game) *MissionQuery
- func (c *GameClient) QueryRoom(ga *Game) *RoomQuery
- func (c *GameClient) Update() *GameUpdate
- func (c *GameClient) UpdateOne(ga *Game) *GameUpdateOne
- func (c *GameClient) UpdateOneID(id int64) *GameUpdateOne
- func (c *GameClient) Use(hooks ...Hook)
- type GameConnection
- type GameCreate
- func (gc *GameCreate) AddGameUserIDs(ids ...int64) *GameCreate
- func (gc *GameCreate) AddGameUsers(g ...*GameUser) *GameCreate
- func (gc *GameCreate) AddMissionIDs(ids ...int64) *GameCreate
- func (gc *GameCreate) AddMissions(m ...*Mission) *GameCreate
- func (gc *GameCreate) Exec(ctx context.Context) error
- func (gc *GameCreate) ExecX(ctx context.Context)
- func (gc *GameCreate) Mutation() *GameMutation
- func (gc *GameCreate) Save(ctx context.Context) (*Game, error)
- func (gc *GameCreate) SaveX(ctx context.Context) *Game
- func (gc *GameCreate) SetAssassinChance(u uint8) *GameCreate
- func (gc *GameCreate) SetCapacity(u uint8) *GameCreate
- func (gc *GameCreate) SetClosed(b bool) *GameCreate
- func (gc *GameCreate) SetCreatedAt(t time.Time) *GameCreate
- func (gc *GameCreate) SetCreatedBy(i int64) *GameCreate
- func (gc *GameCreate) SetDeletedAt(t time.Time) *GameCreate
- func (gc *GameCreate) SetID(i int64) *GameCreate
- func (c *GameCreate) SetInput(i CreateGameInput) *GameCreate
- func (gc *GameCreate) SetNillableAssassinChance(u *uint8) *GameCreate
- func (gc *GameCreate) SetNillableCapacity(u *uint8) *GameCreate
- func (gc *GameCreate) SetNillableClosed(b *bool) *GameCreate
- func (gc *GameCreate) SetNillableCreatedAt(t *time.Time) *GameCreate
- func (gc *GameCreate) SetNillableCreatedBy(i *int64) *GameCreate
- func (gc *GameCreate) SetNillableDeletedAt(t *time.Time) *GameCreate
- func (gc *GameCreate) SetNillableID(i *int64) *GameCreate
- func (gc *GameCreate) SetNillableResult(ga *game.Result) *GameCreate
- func (gc *GameCreate) SetNillableUpdatedAt(t *time.Time) *GameCreate
- func (gc *GameCreate) SetNillableUpdatedBy(i *int64) *GameCreate
- func (gc *GameCreate) SetResult(ga game.Result) *GameCreate
- func (gc *GameCreate) SetRoom(r *Room) *GameCreate
- func (gc *GameCreate) SetRoomID(i int64) *GameCreate
- func (gc *GameCreate) SetTheAssassinatedIds(s []string) *GameCreate
- func (gc *GameCreate) SetUpdatedAt(t time.Time) *GameCreate
- func (gc *GameCreate) SetUpdatedBy(i int64) *GameCreate
- type GameCreateBulk
- type GameDelete
- type GameDeleteOne
- type GameEdge
- type GameEdges
- type GameGroupBy
- func (ggb *GameGroupBy) Aggregate(fns ...AggregateFunc) *GameGroupBy
- func (s *GameGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GameGroupBy) BoolX(ctx context.Context) bool
- func (s *GameGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GameGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GameGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GameGroupBy) Float64X(ctx context.Context) float64
- func (s *GameGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GameGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GameGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GameGroupBy) IntX(ctx context.Context) int
- func (s *GameGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GameGroupBy) IntsX(ctx context.Context) []int
- func (ggb *GameGroupBy) Scan(ctx context.Context, v any) error
- func (s *GameGroupBy) ScanX(ctx context.Context, v any)
- func (s *GameGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GameGroupBy) StringX(ctx context.Context) string
- func (s *GameGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GameGroupBy) StringsX(ctx context.Context) []string
- type GameMutation
- func (m *GameMutation) AddAssassinChance(u int8)
- func (m *GameMutation) AddCapacity(u int8)
- func (m *GameMutation) AddCreatedBy(i int64)
- func (m *GameMutation) AddField(name string, value ent.Value) error
- func (m *GameMutation) AddGameUserIDs(ids ...int64)
- func (m *GameMutation) AddMissionIDs(ids ...int64)
- func (m *GameMutation) AddUpdatedBy(i int64)
- func (m *GameMutation) AddedAssassinChance() (r int8, exists bool)
- func (m *GameMutation) AddedCapacity() (r int8, exists bool)
- func (m *GameMutation) AddedCreatedBy() (r int64, exists bool)
- func (m *GameMutation) AddedEdges() []string
- func (m *GameMutation) AddedField(name string) (ent.Value, bool)
- func (m *GameMutation) AddedFields() []string
- func (m *GameMutation) AddedIDs(name string) []ent.Value
- func (m *GameMutation) AddedUpdatedBy() (r int64, exists bool)
- func (m *GameMutation) AppendTheAssassinatedIds(s []string)
- func (m *GameMutation) AppendedTheAssassinatedIds() ([]string, bool)
- func (m *GameMutation) AssassinChance() (r uint8, exists bool)
- func (m *GameMutation) Capacity() (r uint8, exists bool)
- func (m *GameMutation) ClearEdge(name string) error
- func (m *GameMutation) ClearField(name string) error
- func (m *GameMutation) ClearGameUsers()
- func (m *GameMutation) ClearMissions()
- func (m *GameMutation) ClearRoom()
- func (m *GameMutation) ClearTheAssassinatedIds()
- func (m *GameMutation) ClearedEdges() []string
- func (m *GameMutation) ClearedFields() []string
- func (m GameMutation) Client() *Client
- func (m *GameMutation) Closed() (r bool, exists bool)
- func (m *GameMutation) CreatedAt() (r time.Time, exists bool)
- func (m *GameMutation) CreatedBy() (r int64, exists bool)
- func (m *GameMutation) DeletedAt() (r time.Time, exists bool)
- func (m *GameMutation) EdgeCleared(name string) bool
- func (m *GameMutation) Field(name string) (ent.Value, bool)
- func (m *GameMutation) FieldCleared(name string) bool
- func (m *GameMutation) Fields() []string
- func (m *GameMutation) GameUsersCleared() bool
- func (m *GameMutation) GameUsersIDs() (ids []int64)
- func (m *GameMutation) ID() (id int64, exists bool)
- func (m *GameMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *GameMutation) MissionsCleared() bool
- func (m *GameMutation) MissionsIDs() (ids []int64)
- func (m *GameMutation) OldAssassinChance(ctx context.Context) (v uint8, err error)
- func (m *GameMutation) OldCapacity(ctx context.Context) (v uint8, err error)
- func (m *GameMutation) OldClosed(ctx context.Context) (v bool, err error)
- func (m *GameMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GameMutation) OldCreatedBy(ctx context.Context) (v int64, err error)
- func (m *GameMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *GameMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GameMutation) OldResult(ctx context.Context) (v game.Result, err error)
- func (m *GameMutation) OldRoomID(ctx context.Context) (v int64, err error)
- func (m *GameMutation) OldTheAssassinatedIds(ctx context.Context) (v []string, err error)
- func (m *GameMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GameMutation) OldUpdatedBy(ctx context.Context) (v int64, err error)
- func (m *GameMutation) Op() Op
- func (m *GameMutation) RemoveGameUserIDs(ids ...int64)
- func (m *GameMutation) RemoveMissionIDs(ids ...int64)
- func (m *GameMutation) RemovedEdges() []string
- func (m *GameMutation) RemovedGameUsersIDs() (ids []int64)
- func (m *GameMutation) RemovedIDs(name string) []ent.Value
- func (m *GameMutation) RemovedMissionsIDs() (ids []int64)
- func (m *GameMutation) ResetAssassinChance()
- func (m *GameMutation) ResetCapacity()
- func (m *GameMutation) ResetClosed()
- func (m *GameMutation) ResetCreatedAt()
- func (m *GameMutation) ResetCreatedBy()
- func (m *GameMutation) ResetDeletedAt()
- func (m *GameMutation) ResetEdge(name string) error
- func (m *GameMutation) ResetField(name string) error
- func (m *GameMutation) ResetGameUsers()
- func (m *GameMutation) ResetMissions()
- func (m *GameMutation) ResetResult()
- func (m *GameMutation) ResetRoom()
- func (m *GameMutation) ResetRoomID()
- func (m *GameMutation) ResetTheAssassinatedIds()
- func (m *GameMutation) ResetUpdatedAt()
- func (m *GameMutation) ResetUpdatedBy()
- func (m *GameMutation) Result() (r game.Result, exists bool)
- func (m *GameMutation) RoomCleared() bool
- func (m *GameMutation) RoomID() (r int64, exists bool)
- func (m *GameMutation) RoomIDs() (ids []int64)
- func (m *GameMutation) SetAssassinChance(u uint8)
- func (m *GameMutation) SetCapacity(u uint8)
- func (m *GameMutation) SetClosed(b bool)
- func (m *GameMutation) SetCreatedAt(t time.Time)
- func (m *GameMutation) SetCreatedBy(i int64)
- func (m *GameMutation) SetDeletedAt(t time.Time)
- func (m *GameMutation) SetField(name string, value ent.Value) error
- func (m *GameMutation) SetID(id int64)
- func (m *GameMutation) SetResult(ga game.Result)
- func (m *GameMutation) SetRoomID(i int64)
- func (m *GameMutation) SetTheAssassinatedIds(s []string)
- func (m *GameMutation) SetUpdatedAt(t time.Time)
- func (m *GameMutation) SetUpdatedBy(i int64)
- func (m *GameMutation) TheAssassinatedIds() (r []string, exists bool)
- func (m *GameMutation) TheAssassinatedIdsCleared() bool
- func (m GameMutation) Tx() (*Tx, error)
- func (m *GameMutation) Type() string
- func (m *GameMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *GameMutation) UpdatedBy() (r int64, exists bool)
- func (m *GameMutation) Where(ps ...predicate.Game)
- type GameOrder
- type GameOrderField
- type GamePaginateOption
- type GameQuery
- func (gq *GameQuery) Aggregate(fns ...AggregateFunc) *GameSelect
- func (gq *GameQuery) All(ctx context.Context) ([]*Game, error)
- func (gq *GameQuery) AllX(ctx context.Context) []*Game
- func (gq *GameQuery) Clone() *GameQuery
- func (ga *GameQuery) CollectFields(ctx context.Context, satisfies ...string) (*GameQuery, error)
- func (gq *GameQuery) Count(ctx context.Context) (int, error)
- func (gq *GameQuery) CountX(ctx context.Context) int
- func (gq *GameQuery) Exist(ctx context.Context) (bool, error)
- func (gq *GameQuery) ExistX(ctx context.Context) bool
- func (gq *GameQuery) First(ctx context.Context) (*Game, error)
- func (gq *GameQuery) FirstID(ctx context.Context) (id int64, err error)
- func (gq *GameQuery) FirstIDX(ctx context.Context) int64
- func (gq *GameQuery) FirstX(ctx context.Context) *Game
- func (gq *GameQuery) GroupBy(field string, fields ...string) *GameGroupBy
- func (gq *GameQuery) IDs(ctx context.Context) ([]int64, error)
- func (gq *GameQuery) IDsX(ctx context.Context) []int64
- func (gq *GameQuery) Limit(limit int) *GameQuery
- func (gq *GameQuery) Offset(offset int) *GameQuery
- func (gq *GameQuery) Only(ctx context.Context) (*Game, error)
- func (gq *GameQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (gq *GameQuery) OnlyIDX(ctx context.Context) int64
- func (gq *GameQuery) OnlyX(ctx context.Context) *Game
- func (gq *GameQuery) Order(o ...OrderFunc) *GameQuery
- func (ga *GameQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*GameConnection, error)
- func (gq *GameQuery) QueryGameUsers() *GameUserQuery
- func (gq *GameQuery) QueryMissions() *MissionQuery
- func (gq *GameQuery) QueryRoom() *RoomQuery
- func (gq *GameQuery) Select(fields ...string) *GameSelect
- func (gq *GameQuery) Unique(unique bool) *GameQuery
- func (gq *GameQuery) Where(ps ...predicate.Game) *GameQuery
- func (gq *GameQuery) WithGameUsers(opts ...func(*GameUserQuery)) *GameQuery
- func (gq *GameQuery) WithMissions(opts ...func(*MissionQuery)) *GameQuery
- func (gq *GameQuery) WithNamedGameUsers(name string, opts ...func(*GameUserQuery)) *GameQuery
- func (gq *GameQuery) WithNamedMissions(name string, opts ...func(*MissionQuery)) *GameQuery
- func (gq *GameQuery) WithRoom(opts ...func(*RoomQuery)) *GameQuery
- type GameSelect
- func (gs *GameSelect) Aggregate(fns ...AggregateFunc) *GameSelect
- func (s *GameSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GameSelect) BoolX(ctx context.Context) bool
- func (s *GameSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GameSelect) BoolsX(ctx context.Context) []bool
- func (s *GameSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GameSelect) Float64X(ctx context.Context) float64
- func (s *GameSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GameSelect) Float64sX(ctx context.Context) []float64
- func (s *GameSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GameSelect) IntX(ctx context.Context) int
- func (s *GameSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GameSelect) IntsX(ctx context.Context) []int
- func (gs *GameSelect) Scan(ctx context.Context, v any) error
- func (s *GameSelect) ScanX(ctx context.Context, v any)
- func (s *GameSelect) String(ctx context.Context) (_ string, err error)
- func (s *GameSelect) StringX(ctx context.Context) string
- func (s *GameSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GameSelect) StringsX(ctx context.Context) []string
- type GameUpdate
- func (gu *GameUpdate) AddAssassinChance(u int8) *GameUpdate
- func (gu *GameUpdate) AddCapacity(u int8) *GameUpdate
- func (gu *GameUpdate) AddCreatedBy(i int64) *GameUpdate
- func (gu *GameUpdate) AddGameUserIDs(ids ...int64) *GameUpdate
- func (gu *GameUpdate) AddGameUsers(g ...*GameUser) *GameUpdate
- func (gu *GameUpdate) AddMissionIDs(ids ...int64) *GameUpdate
- func (gu *GameUpdate) AddMissions(m ...*Mission) *GameUpdate
- func (gu *GameUpdate) AddUpdatedBy(i int64) *GameUpdate
- func (gu *GameUpdate) AppendTheAssassinatedIds(s []string) *GameUpdate
- func (gu *GameUpdate) ClearGameUsers() *GameUpdate
- func (gu *GameUpdate) ClearMissions() *GameUpdate
- func (gu *GameUpdate) ClearRoom() *GameUpdate
- func (gu *GameUpdate) ClearTheAssassinatedIds() *GameUpdate
- func (gu *GameUpdate) Exec(ctx context.Context) error
- func (gu *GameUpdate) ExecX(ctx context.Context)
- func (gu *GameUpdate) Mutation() *GameMutation
- func (gu *GameUpdate) RemoveGameUserIDs(ids ...int64) *GameUpdate
- func (gu *GameUpdate) RemoveGameUsers(g ...*GameUser) *GameUpdate
- func (gu *GameUpdate) RemoveMissionIDs(ids ...int64) *GameUpdate
- func (gu *GameUpdate) RemoveMissions(m ...*Mission) *GameUpdate
- func (gu *GameUpdate) Save(ctx context.Context) (int, error)
- func (gu *GameUpdate) SaveX(ctx context.Context) int
- func (gu *GameUpdate) SetAssassinChance(u uint8) *GameUpdate
- func (gu *GameUpdate) SetCapacity(u uint8) *GameUpdate
- func (gu *GameUpdate) SetClosed(b bool) *GameUpdate
- func (gu *GameUpdate) SetCreatedBy(i int64) *GameUpdate
- func (gu *GameUpdate) SetDeletedAt(t time.Time) *GameUpdate
- func (c *GameUpdate) SetInput(i UpdateGameInput) *GameUpdate
- func (gu *GameUpdate) SetNillableAssassinChance(u *uint8) *GameUpdate
- func (gu *GameUpdate) SetNillableCapacity(u *uint8) *GameUpdate
- func (gu *GameUpdate) SetNillableClosed(b *bool) *GameUpdate
- func (gu *GameUpdate) SetNillableCreatedBy(i *int64) *GameUpdate
- func (gu *GameUpdate) SetNillableDeletedAt(t *time.Time) *GameUpdate
- func (gu *GameUpdate) SetNillableResult(ga *game.Result) *GameUpdate
- func (gu *GameUpdate) SetNillableUpdatedBy(i *int64) *GameUpdate
- func (gu *GameUpdate) SetResult(ga game.Result) *GameUpdate
- func (gu *GameUpdate) SetRoom(r *Room) *GameUpdate
- func (gu *GameUpdate) SetRoomID(i int64) *GameUpdate
- func (gu *GameUpdate) SetTheAssassinatedIds(s []string) *GameUpdate
- func (gu *GameUpdate) SetUpdatedAt(t time.Time) *GameUpdate
- func (gu *GameUpdate) SetUpdatedBy(i int64) *GameUpdate
- func (gu *GameUpdate) Where(ps ...predicate.Game) *GameUpdate
- type GameUpdateOne
- func (guo *GameUpdateOne) AddAssassinChance(u int8) *GameUpdateOne
- func (guo *GameUpdateOne) AddCapacity(u int8) *GameUpdateOne
- func (guo *GameUpdateOne) AddCreatedBy(i int64) *GameUpdateOne
- func (guo *GameUpdateOne) AddGameUserIDs(ids ...int64) *GameUpdateOne
- func (guo *GameUpdateOne) AddGameUsers(g ...*GameUser) *GameUpdateOne
- func (guo *GameUpdateOne) AddMissionIDs(ids ...int64) *GameUpdateOne
- func (guo *GameUpdateOne) AddMissions(m ...*Mission) *GameUpdateOne
- func (guo *GameUpdateOne) AddUpdatedBy(i int64) *GameUpdateOne
- func (guo *GameUpdateOne) AppendTheAssassinatedIds(s []string) *GameUpdateOne
- func (guo *GameUpdateOne) ClearGameUsers() *GameUpdateOne
- func (guo *GameUpdateOne) ClearMissions() *GameUpdateOne
- func (guo *GameUpdateOne) ClearRoom() *GameUpdateOne
- func (guo *GameUpdateOne) ClearTheAssassinatedIds() *GameUpdateOne
- func (guo *GameUpdateOne) Exec(ctx context.Context) error
- func (guo *GameUpdateOne) ExecX(ctx context.Context)
- func (guo *GameUpdateOne) Mutation() *GameMutation
- func (guo *GameUpdateOne) RemoveGameUserIDs(ids ...int64) *GameUpdateOne
- func (guo *GameUpdateOne) RemoveGameUsers(g ...*GameUser) *GameUpdateOne
- func (guo *GameUpdateOne) RemoveMissionIDs(ids ...int64) *GameUpdateOne
- func (guo *GameUpdateOne) RemoveMissions(m ...*Mission) *GameUpdateOne
- func (guo *GameUpdateOne) Save(ctx context.Context) (*Game, error)
- func (guo *GameUpdateOne) SaveX(ctx context.Context) *Game
- func (guo *GameUpdateOne) Select(field string, fields ...string) *GameUpdateOne
- func (guo *GameUpdateOne) SetAssassinChance(u uint8) *GameUpdateOne
- func (guo *GameUpdateOne) SetCapacity(u uint8) *GameUpdateOne
- func (guo *GameUpdateOne) SetClosed(b bool) *GameUpdateOne
- func (guo *GameUpdateOne) SetCreatedBy(i int64) *GameUpdateOne
- func (guo *GameUpdateOne) SetDeletedAt(t time.Time) *GameUpdateOne
- func (c *GameUpdateOne) SetInput(i UpdateGameInput) *GameUpdateOne
- func (guo *GameUpdateOne) SetNillableAssassinChance(u *uint8) *GameUpdateOne
- func (guo *GameUpdateOne) SetNillableCapacity(u *uint8) *GameUpdateOne
- func (guo *GameUpdateOne) SetNillableClosed(b *bool) *GameUpdateOne
- func (guo *GameUpdateOne) SetNillableCreatedBy(i *int64) *GameUpdateOne
- func (guo *GameUpdateOne) SetNillableDeletedAt(t *time.Time) *GameUpdateOne
- func (guo *GameUpdateOne) SetNillableResult(ga *game.Result) *GameUpdateOne
- func (guo *GameUpdateOne) SetNillableUpdatedBy(i *int64) *GameUpdateOne
- func (guo *GameUpdateOne) SetResult(ga game.Result) *GameUpdateOne
- func (guo *GameUpdateOne) SetRoom(r *Room) *GameUpdateOne
- func (guo *GameUpdateOne) SetRoomID(i int64) *GameUpdateOne
- func (guo *GameUpdateOne) SetTheAssassinatedIds(s []string) *GameUpdateOne
- func (guo *GameUpdateOne) SetUpdatedAt(t time.Time) *GameUpdateOne
- func (guo *GameUpdateOne) SetUpdatedBy(i int64) *GameUpdateOne
- type GameUser
- func (gu *GameUser) Card(ctx context.Context) (*Card, error)
- func (gu *GameUser) Game(ctx context.Context) (*Game, error)
- func (gu GameUser) IsEntity()
- func (gu *GameUser) Node(ctx context.Context) (node *Node, err error)
- func (gu *GameUser) QueryCard() *CardQuery
- func (gu *GameUser) QueryGame() *GameQuery
- func (gu *GameUser) String() string
- func (gu *GameUser) ToEdge(order *GameUserOrder) *GameUserEdge
- func (gu *GameUser) Unwrap() *GameUser
- func (gu *GameUser) Update() *GameUserUpdateOne
- type GameUserClient
- func (c *GameUserClient) Create() *GameUserCreate
- func (c *GameUserClient) CreateBulk(builders ...*GameUserCreate) *GameUserCreateBulk
- func (c *GameUserClient) Delete() *GameUserDelete
- func (c *GameUserClient) DeleteOne(gu *GameUser) *GameUserDeleteOne
- func (c *GameUserClient) DeleteOneID(id int64) *GameUserDeleteOne
- func (c *GameUserClient) Get(ctx context.Context, id int64) (*GameUser, error)
- func (c *GameUserClient) GetX(ctx context.Context, id int64) *GameUser
- func (c *GameUserClient) Hooks() []Hook
- func (c *GameUserClient) Query() *GameUserQuery
- func (c *GameUserClient) QueryCard(gu *GameUser) *CardQuery
- func (c *GameUserClient) QueryGame(gu *GameUser) *GameQuery
- func (c *GameUserClient) Update() *GameUserUpdate
- func (c *GameUserClient) UpdateOne(gu *GameUser) *GameUserUpdateOne
- func (c *GameUserClient) UpdateOneID(id int64) *GameUserUpdateOne
- func (c *GameUserClient) Use(hooks ...Hook)
- type GameUserConnection
- type GameUserCreate
- func (guc *GameUserCreate) Exec(ctx context.Context) error
- func (guc *GameUserCreate) ExecX(ctx context.Context)
- func (guc *GameUserCreate) Mutation() *GameUserMutation
- func (guc *GameUserCreate) Save(ctx context.Context) (*GameUser, error)
- func (guc *GameUserCreate) SaveX(ctx context.Context) *GameUser
- func (guc *GameUserCreate) SetCard(c *Card) *GameUserCreate
- func (guc *GameUserCreate) SetCardID(i int64) *GameUserCreate
- func (guc *GameUserCreate) SetCreatedAt(t time.Time) *GameUserCreate
- func (guc *GameUserCreate) SetCreatedBy(i int64) *GameUserCreate
- func (guc *GameUserCreate) SetDeletedAt(t time.Time) *GameUserCreate
- func (guc *GameUserCreate) SetExited(b bool) *GameUserCreate
- func (guc *GameUserCreate) SetGame(g *Game) *GameUserCreate
- func (guc *GameUserCreate) SetGameID(i int64) *GameUserCreate
- func (guc *GameUserCreate) SetID(i int64) *GameUserCreate
- func (c *GameUserCreate) SetInput(i CreateGameUserInput) *GameUserCreate
- func (guc *GameUserCreate) SetNillableCreatedAt(t *time.Time) *GameUserCreate
- func (guc *GameUserCreate) SetNillableCreatedBy(i *int64) *GameUserCreate
- func (guc *GameUserCreate) SetNillableDeletedAt(t *time.Time) *GameUserCreate
- func (guc *GameUserCreate) SetNillableExited(b *bool) *GameUserCreate
- func (guc *GameUserCreate) SetNillableID(i *int64) *GameUserCreate
- func (guc *GameUserCreate) SetNillableUpdatedAt(t *time.Time) *GameUserCreate
- func (guc *GameUserCreate) SetNillableUpdatedBy(i *int64) *GameUserCreate
- func (guc *GameUserCreate) SetNumber(u uint8) *GameUserCreate
- func (guc *GameUserCreate) SetUpdatedAt(t time.Time) *GameUserCreate
- func (guc *GameUserCreate) SetUpdatedBy(i int64) *GameUserCreate
- func (guc *GameUserCreate) SetUserID(i int64) *GameUserCreate
- type GameUserCreateBulk
- type GameUserDelete
- type GameUserDeleteOne
- type GameUserEdge
- type GameUserEdges
- type GameUserGroupBy
- func (gugb *GameUserGroupBy) Aggregate(fns ...AggregateFunc) *GameUserGroupBy
- func (s *GameUserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GameUserGroupBy) BoolX(ctx context.Context) bool
- func (s *GameUserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GameUserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GameUserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GameUserGroupBy) Float64X(ctx context.Context) float64
- func (s *GameUserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GameUserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GameUserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GameUserGroupBy) IntX(ctx context.Context) int
- func (s *GameUserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GameUserGroupBy) IntsX(ctx context.Context) []int
- func (gugb *GameUserGroupBy) Scan(ctx context.Context, v any) error
- func (s *GameUserGroupBy) ScanX(ctx context.Context, v any)
- func (s *GameUserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GameUserGroupBy) StringX(ctx context.Context) string
- func (s *GameUserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GameUserGroupBy) StringsX(ctx context.Context) []string
- type GameUserMutation
- func (m *GameUserMutation) AddCreatedBy(i int64)
- func (m *GameUserMutation) AddField(name string, value ent.Value) error
- func (m *GameUserMutation) AddNumber(u int8)
- func (m *GameUserMutation) AddUpdatedBy(i int64)
- func (m *GameUserMutation) AddUserID(i int64)
- func (m *GameUserMutation) AddedCreatedBy() (r int64, exists bool)
- func (m *GameUserMutation) AddedEdges() []string
- func (m *GameUserMutation) AddedField(name string) (ent.Value, bool)
- func (m *GameUserMutation) AddedFields() []string
- func (m *GameUserMutation) AddedIDs(name string) []ent.Value
- func (m *GameUserMutation) AddedNumber() (r int8, exists bool)
- func (m *GameUserMutation) AddedUpdatedBy() (r int64, exists bool)
- func (m *GameUserMutation) AddedUserID() (r int64, exists bool)
- func (m *GameUserMutation) CardCleared() bool
- func (m *GameUserMutation) CardID() (r int64, exists bool)
- func (m *GameUserMutation) CardIDs() (ids []int64)
- func (m *GameUserMutation) ClearCard()
- func (m *GameUserMutation) ClearEdge(name string) error
- func (m *GameUserMutation) ClearField(name string) error
- func (m *GameUserMutation) ClearGame()
- func (m *GameUserMutation) ClearedEdges() []string
- func (m *GameUserMutation) ClearedFields() []string
- func (m GameUserMutation) Client() *Client
- func (m *GameUserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *GameUserMutation) CreatedBy() (r int64, exists bool)
- func (m *GameUserMutation) DeletedAt() (r time.Time, exists bool)
- func (m *GameUserMutation) EdgeCleared(name string) bool
- func (m *GameUserMutation) Exited() (r bool, exists bool)
- func (m *GameUserMutation) Field(name string) (ent.Value, bool)
- func (m *GameUserMutation) FieldCleared(name string) bool
- func (m *GameUserMutation) Fields() []string
- func (m *GameUserMutation) GameCleared() bool
- func (m *GameUserMutation) GameID() (r int64, exists bool)
- func (m *GameUserMutation) GameIDs() (ids []int64)
- func (m *GameUserMutation) ID() (id int64, exists bool)
- func (m *GameUserMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *GameUserMutation) Number() (r uint8, exists bool)
- func (m *GameUserMutation) OldCardID(ctx context.Context) (v int64, err error)
- func (m *GameUserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GameUserMutation) OldCreatedBy(ctx context.Context) (v int64, err error)
- func (m *GameUserMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *GameUserMutation) OldExited(ctx context.Context) (v bool, err error)
- func (m *GameUserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GameUserMutation) OldGameID(ctx context.Context) (v int64, err error)
- func (m *GameUserMutation) OldNumber(ctx context.Context) (v uint8, err error)
- func (m *GameUserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GameUserMutation) OldUpdatedBy(ctx context.Context) (v int64, err error)
- func (m *GameUserMutation) OldUserID(ctx context.Context) (v int64, err error)
- func (m *GameUserMutation) Op() Op
- func (m *GameUserMutation) RemovedEdges() []string
- func (m *GameUserMutation) RemovedIDs(name string) []ent.Value
- func (m *GameUserMutation) ResetCard()
- func (m *GameUserMutation) ResetCardID()
- func (m *GameUserMutation) ResetCreatedAt()
- func (m *GameUserMutation) ResetCreatedBy()
- func (m *GameUserMutation) ResetDeletedAt()
- func (m *GameUserMutation) ResetEdge(name string) error
- func (m *GameUserMutation) ResetExited()
- func (m *GameUserMutation) ResetField(name string) error
- func (m *GameUserMutation) ResetGame()
- func (m *GameUserMutation) ResetGameID()
- func (m *GameUserMutation) ResetNumber()
- func (m *GameUserMutation) ResetUpdatedAt()
- func (m *GameUserMutation) ResetUpdatedBy()
- func (m *GameUserMutation) ResetUserID()
- func (m *GameUserMutation) SetCardID(i int64)
- func (m *GameUserMutation) SetCreatedAt(t time.Time)
- func (m *GameUserMutation) SetCreatedBy(i int64)
- func (m *GameUserMutation) SetDeletedAt(t time.Time)
- func (m *GameUserMutation) SetExited(b bool)
- func (m *GameUserMutation) SetField(name string, value ent.Value) error
- func (m *GameUserMutation) SetGameID(i int64)
- func (m *GameUserMutation) SetID(id int64)
- func (m *GameUserMutation) SetNumber(u uint8)
- func (m *GameUserMutation) SetUpdatedAt(t time.Time)
- func (m *GameUserMutation) SetUpdatedBy(i int64)
- func (m *GameUserMutation) SetUserID(i int64)
- func (m GameUserMutation) Tx() (*Tx, error)
- func (m *GameUserMutation) Type() string
- func (m *GameUserMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *GameUserMutation) UpdatedBy() (r int64, exists bool)
- func (m *GameUserMutation) UserID() (r int64, exists bool)
- func (m *GameUserMutation) Where(ps ...predicate.GameUser)
- type GameUserOrder
- type GameUserOrderField
- type GameUserPaginateOption
- type GameUserQuery
- func (guq *GameUserQuery) Aggregate(fns ...AggregateFunc) *GameUserSelect
- func (guq *GameUserQuery) All(ctx context.Context) ([]*GameUser, error)
- func (guq *GameUserQuery) AllX(ctx context.Context) []*GameUser
- func (guq *GameUserQuery) Clone() *GameUserQuery
- func (gu *GameUserQuery) CollectFields(ctx context.Context, satisfies ...string) (*GameUserQuery, error)
- func (guq *GameUserQuery) Count(ctx context.Context) (int, error)
- func (guq *GameUserQuery) CountX(ctx context.Context) int
- func (guq *GameUserQuery) Exist(ctx context.Context) (bool, error)
- func (guq *GameUserQuery) ExistX(ctx context.Context) bool
- func (guq *GameUserQuery) First(ctx context.Context) (*GameUser, error)
- func (guq *GameUserQuery) FirstID(ctx context.Context) (id int64, err error)
- func (guq *GameUserQuery) FirstIDX(ctx context.Context) int64
- func (guq *GameUserQuery) FirstX(ctx context.Context) *GameUser
- func (guq *GameUserQuery) GroupBy(field string, fields ...string) *GameUserGroupBy
- func (guq *GameUserQuery) IDs(ctx context.Context) ([]int64, error)
- func (guq *GameUserQuery) IDsX(ctx context.Context) []int64
- func (guq *GameUserQuery) Limit(limit int) *GameUserQuery
- func (guq *GameUserQuery) Offset(offset int) *GameUserQuery
- func (guq *GameUserQuery) Only(ctx context.Context) (*GameUser, error)
- func (guq *GameUserQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (guq *GameUserQuery) OnlyIDX(ctx context.Context) int64
- func (guq *GameUserQuery) OnlyX(ctx context.Context) *GameUser
- func (guq *GameUserQuery) Order(o ...OrderFunc) *GameUserQuery
- func (gu *GameUserQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*GameUserConnection, error)
- func (guq *GameUserQuery) QueryCard() *CardQuery
- func (guq *GameUserQuery) QueryGame() *GameQuery
- func (guq *GameUserQuery) Select(fields ...string) *GameUserSelect
- func (guq *GameUserQuery) Unique(unique bool) *GameUserQuery
- func (guq *GameUserQuery) Where(ps ...predicate.GameUser) *GameUserQuery
- func (guq *GameUserQuery) WithCard(opts ...func(*CardQuery)) *GameUserQuery
- func (guq *GameUserQuery) WithGame(opts ...func(*GameQuery)) *GameUserQuery
- type GameUserSelect
- func (gus *GameUserSelect) Aggregate(fns ...AggregateFunc) *GameUserSelect
- func (s *GameUserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GameUserSelect) BoolX(ctx context.Context) bool
- func (s *GameUserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GameUserSelect) BoolsX(ctx context.Context) []bool
- func (s *GameUserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GameUserSelect) Float64X(ctx context.Context) float64
- func (s *GameUserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GameUserSelect) Float64sX(ctx context.Context) []float64
- func (s *GameUserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GameUserSelect) IntX(ctx context.Context) int
- func (s *GameUserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GameUserSelect) IntsX(ctx context.Context) []int
- func (gus *GameUserSelect) Scan(ctx context.Context, v any) error
- func (s *GameUserSelect) ScanX(ctx context.Context, v any)
- func (s *GameUserSelect) String(ctx context.Context) (_ string, err error)
- func (s *GameUserSelect) StringX(ctx context.Context) string
- func (s *GameUserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GameUserSelect) StringsX(ctx context.Context) []string
- type GameUserUpdate
- func (guu *GameUserUpdate) AddCreatedBy(i int64) *GameUserUpdate
- func (guu *GameUserUpdate) AddNumber(u int8) *GameUserUpdate
- func (guu *GameUserUpdate) AddUpdatedBy(i int64) *GameUserUpdate
- func (guu *GameUserUpdate) AddUserID(i int64) *GameUserUpdate
- func (guu *GameUserUpdate) ClearCard() *GameUserUpdate
- func (guu *GameUserUpdate) ClearGame() *GameUserUpdate
- func (guu *GameUserUpdate) Exec(ctx context.Context) error
- func (guu *GameUserUpdate) ExecX(ctx context.Context)
- func (guu *GameUserUpdate) Mutation() *GameUserMutation
- func (guu *GameUserUpdate) Save(ctx context.Context) (int, error)
- func (guu *GameUserUpdate) SaveX(ctx context.Context) int
- func (guu *GameUserUpdate) SetCard(c *Card) *GameUserUpdate
- func (guu *GameUserUpdate) SetCardID(i int64) *GameUserUpdate
- func (guu *GameUserUpdate) SetCreatedBy(i int64) *GameUserUpdate
- func (guu *GameUserUpdate) SetDeletedAt(t time.Time) *GameUserUpdate
- func (guu *GameUserUpdate) SetExited(b bool) *GameUserUpdate
- func (guu *GameUserUpdate) SetGame(g *Game) *GameUserUpdate
- func (guu *GameUserUpdate) SetGameID(i int64) *GameUserUpdate
- func (c *GameUserUpdate) SetInput(i UpdateGameUserInput) *GameUserUpdate
- func (guu *GameUserUpdate) SetNillableCreatedBy(i *int64) *GameUserUpdate
- func (guu *GameUserUpdate) SetNillableDeletedAt(t *time.Time) *GameUserUpdate
- func (guu *GameUserUpdate) SetNillableExited(b *bool) *GameUserUpdate
- func (guu *GameUserUpdate) SetNillableUpdatedBy(i *int64) *GameUserUpdate
- func (guu *GameUserUpdate) SetNumber(u uint8) *GameUserUpdate
- func (guu *GameUserUpdate) SetUpdatedAt(t time.Time) *GameUserUpdate
- func (guu *GameUserUpdate) SetUpdatedBy(i int64) *GameUserUpdate
- func (guu *GameUserUpdate) SetUserID(i int64) *GameUserUpdate
- func (guu *GameUserUpdate) Where(ps ...predicate.GameUser) *GameUserUpdate
- type GameUserUpdateOne
- func (guuo *GameUserUpdateOne) AddCreatedBy(i int64) *GameUserUpdateOne
- func (guuo *GameUserUpdateOne) AddNumber(u int8) *GameUserUpdateOne
- func (guuo *GameUserUpdateOne) AddUpdatedBy(i int64) *GameUserUpdateOne
- func (guuo *GameUserUpdateOne) AddUserID(i int64) *GameUserUpdateOne
- func (guuo *GameUserUpdateOne) ClearCard() *GameUserUpdateOne
- func (guuo *GameUserUpdateOne) ClearGame() *GameUserUpdateOne
- func (guuo *GameUserUpdateOne) Exec(ctx context.Context) error
- func (guuo *GameUserUpdateOne) ExecX(ctx context.Context)
- func (guuo *GameUserUpdateOne) Mutation() *GameUserMutation
- func (guuo *GameUserUpdateOne) Save(ctx context.Context) (*GameUser, error)
- func (guuo *GameUserUpdateOne) SaveX(ctx context.Context) *GameUser
- func (guuo *GameUserUpdateOne) Select(field string, fields ...string) *GameUserUpdateOne
- func (guuo *GameUserUpdateOne) SetCard(c *Card) *GameUserUpdateOne
- func (guuo *GameUserUpdateOne) SetCardID(i int64) *GameUserUpdateOne
- func (guuo *GameUserUpdateOne) SetCreatedBy(i int64) *GameUserUpdateOne
- func (guuo *GameUserUpdateOne) SetDeletedAt(t time.Time) *GameUserUpdateOne
- func (guuo *GameUserUpdateOne) SetExited(b bool) *GameUserUpdateOne
- func (guuo *GameUserUpdateOne) SetGame(g *Game) *GameUserUpdateOne
- func (guuo *GameUserUpdateOne) SetGameID(i int64) *GameUserUpdateOne
- func (c *GameUserUpdateOne) SetInput(i UpdateGameUserInput) *GameUserUpdateOne
- func (guuo *GameUserUpdateOne) SetNillableCreatedBy(i *int64) *GameUserUpdateOne
- func (guuo *GameUserUpdateOne) SetNillableDeletedAt(t *time.Time) *GameUserUpdateOne
- func (guuo *GameUserUpdateOne) SetNillableExited(b *bool) *GameUserUpdateOne
- func (guuo *GameUserUpdateOne) SetNillableUpdatedBy(i *int64) *GameUserUpdateOne
- func (guuo *GameUserUpdateOne) SetNumber(u uint8) *GameUserUpdateOne
- func (guuo *GameUserUpdateOne) SetUpdatedAt(t time.Time) *GameUserUpdateOne
- func (guuo *GameUserUpdateOne) SetUpdatedBy(i int64) *GameUserUpdateOne
- func (guuo *GameUserUpdateOne) SetUserID(i int64) *GameUserUpdateOne
- type GameUserWhereInput
- type GameUsers
- type GameWhereInput
- type Games
- type Hook
- type Mission
- func (m *Mission) Game(ctx context.Context) (*Game, error)
- func (m Mission) IsEntity()
- func (m *Mission) NamedSquads(name string) ([]*Squad, error)
- func (m *Mission) NamedVotes(name string) ([]*Vote, error)
- func (m *Mission) Node(ctx context.Context) (node *Node, err error)
- func (m *Mission) QueryGame() *GameQuery
- func (m *Mission) QuerySquads() *SquadQuery
- func (m *Mission) QueryVotes() *VoteQuery
- func (m *Mission) Squads(ctx context.Context) (result []*Squad, err error)
- func (m *Mission) String() string
- func (m *Mission) ToEdge(order *MissionOrder) *MissionEdge
- func (m *Mission) Unwrap() *Mission
- func (m *Mission) Update() *MissionUpdateOne
- func (m *Mission) Votes(ctx context.Context) (result []*Vote, err error)
- type MissionClient
- func (c *MissionClient) Create() *MissionCreate
- func (c *MissionClient) CreateBulk(builders ...*MissionCreate) *MissionCreateBulk
- func (c *MissionClient) Delete() *MissionDelete
- func (c *MissionClient) DeleteOne(m *Mission) *MissionDeleteOne
- func (c *MissionClient) DeleteOneID(id int64) *MissionDeleteOne
- func (c *MissionClient) Get(ctx context.Context, id int64) (*Mission, error)
- func (c *MissionClient) GetX(ctx context.Context, id int64) *Mission
- func (c *MissionClient) Hooks() []Hook
- func (c *MissionClient) Query() *MissionQuery
- func (c *MissionClient) QueryGame(m *Mission) *GameQuery
- func (c *MissionClient) QuerySquads(m *Mission) *SquadQuery
- func (c *MissionClient) QueryVotes(m *Mission) *VoteQuery
- func (c *MissionClient) Update() *MissionUpdate
- func (c *MissionClient) UpdateOne(m *Mission) *MissionUpdateOne
- func (c *MissionClient) UpdateOneID(id int64) *MissionUpdateOne
- func (c *MissionClient) Use(hooks ...Hook)
- type MissionConnection
- type MissionCreate
- func (mc *MissionCreate) AddSquadIDs(ids ...int64) *MissionCreate
- func (mc *MissionCreate) AddSquads(s ...*Squad) *MissionCreate
- func (mc *MissionCreate) AddVoteIDs(ids ...int64) *MissionCreate
- func (mc *MissionCreate) AddVotes(v ...*Vote) *MissionCreate
- func (mc *MissionCreate) Exec(ctx context.Context) error
- func (mc *MissionCreate) ExecX(ctx context.Context)
- func (mc *MissionCreate) Mutation() *MissionMutation
- func (mc *MissionCreate) Save(ctx context.Context) (*Mission, error)
- func (mc *MissionCreate) SaveX(ctx context.Context) *Mission
- func (mc *MissionCreate) SetCapacity(u uint8) *MissionCreate
- func (mc *MissionCreate) SetCreatedAt(t time.Time) *MissionCreate
- func (mc *MissionCreate) SetCreatedBy(i int64) *MissionCreate
- func (mc *MissionCreate) SetDeletedAt(t time.Time) *MissionCreate
- func (mc *MissionCreate) SetFailed(b bool) *MissionCreate
- func (mc *MissionCreate) SetGame(g *Game) *MissionCreate
- func (mc *MissionCreate) SetGameID(i int64) *MissionCreate
- func (mc *MissionCreate) SetID(i int64) *MissionCreate
- func (c *MissionCreate) SetInput(i CreateMissionInput) *MissionCreate
- func (mc *MissionCreate) SetLeaderID(i int64) *MissionCreate
- func (mc *MissionCreate) SetNillableCapacity(u *uint8) *MissionCreate
- func (mc *MissionCreate) SetNillableCreatedAt(t *time.Time) *MissionCreate
- func (mc *MissionCreate) SetNillableCreatedBy(i *int64) *MissionCreate
- func (mc *MissionCreate) SetNillableDeletedAt(t *time.Time) *MissionCreate
- func (mc *MissionCreate) SetNillableFailed(b *bool) *MissionCreate
- func (mc *MissionCreate) SetNillableID(i *int64) *MissionCreate
- func (mc *MissionCreate) SetNillableLeaderID(i *int64) *MissionCreate
- func (mc *MissionCreate) SetNillableProtected(b *bool) *MissionCreate
- func (mc *MissionCreate) SetNillableStatus(m *mission.Status) *MissionCreate
- func (mc *MissionCreate) SetNillableUpdatedAt(t *time.Time) *MissionCreate
- func (mc *MissionCreate) SetNillableUpdatedBy(i *int64) *MissionCreate
- func (mc *MissionCreate) SetProtected(b bool) *MissionCreate
- func (mc *MissionCreate) SetSequence(u uint8) *MissionCreate
- func (mc *MissionCreate) SetStatus(m mission.Status) *MissionCreate
- func (mc *MissionCreate) SetUpdatedAt(t time.Time) *MissionCreate
- func (mc *MissionCreate) SetUpdatedBy(i int64) *MissionCreate
- type MissionCreateBulk
- type MissionDelete
- type MissionDeleteOne
- type MissionEdge
- type MissionEdges
- type MissionGroupBy
- func (mgb *MissionGroupBy) Aggregate(fns ...AggregateFunc) *MissionGroupBy
- func (s *MissionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MissionGroupBy) BoolX(ctx context.Context) bool
- func (s *MissionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MissionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MissionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MissionGroupBy) Float64X(ctx context.Context) float64
- func (s *MissionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MissionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MissionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MissionGroupBy) IntX(ctx context.Context) int
- func (s *MissionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MissionGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MissionGroupBy) Scan(ctx context.Context, v any) error
- func (s *MissionGroupBy) ScanX(ctx context.Context, v any)
- func (s *MissionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MissionGroupBy) StringX(ctx context.Context) string
- func (s *MissionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MissionGroupBy) StringsX(ctx context.Context) []string
- type MissionMutation
- func (m *MissionMutation) AddCapacity(u int8)
- func (m *MissionMutation) AddCreatedBy(i int64)
- func (m *MissionMutation) AddField(name string, value ent.Value) error
- func (m *MissionMutation) AddLeaderID(i int64)
- func (m *MissionMutation) AddSequence(u int8)
- func (m *MissionMutation) AddSquadIDs(ids ...int64)
- func (m *MissionMutation) AddUpdatedBy(i int64)
- func (m *MissionMutation) AddVoteIDs(ids ...int64)
- func (m *MissionMutation) AddedCapacity() (r int8, exists bool)
- func (m *MissionMutation) AddedCreatedBy() (r int64, exists bool)
- func (m *MissionMutation) AddedEdges() []string
- func (m *MissionMutation) AddedField(name string) (ent.Value, bool)
- func (m *MissionMutation) AddedFields() []string
- func (m *MissionMutation) AddedIDs(name string) []ent.Value
- func (m *MissionMutation) AddedLeaderID() (r int64, exists bool)
- func (m *MissionMutation) AddedSequence() (r int8, exists bool)
- func (m *MissionMutation) AddedUpdatedBy() (r int64, exists bool)
- func (m *MissionMutation) Capacity() (r uint8, exists bool)
- func (m *MissionMutation) ClearEdge(name string) error
- func (m *MissionMutation) ClearField(name string) error
- func (m *MissionMutation) ClearGame()
- func (m *MissionMutation) ClearSquads()
- func (m *MissionMutation) ClearVotes()
- func (m *MissionMutation) ClearedEdges() []string
- func (m *MissionMutation) ClearedFields() []string
- func (m MissionMutation) Client() *Client
- func (m *MissionMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MissionMutation) CreatedBy() (r int64, exists bool)
- func (m *MissionMutation) DeletedAt() (r time.Time, exists bool)
- func (m *MissionMutation) EdgeCleared(name string) bool
- func (m *MissionMutation) Failed() (r bool, exists bool)
- func (m *MissionMutation) Field(name string) (ent.Value, bool)
- func (m *MissionMutation) FieldCleared(name string) bool
- func (m *MissionMutation) Fields() []string
- func (m *MissionMutation) GameCleared() bool
- func (m *MissionMutation) GameID() (r int64, exists bool)
- func (m *MissionMutation) GameIDs() (ids []int64)
- func (m *MissionMutation) ID() (id int64, exists bool)
- func (m *MissionMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *MissionMutation) LeaderID() (r int64, exists bool)
- func (m *MissionMutation) OldCapacity(ctx context.Context) (v uint8, err error)
- func (m *MissionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MissionMutation) OldCreatedBy(ctx context.Context) (v int64, err error)
- func (m *MissionMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *MissionMutation) OldFailed(ctx context.Context) (v bool, err error)
- func (m *MissionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MissionMutation) OldGameID(ctx context.Context) (v int64, err error)
- func (m *MissionMutation) OldLeaderID(ctx context.Context) (v int64, err error)
- func (m *MissionMutation) OldProtected(ctx context.Context) (v bool, err error)
- func (m *MissionMutation) OldSequence(ctx context.Context) (v uint8, err error)
- func (m *MissionMutation) OldStatus(ctx context.Context) (v mission.Status, err error)
- func (m *MissionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MissionMutation) OldUpdatedBy(ctx context.Context) (v int64, err error)
- func (m *MissionMutation) Op() Op
- func (m *MissionMutation) Protected() (r bool, exists bool)
- func (m *MissionMutation) RemoveSquadIDs(ids ...int64)
- func (m *MissionMutation) RemoveVoteIDs(ids ...int64)
- func (m *MissionMutation) RemovedEdges() []string
- func (m *MissionMutation) RemovedIDs(name string) []ent.Value
- func (m *MissionMutation) RemovedSquadsIDs() (ids []int64)
- func (m *MissionMutation) RemovedVotesIDs() (ids []int64)
- func (m *MissionMutation) ResetCapacity()
- func (m *MissionMutation) ResetCreatedAt()
- func (m *MissionMutation) ResetCreatedBy()
- func (m *MissionMutation) ResetDeletedAt()
- func (m *MissionMutation) ResetEdge(name string) error
- func (m *MissionMutation) ResetFailed()
- func (m *MissionMutation) ResetField(name string) error
- func (m *MissionMutation) ResetGame()
- func (m *MissionMutation) ResetGameID()
- func (m *MissionMutation) ResetLeaderID()
- func (m *MissionMutation) ResetProtected()
- func (m *MissionMutation) ResetSequence()
- func (m *MissionMutation) ResetSquads()
- func (m *MissionMutation) ResetStatus()
- func (m *MissionMutation) ResetUpdatedAt()
- func (m *MissionMutation) ResetUpdatedBy()
- func (m *MissionMutation) ResetVotes()
- func (m *MissionMutation) Sequence() (r uint8, exists bool)
- func (m *MissionMutation) SetCapacity(u uint8)
- func (m *MissionMutation) SetCreatedAt(t time.Time)
- func (m *MissionMutation) SetCreatedBy(i int64)
- func (m *MissionMutation) SetDeletedAt(t time.Time)
- func (m *MissionMutation) SetFailed(b bool)
- func (m *MissionMutation) SetField(name string, value ent.Value) error
- func (m *MissionMutation) SetGameID(i int64)
- func (m *MissionMutation) SetID(id int64)
- func (m *MissionMutation) SetLeaderID(i int64)
- func (m *MissionMutation) SetProtected(b bool)
- func (m *MissionMutation) SetSequence(u uint8)
- func (m *MissionMutation) SetStatus(value mission.Status)
- func (m *MissionMutation) SetUpdatedAt(t time.Time)
- func (m *MissionMutation) SetUpdatedBy(i int64)
- func (m *MissionMutation) SquadsCleared() bool
- func (m *MissionMutation) SquadsIDs() (ids []int64)
- func (m *MissionMutation) Status() (r mission.Status, exists bool)
- func (m MissionMutation) Tx() (*Tx, error)
- func (m *MissionMutation) Type() string
- func (m *MissionMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *MissionMutation) UpdatedBy() (r int64, exists bool)
- func (m *MissionMutation) VotesCleared() bool
- func (m *MissionMutation) VotesIDs() (ids []int64)
- func (m *MissionMutation) Where(ps ...predicate.Mission)
- type MissionOrder
- type MissionOrderField
- type MissionPaginateOption
- type MissionQuery
- func (mq *MissionQuery) Aggregate(fns ...AggregateFunc) *MissionSelect
- func (mq *MissionQuery) All(ctx context.Context) ([]*Mission, error)
- func (mq *MissionQuery) AllX(ctx context.Context) []*Mission
- func (mq *MissionQuery) Clone() *MissionQuery
- func (m *MissionQuery) CollectFields(ctx context.Context, satisfies ...string) (*MissionQuery, error)
- func (mq *MissionQuery) Count(ctx context.Context) (int, error)
- func (mq *MissionQuery) CountX(ctx context.Context) int
- func (mq *MissionQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MissionQuery) ExistX(ctx context.Context) bool
- func (mq *MissionQuery) First(ctx context.Context) (*Mission, error)
- func (mq *MissionQuery) FirstID(ctx context.Context) (id int64, err error)
- func (mq *MissionQuery) FirstIDX(ctx context.Context) int64
- func (mq *MissionQuery) FirstX(ctx context.Context) *Mission
- func (mq *MissionQuery) GroupBy(field string, fields ...string) *MissionGroupBy
- func (mq *MissionQuery) IDs(ctx context.Context) ([]int64, error)
- func (mq *MissionQuery) IDsX(ctx context.Context) []int64
- func (mq *MissionQuery) Limit(limit int) *MissionQuery
- func (mq *MissionQuery) Offset(offset int) *MissionQuery
- func (mq *MissionQuery) Only(ctx context.Context) (*Mission, error)
- func (mq *MissionQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (mq *MissionQuery) OnlyIDX(ctx context.Context) int64
- func (mq *MissionQuery) OnlyX(ctx context.Context) *Mission
- func (mq *MissionQuery) Order(o ...OrderFunc) *MissionQuery
- func (m *MissionQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*MissionConnection, error)
- func (mq *MissionQuery) QueryGame() *GameQuery
- func (mq *MissionQuery) QuerySquads() *SquadQuery
- func (mq *MissionQuery) QueryVotes() *VoteQuery
- func (mq *MissionQuery) Select(fields ...string) *MissionSelect
- func (mq *MissionQuery) Unique(unique bool) *MissionQuery
- func (mq *MissionQuery) Where(ps ...predicate.Mission) *MissionQuery
- func (mq *MissionQuery) WithGame(opts ...func(*GameQuery)) *MissionQuery
- func (mq *MissionQuery) WithNamedSquads(name string, opts ...func(*SquadQuery)) *MissionQuery
- func (mq *MissionQuery) WithNamedVotes(name string, opts ...func(*VoteQuery)) *MissionQuery
- func (mq *MissionQuery) WithSquads(opts ...func(*SquadQuery)) *MissionQuery
- func (mq *MissionQuery) WithVotes(opts ...func(*VoteQuery)) *MissionQuery
- type MissionSelect
- func (ms *MissionSelect) Aggregate(fns ...AggregateFunc) *MissionSelect
- func (s *MissionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MissionSelect) BoolX(ctx context.Context) bool
- func (s *MissionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MissionSelect) BoolsX(ctx context.Context) []bool
- func (s *MissionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MissionSelect) Float64X(ctx context.Context) float64
- func (s *MissionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MissionSelect) Float64sX(ctx context.Context) []float64
- func (s *MissionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MissionSelect) IntX(ctx context.Context) int
- func (s *MissionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MissionSelect) IntsX(ctx context.Context) []int
- func (ms *MissionSelect) Scan(ctx context.Context, v any) error
- func (s *MissionSelect) ScanX(ctx context.Context, v any)
- func (s *MissionSelect) String(ctx context.Context) (_ string, err error)
- func (s *MissionSelect) StringX(ctx context.Context) string
- func (s *MissionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MissionSelect) StringsX(ctx context.Context) []string
- type MissionUpdate
- func (mu *MissionUpdate) AddCapacity(u int8) *MissionUpdate
- func (mu *MissionUpdate) AddCreatedBy(i int64) *MissionUpdate
- func (mu *MissionUpdate) AddLeaderID(i int64) *MissionUpdate
- func (mu *MissionUpdate) AddSequence(u int8) *MissionUpdate
- func (mu *MissionUpdate) AddSquadIDs(ids ...int64) *MissionUpdate
- func (mu *MissionUpdate) AddSquads(s ...*Squad) *MissionUpdate
- func (mu *MissionUpdate) AddUpdatedBy(i int64) *MissionUpdate
- func (mu *MissionUpdate) AddVoteIDs(ids ...int64) *MissionUpdate
- func (mu *MissionUpdate) AddVotes(v ...*Vote) *MissionUpdate
- func (mu *MissionUpdate) ClearGame() *MissionUpdate
- func (mu *MissionUpdate) ClearSquads() *MissionUpdate
- func (mu *MissionUpdate) ClearVotes() *MissionUpdate
- func (mu *MissionUpdate) Exec(ctx context.Context) error
- func (mu *MissionUpdate) ExecX(ctx context.Context)
- func (mu *MissionUpdate) Mutation() *MissionMutation
- func (mu *MissionUpdate) RemoveSquadIDs(ids ...int64) *MissionUpdate
- func (mu *MissionUpdate) RemoveSquads(s ...*Squad) *MissionUpdate
- func (mu *MissionUpdate) RemoveVoteIDs(ids ...int64) *MissionUpdate
- func (mu *MissionUpdate) RemoveVotes(v ...*Vote) *MissionUpdate
- func (mu *MissionUpdate) Save(ctx context.Context) (int, error)
- func (mu *MissionUpdate) SaveX(ctx context.Context) int
- func (mu *MissionUpdate) SetCapacity(u uint8) *MissionUpdate
- func (mu *MissionUpdate) SetCreatedBy(i int64) *MissionUpdate
- func (mu *MissionUpdate) SetDeletedAt(t time.Time) *MissionUpdate
- func (mu *MissionUpdate) SetFailed(b bool) *MissionUpdate
- func (mu *MissionUpdate) SetGame(g *Game) *MissionUpdate
- func (mu *MissionUpdate) SetGameID(i int64) *MissionUpdate
- func (c *MissionUpdate) SetInput(i UpdateMissionInput) *MissionUpdate
- func (mu *MissionUpdate) SetLeaderID(i int64) *MissionUpdate
- func (mu *MissionUpdate) SetNillableCapacity(u *uint8) *MissionUpdate
- func (mu *MissionUpdate) SetNillableCreatedBy(i *int64) *MissionUpdate
- func (mu *MissionUpdate) SetNillableDeletedAt(t *time.Time) *MissionUpdate
- func (mu *MissionUpdate) SetNillableFailed(b *bool) *MissionUpdate
- func (mu *MissionUpdate) SetNillableLeaderID(i *int64) *MissionUpdate
- func (mu *MissionUpdate) SetNillableProtected(b *bool) *MissionUpdate
- func (mu *MissionUpdate) SetNillableStatus(m *mission.Status) *MissionUpdate
- func (mu *MissionUpdate) SetNillableUpdatedBy(i *int64) *MissionUpdate
- func (mu *MissionUpdate) SetProtected(b bool) *MissionUpdate
- func (mu *MissionUpdate) SetSequence(u uint8) *MissionUpdate
- func (mu *MissionUpdate) SetStatus(m mission.Status) *MissionUpdate
- func (mu *MissionUpdate) SetUpdatedAt(t time.Time) *MissionUpdate
- func (mu *MissionUpdate) SetUpdatedBy(i int64) *MissionUpdate
- func (mu *MissionUpdate) Where(ps ...predicate.Mission) *MissionUpdate
- type MissionUpdateOne
- func (muo *MissionUpdateOne) AddCapacity(u int8) *MissionUpdateOne
- func (muo *MissionUpdateOne) AddCreatedBy(i int64) *MissionUpdateOne
- func (muo *MissionUpdateOne) AddLeaderID(i int64) *MissionUpdateOne
- func (muo *MissionUpdateOne) AddSequence(u int8) *MissionUpdateOne
- func (muo *MissionUpdateOne) AddSquadIDs(ids ...int64) *MissionUpdateOne
- func (muo *MissionUpdateOne) AddSquads(s ...*Squad) *MissionUpdateOne
- func (muo *MissionUpdateOne) AddUpdatedBy(i int64) *MissionUpdateOne
- func (muo *MissionUpdateOne) AddVoteIDs(ids ...int64) *MissionUpdateOne
- func (muo *MissionUpdateOne) AddVotes(v ...*Vote) *MissionUpdateOne
- func (muo *MissionUpdateOne) ClearGame() *MissionUpdateOne
- func (muo *MissionUpdateOne) ClearSquads() *MissionUpdateOne
- func (muo *MissionUpdateOne) ClearVotes() *MissionUpdateOne
- func (muo *MissionUpdateOne) Exec(ctx context.Context) error
- func (muo *MissionUpdateOne) ExecX(ctx context.Context)
- func (muo *MissionUpdateOne) Mutation() *MissionMutation
- func (muo *MissionUpdateOne) RemoveSquadIDs(ids ...int64) *MissionUpdateOne
- func (muo *MissionUpdateOne) RemoveSquads(s ...*Squad) *MissionUpdateOne
- func (muo *MissionUpdateOne) RemoveVoteIDs(ids ...int64) *MissionUpdateOne
- func (muo *MissionUpdateOne) RemoveVotes(v ...*Vote) *MissionUpdateOne
- func (muo *MissionUpdateOne) Save(ctx context.Context) (*Mission, error)
- func (muo *MissionUpdateOne) SaveX(ctx context.Context) *Mission
- func (muo *MissionUpdateOne) Select(field string, fields ...string) *MissionUpdateOne
- func (muo *MissionUpdateOne) SetCapacity(u uint8) *MissionUpdateOne
- func (muo *MissionUpdateOne) SetCreatedBy(i int64) *MissionUpdateOne
- func (muo *MissionUpdateOne) SetDeletedAt(t time.Time) *MissionUpdateOne
- func (muo *MissionUpdateOne) SetFailed(b bool) *MissionUpdateOne
- func (muo *MissionUpdateOne) SetGame(g *Game) *MissionUpdateOne
- func (muo *MissionUpdateOne) SetGameID(i int64) *MissionUpdateOne
- func (c *MissionUpdateOne) SetInput(i UpdateMissionInput) *MissionUpdateOne
- func (muo *MissionUpdateOne) SetLeaderID(i int64) *MissionUpdateOne
- func (muo *MissionUpdateOne) SetNillableCapacity(u *uint8) *MissionUpdateOne
- func (muo *MissionUpdateOne) SetNillableCreatedBy(i *int64) *MissionUpdateOne
- func (muo *MissionUpdateOne) SetNillableDeletedAt(t *time.Time) *MissionUpdateOne
- func (muo *MissionUpdateOne) SetNillableFailed(b *bool) *MissionUpdateOne
- func (muo *MissionUpdateOne) SetNillableLeaderID(i *int64) *MissionUpdateOne
- func (muo *MissionUpdateOne) SetNillableProtected(b *bool) *MissionUpdateOne
- func (muo *MissionUpdateOne) SetNillableStatus(m *mission.Status) *MissionUpdateOne
- func (muo *MissionUpdateOne) SetNillableUpdatedBy(i *int64) *MissionUpdateOne
- func (muo *MissionUpdateOne) SetProtected(b bool) *MissionUpdateOne
- func (muo *MissionUpdateOne) SetSequence(u uint8) *MissionUpdateOne
- func (muo *MissionUpdateOne) SetStatus(m mission.Status) *MissionUpdateOne
- func (muo *MissionUpdateOne) SetUpdatedAt(t time.Time) *MissionUpdateOne
- func (muo *MissionUpdateOne) SetUpdatedBy(i int64) *MissionUpdateOne
- type MissionWhereInput
- type Missions
- type MutateFunc
- type Mutation
- type Mutator
- type Node
- type NodeOption
- type Noder
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderDirection
- type OrderFunc
- type PageInfo
- type Policy
- type Query
- type Record
- func (r Record) IsEntity()
- func (r *Record) Node(ctx context.Context) (node *Node, err error)
- func (r *Record) QueryRoom() *RoomQuery
- func (r *Record) Room(ctx context.Context) (*Room, error)
- func (r *Record) String() string
- func (r *Record) ToEdge(order *RecordOrder) *RecordEdge
- func (r *Record) Unwrap() *Record
- func (r *Record) Update() *RecordUpdateOne
- type RecordClient
- func (c *RecordClient) Create() *RecordCreate
- func (c *RecordClient) CreateBulk(builders ...*RecordCreate) *RecordCreateBulk
- func (c *RecordClient) Delete() *RecordDelete
- func (c *RecordClient) DeleteOne(r *Record) *RecordDeleteOne
- func (c *RecordClient) DeleteOneID(id int64) *RecordDeleteOne
- func (c *RecordClient) Get(ctx context.Context, id int64) (*Record, error)
- func (c *RecordClient) GetX(ctx context.Context, id int64) *Record
- func (c *RecordClient) Hooks() []Hook
- func (c *RecordClient) Query() *RecordQuery
- func (c *RecordClient) QueryRoom(r *Record) *RoomQuery
- func (c *RecordClient) Update() *RecordUpdate
- func (c *RecordClient) UpdateOne(r *Record) *RecordUpdateOne
- func (c *RecordClient) UpdateOneID(id int64) *RecordUpdateOne
- func (c *RecordClient) Use(hooks ...Hook)
- type RecordConnection
- type RecordCreate
- func (rc *RecordCreate) Exec(ctx context.Context) error
- func (rc *RecordCreate) ExecX(ctx context.Context)
- func (rc *RecordCreate) Mutation() *RecordMutation
- func (rc *RecordCreate) Save(ctx context.Context) (*Record, error)
- func (rc *RecordCreate) SaveX(ctx context.Context) *Record
- func (rc *RecordCreate) SetCreatedAt(t time.Time) *RecordCreate
- func (rc *RecordCreate) SetCreatedBy(i int64) *RecordCreate
- func (rc *RecordCreate) SetDeletedAt(t time.Time) *RecordCreate
- func (rc *RecordCreate) SetID(i int64) *RecordCreate
- func (c *RecordCreate) SetInput(i CreateRecordInput) *RecordCreate
- func (rc *RecordCreate) SetNillableCreatedAt(t *time.Time) *RecordCreate
- func (rc *RecordCreate) SetNillableCreatedBy(i *int64) *RecordCreate
- func (rc *RecordCreate) SetNillableDeletedAt(t *time.Time) *RecordCreate
- func (rc *RecordCreate) SetNillableID(i *int64) *RecordCreate
- func (rc *RecordCreate) SetNillableScore(i *int32) *RecordCreate
- func (rc *RecordCreate) SetNillableUpdatedAt(t *time.Time) *RecordCreate
- func (rc *RecordCreate) SetNillableUpdatedBy(i *int64) *RecordCreate
- func (rc *RecordCreate) SetRoom(r *Room) *RecordCreate
- func (rc *RecordCreate) SetRoomID(i int64) *RecordCreate
- func (rc *RecordCreate) SetScore(i int32) *RecordCreate
- func (rc *RecordCreate) SetUpdatedAt(t time.Time) *RecordCreate
- func (rc *RecordCreate) SetUpdatedBy(i int64) *RecordCreate
- func (rc *RecordCreate) SetUserID(i int64) *RecordCreate
- type RecordCreateBulk
- type RecordDelete
- type RecordDeleteOne
- type RecordEdge
- type RecordEdges
- type RecordGroupBy
- func (rgb *RecordGroupBy) Aggregate(fns ...AggregateFunc) *RecordGroupBy
- func (s *RecordGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RecordGroupBy) BoolX(ctx context.Context) bool
- func (s *RecordGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RecordGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RecordGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RecordGroupBy) Float64X(ctx context.Context) float64
- func (s *RecordGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RecordGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RecordGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RecordGroupBy) IntX(ctx context.Context) int
- func (s *RecordGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RecordGroupBy) IntsX(ctx context.Context) []int
- func (rgb *RecordGroupBy) Scan(ctx context.Context, v any) error
- func (s *RecordGroupBy) ScanX(ctx context.Context, v any)
- func (s *RecordGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RecordGroupBy) StringX(ctx context.Context) string
- func (s *RecordGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RecordGroupBy) StringsX(ctx context.Context) []string
- type RecordMutation
- func (m *RecordMutation) AddCreatedBy(i int64)
- func (m *RecordMutation) AddField(name string, value ent.Value) error
- func (m *RecordMutation) AddScore(i int32)
- func (m *RecordMutation) AddUpdatedBy(i int64)
- func (m *RecordMutation) AddUserID(i int64)
- func (m *RecordMutation) AddedCreatedBy() (r int64, exists bool)
- func (m *RecordMutation) AddedEdges() []string
- func (m *RecordMutation) AddedField(name string) (ent.Value, bool)
- func (m *RecordMutation) AddedFields() []string
- func (m *RecordMutation) AddedIDs(name string) []ent.Value
- func (m *RecordMutation) AddedScore() (r int32, exists bool)
- func (m *RecordMutation) AddedUpdatedBy() (r int64, exists bool)
- func (m *RecordMutation) AddedUserID() (r int64, exists bool)
- func (m *RecordMutation) ClearEdge(name string) error
- func (m *RecordMutation) ClearField(name string) error
- func (m *RecordMutation) ClearRoom()
- func (m *RecordMutation) ClearedEdges() []string
- func (m *RecordMutation) ClearedFields() []string
- func (m RecordMutation) Client() *Client
- func (m *RecordMutation) CreatedAt() (r time.Time, exists bool)
- func (m *RecordMutation) CreatedBy() (r int64, exists bool)
- func (m *RecordMutation) DeletedAt() (r time.Time, exists bool)
- func (m *RecordMutation) EdgeCleared(name string) bool
- func (m *RecordMutation) Field(name string) (ent.Value, bool)
- func (m *RecordMutation) FieldCleared(name string) bool
- func (m *RecordMutation) Fields() []string
- func (m *RecordMutation) ID() (id int64, exists bool)
- func (m *RecordMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *RecordMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *RecordMutation) OldCreatedBy(ctx context.Context) (v int64, err error)
- func (m *RecordMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *RecordMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RecordMutation) OldRoomID(ctx context.Context) (v int64, err error)
- func (m *RecordMutation) OldScore(ctx context.Context) (v int32, err error)
- func (m *RecordMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *RecordMutation) OldUpdatedBy(ctx context.Context) (v int64, err error)
- func (m *RecordMutation) OldUserID(ctx context.Context) (v int64, err error)
- func (m *RecordMutation) Op() Op
- func (m *RecordMutation) RemovedEdges() []string
- func (m *RecordMutation) RemovedIDs(name string) []ent.Value
- func (m *RecordMutation) ResetCreatedAt()
- func (m *RecordMutation) ResetCreatedBy()
- func (m *RecordMutation) ResetDeletedAt()
- func (m *RecordMutation) ResetEdge(name string) error
- func (m *RecordMutation) ResetField(name string) error
- func (m *RecordMutation) ResetRoom()
- func (m *RecordMutation) ResetRoomID()
- func (m *RecordMutation) ResetScore()
- func (m *RecordMutation) ResetUpdatedAt()
- func (m *RecordMutation) ResetUpdatedBy()
- func (m *RecordMutation) ResetUserID()
- func (m *RecordMutation) RoomCleared() bool
- func (m *RecordMutation) RoomID() (r int64, exists bool)
- func (m *RecordMutation) RoomIDs() (ids []int64)
- func (m *RecordMutation) Score() (r int32, exists bool)
- func (m *RecordMutation) SetCreatedAt(t time.Time)
- func (m *RecordMutation) SetCreatedBy(i int64)
- func (m *RecordMutation) SetDeletedAt(t time.Time)
- func (m *RecordMutation) SetField(name string, value ent.Value) error
- func (m *RecordMutation) SetID(id int64)
- func (m *RecordMutation) SetRoomID(i int64)
- func (m *RecordMutation) SetScore(i int32)
- func (m *RecordMutation) SetUpdatedAt(t time.Time)
- func (m *RecordMutation) SetUpdatedBy(i int64)
- func (m *RecordMutation) SetUserID(i int64)
- func (m RecordMutation) Tx() (*Tx, error)
- func (m *RecordMutation) Type() string
- func (m *RecordMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *RecordMutation) UpdatedBy() (r int64, exists bool)
- func (m *RecordMutation) UserID() (r int64, exists bool)
- func (m *RecordMutation) Where(ps ...predicate.Record)
- type RecordOrder
- type RecordOrderField
- type RecordPaginateOption
- type RecordQuery
- func (rq *RecordQuery) Aggregate(fns ...AggregateFunc) *RecordSelect
- func (rq *RecordQuery) All(ctx context.Context) ([]*Record, error)
- func (rq *RecordQuery) AllX(ctx context.Context) []*Record
- func (rq *RecordQuery) Clone() *RecordQuery
- func (r *RecordQuery) CollectFields(ctx context.Context, satisfies ...string) (*RecordQuery, error)
- func (rq *RecordQuery) Count(ctx context.Context) (int, error)
- func (rq *RecordQuery) CountX(ctx context.Context) int
- func (rq *RecordQuery) Exist(ctx context.Context) (bool, error)
- func (rq *RecordQuery) ExistX(ctx context.Context) bool
- func (rq *RecordQuery) First(ctx context.Context) (*Record, error)
- func (rq *RecordQuery) FirstID(ctx context.Context) (id int64, err error)
- func (rq *RecordQuery) FirstIDX(ctx context.Context) int64
- func (rq *RecordQuery) FirstX(ctx context.Context) *Record
- func (rq *RecordQuery) GroupBy(field string, fields ...string) *RecordGroupBy
- func (rq *RecordQuery) IDs(ctx context.Context) ([]int64, error)
- func (rq *RecordQuery) IDsX(ctx context.Context) []int64
- func (rq *RecordQuery) Limit(limit int) *RecordQuery
- func (rq *RecordQuery) Offset(offset int) *RecordQuery
- func (rq *RecordQuery) Only(ctx context.Context) (*Record, error)
- func (rq *RecordQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (rq *RecordQuery) OnlyIDX(ctx context.Context) int64
- func (rq *RecordQuery) OnlyX(ctx context.Context) *Record
- func (rq *RecordQuery) Order(o ...OrderFunc) *RecordQuery
- func (r *RecordQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*RecordConnection, error)
- func (rq *RecordQuery) QueryRoom() *RoomQuery
- func (rq *RecordQuery) Select(fields ...string) *RecordSelect
- func (rq *RecordQuery) Unique(unique bool) *RecordQuery
- func (rq *RecordQuery) Where(ps ...predicate.Record) *RecordQuery
- func (rq *RecordQuery) WithRoom(opts ...func(*RoomQuery)) *RecordQuery
- type RecordSelect
- func (rs *RecordSelect) Aggregate(fns ...AggregateFunc) *RecordSelect
- func (s *RecordSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RecordSelect) BoolX(ctx context.Context) bool
- func (s *RecordSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RecordSelect) BoolsX(ctx context.Context) []bool
- func (s *RecordSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RecordSelect) Float64X(ctx context.Context) float64
- func (s *RecordSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RecordSelect) Float64sX(ctx context.Context) []float64
- func (s *RecordSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RecordSelect) IntX(ctx context.Context) int
- func (s *RecordSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RecordSelect) IntsX(ctx context.Context) []int
- func (rs *RecordSelect) Scan(ctx context.Context, v any) error
- func (s *RecordSelect) ScanX(ctx context.Context, v any)
- func (s *RecordSelect) String(ctx context.Context) (_ string, err error)
- func (s *RecordSelect) StringX(ctx context.Context) string
- func (s *RecordSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RecordSelect) StringsX(ctx context.Context) []string
- type RecordUpdate
- func (ru *RecordUpdate) AddCreatedBy(i int64) *RecordUpdate
- func (ru *RecordUpdate) AddScore(i int32) *RecordUpdate
- func (ru *RecordUpdate) AddUpdatedBy(i int64) *RecordUpdate
- func (ru *RecordUpdate) AddUserID(i int64) *RecordUpdate
- func (ru *RecordUpdate) ClearRoom() *RecordUpdate
- func (ru *RecordUpdate) Exec(ctx context.Context) error
- func (ru *RecordUpdate) ExecX(ctx context.Context)
- func (ru *RecordUpdate) Mutation() *RecordMutation
- func (ru *RecordUpdate) Save(ctx context.Context) (int, error)
- func (ru *RecordUpdate) SaveX(ctx context.Context) int
- func (ru *RecordUpdate) SetCreatedBy(i int64) *RecordUpdate
- func (ru *RecordUpdate) SetDeletedAt(t time.Time) *RecordUpdate
- func (c *RecordUpdate) SetInput(i UpdateRecordInput) *RecordUpdate
- func (ru *RecordUpdate) SetNillableCreatedBy(i *int64) *RecordUpdate
- func (ru *RecordUpdate) SetNillableDeletedAt(t *time.Time) *RecordUpdate
- func (ru *RecordUpdate) SetNillableScore(i *int32) *RecordUpdate
- func (ru *RecordUpdate) SetNillableUpdatedBy(i *int64) *RecordUpdate
- func (ru *RecordUpdate) SetRoom(r *Room) *RecordUpdate
- func (ru *RecordUpdate) SetRoomID(i int64) *RecordUpdate
- func (ru *RecordUpdate) SetScore(i int32) *RecordUpdate
- func (ru *RecordUpdate) SetUpdatedAt(t time.Time) *RecordUpdate
- func (ru *RecordUpdate) SetUpdatedBy(i int64) *RecordUpdate
- func (ru *RecordUpdate) SetUserID(i int64) *RecordUpdate
- func (ru *RecordUpdate) Where(ps ...predicate.Record) *RecordUpdate
- type RecordUpdateOne
- func (ruo *RecordUpdateOne) AddCreatedBy(i int64) *RecordUpdateOne
- func (ruo *RecordUpdateOne) AddScore(i int32) *RecordUpdateOne
- func (ruo *RecordUpdateOne) AddUpdatedBy(i int64) *RecordUpdateOne
- func (ruo *RecordUpdateOne) AddUserID(i int64) *RecordUpdateOne
- func (ruo *RecordUpdateOne) ClearRoom() *RecordUpdateOne
- func (ruo *RecordUpdateOne) Exec(ctx context.Context) error
- func (ruo *RecordUpdateOne) ExecX(ctx context.Context)
- func (ruo *RecordUpdateOne) Mutation() *RecordMutation
- func (ruo *RecordUpdateOne) Save(ctx context.Context) (*Record, error)
- func (ruo *RecordUpdateOne) SaveX(ctx context.Context) *Record
- func (ruo *RecordUpdateOne) Select(field string, fields ...string) *RecordUpdateOne
- func (ruo *RecordUpdateOne) SetCreatedBy(i int64) *RecordUpdateOne
- func (ruo *RecordUpdateOne) SetDeletedAt(t time.Time) *RecordUpdateOne
- func (c *RecordUpdateOne) SetInput(i UpdateRecordInput) *RecordUpdateOne
- func (ruo *RecordUpdateOne) SetNillableCreatedBy(i *int64) *RecordUpdateOne
- func (ruo *RecordUpdateOne) SetNillableDeletedAt(t *time.Time) *RecordUpdateOne
- func (ruo *RecordUpdateOne) SetNillableScore(i *int32) *RecordUpdateOne
- func (ruo *RecordUpdateOne) SetNillableUpdatedBy(i *int64) *RecordUpdateOne
- func (ruo *RecordUpdateOne) SetRoom(r *Room) *RecordUpdateOne
- func (ruo *RecordUpdateOne) SetRoomID(i int64) *RecordUpdateOne
- func (ruo *RecordUpdateOne) SetScore(i int32) *RecordUpdateOne
- func (ruo *RecordUpdateOne) SetUpdatedAt(t time.Time) *RecordUpdateOne
- func (ruo *RecordUpdateOne) SetUpdatedBy(i int64) *RecordUpdateOne
- func (ruo *RecordUpdateOne) SetUserID(i int64) *RecordUpdateOne
- type RecordWhereInput
- type Records
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Room
- func (r *Room) Games(ctx context.Context) (result []*Game, err error)
- func (r Room) IsEntity()
- func (r *Room) NamedGames(name string) ([]*Game, error)
- func (r *Room) NamedRecords(name string) ([]*Record, error)
- func (r *Room) NamedRoomUsers(name string) ([]*RoomUser, error)
- func (r *Room) Node(ctx context.Context) (node *Node, err error)
- func (r *Room) QueryGames() *GameQuery
- func (r *Room) QueryRecords() *RecordQuery
- func (r *Room) QueryRoomUsers() *RoomUserQuery
- func (r *Room) Records(ctx context.Context) (result []*Record, err error)
- func (r *Room) RoomUsers(ctx context.Context) (result []*RoomUser, err error)
- func (r *Room) String() string
- func (r *Room) ToEdge(order *RoomOrder) *RoomEdge
- func (r *Room) Unwrap() *Room
- func (r *Room) Update() *RoomUpdateOne
- type RoomClient
- func (c *RoomClient) Create() *RoomCreate
- func (c *RoomClient) CreateBulk(builders ...*RoomCreate) *RoomCreateBulk
- func (c *RoomClient) Delete() *RoomDelete
- func (c *RoomClient) DeleteOne(r *Room) *RoomDeleteOne
- func (c *RoomClient) DeleteOneID(id int64) *RoomDeleteOne
- func (c *RoomClient) Get(ctx context.Context, id int64) (*Room, error)
- func (c *RoomClient) GetX(ctx context.Context, id int64) *Room
- func (c *RoomClient) Hooks() []Hook
- func (c *RoomClient) Query() *RoomQuery
- func (c *RoomClient) QueryGames(r *Room) *GameQuery
- func (c *RoomClient) QueryRecords(r *Room) *RecordQuery
- func (c *RoomClient) QueryRoomUsers(r *Room) *RoomUserQuery
- func (c *RoomClient) Update() *RoomUpdate
- func (c *RoomClient) UpdateOne(r *Room) *RoomUpdateOne
- func (c *RoomClient) UpdateOneID(id int64) *RoomUpdateOne
- func (c *RoomClient) Use(hooks ...Hook)
- type RoomConnection
- type RoomCreate
- func (rc *RoomCreate) AddGameIDs(ids ...int64) *RoomCreate
- func (rc *RoomCreate) AddGames(g ...*Game) *RoomCreate
- func (rc *RoomCreate) AddRecordIDs(ids ...int64) *RoomCreate
- func (rc *RoomCreate) AddRecords(r ...*Record) *RoomCreate
- func (rc *RoomCreate) AddRoomUserIDs(ids ...int64) *RoomCreate
- func (rc *RoomCreate) AddRoomUsers(r ...*RoomUser) *RoomCreate
- func (rc *RoomCreate) Exec(ctx context.Context) error
- func (rc *RoomCreate) ExecX(ctx context.Context)
- func (rc *RoomCreate) Mutation() *RoomMutation
- func (rc *RoomCreate) Save(ctx context.Context) (*Room, error)
- func (rc *RoomCreate) SaveX(ctx context.Context) *Room
- func (rc *RoomCreate) SetClosed(b bool) *RoomCreate
- func (rc *RoomCreate) SetCreatedAt(t time.Time) *RoomCreate
- func (rc *RoomCreate) SetCreatedBy(i int64) *RoomCreate
- func (rc *RoomCreate) SetDeletedAt(t time.Time) *RoomCreate
- func (rc *RoomCreate) SetGameOn(b bool) *RoomCreate
- func (rc *RoomCreate) SetID(i int64) *RoomCreate
- func (c *RoomCreate) SetInput(i CreateRoomInput) *RoomCreate
- func (rc *RoomCreate) SetName(s string) *RoomCreate
- func (rc *RoomCreate) SetNillableClosed(b *bool) *RoomCreate
- func (rc *RoomCreate) SetNillableCreatedAt(t *time.Time) *RoomCreate
- func (rc *RoomCreate) SetNillableCreatedBy(i *int64) *RoomCreate
- func (rc *RoomCreate) SetNillableDeletedAt(t *time.Time) *RoomCreate
- func (rc *RoomCreate) SetNillableGameOn(b *bool) *RoomCreate
- func (rc *RoomCreate) SetNillableID(i *int64) *RoomCreate
- func (rc *RoomCreate) SetNillableName(s *string) *RoomCreate
- func (rc *RoomCreate) SetNillableUpdatedAt(t *time.Time) *RoomCreate
- func (rc *RoomCreate) SetNillableUpdatedBy(i *int64) *RoomCreate
- func (rc *RoomCreate) SetUpdatedAt(t time.Time) *RoomCreate
- func (rc *RoomCreate) SetUpdatedBy(i int64) *RoomCreate
- type RoomCreateBulk
- type RoomDelete
- type RoomDeleteOne
- type RoomEdge
- type RoomEdges
- type RoomGroupBy
- func (rgb *RoomGroupBy) Aggregate(fns ...AggregateFunc) *RoomGroupBy
- func (s *RoomGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RoomGroupBy) BoolX(ctx context.Context) bool
- func (s *RoomGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RoomGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RoomGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RoomGroupBy) Float64X(ctx context.Context) float64
- func (s *RoomGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RoomGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RoomGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RoomGroupBy) IntX(ctx context.Context) int
- func (s *RoomGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RoomGroupBy) IntsX(ctx context.Context) []int
- func (rgb *RoomGroupBy) Scan(ctx context.Context, v any) error
- func (s *RoomGroupBy) ScanX(ctx context.Context, v any)
- func (s *RoomGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RoomGroupBy) StringX(ctx context.Context) string
- func (s *RoomGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RoomGroupBy) StringsX(ctx context.Context) []string
- type RoomMutation
- func (m *RoomMutation) AddCreatedBy(i int64)
- func (m *RoomMutation) AddField(name string, value ent.Value) error
- func (m *RoomMutation) AddGameIDs(ids ...int64)
- func (m *RoomMutation) AddRecordIDs(ids ...int64)
- func (m *RoomMutation) AddRoomUserIDs(ids ...int64)
- func (m *RoomMutation) AddUpdatedBy(i int64)
- func (m *RoomMutation) AddedCreatedBy() (r int64, exists bool)
- func (m *RoomMutation) AddedEdges() []string
- func (m *RoomMutation) AddedField(name string) (ent.Value, bool)
- func (m *RoomMutation) AddedFields() []string
- func (m *RoomMutation) AddedIDs(name string) []ent.Value
- func (m *RoomMutation) AddedUpdatedBy() (r int64, exists bool)
- func (m *RoomMutation) ClearEdge(name string) error
- func (m *RoomMutation) ClearField(name string) error
- func (m *RoomMutation) ClearGames()
- func (m *RoomMutation) ClearRecords()
- func (m *RoomMutation) ClearRoomUsers()
- func (m *RoomMutation) ClearedEdges() []string
- func (m *RoomMutation) ClearedFields() []string
- func (m RoomMutation) Client() *Client
- func (m *RoomMutation) Closed() (r bool, exists bool)
- func (m *RoomMutation) CreatedAt() (r time.Time, exists bool)
- func (m *RoomMutation) CreatedBy() (r int64, exists bool)
- func (m *RoomMutation) DeletedAt() (r time.Time, exists bool)
- func (m *RoomMutation) EdgeCleared(name string) bool
- func (m *RoomMutation) Field(name string) (ent.Value, bool)
- func (m *RoomMutation) FieldCleared(name string) bool
- func (m *RoomMutation) Fields() []string
- func (m *RoomMutation) GameOn() (r bool, exists bool)
- func (m *RoomMutation) GamesCleared() bool
- func (m *RoomMutation) GamesIDs() (ids []int64)
- func (m *RoomMutation) ID() (id int64, exists bool)
- func (m *RoomMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *RoomMutation) Name() (r string, exists bool)
- func (m *RoomMutation) OldClosed(ctx context.Context) (v bool, err error)
- func (m *RoomMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *RoomMutation) OldCreatedBy(ctx context.Context) (v int64, err error)
- func (m *RoomMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *RoomMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RoomMutation) OldGameOn(ctx context.Context) (v bool, err error)
- func (m *RoomMutation) OldName(ctx context.Context) (v string, err error)
- func (m *RoomMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *RoomMutation) OldUpdatedBy(ctx context.Context) (v int64, err error)
- func (m *RoomMutation) Op() Op
- func (m *RoomMutation) RecordsCleared() bool
- func (m *RoomMutation) RecordsIDs() (ids []int64)
- func (m *RoomMutation) RemoveGameIDs(ids ...int64)
- func (m *RoomMutation) RemoveRecordIDs(ids ...int64)
- func (m *RoomMutation) RemoveRoomUserIDs(ids ...int64)
- func (m *RoomMutation) RemovedEdges() []string
- func (m *RoomMutation) RemovedGamesIDs() (ids []int64)
- func (m *RoomMutation) RemovedIDs(name string) []ent.Value
- func (m *RoomMutation) RemovedRecordsIDs() (ids []int64)
- func (m *RoomMutation) RemovedRoomUsersIDs() (ids []int64)
- func (m *RoomMutation) ResetClosed()
- func (m *RoomMutation) ResetCreatedAt()
- func (m *RoomMutation) ResetCreatedBy()
- func (m *RoomMutation) ResetDeletedAt()
- func (m *RoomMutation) ResetEdge(name string) error
- func (m *RoomMutation) ResetField(name string) error
- func (m *RoomMutation) ResetGameOn()
- func (m *RoomMutation) ResetGames()
- func (m *RoomMutation) ResetName()
- func (m *RoomMutation) ResetRecords()
- func (m *RoomMutation) ResetRoomUsers()
- func (m *RoomMutation) ResetUpdatedAt()
- func (m *RoomMutation) ResetUpdatedBy()
- func (m *RoomMutation) RoomUsersCleared() bool
- func (m *RoomMutation) RoomUsersIDs() (ids []int64)
- func (m *RoomMutation) SetClosed(b bool)
- func (m *RoomMutation) SetCreatedAt(t time.Time)
- func (m *RoomMutation) SetCreatedBy(i int64)
- func (m *RoomMutation) SetDeletedAt(t time.Time)
- func (m *RoomMutation) SetField(name string, value ent.Value) error
- func (m *RoomMutation) SetGameOn(b bool)
- func (m *RoomMutation) SetID(id int64)
- func (m *RoomMutation) SetName(s string)
- func (m *RoomMutation) SetUpdatedAt(t time.Time)
- func (m *RoomMutation) SetUpdatedBy(i int64)
- func (m RoomMutation) Tx() (*Tx, error)
- func (m *RoomMutation) Type() string
- func (m *RoomMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *RoomMutation) UpdatedBy() (r int64, exists bool)
- func (m *RoomMutation) Where(ps ...predicate.Room)
- type RoomOrder
- type RoomOrderField
- type RoomPaginateOption
- type RoomQuery
- func (rq *RoomQuery) Aggregate(fns ...AggregateFunc) *RoomSelect
- func (rq *RoomQuery) All(ctx context.Context) ([]*Room, error)
- func (rq *RoomQuery) AllX(ctx context.Context) []*Room
- func (rq *RoomQuery) Clone() *RoomQuery
- func (r *RoomQuery) CollectFields(ctx context.Context, satisfies ...string) (*RoomQuery, error)
- func (rq *RoomQuery) Count(ctx context.Context) (int, error)
- func (rq *RoomQuery) CountX(ctx context.Context) int
- func (rq *RoomQuery) Exist(ctx context.Context) (bool, error)
- func (rq *RoomQuery) ExistX(ctx context.Context) bool
- func (rq *RoomQuery) First(ctx context.Context) (*Room, error)
- func (rq *RoomQuery) FirstID(ctx context.Context) (id int64, err error)
- func (rq *RoomQuery) FirstIDX(ctx context.Context) int64
- func (rq *RoomQuery) FirstX(ctx context.Context) *Room
- func (rq *RoomQuery) GroupBy(field string, fields ...string) *RoomGroupBy
- func (rq *RoomQuery) IDs(ctx context.Context) ([]int64, error)
- func (rq *RoomQuery) IDsX(ctx context.Context) []int64
- func (rq *RoomQuery) Limit(limit int) *RoomQuery
- func (rq *RoomQuery) Offset(offset int) *RoomQuery
- func (rq *RoomQuery) Only(ctx context.Context) (*Room, error)
- func (rq *RoomQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (rq *RoomQuery) OnlyIDX(ctx context.Context) int64
- func (rq *RoomQuery) OnlyX(ctx context.Context) *Room
- func (rq *RoomQuery) Order(o ...OrderFunc) *RoomQuery
- func (r *RoomQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*RoomConnection, error)
- func (rq *RoomQuery) QueryGames() *GameQuery
- func (rq *RoomQuery) QueryRecords() *RecordQuery
- func (rq *RoomQuery) QueryRoomUsers() *RoomUserQuery
- func (rq *RoomQuery) Select(fields ...string) *RoomSelect
- func (rq *RoomQuery) Unique(unique bool) *RoomQuery
- func (rq *RoomQuery) Where(ps ...predicate.Room) *RoomQuery
- func (rq *RoomQuery) WithGames(opts ...func(*GameQuery)) *RoomQuery
- func (rq *RoomQuery) WithNamedGames(name string, opts ...func(*GameQuery)) *RoomQuery
- func (rq *RoomQuery) WithNamedRecords(name string, opts ...func(*RecordQuery)) *RoomQuery
- func (rq *RoomQuery) WithNamedRoomUsers(name string, opts ...func(*RoomUserQuery)) *RoomQuery
- func (rq *RoomQuery) WithRecords(opts ...func(*RecordQuery)) *RoomQuery
- func (rq *RoomQuery) WithRoomUsers(opts ...func(*RoomUserQuery)) *RoomQuery
- type RoomSelect
- func (rs *RoomSelect) Aggregate(fns ...AggregateFunc) *RoomSelect
- func (s *RoomSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RoomSelect) BoolX(ctx context.Context) bool
- func (s *RoomSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RoomSelect) BoolsX(ctx context.Context) []bool
- func (s *RoomSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RoomSelect) Float64X(ctx context.Context) float64
- func (s *RoomSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RoomSelect) Float64sX(ctx context.Context) []float64
- func (s *RoomSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RoomSelect) IntX(ctx context.Context) int
- func (s *RoomSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RoomSelect) IntsX(ctx context.Context) []int
- func (rs *RoomSelect) Scan(ctx context.Context, v any) error
- func (s *RoomSelect) ScanX(ctx context.Context, v any)
- func (s *RoomSelect) String(ctx context.Context) (_ string, err error)
- func (s *RoomSelect) StringX(ctx context.Context) string
- func (s *RoomSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RoomSelect) StringsX(ctx context.Context) []string
- type RoomUpdate
- func (ru *RoomUpdate) AddCreatedBy(i int64) *RoomUpdate
- func (ru *RoomUpdate) AddGameIDs(ids ...int64) *RoomUpdate
- func (ru *RoomUpdate) AddGames(g ...*Game) *RoomUpdate
- func (ru *RoomUpdate) AddRecordIDs(ids ...int64) *RoomUpdate
- func (ru *RoomUpdate) AddRecords(r ...*Record) *RoomUpdate
- func (ru *RoomUpdate) AddRoomUserIDs(ids ...int64) *RoomUpdate
- func (ru *RoomUpdate) AddRoomUsers(r ...*RoomUser) *RoomUpdate
- func (ru *RoomUpdate) AddUpdatedBy(i int64) *RoomUpdate
- func (ru *RoomUpdate) ClearGames() *RoomUpdate
- func (ru *RoomUpdate) ClearRecords() *RoomUpdate
- func (ru *RoomUpdate) ClearRoomUsers() *RoomUpdate
- func (ru *RoomUpdate) Exec(ctx context.Context) error
- func (ru *RoomUpdate) ExecX(ctx context.Context)
- func (ru *RoomUpdate) Mutation() *RoomMutation
- func (ru *RoomUpdate) RemoveGameIDs(ids ...int64) *RoomUpdate
- func (ru *RoomUpdate) RemoveGames(g ...*Game) *RoomUpdate
- func (ru *RoomUpdate) RemoveRecordIDs(ids ...int64) *RoomUpdate
- func (ru *RoomUpdate) RemoveRecords(r ...*Record) *RoomUpdate
- func (ru *RoomUpdate) RemoveRoomUserIDs(ids ...int64) *RoomUpdate
- func (ru *RoomUpdate) RemoveRoomUsers(r ...*RoomUser) *RoomUpdate
- func (ru *RoomUpdate) Save(ctx context.Context) (int, error)
- func (ru *RoomUpdate) SaveX(ctx context.Context) int
- func (ru *RoomUpdate) SetClosed(b bool) *RoomUpdate
- func (ru *RoomUpdate) SetCreatedBy(i int64) *RoomUpdate
- func (ru *RoomUpdate) SetDeletedAt(t time.Time) *RoomUpdate
- func (ru *RoomUpdate) SetGameOn(b bool) *RoomUpdate
- func (c *RoomUpdate) SetInput(i UpdateRoomInput) *RoomUpdate
- func (ru *RoomUpdate) SetName(s string) *RoomUpdate
- func (ru *RoomUpdate) SetNillableClosed(b *bool) *RoomUpdate
- func (ru *RoomUpdate) SetNillableCreatedBy(i *int64) *RoomUpdate
- func (ru *RoomUpdate) SetNillableDeletedAt(t *time.Time) *RoomUpdate
- func (ru *RoomUpdate) SetNillableGameOn(b *bool) *RoomUpdate
- func (ru *RoomUpdate) SetNillableName(s *string) *RoomUpdate
- func (ru *RoomUpdate) SetNillableUpdatedBy(i *int64) *RoomUpdate
- func (ru *RoomUpdate) SetUpdatedAt(t time.Time) *RoomUpdate
- func (ru *RoomUpdate) SetUpdatedBy(i int64) *RoomUpdate
- func (ru *RoomUpdate) Where(ps ...predicate.Room) *RoomUpdate
- type RoomUpdateOne
- func (ruo *RoomUpdateOne) AddCreatedBy(i int64) *RoomUpdateOne
- func (ruo *RoomUpdateOne) AddGameIDs(ids ...int64) *RoomUpdateOne
- func (ruo *RoomUpdateOne) AddGames(g ...*Game) *RoomUpdateOne
- func (ruo *RoomUpdateOne) AddRecordIDs(ids ...int64) *RoomUpdateOne
- func (ruo *RoomUpdateOne) AddRecords(r ...*Record) *RoomUpdateOne
- func (ruo *RoomUpdateOne) AddRoomUserIDs(ids ...int64) *RoomUpdateOne
- func (ruo *RoomUpdateOne) AddRoomUsers(r ...*RoomUser) *RoomUpdateOne
- func (ruo *RoomUpdateOne) AddUpdatedBy(i int64) *RoomUpdateOne
- func (ruo *RoomUpdateOne) ClearGames() *RoomUpdateOne
- func (ruo *RoomUpdateOne) ClearRecords() *RoomUpdateOne
- func (ruo *RoomUpdateOne) ClearRoomUsers() *RoomUpdateOne
- func (ruo *RoomUpdateOne) Exec(ctx context.Context) error
- func (ruo *RoomUpdateOne) ExecX(ctx context.Context)
- func (ruo *RoomUpdateOne) Mutation() *RoomMutation
- func (ruo *RoomUpdateOne) RemoveGameIDs(ids ...int64) *RoomUpdateOne
- func (ruo *RoomUpdateOne) RemoveGames(g ...*Game) *RoomUpdateOne
- func (ruo *RoomUpdateOne) RemoveRecordIDs(ids ...int64) *RoomUpdateOne
- func (ruo *RoomUpdateOne) RemoveRecords(r ...*Record) *RoomUpdateOne
- func (ruo *RoomUpdateOne) RemoveRoomUserIDs(ids ...int64) *RoomUpdateOne
- func (ruo *RoomUpdateOne) RemoveRoomUsers(r ...*RoomUser) *RoomUpdateOne
- func (ruo *RoomUpdateOne) Save(ctx context.Context) (*Room, error)
- func (ruo *RoomUpdateOne) SaveX(ctx context.Context) *Room
- func (ruo *RoomUpdateOne) Select(field string, fields ...string) *RoomUpdateOne
- func (ruo *RoomUpdateOne) SetClosed(b bool) *RoomUpdateOne
- func (ruo *RoomUpdateOne) SetCreatedBy(i int64) *RoomUpdateOne
- func (ruo *RoomUpdateOne) SetDeletedAt(t time.Time) *RoomUpdateOne
- func (ruo *RoomUpdateOne) SetGameOn(b bool) *RoomUpdateOne
- func (c *RoomUpdateOne) SetInput(i UpdateRoomInput) *RoomUpdateOne
- func (ruo *RoomUpdateOne) SetName(s string) *RoomUpdateOne
- func (ruo *RoomUpdateOne) SetNillableClosed(b *bool) *RoomUpdateOne
- func (ruo *RoomUpdateOne) SetNillableCreatedBy(i *int64) *RoomUpdateOne
- func (ruo *RoomUpdateOne) SetNillableDeletedAt(t *time.Time) *RoomUpdateOne
- func (ruo *RoomUpdateOne) SetNillableGameOn(b *bool) *RoomUpdateOne
- func (ruo *RoomUpdateOne) SetNillableName(s *string) *RoomUpdateOne
- func (ruo *RoomUpdateOne) SetNillableUpdatedBy(i *int64) *RoomUpdateOne
- func (ruo *RoomUpdateOne) SetUpdatedAt(t time.Time) *RoomUpdateOne
- func (ruo *RoomUpdateOne) SetUpdatedBy(i int64) *RoomUpdateOne
- type RoomUser
- func (ru RoomUser) IsEntity()
- func (ru *RoomUser) Node(ctx context.Context) (node *Node, err error)
- func (ru *RoomUser) QueryRoom() *RoomQuery
- func (ru *RoomUser) Room(ctx context.Context) (*Room, error)
- func (ru *RoomUser) String() string
- func (ru *RoomUser) ToEdge(order *RoomUserOrder) *RoomUserEdge
- func (ru *RoomUser) Unwrap() *RoomUser
- func (ru *RoomUser) Update() *RoomUserUpdateOne
- type RoomUserClient
- func (c *RoomUserClient) Create() *RoomUserCreate
- func (c *RoomUserClient) CreateBulk(builders ...*RoomUserCreate) *RoomUserCreateBulk
- func (c *RoomUserClient) Delete() *RoomUserDelete
- func (c *RoomUserClient) DeleteOne(ru *RoomUser) *RoomUserDeleteOne
- func (c *RoomUserClient) DeleteOneID(id int64) *RoomUserDeleteOne
- func (c *RoomUserClient) Get(ctx context.Context, id int64) (*RoomUser, error)
- func (c *RoomUserClient) GetX(ctx context.Context, id int64) *RoomUser
- func (c *RoomUserClient) Hooks() []Hook
- func (c *RoomUserClient) Query() *RoomUserQuery
- func (c *RoomUserClient) QueryRoom(ru *RoomUser) *RoomQuery
- func (c *RoomUserClient) Update() *RoomUserUpdate
- func (c *RoomUserClient) UpdateOne(ru *RoomUser) *RoomUserUpdateOne
- func (c *RoomUserClient) UpdateOneID(id int64) *RoomUserUpdateOne
- func (c *RoomUserClient) Use(hooks ...Hook)
- type RoomUserConnection
- type RoomUserCreate
- func (ruc *RoomUserCreate) Exec(ctx context.Context) error
- func (ruc *RoomUserCreate) ExecX(ctx context.Context)
- func (ruc *RoomUserCreate) Mutation() *RoomUserMutation
- func (ruc *RoomUserCreate) Save(ctx context.Context) (*RoomUser, error)
- func (ruc *RoomUserCreate) SaveX(ctx context.Context) *RoomUser
- func (ruc *RoomUserCreate) SetCreatedAt(t time.Time) *RoomUserCreate
- func (ruc *RoomUserCreate) SetCreatedBy(i int64) *RoomUserCreate
- func (ruc *RoomUserCreate) SetDeletedAt(t time.Time) *RoomUserCreate
- func (ruc *RoomUserCreate) SetHost(b bool) *RoomUserCreate
- func (ruc *RoomUserCreate) SetID(i int64) *RoomUserCreate
- func (c *RoomUserCreate) SetInput(i CreateRoomUserInput) *RoomUserCreate
- func (ruc *RoomUserCreate) SetNillableCreatedAt(t *time.Time) *RoomUserCreate
- func (ruc *RoomUserCreate) SetNillableCreatedBy(i *int64) *RoomUserCreate
- func (ruc *RoomUserCreate) SetNillableDeletedAt(t *time.Time) *RoomUserCreate
- func (ruc *RoomUserCreate) SetNillableHost(b *bool) *RoomUserCreate
- func (ruc *RoomUserCreate) SetNillableID(i *int64) *RoomUserCreate
- func (ruc *RoomUserCreate) SetNillableUpdatedAt(t *time.Time) *RoomUserCreate
- func (ruc *RoomUserCreate) SetNillableUpdatedBy(i *int64) *RoomUserCreate
- func (ruc *RoomUserCreate) SetRoom(r *Room) *RoomUserCreate
- func (ruc *RoomUserCreate) SetRoomID(i int64) *RoomUserCreate
- func (ruc *RoomUserCreate) SetUpdatedAt(t time.Time) *RoomUserCreate
- func (ruc *RoomUserCreate) SetUpdatedBy(i int64) *RoomUserCreate
- func (ruc *RoomUserCreate) SetUserID(i int64) *RoomUserCreate
- type RoomUserCreateBulk
- type RoomUserDelete
- type RoomUserDeleteOne
- type RoomUserEdge
- type RoomUserEdges
- type RoomUserGroupBy
- func (rugb *RoomUserGroupBy) Aggregate(fns ...AggregateFunc) *RoomUserGroupBy
- func (s *RoomUserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RoomUserGroupBy) BoolX(ctx context.Context) bool
- func (s *RoomUserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RoomUserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RoomUserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RoomUserGroupBy) Float64X(ctx context.Context) float64
- func (s *RoomUserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RoomUserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RoomUserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RoomUserGroupBy) IntX(ctx context.Context) int
- func (s *RoomUserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RoomUserGroupBy) IntsX(ctx context.Context) []int
- func (rugb *RoomUserGroupBy) Scan(ctx context.Context, v any) error
- func (s *RoomUserGroupBy) ScanX(ctx context.Context, v any)
- func (s *RoomUserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RoomUserGroupBy) StringX(ctx context.Context) string
- func (s *RoomUserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RoomUserGroupBy) StringsX(ctx context.Context) []string
- type RoomUserMutation
- func (m *RoomUserMutation) AddCreatedBy(i int64)
- func (m *RoomUserMutation) AddField(name string, value ent.Value) error
- func (m *RoomUserMutation) AddUpdatedBy(i int64)
- func (m *RoomUserMutation) AddUserID(i int64)
- func (m *RoomUserMutation) AddedCreatedBy() (r int64, exists bool)
- func (m *RoomUserMutation) AddedEdges() []string
- func (m *RoomUserMutation) AddedField(name string) (ent.Value, bool)
- func (m *RoomUserMutation) AddedFields() []string
- func (m *RoomUserMutation) AddedIDs(name string) []ent.Value
- func (m *RoomUserMutation) AddedUpdatedBy() (r int64, exists bool)
- func (m *RoomUserMutation) AddedUserID() (r int64, exists bool)
- func (m *RoomUserMutation) ClearEdge(name string) error
- func (m *RoomUserMutation) ClearField(name string) error
- func (m *RoomUserMutation) ClearRoom()
- func (m *RoomUserMutation) ClearedEdges() []string
- func (m *RoomUserMutation) ClearedFields() []string
- func (m RoomUserMutation) Client() *Client
- func (m *RoomUserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *RoomUserMutation) CreatedBy() (r int64, exists bool)
- func (m *RoomUserMutation) DeletedAt() (r time.Time, exists bool)
- func (m *RoomUserMutation) EdgeCleared(name string) bool
- func (m *RoomUserMutation) Field(name string) (ent.Value, bool)
- func (m *RoomUserMutation) FieldCleared(name string) bool
- func (m *RoomUserMutation) Fields() []string
- func (m *RoomUserMutation) Host() (r bool, exists bool)
- func (m *RoomUserMutation) ID() (id int64, exists bool)
- func (m *RoomUserMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *RoomUserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *RoomUserMutation) OldCreatedBy(ctx context.Context) (v int64, err error)
- func (m *RoomUserMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *RoomUserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RoomUserMutation) OldHost(ctx context.Context) (v bool, err error)
- func (m *RoomUserMutation) OldRoomID(ctx context.Context) (v int64, err error)
- func (m *RoomUserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *RoomUserMutation) OldUpdatedBy(ctx context.Context) (v int64, err error)
- func (m *RoomUserMutation) OldUserID(ctx context.Context) (v int64, err error)
- func (m *RoomUserMutation) Op() Op
- func (m *RoomUserMutation) RemovedEdges() []string
- func (m *RoomUserMutation) RemovedIDs(name string) []ent.Value
- func (m *RoomUserMutation) ResetCreatedAt()
- func (m *RoomUserMutation) ResetCreatedBy()
- func (m *RoomUserMutation) ResetDeletedAt()
- func (m *RoomUserMutation) ResetEdge(name string) error
- func (m *RoomUserMutation) ResetField(name string) error
- func (m *RoomUserMutation) ResetHost()
- func (m *RoomUserMutation) ResetRoom()
- func (m *RoomUserMutation) ResetRoomID()
- func (m *RoomUserMutation) ResetUpdatedAt()
- func (m *RoomUserMutation) ResetUpdatedBy()
- func (m *RoomUserMutation) ResetUserID()
- func (m *RoomUserMutation) RoomCleared() bool
- func (m *RoomUserMutation) RoomID() (r int64, exists bool)
- func (m *RoomUserMutation) RoomIDs() (ids []int64)
- func (m *RoomUserMutation) SetCreatedAt(t time.Time)
- func (m *RoomUserMutation) SetCreatedBy(i int64)
- func (m *RoomUserMutation) SetDeletedAt(t time.Time)
- func (m *RoomUserMutation) SetField(name string, value ent.Value) error
- func (m *RoomUserMutation) SetHost(b bool)
- func (m *RoomUserMutation) SetID(id int64)
- func (m *RoomUserMutation) SetRoomID(i int64)
- func (m *RoomUserMutation) SetUpdatedAt(t time.Time)
- func (m *RoomUserMutation) SetUpdatedBy(i int64)
- func (m *RoomUserMutation) SetUserID(i int64)
- func (m RoomUserMutation) Tx() (*Tx, error)
- func (m *RoomUserMutation) Type() string
- func (m *RoomUserMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *RoomUserMutation) UpdatedBy() (r int64, exists bool)
- func (m *RoomUserMutation) UserID() (r int64, exists bool)
- func (m *RoomUserMutation) Where(ps ...predicate.RoomUser)
- type RoomUserOrder
- type RoomUserOrderField
- type RoomUserPaginateOption
- type RoomUserQuery
- func (ruq *RoomUserQuery) Aggregate(fns ...AggregateFunc) *RoomUserSelect
- func (ruq *RoomUserQuery) All(ctx context.Context) ([]*RoomUser, error)
- func (ruq *RoomUserQuery) AllX(ctx context.Context) []*RoomUser
- func (ruq *RoomUserQuery) Clone() *RoomUserQuery
- func (ru *RoomUserQuery) CollectFields(ctx context.Context, satisfies ...string) (*RoomUserQuery, error)
- func (ruq *RoomUserQuery) Count(ctx context.Context) (int, error)
- func (ruq *RoomUserQuery) CountX(ctx context.Context) int
- func (ruq *RoomUserQuery) Exist(ctx context.Context) (bool, error)
- func (ruq *RoomUserQuery) ExistX(ctx context.Context) bool
- func (ruq *RoomUserQuery) First(ctx context.Context) (*RoomUser, error)
- func (ruq *RoomUserQuery) FirstID(ctx context.Context) (id int64, err error)
- func (ruq *RoomUserQuery) FirstIDX(ctx context.Context) int64
- func (ruq *RoomUserQuery) FirstX(ctx context.Context) *RoomUser
- func (ruq *RoomUserQuery) GroupBy(field string, fields ...string) *RoomUserGroupBy
- func (ruq *RoomUserQuery) IDs(ctx context.Context) ([]int64, error)
- func (ruq *RoomUserQuery) IDsX(ctx context.Context) []int64
- func (ruq *RoomUserQuery) Limit(limit int) *RoomUserQuery
- func (ruq *RoomUserQuery) Offset(offset int) *RoomUserQuery
- func (ruq *RoomUserQuery) Only(ctx context.Context) (*RoomUser, error)
- func (ruq *RoomUserQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (ruq *RoomUserQuery) OnlyIDX(ctx context.Context) int64
- func (ruq *RoomUserQuery) OnlyX(ctx context.Context) *RoomUser
- func (ruq *RoomUserQuery) Order(o ...OrderFunc) *RoomUserQuery
- func (ru *RoomUserQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*RoomUserConnection, error)
- func (ruq *RoomUserQuery) QueryRoom() *RoomQuery
- func (ruq *RoomUserQuery) Select(fields ...string) *RoomUserSelect
- func (ruq *RoomUserQuery) Unique(unique bool) *RoomUserQuery
- func (ruq *RoomUserQuery) Where(ps ...predicate.RoomUser) *RoomUserQuery
- func (ruq *RoomUserQuery) WithRoom(opts ...func(*RoomQuery)) *RoomUserQuery
- type RoomUserSelect
- func (rus *RoomUserSelect) Aggregate(fns ...AggregateFunc) *RoomUserSelect
- func (s *RoomUserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RoomUserSelect) BoolX(ctx context.Context) bool
- func (s *RoomUserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RoomUserSelect) BoolsX(ctx context.Context) []bool
- func (s *RoomUserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RoomUserSelect) Float64X(ctx context.Context) float64
- func (s *RoomUserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RoomUserSelect) Float64sX(ctx context.Context) []float64
- func (s *RoomUserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RoomUserSelect) IntX(ctx context.Context) int
- func (s *RoomUserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RoomUserSelect) IntsX(ctx context.Context) []int
- func (rus *RoomUserSelect) Scan(ctx context.Context, v any) error
- func (s *RoomUserSelect) ScanX(ctx context.Context, v any)
- func (s *RoomUserSelect) String(ctx context.Context) (_ string, err error)
- func (s *RoomUserSelect) StringX(ctx context.Context) string
- func (s *RoomUserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RoomUserSelect) StringsX(ctx context.Context) []string
- type RoomUserUpdate
- func (ruu *RoomUserUpdate) AddCreatedBy(i int64) *RoomUserUpdate
- func (ruu *RoomUserUpdate) AddUpdatedBy(i int64) *RoomUserUpdate
- func (ruu *RoomUserUpdate) AddUserID(i int64) *RoomUserUpdate
- func (ruu *RoomUserUpdate) ClearRoom() *RoomUserUpdate
- func (ruu *RoomUserUpdate) Exec(ctx context.Context) error
- func (ruu *RoomUserUpdate) ExecX(ctx context.Context)
- func (ruu *RoomUserUpdate) Mutation() *RoomUserMutation
- func (ruu *RoomUserUpdate) Save(ctx context.Context) (int, error)
- func (ruu *RoomUserUpdate) SaveX(ctx context.Context) int
- func (ruu *RoomUserUpdate) SetCreatedBy(i int64) *RoomUserUpdate
- func (ruu *RoomUserUpdate) SetDeletedAt(t time.Time) *RoomUserUpdate
- func (ruu *RoomUserUpdate) SetHost(b bool) *RoomUserUpdate
- func (c *RoomUserUpdate) SetInput(i UpdateRoomUserInput) *RoomUserUpdate
- func (ruu *RoomUserUpdate) SetNillableCreatedBy(i *int64) *RoomUserUpdate
- func (ruu *RoomUserUpdate) SetNillableDeletedAt(t *time.Time) *RoomUserUpdate
- func (ruu *RoomUserUpdate) SetNillableHost(b *bool) *RoomUserUpdate
- func (ruu *RoomUserUpdate) SetNillableUpdatedBy(i *int64) *RoomUserUpdate
- func (ruu *RoomUserUpdate) SetRoom(r *Room) *RoomUserUpdate
- func (ruu *RoomUserUpdate) SetRoomID(i int64) *RoomUserUpdate
- func (ruu *RoomUserUpdate) SetUpdatedAt(t time.Time) *RoomUserUpdate
- func (ruu *RoomUserUpdate) SetUpdatedBy(i int64) *RoomUserUpdate
- func (ruu *RoomUserUpdate) SetUserID(i int64) *RoomUserUpdate
- func (ruu *RoomUserUpdate) Where(ps ...predicate.RoomUser) *RoomUserUpdate
- type RoomUserUpdateOne
- func (ruuo *RoomUserUpdateOne) AddCreatedBy(i int64) *RoomUserUpdateOne
- func (ruuo *RoomUserUpdateOne) AddUpdatedBy(i int64) *RoomUserUpdateOne
- func (ruuo *RoomUserUpdateOne) AddUserID(i int64) *RoomUserUpdateOne
- func (ruuo *RoomUserUpdateOne) ClearRoom() *RoomUserUpdateOne
- func (ruuo *RoomUserUpdateOne) Exec(ctx context.Context) error
- func (ruuo *RoomUserUpdateOne) ExecX(ctx context.Context)
- func (ruuo *RoomUserUpdateOne) Mutation() *RoomUserMutation
- func (ruuo *RoomUserUpdateOne) Save(ctx context.Context) (*RoomUser, error)
- func (ruuo *RoomUserUpdateOne) SaveX(ctx context.Context) *RoomUser
- func (ruuo *RoomUserUpdateOne) Select(field string, fields ...string) *RoomUserUpdateOne
- func (ruuo *RoomUserUpdateOne) SetCreatedBy(i int64) *RoomUserUpdateOne
- func (ruuo *RoomUserUpdateOne) SetDeletedAt(t time.Time) *RoomUserUpdateOne
- func (ruuo *RoomUserUpdateOne) SetHost(b bool) *RoomUserUpdateOne
- func (c *RoomUserUpdateOne) SetInput(i UpdateRoomUserInput) *RoomUserUpdateOne
- func (ruuo *RoomUserUpdateOne) SetNillableCreatedBy(i *int64) *RoomUserUpdateOne
- func (ruuo *RoomUserUpdateOne) SetNillableDeletedAt(t *time.Time) *RoomUserUpdateOne
- func (ruuo *RoomUserUpdateOne) SetNillableHost(b *bool) *RoomUserUpdateOne
- func (ruuo *RoomUserUpdateOne) SetNillableUpdatedBy(i *int64) *RoomUserUpdateOne
- func (ruuo *RoomUserUpdateOne) SetRoom(r *Room) *RoomUserUpdateOne
- func (ruuo *RoomUserUpdateOne) SetRoomID(i int64) *RoomUserUpdateOne
- func (ruuo *RoomUserUpdateOne) SetUpdatedAt(t time.Time) *RoomUserUpdateOne
- func (ruuo *RoomUserUpdateOne) SetUpdatedBy(i int64) *RoomUserUpdateOne
- func (ruuo *RoomUserUpdateOne) SetUserID(i int64) *RoomUserUpdateOne
- type RoomUserWhereInput
- type RoomUsers
- type RoomWhereInput
- type Rooms
- type Squad
- func (s Squad) IsEntity()
- func (s *Squad) Mission(ctx context.Context) (*Mission, error)
- func (s *Squad) Node(ctx context.Context) (node *Node, err error)
- func (s *Squad) QueryMission() *MissionQuery
- func (s *Squad) String() string
- func (s *Squad) ToEdge(order *SquadOrder) *SquadEdge
- func (s *Squad) Unwrap() *Squad
- func (s *Squad) Update() *SquadUpdateOne
- type SquadClient
- func (c *SquadClient) Create() *SquadCreate
- func (c *SquadClient) CreateBulk(builders ...*SquadCreate) *SquadCreateBulk
- func (c *SquadClient) Delete() *SquadDelete
- func (c *SquadClient) DeleteOne(s *Squad) *SquadDeleteOne
- func (c *SquadClient) DeleteOneID(id int64) *SquadDeleteOne
- func (c *SquadClient) Get(ctx context.Context, id int64) (*Squad, error)
- func (c *SquadClient) GetX(ctx context.Context, id int64) *Squad
- func (c *SquadClient) Hooks() []Hook
- func (c *SquadClient) Query() *SquadQuery
- func (c *SquadClient) QueryMission(s *Squad) *MissionQuery
- func (c *SquadClient) Update() *SquadUpdate
- func (c *SquadClient) UpdateOne(s *Squad) *SquadUpdateOne
- func (c *SquadClient) UpdateOneID(id int64) *SquadUpdateOne
- func (c *SquadClient) Use(hooks ...Hook)
- type SquadConnection
- type SquadCreate
- func (sc *SquadCreate) Exec(ctx context.Context) error
- func (sc *SquadCreate) ExecX(ctx context.Context)
- func (sc *SquadCreate) Mutation() *SquadMutation
- func (sc *SquadCreate) Save(ctx context.Context) (*Squad, error)
- func (sc *SquadCreate) SaveX(ctx context.Context) *Squad
- func (sc *SquadCreate) SetActed(b bool) *SquadCreate
- func (sc *SquadCreate) SetCreatedAt(t time.Time) *SquadCreate
- func (sc *SquadCreate) SetCreatedBy(i int64) *SquadCreate
- func (sc *SquadCreate) SetDeletedAt(t time.Time) *SquadCreate
- func (sc *SquadCreate) SetID(i int64) *SquadCreate
- func (c *SquadCreate) SetInput(i CreateSquadInput) *SquadCreate
- func (sc *SquadCreate) SetMission(m *Mission) *SquadCreate
- func (sc *SquadCreate) SetMissionID(i int64) *SquadCreate
- func (sc *SquadCreate) SetNillableActed(b *bool) *SquadCreate
- func (sc *SquadCreate) SetNillableCreatedAt(t *time.Time) *SquadCreate
- func (sc *SquadCreate) SetNillableCreatedBy(i *int64) *SquadCreate
- func (sc *SquadCreate) SetNillableDeletedAt(t *time.Time) *SquadCreate
- func (sc *SquadCreate) SetNillableID(i *int64) *SquadCreate
- func (sc *SquadCreate) SetNillableRat(b *bool) *SquadCreate
- func (sc *SquadCreate) SetNillableUpdatedAt(t *time.Time) *SquadCreate
- func (sc *SquadCreate) SetNillableUpdatedBy(i *int64) *SquadCreate
- func (sc *SquadCreate) SetRat(b bool) *SquadCreate
- func (sc *SquadCreate) SetUpdatedAt(t time.Time) *SquadCreate
- func (sc *SquadCreate) SetUpdatedBy(i int64) *SquadCreate
- func (sc *SquadCreate) SetUserID(i int64) *SquadCreate
- type SquadCreateBulk
- type SquadDelete
- type SquadDeleteOne
- type SquadEdge
- type SquadEdges
- type SquadGroupBy
- func (sgb *SquadGroupBy) Aggregate(fns ...AggregateFunc) *SquadGroupBy
- func (s *SquadGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SquadGroupBy) BoolX(ctx context.Context) bool
- func (s *SquadGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SquadGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SquadGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SquadGroupBy) Float64X(ctx context.Context) float64
- func (s *SquadGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SquadGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SquadGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SquadGroupBy) IntX(ctx context.Context) int
- func (s *SquadGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SquadGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SquadGroupBy) Scan(ctx context.Context, v any) error
- func (s *SquadGroupBy) ScanX(ctx context.Context, v any)
- func (s *SquadGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SquadGroupBy) StringX(ctx context.Context) string
- func (s *SquadGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SquadGroupBy) StringsX(ctx context.Context) []string
- type SquadMutation
- func (m *SquadMutation) Acted() (r bool, exists bool)
- func (m *SquadMutation) AddCreatedBy(i int64)
- func (m *SquadMutation) AddField(name string, value ent.Value) error
- func (m *SquadMutation) AddUpdatedBy(i int64)
- func (m *SquadMutation) AddUserID(i int64)
- func (m *SquadMutation) AddedCreatedBy() (r int64, exists bool)
- func (m *SquadMutation) AddedEdges() []string
- func (m *SquadMutation) AddedField(name string) (ent.Value, bool)
- func (m *SquadMutation) AddedFields() []string
- func (m *SquadMutation) AddedIDs(name string) []ent.Value
- func (m *SquadMutation) AddedUpdatedBy() (r int64, exists bool)
- func (m *SquadMutation) AddedUserID() (r int64, exists bool)
- func (m *SquadMutation) ClearEdge(name string) error
- func (m *SquadMutation) ClearField(name string) error
- func (m *SquadMutation) ClearMission()
- func (m *SquadMutation) ClearedEdges() []string
- func (m *SquadMutation) ClearedFields() []string
- func (m SquadMutation) Client() *Client
- func (m *SquadMutation) CreatedAt() (r time.Time, exists bool)
- func (m *SquadMutation) CreatedBy() (r int64, exists bool)
- func (m *SquadMutation) DeletedAt() (r time.Time, exists bool)
- func (m *SquadMutation) EdgeCleared(name string) bool
- func (m *SquadMutation) Field(name string) (ent.Value, bool)
- func (m *SquadMutation) FieldCleared(name string) bool
- func (m *SquadMutation) Fields() []string
- func (m *SquadMutation) ID() (id int64, exists bool)
- func (m *SquadMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *SquadMutation) MissionCleared() bool
- func (m *SquadMutation) MissionID() (r int64, exists bool)
- func (m *SquadMutation) MissionIDs() (ids []int64)
- func (m *SquadMutation) OldActed(ctx context.Context) (v bool, err error)
- func (m *SquadMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SquadMutation) OldCreatedBy(ctx context.Context) (v int64, err error)
- func (m *SquadMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *SquadMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SquadMutation) OldMissionID(ctx context.Context) (v int64, err error)
- func (m *SquadMutation) OldRat(ctx context.Context) (v bool, err error)
- func (m *SquadMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SquadMutation) OldUpdatedBy(ctx context.Context) (v int64, err error)
- func (m *SquadMutation) OldUserID(ctx context.Context) (v int64, err error)
- func (m *SquadMutation) Op() Op
- func (m *SquadMutation) Rat() (r bool, exists bool)
- func (m *SquadMutation) RemovedEdges() []string
- func (m *SquadMutation) RemovedIDs(name string) []ent.Value
- func (m *SquadMutation) ResetActed()
- func (m *SquadMutation) ResetCreatedAt()
- func (m *SquadMutation) ResetCreatedBy()
- func (m *SquadMutation) ResetDeletedAt()
- func (m *SquadMutation) ResetEdge(name string) error
- func (m *SquadMutation) ResetField(name string) error
- func (m *SquadMutation) ResetMission()
- func (m *SquadMutation) ResetMissionID()
- func (m *SquadMutation) ResetRat()
- func (m *SquadMutation) ResetUpdatedAt()
- func (m *SquadMutation) ResetUpdatedBy()
- func (m *SquadMutation) ResetUserID()
- func (m *SquadMutation) SetActed(b bool)
- func (m *SquadMutation) SetCreatedAt(t time.Time)
- func (m *SquadMutation) SetCreatedBy(i int64)
- func (m *SquadMutation) SetDeletedAt(t time.Time)
- func (m *SquadMutation) SetField(name string, value ent.Value) error
- func (m *SquadMutation) SetID(id int64)
- func (m *SquadMutation) SetMissionID(i int64)
- func (m *SquadMutation) SetRat(b bool)
- func (m *SquadMutation) SetUpdatedAt(t time.Time)
- func (m *SquadMutation) SetUpdatedBy(i int64)
- func (m *SquadMutation) SetUserID(i int64)
- func (m SquadMutation) Tx() (*Tx, error)
- func (m *SquadMutation) Type() string
- func (m *SquadMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *SquadMutation) UpdatedBy() (r int64, exists bool)
- func (m *SquadMutation) UserID() (r int64, exists bool)
- func (m *SquadMutation) Where(ps ...predicate.Squad)
- type SquadOrder
- type SquadOrderField
- type SquadPaginateOption
- type SquadQuery
- func (sq *SquadQuery) Aggregate(fns ...AggregateFunc) *SquadSelect
- func (sq *SquadQuery) All(ctx context.Context) ([]*Squad, error)
- func (sq *SquadQuery) AllX(ctx context.Context) []*Squad
- func (sq *SquadQuery) Clone() *SquadQuery
- func (s *SquadQuery) CollectFields(ctx context.Context, satisfies ...string) (*SquadQuery, error)
- func (sq *SquadQuery) Count(ctx context.Context) (int, error)
- func (sq *SquadQuery) CountX(ctx context.Context) int
- func (sq *SquadQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SquadQuery) ExistX(ctx context.Context) bool
- func (sq *SquadQuery) First(ctx context.Context) (*Squad, error)
- func (sq *SquadQuery) FirstID(ctx context.Context) (id int64, err error)
- func (sq *SquadQuery) FirstIDX(ctx context.Context) int64
- func (sq *SquadQuery) FirstX(ctx context.Context) *Squad
- func (sq *SquadQuery) GroupBy(field string, fields ...string) *SquadGroupBy
- func (sq *SquadQuery) IDs(ctx context.Context) ([]int64, error)
- func (sq *SquadQuery) IDsX(ctx context.Context) []int64
- func (sq *SquadQuery) Limit(limit int) *SquadQuery
- func (sq *SquadQuery) Offset(offset int) *SquadQuery
- func (sq *SquadQuery) Only(ctx context.Context) (*Squad, error)
- func (sq *SquadQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (sq *SquadQuery) OnlyIDX(ctx context.Context) int64
- func (sq *SquadQuery) OnlyX(ctx context.Context) *Squad
- func (sq *SquadQuery) Order(o ...OrderFunc) *SquadQuery
- func (s *SquadQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*SquadConnection, error)
- func (sq *SquadQuery) QueryMission() *MissionQuery
- func (sq *SquadQuery) Select(fields ...string) *SquadSelect
- func (sq *SquadQuery) Unique(unique bool) *SquadQuery
- func (sq *SquadQuery) Where(ps ...predicate.Squad) *SquadQuery
- func (sq *SquadQuery) WithMission(opts ...func(*MissionQuery)) *SquadQuery
- type SquadSelect
- func (ss *SquadSelect) Aggregate(fns ...AggregateFunc) *SquadSelect
- func (s *SquadSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SquadSelect) BoolX(ctx context.Context) bool
- func (s *SquadSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SquadSelect) BoolsX(ctx context.Context) []bool
- func (s *SquadSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SquadSelect) Float64X(ctx context.Context) float64
- func (s *SquadSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SquadSelect) Float64sX(ctx context.Context) []float64
- func (s *SquadSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SquadSelect) IntX(ctx context.Context) int
- func (s *SquadSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SquadSelect) IntsX(ctx context.Context) []int
- func (ss *SquadSelect) Scan(ctx context.Context, v any) error
- func (s *SquadSelect) ScanX(ctx context.Context, v any)
- func (s *SquadSelect) String(ctx context.Context) (_ string, err error)
- func (s *SquadSelect) StringX(ctx context.Context) string
- func (s *SquadSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SquadSelect) StringsX(ctx context.Context) []string
- type SquadUpdate
- func (su *SquadUpdate) AddCreatedBy(i int64) *SquadUpdate
- func (su *SquadUpdate) AddUpdatedBy(i int64) *SquadUpdate
- func (su *SquadUpdate) AddUserID(i int64) *SquadUpdate
- func (su *SquadUpdate) ClearMission() *SquadUpdate
- func (su *SquadUpdate) Exec(ctx context.Context) error
- func (su *SquadUpdate) ExecX(ctx context.Context)
- func (su *SquadUpdate) Mutation() *SquadMutation
- func (su *SquadUpdate) Save(ctx context.Context) (int, error)
- func (su *SquadUpdate) SaveX(ctx context.Context) int
- func (su *SquadUpdate) SetActed(b bool) *SquadUpdate
- func (su *SquadUpdate) SetCreatedBy(i int64) *SquadUpdate
- func (su *SquadUpdate) SetDeletedAt(t time.Time) *SquadUpdate
- func (c *SquadUpdate) SetInput(i UpdateSquadInput) *SquadUpdate
- func (su *SquadUpdate) SetMission(m *Mission) *SquadUpdate
- func (su *SquadUpdate) SetMissionID(i int64) *SquadUpdate
- func (su *SquadUpdate) SetNillableActed(b *bool) *SquadUpdate
- func (su *SquadUpdate) SetNillableCreatedBy(i *int64) *SquadUpdate
- func (su *SquadUpdate) SetNillableDeletedAt(t *time.Time) *SquadUpdate
- func (su *SquadUpdate) SetNillableRat(b *bool) *SquadUpdate
- func (su *SquadUpdate) SetNillableUpdatedBy(i *int64) *SquadUpdate
- func (su *SquadUpdate) SetRat(b bool) *SquadUpdate
- func (su *SquadUpdate) SetUpdatedAt(t time.Time) *SquadUpdate
- func (su *SquadUpdate) SetUpdatedBy(i int64) *SquadUpdate
- func (su *SquadUpdate) SetUserID(i int64) *SquadUpdate
- func (su *SquadUpdate) Where(ps ...predicate.Squad) *SquadUpdate
- type SquadUpdateOne
- func (suo *SquadUpdateOne) AddCreatedBy(i int64) *SquadUpdateOne
- func (suo *SquadUpdateOne) AddUpdatedBy(i int64) *SquadUpdateOne
- func (suo *SquadUpdateOne) AddUserID(i int64) *SquadUpdateOne
- func (suo *SquadUpdateOne) ClearMission() *SquadUpdateOne
- func (suo *SquadUpdateOne) Exec(ctx context.Context) error
- func (suo *SquadUpdateOne) ExecX(ctx context.Context)
- func (suo *SquadUpdateOne) Mutation() *SquadMutation
- func (suo *SquadUpdateOne) Save(ctx context.Context) (*Squad, error)
- func (suo *SquadUpdateOne) SaveX(ctx context.Context) *Squad
- func (suo *SquadUpdateOne) Select(field string, fields ...string) *SquadUpdateOne
- func (suo *SquadUpdateOne) SetActed(b bool) *SquadUpdateOne
- func (suo *SquadUpdateOne) SetCreatedBy(i int64) *SquadUpdateOne
- func (suo *SquadUpdateOne) SetDeletedAt(t time.Time) *SquadUpdateOne
- func (c *SquadUpdateOne) SetInput(i UpdateSquadInput) *SquadUpdateOne
- func (suo *SquadUpdateOne) SetMission(m *Mission) *SquadUpdateOne
- func (suo *SquadUpdateOne) SetMissionID(i int64) *SquadUpdateOne
- func (suo *SquadUpdateOne) SetNillableActed(b *bool) *SquadUpdateOne
- func (suo *SquadUpdateOne) SetNillableCreatedBy(i *int64) *SquadUpdateOne
- func (suo *SquadUpdateOne) SetNillableDeletedAt(t *time.Time) *SquadUpdateOne
- func (suo *SquadUpdateOne) SetNillableRat(b *bool) *SquadUpdateOne
- func (suo *SquadUpdateOne) SetNillableUpdatedBy(i *int64) *SquadUpdateOne
- func (suo *SquadUpdateOne) SetRat(b bool) *SquadUpdateOne
- func (suo *SquadUpdateOne) SetUpdatedAt(t time.Time) *SquadUpdateOne
- func (suo *SquadUpdateOne) SetUpdatedBy(i int64) *SquadUpdateOne
- func (suo *SquadUpdateOne) SetUserID(i int64) *SquadUpdateOne
- type SquadWhereInput
- type Squads
- type Tx
- type UpdateCardInput
- type UpdateGameInput
- type UpdateGameUserInput
- type UpdateMissionInput
- type UpdateRecordInput
- type UpdateRoomInput
- type UpdateRoomUserInput
- type UpdateSquadInput
- type UpdateVoteInput
- type ValidationError
- type Value
- type Vote
- func (v Vote) IsEntity()
- func (v *Vote) Mission(ctx context.Context) (*Mission, error)
- func (v *Vote) Node(ctx context.Context) (node *Node, err error)
- func (v *Vote) QueryMission() *MissionQuery
- func (v *Vote) String() string
- func (v *Vote) ToEdge(order *VoteOrder) *VoteEdge
- func (v *Vote) Unwrap() *Vote
- func (v *Vote) Update() *VoteUpdateOne
- type VoteClient
- func (c *VoteClient) Create() *VoteCreate
- func (c *VoteClient) CreateBulk(builders ...*VoteCreate) *VoteCreateBulk
- func (c *VoteClient) Delete() *VoteDelete
- func (c *VoteClient) DeleteOne(v *Vote) *VoteDeleteOne
- func (c *VoteClient) DeleteOneID(id int64) *VoteDeleteOne
- func (c *VoteClient) Get(ctx context.Context, id int64) (*Vote, error)
- func (c *VoteClient) GetX(ctx context.Context, id int64) *Vote
- func (c *VoteClient) Hooks() []Hook
- func (c *VoteClient) Query() *VoteQuery
- func (c *VoteClient) QueryMission(v *Vote) *MissionQuery
- func (c *VoteClient) Update() *VoteUpdate
- func (c *VoteClient) UpdateOne(v *Vote) *VoteUpdateOne
- func (c *VoteClient) UpdateOneID(id int64) *VoteUpdateOne
- func (c *VoteClient) Use(hooks ...Hook)
- type VoteConnection
- type VoteCreate
- func (vc *VoteCreate) Exec(ctx context.Context) error
- func (vc *VoteCreate) ExecX(ctx context.Context)
- func (vc *VoteCreate) Mutation() *VoteMutation
- func (vc *VoteCreate) Save(ctx context.Context) (*Vote, error)
- func (vc *VoteCreate) SaveX(ctx context.Context) *Vote
- func (vc *VoteCreate) SetCreatedAt(t time.Time) *VoteCreate
- func (vc *VoteCreate) SetCreatedBy(i int64) *VoteCreate
- func (vc *VoteCreate) SetDeletedAt(t time.Time) *VoteCreate
- func (vc *VoteCreate) SetID(i int64) *VoteCreate
- func (c *VoteCreate) SetInput(i CreateVoteInput) *VoteCreate
- func (vc *VoteCreate) SetMission(m *Mission) *VoteCreate
- func (vc *VoteCreate) SetMissionID(i int64) *VoteCreate
- func (vc *VoteCreate) SetNillableCreatedAt(t *time.Time) *VoteCreate
- func (vc *VoteCreate) SetNillableCreatedBy(i *int64) *VoteCreate
- func (vc *VoteCreate) SetNillableDeletedAt(t *time.Time) *VoteCreate
- func (vc *VoteCreate) SetNillableID(i *int64) *VoteCreate
- func (vc *VoteCreate) SetNillablePass(b *bool) *VoteCreate
- func (vc *VoteCreate) SetNillableUpdatedAt(t *time.Time) *VoteCreate
- func (vc *VoteCreate) SetNillableUpdatedBy(i *int64) *VoteCreate
- func (vc *VoteCreate) SetNillableVoted(b *bool) *VoteCreate
- func (vc *VoteCreate) SetPass(b bool) *VoteCreate
- func (vc *VoteCreate) SetUpdatedAt(t time.Time) *VoteCreate
- func (vc *VoteCreate) SetUpdatedBy(i int64) *VoteCreate
- func (vc *VoteCreate) SetUserID(i int64) *VoteCreate
- func (vc *VoteCreate) SetVoted(b bool) *VoteCreate
- type VoteCreateBulk
- type VoteDelete
- type VoteDeleteOne
- type VoteEdge
- type VoteEdges
- type VoteGroupBy
- func (vgb *VoteGroupBy) Aggregate(fns ...AggregateFunc) *VoteGroupBy
- func (s *VoteGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *VoteGroupBy) BoolX(ctx context.Context) bool
- func (s *VoteGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *VoteGroupBy) BoolsX(ctx context.Context) []bool
- func (s *VoteGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *VoteGroupBy) Float64X(ctx context.Context) float64
- func (s *VoteGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *VoteGroupBy) Float64sX(ctx context.Context) []float64
- func (s *VoteGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *VoteGroupBy) IntX(ctx context.Context) int
- func (s *VoteGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *VoteGroupBy) IntsX(ctx context.Context) []int
- func (vgb *VoteGroupBy) Scan(ctx context.Context, v any) error
- func (s *VoteGroupBy) ScanX(ctx context.Context, v any)
- func (s *VoteGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *VoteGroupBy) StringX(ctx context.Context) string
- func (s *VoteGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *VoteGroupBy) StringsX(ctx context.Context) []string
- type VoteMutation
- func (m *VoteMutation) AddCreatedBy(i int64)
- func (m *VoteMutation) AddField(name string, value ent.Value) error
- func (m *VoteMutation) AddUpdatedBy(i int64)
- func (m *VoteMutation) AddUserID(i int64)
- func (m *VoteMutation) AddedCreatedBy() (r int64, exists bool)
- func (m *VoteMutation) AddedEdges() []string
- func (m *VoteMutation) AddedField(name string) (ent.Value, bool)
- func (m *VoteMutation) AddedFields() []string
- func (m *VoteMutation) AddedIDs(name string) []ent.Value
- func (m *VoteMutation) AddedUpdatedBy() (r int64, exists bool)
- func (m *VoteMutation) AddedUserID() (r int64, exists bool)
- func (m *VoteMutation) ClearEdge(name string) error
- func (m *VoteMutation) ClearField(name string) error
- func (m *VoteMutation) ClearMission()
- func (m *VoteMutation) ClearedEdges() []string
- func (m *VoteMutation) ClearedFields() []string
- func (m VoteMutation) Client() *Client
- func (m *VoteMutation) CreatedAt() (r time.Time, exists bool)
- func (m *VoteMutation) CreatedBy() (r int64, exists bool)
- func (m *VoteMutation) DeletedAt() (r time.Time, exists bool)
- func (m *VoteMutation) EdgeCleared(name string) bool
- func (m *VoteMutation) Field(name string) (ent.Value, bool)
- func (m *VoteMutation) FieldCleared(name string) bool
- func (m *VoteMutation) Fields() []string
- func (m *VoteMutation) ID() (id int64, exists bool)
- func (m *VoteMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *VoteMutation) MissionCleared() bool
- func (m *VoteMutation) MissionID() (r int64, exists bool)
- func (m *VoteMutation) MissionIDs() (ids []int64)
- func (m *VoteMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *VoteMutation) OldCreatedBy(ctx context.Context) (v int64, err error)
- func (m *VoteMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *VoteMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *VoteMutation) OldMissionID(ctx context.Context) (v int64, err error)
- func (m *VoteMutation) OldPass(ctx context.Context) (v bool, err error)
- func (m *VoteMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *VoteMutation) OldUpdatedBy(ctx context.Context) (v int64, err error)
- func (m *VoteMutation) OldUserID(ctx context.Context) (v int64, err error)
- func (m *VoteMutation) OldVoted(ctx context.Context) (v bool, err error)
- func (m *VoteMutation) Op() Op
- func (m *VoteMutation) Pass() (r bool, exists bool)
- func (m *VoteMutation) RemovedEdges() []string
- func (m *VoteMutation) RemovedIDs(name string) []ent.Value
- func (m *VoteMutation) ResetCreatedAt()
- func (m *VoteMutation) ResetCreatedBy()
- func (m *VoteMutation) ResetDeletedAt()
- func (m *VoteMutation) ResetEdge(name string) error
- func (m *VoteMutation) ResetField(name string) error
- func (m *VoteMutation) ResetMission()
- func (m *VoteMutation) ResetMissionID()
- func (m *VoteMutation) ResetPass()
- func (m *VoteMutation) ResetUpdatedAt()
- func (m *VoteMutation) ResetUpdatedBy()
- func (m *VoteMutation) ResetUserID()
- func (m *VoteMutation) ResetVoted()
- func (m *VoteMutation) SetCreatedAt(t time.Time)
- func (m *VoteMutation) SetCreatedBy(i int64)
- func (m *VoteMutation) SetDeletedAt(t time.Time)
- func (m *VoteMutation) SetField(name string, value ent.Value) error
- func (m *VoteMutation) SetID(id int64)
- func (m *VoteMutation) SetMissionID(i int64)
- func (m *VoteMutation) SetPass(b bool)
- func (m *VoteMutation) SetUpdatedAt(t time.Time)
- func (m *VoteMutation) SetUpdatedBy(i int64)
- func (m *VoteMutation) SetUserID(i int64)
- func (m *VoteMutation) SetVoted(b bool)
- func (m VoteMutation) Tx() (*Tx, error)
- func (m *VoteMutation) Type() string
- func (m *VoteMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *VoteMutation) UpdatedBy() (r int64, exists bool)
- func (m *VoteMutation) UserID() (r int64, exists bool)
- func (m *VoteMutation) Voted() (r bool, exists bool)
- func (m *VoteMutation) Where(ps ...predicate.Vote)
- type VoteOrder
- type VoteOrderField
- type VotePaginateOption
- type VoteQuery
- func (vq *VoteQuery) Aggregate(fns ...AggregateFunc) *VoteSelect
- func (vq *VoteQuery) All(ctx context.Context) ([]*Vote, error)
- func (vq *VoteQuery) AllX(ctx context.Context) []*Vote
- func (vq *VoteQuery) Clone() *VoteQuery
- func (v *VoteQuery) CollectFields(ctx context.Context, satisfies ...string) (*VoteQuery, error)
- func (vq *VoteQuery) Count(ctx context.Context) (int, error)
- func (vq *VoteQuery) CountX(ctx context.Context) int
- func (vq *VoteQuery) Exist(ctx context.Context) (bool, error)
- func (vq *VoteQuery) ExistX(ctx context.Context) bool
- func (vq *VoteQuery) First(ctx context.Context) (*Vote, error)
- func (vq *VoteQuery) FirstID(ctx context.Context) (id int64, err error)
- func (vq *VoteQuery) FirstIDX(ctx context.Context) int64
- func (vq *VoteQuery) FirstX(ctx context.Context) *Vote
- func (vq *VoteQuery) GroupBy(field string, fields ...string) *VoteGroupBy
- func (vq *VoteQuery) IDs(ctx context.Context) ([]int64, error)
- func (vq *VoteQuery) IDsX(ctx context.Context) []int64
- func (vq *VoteQuery) Limit(limit int) *VoteQuery
- func (vq *VoteQuery) Offset(offset int) *VoteQuery
- func (vq *VoteQuery) Only(ctx context.Context) (*Vote, error)
- func (vq *VoteQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (vq *VoteQuery) OnlyIDX(ctx context.Context) int64
- func (vq *VoteQuery) OnlyX(ctx context.Context) *Vote
- func (vq *VoteQuery) Order(o ...OrderFunc) *VoteQuery
- func (v *VoteQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*VoteConnection, error)
- func (vq *VoteQuery) QueryMission() *MissionQuery
- func (vq *VoteQuery) Select(fields ...string) *VoteSelect
- func (vq *VoteQuery) Unique(unique bool) *VoteQuery
- func (vq *VoteQuery) Where(ps ...predicate.Vote) *VoteQuery
- func (vq *VoteQuery) WithMission(opts ...func(*MissionQuery)) *VoteQuery
- type VoteSelect
- func (vs *VoteSelect) Aggregate(fns ...AggregateFunc) *VoteSelect
- func (s *VoteSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *VoteSelect) BoolX(ctx context.Context) bool
- func (s *VoteSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *VoteSelect) BoolsX(ctx context.Context) []bool
- func (s *VoteSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *VoteSelect) Float64X(ctx context.Context) float64
- func (s *VoteSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *VoteSelect) Float64sX(ctx context.Context) []float64
- func (s *VoteSelect) Int(ctx context.Context) (_ int, err error)
- func (s *VoteSelect) IntX(ctx context.Context) int
- func (s *VoteSelect) Ints(ctx context.Context) ([]int, error)
- func (s *VoteSelect) IntsX(ctx context.Context) []int
- func (vs *VoteSelect) Scan(ctx context.Context, v any) error
- func (s *VoteSelect) ScanX(ctx context.Context, v any)
- func (s *VoteSelect) String(ctx context.Context) (_ string, err error)
- func (s *VoteSelect) StringX(ctx context.Context) string
- func (s *VoteSelect) Strings(ctx context.Context) ([]string, error)
- func (s *VoteSelect) StringsX(ctx context.Context) []string
- type VoteUpdate
- func (vu *VoteUpdate) AddCreatedBy(i int64) *VoteUpdate
- func (vu *VoteUpdate) AddUpdatedBy(i int64) *VoteUpdate
- func (vu *VoteUpdate) AddUserID(i int64) *VoteUpdate
- func (vu *VoteUpdate) ClearMission() *VoteUpdate
- func (vu *VoteUpdate) Exec(ctx context.Context) error
- func (vu *VoteUpdate) ExecX(ctx context.Context)
- func (vu *VoteUpdate) Mutation() *VoteMutation
- func (vu *VoteUpdate) Save(ctx context.Context) (int, error)
- func (vu *VoteUpdate) SaveX(ctx context.Context) int
- func (vu *VoteUpdate) SetCreatedBy(i int64) *VoteUpdate
- func (vu *VoteUpdate) SetDeletedAt(t time.Time) *VoteUpdate
- func (c *VoteUpdate) SetInput(i UpdateVoteInput) *VoteUpdate
- func (vu *VoteUpdate) SetMission(m *Mission) *VoteUpdate
- func (vu *VoteUpdate) SetMissionID(i int64) *VoteUpdate
- func (vu *VoteUpdate) SetNillableCreatedBy(i *int64) *VoteUpdate
- func (vu *VoteUpdate) SetNillableDeletedAt(t *time.Time) *VoteUpdate
- func (vu *VoteUpdate) SetNillablePass(b *bool) *VoteUpdate
- func (vu *VoteUpdate) SetNillableUpdatedBy(i *int64) *VoteUpdate
- func (vu *VoteUpdate) SetNillableVoted(b *bool) *VoteUpdate
- func (vu *VoteUpdate) SetPass(b bool) *VoteUpdate
- func (vu *VoteUpdate) SetUpdatedAt(t time.Time) *VoteUpdate
- func (vu *VoteUpdate) SetUpdatedBy(i int64) *VoteUpdate
- func (vu *VoteUpdate) SetUserID(i int64) *VoteUpdate
- func (vu *VoteUpdate) SetVoted(b bool) *VoteUpdate
- func (vu *VoteUpdate) Where(ps ...predicate.Vote) *VoteUpdate
- type VoteUpdateOne
- func (vuo *VoteUpdateOne) AddCreatedBy(i int64) *VoteUpdateOne
- func (vuo *VoteUpdateOne) AddUpdatedBy(i int64) *VoteUpdateOne
- func (vuo *VoteUpdateOne) AddUserID(i int64) *VoteUpdateOne
- func (vuo *VoteUpdateOne) ClearMission() *VoteUpdateOne
- func (vuo *VoteUpdateOne) Exec(ctx context.Context) error
- func (vuo *VoteUpdateOne) ExecX(ctx context.Context)
- func (vuo *VoteUpdateOne) Mutation() *VoteMutation
- func (vuo *VoteUpdateOne) Save(ctx context.Context) (*Vote, error)
- func (vuo *VoteUpdateOne) SaveX(ctx context.Context) *Vote
- func (vuo *VoteUpdateOne) Select(field string, fields ...string) *VoteUpdateOne
- func (vuo *VoteUpdateOne) SetCreatedBy(i int64) *VoteUpdateOne
- func (vuo *VoteUpdateOne) SetDeletedAt(t time.Time) *VoteUpdateOne
- func (c *VoteUpdateOne) SetInput(i UpdateVoteInput) *VoteUpdateOne
- func (vuo *VoteUpdateOne) SetMission(m *Mission) *VoteUpdateOne
- func (vuo *VoteUpdateOne) SetMissionID(i int64) *VoteUpdateOne
- func (vuo *VoteUpdateOne) SetNillableCreatedBy(i *int64) *VoteUpdateOne
- func (vuo *VoteUpdateOne) SetNillableDeletedAt(t *time.Time) *VoteUpdateOne
- func (vuo *VoteUpdateOne) SetNillablePass(b *bool) *VoteUpdateOne
- func (vuo *VoteUpdateOne) SetNillableUpdatedBy(i *int64) *VoteUpdateOne
- func (vuo *VoteUpdateOne) SetNillableVoted(b *bool) *VoteUpdateOne
- func (vuo *VoteUpdateOne) SetPass(b bool) *VoteUpdateOne
- func (vuo *VoteUpdateOne) SetUpdatedAt(t time.Time) *VoteUpdateOne
- func (vuo *VoteUpdateOne) SetUpdatedBy(i int64) *VoteUpdateOne
- func (vuo *VoteUpdateOne) SetUserID(i int64) *VoteUpdateOne
- func (vuo *VoteUpdateOne) SetVoted(b bool) *VoteUpdateOne
- type VoteWhereInput
- type Votes
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeCard = "Card" TypeGame = "Game" TypeGameUser = "GameUser" TypeMission = "Mission" TypeRecord = "Record" TypeRoom = "Room" TypeRoomUser = "RoomUser" TypeSquad = "Squad" TypeVote = "Vote" )
Variables ¶
var ( // CardOrderFieldCreatedAt orders Card by created_at. CardOrderFieldCreatedAt = &CardOrderField{ field: card.FieldCreatedAt, toCursor: func(c *Card) Cursor { return Cursor{ ID: c.ID, Value: c.CreatedAt, } }, } // CardOrderFieldUpdatedAt orders Card by updated_at. CardOrderFieldUpdatedAt = &CardOrderField{ field: card.FieldUpdatedAt, toCursor: func(c *Card) Cursor { return Cursor{ ID: c.ID, Value: c.UpdatedAt, } }, } // CardOrderFieldDeletedAt orders Card by deleted_at. CardOrderFieldDeletedAt = &CardOrderField{ field: card.FieldDeletedAt, toCursor: func(c *Card) Cursor { return Cursor{ ID: c.ID, Value: c.DeletedAt, } }, } // CardOrderFieldName orders Card by name. CardOrderFieldName = &CardOrderField{ field: card.FieldName, toCursor: func(c *Card) Cursor { return Cursor{ ID: c.ID, Value: c.Name, } }, } )
var ( // GameOrderFieldCreatedAt orders Game by created_at. GameOrderFieldCreatedAt = &GameOrderField{ field: game.FieldCreatedAt, toCursor: func(ga *Game) Cursor { return Cursor{ ID: ga.ID, Value: ga.CreatedAt, } }, } // GameOrderFieldUpdatedAt orders Game by updated_at. GameOrderFieldUpdatedAt = &GameOrderField{ field: game.FieldUpdatedAt, toCursor: func(ga *Game) Cursor { return Cursor{ ID: ga.ID, Value: ga.UpdatedAt, } }, } // GameOrderFieldDeletedAt orders Game by deleted_at. GameOrderFieldDeletedAt = &GameOrderField{ field: game.FieldDeletedAt, toCursor: func(ga *Game) Cursor { return Cursor{ ID: ga.ID, Value: ga.DeletedAt, } }, } )
var ( // GameUserOrderFieldCreatedAt orders GameUser by created_at. GameUserOrderFieldCreatedAt = &GameUserOrderField{ field: gameuser.FieldCreatedAt, toCursor: func(gu *GameUser) Cursor { return Cursor{ ID: gu.ID, Value: gu.CreatedAt, } }, } // GameUserOrderFieldUpdatedAt orders GameUser by updated_at. GameUserOrderFieldUpdatedAt = &GameUserOrderField{ field: gameuser.FieldUpdatedAt, toCursor: func(gu *GameUser) Cursor { return Cursor{ ID: gu.ID, Value: gu.UpdatedAt, } }, } // GameUserOrderFieldDeletedAt orders GameUser by deleted_at. GameUserOrderFieldDeletedAt = &GameUserOrderField{ field: gameuser.FieldDeletedAt, toCursor: func(gu *GameUser) Cursor { return Cursor{ ID: gu.ID, Value: gu.DeletedAt, } }, } )
var ( // MissionOrderFieldCreatedAt orders Mission by created_at. MissionOrderFieldCreatedAt = &MissionOrderField{ field: mission.FieldCreatedAt, toCursor: func(m *Mission) Cursor { return Cursor{ ID: m.ID, Value: m.CreatedAt, } }, } // MissionOrderFieldUpdatedAt orders Mission by updated_at. MissionOrderFieldUpdatedAt = &MissionOrderField{ field: mission.FieldUpdatedAt, toCursor: func(m *Mission) Cursor { return Cursor{ ID: m.ID, Value: m.UpdatedAt, } }, } // MissionOrderFieldDeletedAt orders Mission by deleted_at. MissionOrderFieldDeletedAt = &MissionOrderField{ field: mission.FieldDeletedAt, toCursor: func(m *Mission) Cursor { return Cursor{ ID: m.ID, Value: m.DeletedAt, } }, } )
var ( // RecordOrderFieldCreatedAt orders Record by created_at. RecordOrderFieldCreatedAt = &RecordOrderField{ field: record.FieldCreatedAt, toCursor: func(r *Record) Cursor { return Cursor{ ID: r.ID, Value: r.CreatedAt, } }, } // RecordOrderFieldUpdatedAt orders Record by updated_at. RecordOrderFieldUpdatedAt = &RecordOrderField{ field: record.FieldUpdatedAt, toCursor: func(r *Record) Cursor { return Cursor{ ID: r.ID, Value: r.UpdatedAt, } }, } // RecordOrderFieldDeletedAt orders Record by deleted_at. RecordOrderFieldDeletedAt = &RecordOrderField{ field: record.FieldDeletedAt, toCursor: func(r *Record) Cursor { return Cursor{ ID: r.ID, Value: r.DeletedAt, } }, } )
var ( // RoomOrderFieldCreatedAt orders Room by created_at. RoomOrderFieldCreatedAt = &RoomOrderField{ field: room.FieldCreatedAt, toCursor: func(r *Room) Cursor { return Cursor{ ID: r.ID, Value: r.CreatedAt, } }, } // RoomOrderFieldUpdatedAt orders Room by updated_at. RoomOrderFieldUpdatedAt = &RoomOrderField{ field: room.FieldUpdatedAt, toCursor: func(r *Room) Cursor { return Cursor{ ID: r.ID, Value: r.UpdatedAt, } }, } // RoomOrderFieldDeletedAt orders Room by deleted_at. RoomOrderFieldDeletedAt = &RoomOrderField{ field: room.FieldDeletedAt, toCursor: func(r *Room) Cursor { return Cursor{ ID: r.ID, Value: r.DeletedAt, } }, } // RoomOrderFieldName orders Room by name. RoomOrderFieldName = &RoomOrderField{ field: room.FieldName, toCursor: func(r *Room) Cursor { return Cursor{ ID: r.ID, Value: r.Name, } }, } )
var ( // RoomUserOrderFieldCreatedAt orders RoomUser by created_at. RoomUserOrderFieldCreatedAt = &RoomUserOrderField{ field: roomuser.FieldCreatedAt, toCursor: func(ru *RoomUser) Cursor { return Cursor{ ID: ru.ID, Value: ru.CreatedAt, } }, } // RoomUserOrderFieldUpdatedAt orders RoomUser by updated_at. RoomUserOrderFieldUpdatedAt = &RoomUserOrderField{ field: roomuser.FieldUpdatedAt, toCursor: func(ru *RoomUser) Cursor { return Cursor{ ID: ru.ID, Value: ru.UpdatedAt, } }, } // RoomUserOrderFieldDeletedAt orders RoomUser by deleted_at. RoomUserOrderFieldDeletedAt = &RoomUserOrderField{ field: roomuser.FieldDeletedAt, toCursor: func(ru *RoomUser) Cursor { return Cursor{ ID: ru.ID, Value: ru.DeletedAt, } }, } )
var ( // SquadOrderFieldCreatedAt orders Squad by created_at. SquadOrderFieldCreatedAt = &SquadOrderField{ field: squad.FieldCreatedAt, toCursor: func(s *Squad) Cursor { return Cursor{ ID: s.ID, Value: s.CreatedAt, } }, } // SquadOrderFieldUpdatedAt orders Squad by updated_at. SquadOrderFieldUpdatedAt = &SquadOrderField{ field: squad.FieldUpdatedAt, toCursor: func(s *Squad) Cursor { return Cursor{ ID: s.ID, Value: s.UpdatedAt, } }, } // SquadOrderFieldDeletedAt orders Squad by deleted_at. SquadOrderFieldDeletedAt = &SquadOrderField{ field: squad.FieldDeletedAt, toCursor: func(s *Squad) Cursor { return Cursor{ ID: s.ID, Value: s.DeletedAt, } }, } )
var ( // VoteOrderFieldCreatedAt orders Vote by created_at. VoteOrderFieldCreatedAt = &VoteOrderField{ field: vote.FieldCreatedAt, toCursor: func(v *Vote) Cursor { return Cursor{ ID: v.ID, Value: v.CreatedAt, } }, } // VoteOrderFieldUpdatedAt orders Vote by updated_at. VoteOrderFieldUpdatedAt = &VoteOrderField{ field: vote.FieldUpdatedAt, toCursor: func(v *Vote) Cursor { return Cursor{ ID: v.ID, Value: v.UpdatedAt, } }, } // VoteOrderFieldDeletedAt orders Vote by deleted_at. VoteOrderFieldDeletedAt = &VoteOrderField{ field: vote.FieldDeletedAt, toCursor: func(v *Vote) Cursor { return Cursor{ ID: v.ID, Value: v.DeletedAt, } }, } )
var DefaultCardOrder = &CardOrder{ Direction: OrderDirectionAsc, Field: &CardOrderField{ field: card.FieldID, toCursor: func(c *Card) Cursor { return Cursor{ID: c.ID} }, }, }
DefaultCardOrder is the default ordering of Card.
var DefaultGameOrder = &GameOrder{ Direction: OrderDirectionAsc, Field: &GameOrderField{ field: game.FieldID, toCursor: func(ga *Game) Cursor { return Cursor{ID: ga.ID} }, }, }
DefaultGameOrder is the default ordering of Game.
var DefaultGameUserOrder = &GameUserOrder{ Direction: OrderDirectionAsc, Field: &GameUserOrderField{ field: gameuser.FieldID, toCursor: func(gu *GameUser) Cursor { return Cursor{ID: gu.ID} }, }, }
DefaultGameUserOrder is the default ordering of GameUser.
var DefaultMissionOrder = &MissionOrder{ Direction: OrderDirectionAsc, Field: &MissionOrderField{ field: mission.FieldID, toCursor: func(m *Mission) Cursor { return Cursor{ID: m.ID} }, }, }
DefaultMissionOrder is the default ordering of Mission.
var DefaultRecordOrder = &RecordOrder{ Direction: OrderDirectionAsc, Field: &RecordOrderField{ field: record.FieldID, toCursor: func(r *Record) Cursor { return Cursor{ID: r.ID} }, }, }
DefaultRecordOrder is the default ordering of Record.
var DefaultRoomOrder = &RoomOrder{ Direction: OrderDirectionAsc, Field: &RoomOrderField{ field: room.FieldID, toCursor: func(r *Room) Cursor { return Cursor{ID: r.ID} }, }, }
DefaultRoomOrder is the default ordering of Room.
var DefaultRoomUserOrder = &RoomUserOrder{ Direction: OrderDirectionAsc, Field: &RoomUserOrderField{ field: roomuser.FieldID, toCursor: func(ru *RoomUser) Cursor { return Cursor{ID: ru.ID} }, }, }
DefaultRoomUserOrder is the default ordering of RoomUser.
var DefaultSquadOrder = &SquadOrder{ Direction: OrderDirectionAsc, Field: &SquadOrderField{ field: squad.FieldID, toCursor: func(s *Squad) Cursor { return Cursor{ID: s.ID} }, }, }
DefaultSquadOrder is the default ordering of Squad.
var DefaultVoteOrder = &VoteOrder{ Direction: OrderDirectionAsc, Field: &VoteOrderField{ field: vote.FieldID, toCursor: func(v *Vote) Cursor { return Cursor{ID: v.ID} }, }, }
DefaultVoteOrder is the default ordering of Vote.
var ErrEmptyCardWhereInput = errors.New("ent: empty predicate CardWhereInput")
ErrEmptyCardWhereInput is returned in case the CardWhereInput is empty.
var ErrEmptyGameUserWhereInput = errors.New("ent: empty predicate GameUserWhereInput")
ErrEmptyGameUserWhereInput is returned in case the GameUserWhereInput is empty.
var ErrEmptyGameWhereInput = errors.New("ent: empty predicate GameWhereInput")
ErrEmptyGameWhereInput is returned in case the GameWhereInput is empty.
var ErrEmptyMissionWhereInput = errors.New("ent: empty predicate MissionWhereInput")
ErrEmptyMissionWhereInput is returned in case the MissionWhereInput is empty.
var ErrEmptyRecordWhereInput = errors.New("ent: empty predicate RecordWhereInput")
ErrEmptyRecordWhereInput is returned in case the RecordWhereInput is empty.
var ErrEmptyRoomUserWhereInput = errors.New("ent: empty predicate RoomUserWhereInput")
ErrEmptyRoomUserWhereInput is returned in case the RoomUserWhereInput is empty.
var ErrEmptyRoomWhereInput = errors.New("ent: empty predicate RoomWhereInput")
ErrEmptyRoomWhereInput is returned in case the RoomWhereInput is empty.
var ErrEmptySquadWhereInput = errors.New("ent: empty predicate SquadWhereInput")
ErrEmptySquadWhereInput is returned in case the SquadWhereInput is empty.
var ErrEmptyVoteWhereInput = errors.New("ent: empty predicate VoteWhereInput")
ErrEmptyVoteWhereInput is returned in case the VoteWhereInput 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.
func NewTxContext ¶
NewTxContext returns a new context with the given Tx 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 Card ¶
type Card struct { // ID of the ent. ID int64 `json:"id,omitempty"` // CreatedBy holds the value of the "created_by" field. CreatedBy int64 `json:"created_by"` // UpdatedBy holds the value of the "updated_by" field. UpdatedBy int64 `json:"updated_by"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt time.Time `json:"deleted_at"` // 名称 Name card.Name `json:"name"` // 角色 Role card.Role `json:"role"` // 故事 Tale string `json:"tale"` // 是否属于红方 Red bool `json:"red"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the CardQuery when eager-loading is set. Edges CardEdges `json:"edges"` // contains filtered or unexported fields }
Card is the model entity for the Card schema.
func (*Card) NamedGameUsers ¶
NamedGameUsers returns the GameUsers named value or an error if the edge was not loaded in eager-loading with this name.
func (*Card) QueryGameUsers ¶
func (c *Card) QueryGameUsers() *GameUserQuery
QueryGameUsers queries the "game_users" edge of the Card entity.
func (*Card) Unwrap ¶
Unwrap unwraps the Card 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 (*Card) Update ¶
func (c *Card) Update() *CardUpdateOne
Update returns a builder for updating this Card. Note that you need to call Card.Unwrap() before calling this method if this Card was returned from a transaction, and the transaction was committed or rolled back.
type CardClient ¶
type CardClient struct {
// contains filtered or unexported fields
}
CardClient is a client for the Card schema.
func NewCardClient ¶
func NewCardClient(c config) *CardClient
NewCardClient returns a client for the Card from the given config.
func (*CardClient) Create ¶
func (c *CardClient) Create() *CardCreate
Create returns a builder for creating a Card entity.
func (*CardClient) CreateBulk ¶
func (c *CardClient) CreateBulk(builders ...*CardCreate) *CardCreateBulk
CreateBulk returns a builder for creating a bulk of Card entities.
func (*CardClient) Delete ¶
func (c *CardClient) Delete() *CardDelete
Delete returns a delete builder for Card.
func (*CardClient) DeleteOne ¶
func (c *CardClient) DeleteOne(ca *Card) *CardDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CardClient) DeleteOneID ¶
func (c *CardClient) DeleteOneID(id int64) *CardDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CardClient) GetX ¶
func (c *CardClient) GetX(ctx context.Context, id int64) *Card
GetX is like Get, but panics if an error occurs.
func (*CardClient) Query ¶
func (c *CardClient) Query() *CardQuery
Query returns a query builder for Card.
func (*CardClient) QueryGameUsers ¶
func (c *CardClient) QueryGameUsers(ca *Card) *GameUserQuery
QueryGameUsers queries the game_users edge of a Card.
func (*CardClient) Update ¶
func (c *CardClient) Update() *CardUpdate
Update returns an update builder for Card.
func (*CardClient) UpdateOne ¶
func (c *CardClient) UpdateOne(ca *Card) *CardUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CardClient) UpdateOneID ¶
func (c *CardClient) UpdateOneID(id int64) *CardUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CardClient) Use ¶
func (c *CardClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `card.Hooks(f(g(h())))`.
type CardConnection ¶
type CardConnection struct { Edges []*CardEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
CardConnection is the connection containing edges to Card.
type CardCreate ¶
type CardCreate struct {
// contains filtered or unexported fields
}
CardCreate is the builder for creating a Card entity.
func (*CardCreate) AddGameUserIDs ¶
func (cc *CardCreate) AddGameUserIDs(ids ...int64) *CardCreate
AddGameUserIDs adds the "game_users" edge to the GameUser entity by IDs.
func (*CardCreate) AddGameUsers ¶
func (cc *CardCreate) AddGameUsers(g ...*GameUser) *CardCreate
AddGameUsers adds the "game_users" edges to the GameUser entity.
func (*CardCreate) Exec ¶
func (cc *CardCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CardCreate) ExecX ¶
func (cc *CardCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CardCreate) Mutation ¶
func (cc *CardCreate) Mutation() *CardMutation
Mutation returns the CardMutation object of the builder.
func (*CardCreate) Save ¶
func (cc *CardCreate) Save(ctx context.Context) (*Card, error)
Save creates the Card in the database.
func (*CardCreate) SaveX ¶
func (cc *CardCreate) SaveX(ctx context.Context) *Card
SaveX calls Save and panics if Save returns an error.
func (*CardCreate) SetCreatedAt ¶
func (cc *CardCreate) SetCreatedAt(t time.Time) *CardCreate
SetCreatedAt sets the "created_at" field.
func (*CardCreate) SetCreatedBy ¶
func (cc *CardCreate) SetCreatedBy(i int64) *CardCreate
SetCreatedBy sets the "created_by" field.
func (*CardCreate) SetDeletedAt ¶
func (cc *CardCreate) SetDeletedAt(t time.Time) *CardCreate
SetDeletedAt sets the "deleted_at" field.
func (*CardCreate) SetID ¶
func (cc *CardCreate) SetID(i int64) *CardCreate
SetID sets the "id" field.
func (*CardCreate) SetInput ¶
func (c *CardCreate) SetInput(i CreateCardInput) *CardCreate
SetInput applies the change-set in the CreateCardInput on the CardCreate builder.
func (*CardCreate) SetName ¶
func (cc *CardCreate) SetName(c card.Name) *CardCreate
SetName sets the "name" field.
func (*CardCreate) SetNillableCreatedAt ¶
func (cc *CardCreate) SetNillableCreatedAt(t *time.Time) *CardCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CardCreate) SetNillableCreatedBy ¶
func (cc *CardCreate) SetNillableCreatedBy(i *int64) *CardCreate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*CardCreate) SetNillableDeletedAt ¶
func (cc *CardCreate) SetNillableDeletedAt(t *time.Time) *CardCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*CardCreate) SetNillableID ¶
func (cc *CardCreate) SetNillableID(i *int64) *CardCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*CardCreate) SetNillableName ¶
func (cc *CardCreate) SetNillableName(c *card.Name) *CardCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*CardCreate) SetNillableRed ¶
func (cc *CardCreate) SetNillableRed(b *bool) *CardCreate
SetNillableRed sets the "red" field if the given value is not nil.
func (*CardCreate) SetNillableTale ¶
func (cc *CardCreate) SetNillableTale(s *string) *CardCreate
SetNillableTale sets the "tale" field if the given value is not nil.
func (*CardCreate) SetNillableUpdatedAt ¶
func (cc *CardCreate) SetNillableUpdatedAt(t *time.Time) *CardCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*CardCreate) SetNillableUpdatedBy ¶
func (cc *CardCreate) SetNillableUpdatedBy(i *int64) *CardCreate
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*CardCreate) SetRed ¶
func (cc *CardCreate) SetRed(b bool) *CardCreate
SetRed sets the "red" field.
func (*CardCreate) SetRole ¶
func (cc *CardCreate) SetRole(c card.Role) *CardCreate
SetRole sets the "role" field.
func (*CardCreate) SetTale ¶
func (cc *CardCreate) SetTale(s string) *CardCreate
SetTale sets the "tale" field.
func (*CardCreate) SetUpdatedAt ¶
func (cc *CardCreate) SetUpdatedAt(t time.Time) *CardCreate
SetUpdatedAt sets the "updated_at" field.
func (*CardCreate) SetUpdatedBy ¶
func (cc *CardCreate) SetUpdatedBy(i int64) *CardCreate
SetUpdatedBy sets the "updated_by" field.
type CardCreateBulk ¶
type CardCreateBulk struct {
// contains filtered or unexported fields
}
CardCreateBulk is the builder for creating many Card entities in bulk.
func (*CardCreateBulk) Exec ¶
func (ccb *CardCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CardCreateBulk) ExecX ¶
func (ccb *CardCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CardDelete ¶
type CardDelete struct {
// contains filtered or unexported fields
}
CardDelete is the builder for deleting a Card entity.
func (*CardDelete) Exec ¶
func (cd *CardDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CardDelete) ExecX ¶
func (cd *CardDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CardDelete) Where ¶
func (cd *CardDelete) Where(ps ...predicate.Card) *CardDelete
Where appends a list predicates to the CardDelete builder.
type CardDeleteOne ¶
type CardDeleteOne struct {
// contains filtered or unexported fields
}
CardDeleteOne is the builder for deleting a single Card entity.
func (*CardDeleteOne) Exec ¶
func (cdo *CardDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CardDeleteOne) ExecX ¶
func (cdo *CardDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CardEdges ¶
type CardEdges struct { // GameUsers holds the value of the game_users edge. GameUsers []*GameUser `json:"game_users,omitempty"` // contains filtered or unexported fields }
CardEdges holds the relations/edges for other nodes in the graph.
func (CardEdges) GameUsersOrErr ¶
GameUsersOrErr returns the GameUsers value or an error if the edge was not loaded in eager-loading.
type CardGroupBy ¶
type CardGroupBy struct {
// contains filtered or unexported fields
}
CardGroupBy is the group-by builder for Card entities.
func (*CardGroupBy) Aggregate ¶
func (cgb *CardGroupBy) Aggregate(fns ...AggregateFunc) *CardGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CardGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CardGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CardGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CardGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CardGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CardGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CardGroupBy) Scan ¶
func (cgb *CardGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*CardGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CardMutation ¶
type CardMutation struct {
// contains filtered or unexported fields
}
CardMutation represents an operation that mutates the Card nodes in the graph.
func (*CardMutation) AddCreatedBy ¶
func (m *CardMutation) AddCreatedBy(i int64)
AddCreatedBy adds i to the "created_by" field.
func (*CardMutation) AddField ¶
func (m *CardMutation) 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 (*CardMutation) AddGameUserIDs ¶
func (m *CardMutation) AddGameUserIDs(ids ...int64)
AddGameUserIDs adds the "game_users" edge to the GameUser entity by ids.
func (*CardMutation) AddUpdatedBy ¶
func (m *CardMutation) AddUpdatedBy(i int64)
AddUpdatedBy adds i to the "updated_by" field.
func (*CardMutation) AddedCreatedBy ¶
func (m *CardMutation) AddedCreatedBy() (r int64, exists bool)
AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.
func (*CardMutation) AddedEdges ¶
func (m *CardMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CardMutation) AddedField ¶
func (m *CardMutation) 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 (*CardMutation) AddedFields ¶
func (m *CardMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CardMutation) AddedIDs ¶
func (m *CardMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CardMutation) AddedUpdatedBy ¶
func (m *CardMutation) AddedUpdatedBy() (r int64, exists bool)
AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.
func (*CardMutation) ClearEdge ¶
func (m *CardMutation) 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 (*CardMutation) ClearField ¶
func (m *CardMutation) 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 (*CardMutation) ClearGameUsers ¶
func (m *CardMutation) ClearGameUsers()
ClearGameUsers clears the "game_users" edge to the GameUser entity.
func (*CardMutation) ClearedEdges ¶
func (m *CardMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CardMutation) ClearedFields ¶
func (m *CardMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CardMutation) Client ¶
func (m CardMutation) 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 (*CardMutation) CreatedAt ¶
func (m *CardMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*CardMutation) CreatedBy ¶
func (m *CardMutation) CreatedBy() (r int64, exists bool)
CreatedBy returns the value of the "created_by" field in the mutation.
func (*CardMutation) DeletedAt ¶
func (m *CardMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*CardMutation) EdgeCleared ¶
func (m *CardMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CardMutation) Field ¶
func (m *CardMutation) 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 (*CardMutation) FieldCleared ¶
func (m *CardMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CardMutation) Fields ¶
func (m *CardMutation) 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 (*CardMutation) GameUsersCleared ¶
func (m *CardMutation) GameUsersCleared() bool
GameUsersCleared reports if the "game_users" edge to the GameUser entity was cleared.
func (*CardMutation) GameUsersIDs ¶
func (m *CardMutation) GameUsersIDs() (ids []int64)
GameUsersIDs returns the "game_users" edge IDs in the mutation.
func (*CardMutation) ID ¶
func (m *CardMutation) ID() (id int64, 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 (*CardMutation) IDs ¶
func (m *CardMutation) IDs(ctx context.Context) ([]int64, 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 (*CardMutation) Name ¶
func (m *CardMutation) Name() (r card.Name, exists bool)
Name returns the value of the "name" field in the mutation.
func (*CardMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Card entity. If the Card 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 (*CardMutation) OldCreatedBy ¶
func (m *CardMutation) OldCreatedBy(ctx context.Context) (v int64, err error)
OldCreatedBy returns the old "created_by" field's value of the Card entity. If the Card 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 (*CardMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Card entity. If the Card 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 (*CardMutation) 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 (*CardMutation) OldName ¶
OldName returns the old "name" field's value of the Card entity. If the Card 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 (*CardMutation) OldRed ¶
func (m *CardMutation) OldRed(ctx context.Context) (v bool, err error)
OldRed returns the old "red" field's value of the Card entity. If the Card 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 (*CardMutation) OldRole ¶
OldRole returns the old "role" field's value of the Card entity. If the Card 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 (*CardMutation) OldTale ¶
func (m *CardMutation) OldTale(ctx context.Context) (v string, err error)
OldTale returns the old "tale" field's value of the Card entity. If the Card 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 (*CardMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Card entity. If the Card 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 (*CardMutation) OldUpdatedBy ¶
func (m *CardMutation) OldUpdatedBy(ctx context.Context) (v int64, err error)
OldUpdatedBy returns the old "updated_by" field's value of the Card entity. If the Card 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 (*CardMutation) Red ¶
func (m *CardMutation) Red() (r bool, exists bool)
Red returns the value of the "red" field in the mutation.
func (*CardMutation) RemoveGameUserIDs ¶
func (m *CardMutation) RemoveGameUserIDs(ids ...int64)
RemoveGameUserIDs removes the "game_users" edge to the GameUser entity by IDs.
func (*CardMutation) RemovedEdges ¶
func (m *CardMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CardMutation) RemovedGameUsersIDs ¶
func (m *CardMutation) RemovedGameUsersIDs() (ids []int64)
RemovedGameUsers returns the removed IDs of the "game_users" edge to the GameUser entity.
func (*CardMutation) RemovedIDs ¶
func (m *CardMutation) 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 (*CardMutation) ResetCreatedAt ¶
func (m *CardMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*CardMutation) ResetCreatedBy ¶
func (m *CardMutation) ResetCreatedBy()
ResetCreatedBy resets all changes to the "created_by" field.
func (*CardMutation) ResetDeletedAt ¶
func (m *CardMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*CardMutation) ResetEdge ¶
func (m *CardMutation) 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 (*CardMutation) ResetField ¶
func (m *CardMutation) 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 (*CardMutation) ResetGameUsers ¶
func (m *CardMutation) ResetGameUsers()
ResetGameUsers resets all changes to the "game_users" edge.
func (*CardMutation) ResetName ¶
func (m *CardMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*CardMutation) ResetRed ¶
func (m *CardMutation) ResetRed()
ResetRed resets all changes to the "red" field.
func (*CardMutation) ResetRole ¶
func (m *CardMutation) ResetRole()
ResetRole resets all changes to the "role" field.
func (*CardMutation) ResetTale ¶
func (m *CardMutation) ResetTale()
ResetTale resets all changes to the "tale" field.
func (*CardMutation) ResetUpdatedAt ¶
func (m *CardMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*CardMutation) ResetUpdatedBy ¶
func (m *CardMutation) ResetUpdatedBy()
ResetUpdatedBy resets all changes to the "updated_by" field.
func (*CardMutation) Role ¶
func (m *CardMutation) Role() (r card.Role, exists bool)
Role returns the value of the "role" field in the mutation.
func (*CardMutation) SetCreatedAt ¶
func (m *CardMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*CardMutation) SetCreatedBy ¶
func (m *CardMutation) SetCreatedBy(i int64)
SetCreatedBy sets the "created_by" field.
func (*CardMutation) SetDeletedAt ¶
func (m *CardMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*CardMutation) SetField ¶
func (m *CardMutation) 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 (*CardMutation) SetID ¶
func (m *CardMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Card entities.
func (*CardMutation) SetName ¶
func (m *CardMutation) SetName(c card.Name)
SetName sets the "name" field.
func (*CardMutation) SetRole ¶
func (m *CardMutation) SetRole(c card.Role)
SetRole sets the "role" field.
func (*CardMutation) SetTale ¶
func (m *CardMutation) SetTale(s string)
SetTale sets the "tale" field.
func (*CardMutation) SetUpdatedAt ¶
func (m *CardMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*CardMutation) SetUpdatedBy ¶
func (m *CardMutation) SetUpdatedBy(i int64)
SetUpdatedBy sets the "updated_by" field.
func (*CardMutation) Tale ¶
func (m *CardMutation) Tale() (r string, exists bool)
Tale returns the value of the "tale" field in the mutation.
func (CardMutation) Tx ¶
func (m CardMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CardMutation) Type ¶
func (m *CardMutation) Type() string
Type returns the node type of this mutation (Card).
func (*CardMutation) UpdatedAt ¶
func (m *CardMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*CardMutation) UpdatedBy ¶
func (m *CardMutation) UpdatedBy() (r int64, exists bool)
UpdatedBy returns the value of the "updated_by" field in the mutation.
func (*CardMutation) Where ¶
func (m *CardMutation) Where(ps ...predicate.Card)
Where appends a list predicates to the CardMutation builder.
type CardOrder ¶
type CardOrder struct { Direction OrderDirection `json:"direction"` Field *CardOrderField `json:"field"` }
CardOrder defines the ordering of Card.
type CardOrderField ¶
type CardOrderField struct {
// contains filtered or unexported fields
}
CardOrderField defines the ordering field of Card.
func (CardOrderField) MarshalGQL ¶
func (f CardOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (CardOrderField) String ¶
func (f CardOrderField) String() string
String implement fmt.Stringer interface.
func (*CardOrderField) UnmarshalGQL ¶
func (f *CardOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type CardPaginateOption ¶
type CardPaginateOption func(*cardPager) error
CardPaginateOption enables pagination customization.
func WithCardFilter ¶
func WithCardFilter(filter func(*CardQuery) (*CardQuery, error)) CardPaginateOption
WithCardFilter configures pagination filter.
func WithCardOrder ¶
func WithCardOrder(order *CardOrder) CardPaginateOption
WithCardOrder configures pagination ordering.
type CardQuery ¶
type CardQuery struct {
// contains filtered or unexported fields
}
CardQuery is the builder for querying Card entities.
func (*CardQuery) Aggregate ¶
func (cq *CardQuery) Aggregate(fns ...AggregateFunc) *CardSelect
Aggregate returns a CardSelect configured with the given aggregations.
func (*CardQuery) Clone ¶
Clone returns a duplicate of the CardQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CardQuery) CollectFields ¶
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*CardQuery) First ¶
First returns the first Card entity from the query. Returns a *NotFoundError when no Card was found.
func (*CardQuery) FirstID ¶
FirstID returns the first Card ID from the query. Returns a *NotFoundError when no Card ID was found.
func (*CardQuery) GroupBy ¶
func (cq *CardQuery) GroupBy(field string, fields ...string) *CardGroupBy
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 { CreatedBy int64 `json:"created_by"` Count int `json:"count,omitempty"` } client.Card.Query(). GroupBy(card.FieldCreatedBy). Aggregate(ent.Count()). Scan(ctx, &v)
func (*CardQuery) Only ¶
Only returns a single Card entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Card entity is found. Returns a *NotFoundError when no Card entities are found.
func (*CardQuery) OnlyID ¶
OnlyID is like Only, but returns the only Card ID in the query. Returns a *NotSingularError when more than one Card ID is found. Returns a *NotFoundError when no entities are found.
func (*CardQuery) Paginate ¶
func (c *CardQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...CardPaginateOption, ) (*CardConnection, error)
Paginate executes the query and returns a relay based cursor connection to Card.
func (*CardQuery) QueryGameUsers ¶
func (cq *CardQuery) QueryGameUsers() *GameUserQuery
QueryGameUsers chains the current query on the "game_users" edge.
func (*CardQuery) Select ¶
func (cq *CardQuery) Select(fields ...string) *CardSelect
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 { CreatedBy int64 `json:"created_by"` } client.Card.Query(). Select(card.FieldCreatedBy). Scan(ctx, &v)
func (*CardQuery) Unique ¶
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 (*CardQuery) WithGameUsers ¶
func (cq *CardQuery) WithGameUsers(opts ...func(*GameUserQuery)) *CardQuery
WithGameUsers tells the query-builder to eager-load the nodes that are connected to the "game_users" edge. The optional arguments are used to configure the query builder of the edge.
func (*CardQuery) WithNamedGameUsers ¶
func (cq *CardQuery) WithNamedGameUsers(name string, opts ...func(*GameUserQuery)) *CardQuery
WithNamedGameUsers tells the query-builder to eager-load the nodes that are connected to the "game_users" edge with the given name. The optional arguments are used to configure the query builder of the edge.
type CardSelect ¶
type CardSelect struct { *CardQuery // contains filtered or unexported fields }
CardSelect is the builder for selecting fields of Card entities.
func (*CardSelect) Aggregate ¶
func (cs *CardSelect) Aggregate(fns ...AggregateFunc) *CardSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CardSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CardSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CardSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CardSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CardSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CardSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CardSelect) Scan ¶
func (cs *CardSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CardSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CardUpdate ¶
type CardUpdate struct {
// contains filtered or unexported fields
}
CardUpdate is the builder for updating Card entities.
func (*CardUpdate) AddCreatedBy ¶
func (cu *CardUpdate) AddCreatedBy(i int64) *CardUpdate
AddCreatedBy adds i to the "created_by" field.
func (*CardUpdate) AddGameUserIDs ¶
func (cu *CardUpdate) AddGameUserIDs(ids ...int64) *CardUpdate
AddGameUserIDs adds the "game_users" edge to the GameUser entity by IDs.
func (*CardUpdate) AddGameUsers ¶
func (cu *CardUpdate) AddGameUsers(g ...*GameUser) *CardUpdate
AddGameUsers adds the "game_users" edges to the GameUser entity.
func (*CardUpdate) AddUpdatedBy ¶
func (cu *CardUpdate) AddUpdatedBy(i int64) *CardUpdate
AddUpdatedBy adds i to the "updated_by" field.
func (*CardUpdate) ClearGameUsers ¶
func (cu *CardUpdate) ClearGameUsers() *CardUpdate
ClearGameUsers clears all "game_users" edges to the GameUser entity.
func (*CardUpdate) Exec ¶
func (cu *CardUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CardUpdate) ExecX ¶
func (cu *CardUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CardUpdate) Mutation ¶
func (cu *CardUpdate) Mutation() *CardMutation
Mutation returns the CardMutation object of the builder.
func (*CardUpdate) RemoveGameUserIDs ¶
func (cu *CardUpdate) RemoveGameUserIDs(ids ...int64) *CardUpdate
RemoveGameUserIDs removes the "game_users" edge to GameUser entities by IDs.
func (*CardUpdate) RemoveGameUsers ¶
func (cu *CardUpdate) RemoveGameUsers(g ...*GameUser) *CardUpdate
RemoveGameUsers removes "game_users" edges to GameUser entities.
func (*CardUpdate) Save ¶
func (cu *CardUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CardUpdate) SaveX ¶
func (cu *CardUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CardUpdate) SetCreatedBy ¶
func (cu *CardUpdate) SetCreatedBy(i int64) *CardUpdate
SetCreatedBy sets the "created_by" field.
func (*CardUpdate) SetDeletedAt ¶
func (cu *CardUpdate) SetDeletedAt(t time.Time) *CardUpdate
SetDeletedAt sets the "deleted_at" field.
func (*CardUpdate) SetInput ¶
func (c *CardUpdate) SetInput(i UpdateCardInput) *CardUpdate
SetInput applies the change-set in the UpdateCardInput on the CardUpdate builder.
func (*CardUpdate) SetName ¶
func (cu *CardUpdate) SetName(c card.Name) *CardUpdate
SetName sets the "name" field.
func (*CardUpdate) SetNillableCreatedBy ¶
func (cu *CardUpdate) SetNillableCreatedBy(i *int64) *CardUpdate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*CardUpdate) SetNillableDeletedAt ¶
func (cu *CardUpdate) SetNillableDeletedAt(t *time.Time) *CardUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*CardUpdate) SetNillableName ¶
func (cu *CardUpdate) SetNillableName(c *card.Name) *CardUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*CardUpdate) SetNillableRed ¶
func (cu *CardUpdate) SetNillableRed(b *bool) *CardUpdate
SetNillableRed sets the "red" field if the given value is not nil.
func (*CardUpdate) SetNillableTale ¶
func (cu *CardUpdate) SetNillableTale(s *string) *CardUpdate
SetNillableTale sets the "tale" field if the given value is not nil.
func (*CardUpdate) SetNillableUpdatedBy ¶
func (cu *CardUpdate) SetNillableUpdatedBy(i *int64) *CardUpdate
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*CardUpdate) SetRed ¶
func (cu *CardUpdate) SetRed(b bool) *CardUpdate
SetRed sets the "red" field.
func (*CardUpdate) SetRole ¶
func (cu *CardUpdate) SetRole(c card.Role) *CardUpdate
SetRole sets the "role" field.
func (*CardUpdate) SetTale ¶
func (cu *CardUpdate) SetTale(s string) *CardUpdate
SetTale sets the "tale" field.
func (*CardUpdate) SetUpdatedAt ¶
func (cu *CardUpdate) SetUpdatedAt(t time.Time) *CardUpdate
SetUpdatedAt sets the "updated_at" field.
func (*CardUpdate) SetUpdatedBy ¶
func (cu *CardUpdate) SetUpdatedBy(i int64) *CardUpdate
SetUpdatedBy sets the "updated_by" field.
func (*CardUpdate) Where ¶
func (cu *CardUpdate) Where(ps ...predicate.Card) *CardUpdate
Where appends a list predicates to the CardUpdate builder.
type CardUpdateOne ¶
type CardUpdateOne struct {
// contains filtered or unexported fields
}
CardUpdateOne is the builder for updating a single Card entity.
func (*CardUpdateOne) AddCreatedBy ¶
func (cuo *CardUpdateOne) AddCreatedBy(i int64) *CardUpdateOne
AddCreatedBy adds i to the "created_by" field.
func (*CardUpdateOne) AddGameUserIDs ¶
func (cuo *CardUpdateOne) AddGameUserIDs(ids ...int64) *CardUpdateOne
AddGameUserIDs adds the "game_users" edge to the GameUser entity by IDs.
func (*CardUpdateOne) AddGameUsers ¶
func (cuo *CardUpdateOne) AddGameUsers(g ...*GameUser) *CardUpdateOne
AddGameUsers adds the "game_users" edges to the GameUser entity.
func (*CardUpdateOne) AddUpdatedBy ¶
func (cuo *CardUpdateOne) AddUpdatedBy(i int64) *CardUpdateOne
AddUpdatedBy adds i to the "updated_by" field.
func (*CardUpdateOne) ClearGameUsers ¶
func (cuo *CardUpdateOne) ClearGameUsers() *CardUpdateOne
ClearGameUsers clears all "game_users" edges to the GameUser entity.
func (*CardUpdateOne) Exec ¶
func (cuo *CardUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CardUpdateOne) ExecX ¶
func (cuo *CardUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CardUpdateOne) Mutation ¶
func (cuo *CardUpdateOne) Mutation() *CardMutation
Mutation returns the CardMutation object of the builder.
func (*CardUpdateOne) RemoveGameUserIDs ¶
func (cuo *CardUpdateOne) RemoveGameUserIDs(ids ...int64) *CardUpdateOne
RemoveGameUserIDs removes the "game_users" edge to GameUser entities by IDs.
func (*CardUpdateOne) RemoveGameUsers ¶
func (cuo *CardUpdateOne) RemoveGameUsers(g ...*GameUser) *CardUpdateOne
RemoveGameUsers removes "game_users" edges to GameUser entities.
func (*CardUpdateOne) Save ¶
func (cuo *CardUpdateOne) Save(ctx context.Context) (*Card, error)
Save executes the query and returns the updated Card entity.
func (*CardUpdateOne) SaveX ¶
func (cuo *CardUpdateOne) SaveX(ctx context.Context) *Card
SaveX is like Save, but panics if an error occurs.
func (*CardUpdateOne) Select ¶
func (cuo *CardUpdateOne) Select(field string, fields ...string) *CardUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CardUpdateOne) SetCreatedBy ¶
func (cuo *CardUpdateOne) SetCreatedBy(i int64) *CardUpdateOne
SetCreatedBy sets the "created_by" field.
func (*CardUpdateOne) SetDeletedAt ¶
func (cuo *CardUpdateOne) SetDeletedAt(t time.Time) *CardUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*CardUpdateOne) SetInput ¶
func (c *CardUpdateOne) SetInput(i UpdateCardInput) *CardUpdateOne
SetInput applies the change-set in the UpdateCardInput on the CardUpdateOne builder.
func (*CardUpdateOne) SetName ¶
func (cuo *CardUpdateOne) SetName(c card.Name) *CardUpdateOne
SetName sets the "name" field.
func (*CardUpdateOne) SetNillableCreatedBy ¶
func (cuo *CardUpdateOne) SetNillableCreatedBy(i *int64) *CardUpdateOne
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*CardUpdateOne) SetNillableDeletedAt ¶
func (cuo *CardUpdateOne) SetNillableDeletedAt(t *time.Time) *CardUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*CardUpdateOne) SetNillableName ¶
func (cuo *CardUpdateOne) SetNillableName(c *card.Name) *CardUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*CardUpdateOne) SetNillableRed ¶
func (cuo *CardUpdateOne) SetNillableRed(b *bool) *CardUpdateOne
SetNillableRed sets the "red" field if the given value is not nil.
func (*CardUpdateOne) SetNillableTale ¶
func (cuo *CardUpdateOne) SetNillableTale(s *string) *CardUpdateOne
SetNillableTale sets the "tale" field if the given value is not nil.
func (*CardUpdateOne) SetNillableUpdatedBy ¶
func (cuo *CardUpdateOne) SetNillableUpdatedBy(i *int64) *CardUpdateOne
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*CardUpdateOne) SetRed ¶
func (cuo *CardUpdateOne) SetRed(b bool) *CardUpdateOne
SetRed sets the "red" field.
func (*CardUpdateOne) SetRole ¶
func (cuo *CardUpdateOne) SetRole(c card.Role) *CardUpdateOne
SetRole sets the "role" field.
func (*CardUpdateOne) SetTale ¶
func (cuo *CardUpdateOne) SetTale(s string) *CardUpdateOne
SetTale sets the "tale" field.
func (*CardUpdateOne) SetUpdatedAt ¶
func (cuo *CardUpdateOne) SetUpdatedAt(t time.Time) *CardUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*CardUpdateOne) SetUpdatedBy ¶
func (cuo *CardUpdateOne) SetUpdatedBy(i int64) *CardUpdateOne
SetUpdatedBy sets the "updated_by" field.
type CardWhereInput ¶
type CardWhereInput struct { Predicates []predicate.Card `json:"-"` Not *CardWhereInput `json:"not,omitempty"` Or []*CardWhereInput `json:"or,omitempty"` And []*CardWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int64 `json:"id,omitempty"` IDNEQ *int64 `json:"idNEQ,omitempty"` IDIn []int64 `json:"idIn,omitempty"` IDNotIn []int64 `json:"idNotIn,omitempty"` IDGT *int64 `json:"idGT,omitempty"` IDGTE *int64 `json:"idGTE,omitempty"` IDLT *int64 `json:"idLT,omitempty"` IDLTE *int64 `json:"idLTE,omitempty"` // "created_by" field predicates. CreatedBy *int64 `json:"createdBy,omitempty"` CreatedByNEQ *int64 `json:"createdByNEQ,omitempty"` CreatedByIn []int64 `json:"createdByIn,omitempty"` CreatedByNotIn []int64 `json:"createdByNotIn,omitempty"` CreatedByGT *int64 `json:"createdByGT,omitempty"` CreatedByGTE *int64 `json:"createdByGTE,omitempty"` CreatedByLT *int64 `json:"createdByLT,omitempty"` CreatedByLTE *int64 `json:"createdByLTE,omitempty"` // "updated_by" field predicates. UpdatedBy *int64 `json:"updatedBy,omitempty"` UpdatedByNEQ *int64 `json:"updatedByNEQ,omitempty"` UpdatedByIn []int64 `json:"updatedByIn,omitempty"` UpdatedByNotIn []int64 `json:"updatedByNotIn,omitempty"` UpdatedByGT *int64 `json:"updatedByGT,omitempty"` UpdatedByGTE *int64 `json:"updatedByGTE,omitempty"` UpdatedByLT *int64 `json:"updatedByLT,omitempty"` UpdatedByLTE *int64 `json:"updatedByLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "deleted_at" field predicates. DeletedAt *time.Time `json:"deletedAt,omitempty"` DeletedAtNEQ *time.Time `json:"deletedAtNEQ,omitempty"` DeletedAtIn []time.Time `json:"deletedAtIn,omitempty"` DeletedAtNotIn []time.Time `json:"deletedAtNotIn,omitempty"` DeletedAtGT *time.Time `json:"deletedAtGT,omitempty"` DeletedAtGTE *time.Time `json:"deletedAtGTE,omitempty"` DeletedAtLT *time.Time `json:"deletedAtLT,omitempty"` DeletedAtLTE *time.Time `json:"deletedAtLTE,omitempty"` // "name" field predicates. Name *card.Name `json:"name,omitempty"` NameNEQ *card.Name `json:"nameNEQ,omitempty"` NameIn []card.Name `json:"nameIn,omitempty"` NameNotIn []card.Name `json:"nameNotIn,omitempty"` // "role" field predicates. Role *card.Role `json:"role,omitempty"` RoleNEQ *card.Role `json:"roleNEQ,omitempty"` RoleIn []card.Role `json:"roleIn,omitempty"` RoleNotIn []card.Role `json:"roleNotIn,omitempty"` // "tale" field predicates. Tale *string `json:"tale,omitempty"` TaleNEQ *string `json:"taleNEQ,omitempty"` TaleIn []string `json:"taleIn,omitempty"` TaleNotIn []string `json:"taleNotIn,omitempty"` TaleGT *string `json:"taleGT,omitempty"` TaleGTE *string `json:"taleGTE,omitempty"` TaleLT *string `json:"taleLT,omitempty"` TaleLTE *string `json:"taleLTE,omitempty"` TaleContains *string `json:"taleContains,omitempty"` TaleHasPrefix *string `json:"taleHasPrefix,omitempty"` TaleHasSuffix *string `json:"taleHasSuffix,omitempty"` TaleEqualFold *string `json:"taleEqualFold,omitempty"` TaleContainsFold *string `json:"taleContainsFold,omitempty"` // "red" field predicates. Red *bool `json:"red,omitempty"` RedNEQ *bool `json:"redNEQ,omitempty"` // "game_users" edge predicates. HasGameUsers *bool `json:"hasGameUsers,omitempty"` HasGameUsersWith []*GameUserWhereInput `json:"hasGameUsersWith,omitempty"` }
CardWhereInput represents a where input for filtering Card queries.
func (*CardWhereInput) AddPredicates ¶
func (i *CardWhereInput) AddPredicates(predicates ...predicate.Card)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Card is the client for interacting with the Card builders. Card *CardClient // Game is the client for interacting with the Game builders. Game *GameClient // GameUser is the client for interacting with the GameUser builders. GameUser *GameUserClient // Mission is the client for interacting with the Mission builders. Mission *MissionClient // Record is the client for interacting with the Record builders. Record *RecordClient // Room is the client for interacting with the Room builders. Room *RoomClient // RoomUser is the client for interacting with the RoomUser builders. RoomUser *RoomUserClient // Squad is the client for interacting with the Squad builders. Squad *SquadClient // Vote is the client for interacting with the Vote builders. Vote *VoteClient // 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(). Card. Query(). Count(ctx)
func (*Client) Noder ¶
Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.
c.Noder(ctx, id) c.Noder(ctx, id, ent.WithNodeType(typeResolver))
func (*Client) OpenTx ¶
OpenTx opens a transaction and returns a transactional context along with the created transaction.
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 CreateCardInput ¶
type CreateCardInput struct { CreatedBy *int64 UpdatedBy *int64 CreatedAt *time.Time UpdatedAt *time.Time DeletedAt *time.Time Name *card.Name Role card.Role Tale *string Red *bool GameUserIDs []int64 }
CreateCardInput represents a mutation input for creating cards.
func (*CreateCardInput) Mutate ¶
func (i *CreateCardInput) Mutate(m *CardMutation)
Mutate applies the CreateCardInput on the CardMutation builder.
type CreateGameInput ¶
type CreateGameInput struct { CreatedBy *int64 UpdatedBy *int64 CreatedAt *time.Time UpdatedAt *time.Time DeletedAt *time.Time Result *game.Result Capacity *uint8 TheAssassinatedIds []string AssassinChance *uint8 Closed *bool GameUserIDs []int64 MissionIDs []int64 RoomID int64 }
CreateGameInput represents a mutation input for creating games.
func (*CreateGameInput) Mutate ¶
func (i *CreateGameInput) Mutate(m *GameMutation)
Mutate applies the CreateGameInput on the GameMutation builder.
type CreateGameUserInput ¶
type CreateGameUserInput struct { CreatedBy *int64 UpdatedBy *int64 CreatedAt *time.Time UpdatedAt *time.Time DeletedAt *time.Time UserID int64 Number uint8 Exited *bool GameID int64 CardID int64 }
CreateGameUserInput represents a mutation input for creating gameusers.
func (*CreateGameUserInput) Mutate ¶
func (i *CreateGameUserInput) Mutate(m *GameUserMutation)
Mutate applies the CreateGameUserInput on the GameUserMutation builder.
type CreateMissionInput ¶
type CreateMissionInput struct { CreatedBy *int64 UpdatedBy *int64 CreatedAt *time.Time UpdatedAt *time.Time DeletedAt *time.Time Sequence uint8 Status *mission.Status Failed *bool Capacity *uint8 LeaderID *int64 Protected *bool GameID int64 SquadIDs []int64 VoteIDs []int64 }
CreateMissionInput represents a mutation input for creating missions.
func (*CreateMissionInput) Mutate ¶
func (i *CreateMissionInput) Mutate(m *MissionMutation)
Mutate applies the CreateMissionInput on the MissionMutation builder.
type CreateRecordInput ¶
type CreateRecordInput struct { CreatedBy *int64 UpdatedBy *int64 CreatedAt *time.Time UpdatedAt *time.Time DeletedAt *time.Time UserID int64 Score *int32 RoomID int64 }
CreateRecordInput represents a mutation input for creating records.
func (*CreateRecordInput) Mutate ¶
func (i *CreateRecordInput) Mutate(m *RecordMutation)
Mutate applies the CreateRecordInput on the RecordMutation builder.
type CreateRoomInput ¶
type CreateRoomInput struct { CreatedBy *int64 UpdatedBy *int64 CreatedAt *time.Time UpdatedAt *time.Time DeletedAt *time.Time Name *string Closed *bool GameOn *bool RoomUserIDs []int64 GameIDs []int64 RecordIDs []int64 }
CreateRoomInput represents a mutation input for creating rooms.
func (*CreateRoomInput) Mutate ¶
func (i *CreateRoomInput) Mutate(m *RoomMutation)
Mutate applies the CreateRoomInput on the RoomMutation builder.
type CreateRoomUserInput ¶
type CreateRoomUserInput struct { CreatedBy *int64 UpdatedBy *int64 CreatedAt *time.Time UpdatedAt *time.Time DeletedAt *time.Time UserID int64 Host *bool RoomID int64 }
CreateRoomUserInput represents a mutation input for creating roomusers.
func (*CreateRoomUserInput) Mutate ¶
func (i *CreateRoomUserInput) Mutate(m *RoomUserMutation)
Mutate applies the CreateRoomUserInput on the RoomUserMutation builder.
type CreateSquadInput ¶
type CreateSquadInput struct { CreatedBy *int64 UpdatedBy *int64 CreatedAt *time.Time UpdatedAt *time.Time DeletedAt *time.Time UserID int64 Rat *bool Acted *bool MissionID int64 }
CreateSquadInput represents a mutation input for creating squads.
func (*CreateSquadInput) Mutate ¶
func (i *CreateSquadInput) Mutate(m *SquadMutation)
Mutate applies the CreateSquadInput on the SquadMutation builder.
type CreateVoteInput ¶
type CreateVoteInput struct { CreatedBy *int64 UpdatedBy *int64 CreatedAt *time.Time UpdatedAt *time.Time DeletedAt *time.Time UserID int64 Pass *bool Voted *bool MissionID int64 }
CreateVoteInput represents a mutation input for creating votes.
func (*CreateVoteInput) Mutate ¶
func (i *CreateVoteInput) Mutate(m *VoteMutation)
Mutate applies the CreateVoteInput on the VoteMutation builder.
type Cursor ¶
Cursor of an edge type.
func (Cursor) MarshalGQL ¶
MarshalGQL implements graphql.Marshaler interface.
func (*Cursor) UnmarshalGQL ¶
UnmarshalGQL implements graphql.Unmarshaler interface.
type Edge ¶
type Edge struct { Type string `json:"type,omitempty"` // edge type. Name string `json:"name,omitempty"` // edge name. IDs []int64 `json:"ids,omitempty"` // node ids (where this edge point to). }
Edges between two nodes.
type Field ¶
type Field struct { Type string `json:"type,omitempty"` // field type. Name string `json:"name,omitempty"` // field name (as in struct). Value string `json:"value,omitempty"` // stringified value. }
Field of a node.
type Game ¶
type Game struct { // ID of the ent. ID int64 `json:"id,omitempty"` // CreatedBy holds the value of the "created_by" field. CreatedBy int64 `json:"created_by"` // UpdatedBy holds the value of the "updated_by" field. UpdatedBy int64 `json:"updated_by"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt time.Time `json:"deleted_at"` // 所属房间 ID RoomID int64 `json:"room_id"` // 游戏结果 Result game.Result `json:"result"` // 游戏人数 Capacity uint8 `json:"capacity"` // 被刺杀者[们] ID TheAssassinatedIds []string `json:"the_assassinated_ids"` // 刺杀机会,默认为 1 次 AssassinChance uint8 `json:"assassin_chance"` // 游戏是否关闭,需要有结果且所有人都退出才会关闭或者强制关闭 Closed bool `json:"closed"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the GameQuery when eager-loading is set. Edges GameEdges `json:"edges"` // contains filtered or unexported fields }
Game is the model entity for the Game schema.
func (*Game) NamedGameUsers ¶
NamedGameUsers returns the GameUsers named value or an error if the edge was not loaded in eager-loading with this name.
func (*Game) NamedMissions ¶
NamedMissions returns the Missions named value or an error if the edge was not loaded in eager-loading with this name.
func (*Game) QueryGameUsers ¶
func (ga *Game) QueryGameUsers() *GameUserQuery
QueryGameUsers queries the "game_users" edge of the Game entity.
func (*Game) QueryMissions ¶
func (ga *Game) QueryMissions() *MissionQuery
QueryMissions queries the "missions" edge of the Game entity.
func (*Game) Unwrap ¶
Unwrap unwraps the Game 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 (*Game) Update ¶
func (ga *Game) Update() *GameUpdateOne
Update returns a builder for updating this Game. Note that you need to call Game.Unwrap() before calling this method if this Game was returned from a transaction, and the transaction was committed or rolled back.
type GameClient ¶
type GameClient struct {
// contains filtered or unexported fields
}
GameClient is a client for the Game schema.
func NewGameClient ¶
func NewGameClient(c config) *GameClient
NewGameClient returns a client for the Game from the given config.
func (*GameClient) Create ¶
func (c *GameClient) Create() *GameCreate
Create returns a builder for creating a Game entity.
func (*GameClient) CreateBulk ¶
func (c *GameClient) CreateBulk(builders ...*GameCreate) *GameCreateBulk
CreateBulk returns a builder for creating a bulk of Game entities.
func (*GameClient) Delete ¶
func (c *GameClient) Delete() *GameDelete
Delete returns a delete builder for Game.
func (*GameClient) DeleteOne ¶
func (c *GameClient) DeleteOne(ga *Game) *GameDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GameClient) DeleteOneID ¶
func (c *GameClient) DeleteOneID(id int64) *GameDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GameClient) GetX ¶
func (c *GameClient) GetX(ctx context.Context, id int64) *Game
GetX is like Get, but panics if an error occurs.
func (*GameClient) Query ¶
func (c *GameClient) Query() *GameQuery
Query returns a query builder for Game.
func (*GameClient) QueryGameUsers ¶
func (c *GameClient) QueryGameUsers(ga *Game) *GameUserQuery
QueryGameUsers queries the game_users edge of a Game.
func (*GameClient) QueryMissions ¶
func (c *GameClient) QueryMissions(ga *Game) *MissionQuery
QueryMissions queries the missions edge of a Game.
func (*GameClient) QueryRoom ¶
func (c *GameClient) QueryRoom(ga *Game) *RoomQuery
QueryRoom queries the room edge of a Game.
func (*GameClient) Update ¶
func (c *GameClient) Update() *GameUpdate
Update returns an update builder for Game.
func (*GameClient) UpdateOne ¶
func (c *GameClient) UpdateOne(ga *Game) *GameUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GameClient) UpdateOneID ¶
func (c *GameClient) UpdateOneID(id int64) *GameUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GameClient) Use ¶
func (c *GameClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `game.Hooks(f(g(h())))`.
type GameConnection ¶
type GameConnection struct { Edges []*GameEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
GameConnection is the connection containing edges to Game.
type GameCreate ¶
type GameCreate struct {
// contains filtered or unexported fields
}
GameCreate is the builder for creating a Game entity.
func (*GameCreate) AddGameUserIDs ¶
func (gc *GameCreate) AddGameUserIDs(ids ...int64) *GameCreate
AddGameUserIDs adds the "game_users" edge to the GameUser entity by IDs.
func (*GameCreate) AddGameUsers ¶
func (gc *GameCreate) AddGameUsers(g ...*GameUser) *GameCreate
AddGameUsers adds the "game_users" edges to the GameUser entity.
func (*GameCreate) AddMissionIDs ¶
func (gc *GameCreate) AddMissionIDs(ids ...int64) *GameCreate
AddMissionIDs adds the "missions" edge to the Mission entity by IDs.
func (*GameCreate) AddMissions ¶
func (gc *GameCreate) AddMissions(m ...*Mission) *GameCreate
AddMissions adds the "missions" edges to the Mission entity.
func (*GameCreate) Exec ¶
func (gc *GameCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GameCreate) ExecX ¶
func (gc *GameCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameCreate) Mutation ¶
func (gc *GameCreate) Mutation() *GameMutation
Mutation returns the GameMutation object of the builder.
func (*GameCreate) Save ¶
func (gc *GameCreate) Save(ctx context.Context) (*Game, error)
Save creates the Game in the database.
func (*GameCreate) SaveX ¶
func (gc *GameCreate) SaveX(ctx context.Context) *Game
SaveX calls Save and panics if Save returns an error.
func (*GameCreate) SetAssassinChance ¶
func (gc *GameCreate) SetAssassinChance(u uint8) *GameCreate
SetAssassinChance sets the "assassin_chance" field.
func (*GameCreate) SetCapacity ¶
func (gc *GameCreate) SetCapacity(u uint8) *GameCreate
SetCapacity sets the "capacity" field.
func (*GameCreate) SetClosed ¶
func (gc *GameCreate) SetClosed(b bool) *GameCreate
SetClosed sets the "closed" field.
func (*GameCreate) SetCreatedAt ¶
func (gc *GameCreate) SetCreatedAt(t time.Time) *GameCreate
SetCreatedAt sets the "created_at" field.
func (*GameCreate) SetCreatedBy ¶
func (gc *GameCreate) SetCreatedBy(i int64) *GameCreate
SetCreatedBy sets the "created_by" field.
func (*GameCreate) SetDeletedAt ¶
func (gc *GameCreate) SetDeletedAt(t time.Time) *GameCreate
SetDeletedAt sets the "deleted_at" field.
func (*GameCreate) SetID ¶
func (gc *GameCreate) SetID(i int64) *GameCreate
SetID sets the "id" field.
func (*GameCreate) SetInput ¶
func (c *GameCreate) SetInput(i CreateGameInput) *GameCreate
SetInput applies the change-set in the CreateGameInput on the GameCreate builder.
func (*GameCreate) SetNillableAssassinChance ¶
func (gc *GameCreate) SetNillableAssassinChance(u *uint8) *GameCreate
SetNillableAssassinChance sets the "assassin_chance" field if the given value is not nil.
func (*GameCreate) SetNillableCapacity ¶
func (gc *GameCreate) SetNillableCapacity(u *uint8) *GameCreate
SetNillableCapacity sets the "capacity" field if the given value is not nil.
func (*GameCreate) SetNillableClosed ¶
func (gc *GameCreate) SetNillableClosed(b *bool) *GameCreate
SetNillableClosed sets the "closed" field if the given value is not nil.
func (*GameCreate) SetNillableCreatedAt ¶
func (gc *GameCreate) SetNillableCreatedAt(t *time.Time) *GameCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*GameCreate) SetNillableCreatedBy ¶
func (gc *GameCreate) SetNillableCreatedBy(i *int64) *GameCreate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*GameCreate) SetNillableDeletedAt ¶
func (gc *GameCreate) SetNillableDeletedAt(t *time.Time) *GameCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*GameCreate) SetNillableID ¶
func (gc *GameCreate) SetNillableID(i *int64) *GameCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*GameCreate) SetNillableResult ¶
func (gc *GameCreate) SetNillableResult(ga *game.Result) *GameCreate
SetNillableResult sets the "result" field if the given value is not nil.
func (*GameCreate) SetNillableUpdatedAt ¶
func (gc *GameCreate) SetNillableUpdatedAt(t *time.Time) *GameCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*GameCreate) SetNillableUpdatedBy ¶
func (gc *GameCreate) SetNillableUpdatedBy(i *int64) *GameCreate
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*GameCreate) SetResult ¶
func (gc *GameCreate) SetResult(ga game.Result) *GameCreate
SetResult sets the "result" field.
func (*GameCreate) SetRoom ¶
func (gc *GameCreate) SetRoom(r *Room) *GameCreate
SetRoom sets the "room" edge to the Room entity.
func (*GameCreate) SetRoomID ¶
func (gc *GameCreate) SetRoomID(i int64) *GameCreate
SetRoomID sets the "room_id" field.
func (*GameCreate) SetTheAssassinatedIds ¶
func (gc *GameCreate) SetTheAssassinatedIds(s []string) *GameCreate
SetTheAssassinatedIds sets the "the_assassinated_ids" field.
func (*GameCreate) SetUpdatedAt ¶
func (gc *GameCreate) SetUpdatedAt(t time.Time) *GameCreate
SetUpdatedAt sets the "updated_at" field.
func (*GameCreate) SetUpdatedBy ¶
func (gc *GameCreate) SetUpdatedBy(i int64) *GameCreate
SetUpdatedBy sets the "updated_by" field.
type GameCreateBulk ¶
type GameCreateBulk struct {
// contains filtered or unexported fields
}
GameCreateBulk is the builder for creating many Game entities in bulk.
func (*GameCreateBulk) Exec ¶
func (gcb *GameCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GameCreateBulk) ExecX ¶
func (gcb *GameCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type GameDelete ¶
type GameDelete struct {
// contains filtered or unexported fields
}
GameDelete is the builder for deleting a Game entity.
func (*GameDelete) Exec ¶
func (gd *GameDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GameDelete) ExecX ¶
func (gd *GameDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GameDelete) Where ¶
func (gd *GameDelete) Where(ps ...predicate.Game) *GameDelete
Where appends a list predicates to the GameDelete builder.
type GameDeleteOne ¶
type GameDeleteOne struct {
// contains filtered or unexported fields
}
GameDeleteOne is the builder for deleting a single Game entity.
func (*GameDeleteOne) Exec ¶
func (gdo *GameDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GameDeleteOne) ExecX ¶
func (gdo *GameDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type GameEdges ¶
type GameEdges struct { // GameUsers holds the value of the game_users edge. GameUsers []*GameUser `json:"game_users,omitempty"` // Missions holds the value of the missions edge. Missions []*Mission `json:"missions,omitempty"` // Room holds the value of the room edge. Room *Room `json:"room,omitempty"` // contains filtered or unexported fields }
GameEdges holds the relations/edges for other nodes in the graph.
func (GameEdges) GameUsersOrErr ¶
GameUsersOrErr returns the GameUsers value or an error if the edge was not loaded in eager-loading.
func (GameEdges) MissionsOrErr ¶
MissionsOrErr returns the Missions value or an error if the edge was not loaded in eager-loading.
type GameGroupBy ¶
type GameGroupBy struct {
// contains filtered or unexported fields
}
GameGroupBy is the group-by builder for Game entities.
func (*GameGroupBy) Aggregate ¶
func (ggb *GameGroupBy) Aggregate(fns ...AggregateFunc) *GameGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GameGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GameGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GameGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GameGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GameGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GameGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GameGroupBy) Scan ¶
func (ggb *GameGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*GameGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GameMutation ¶
type GameMutation struct {
// contains filtered or unexported fields
}
GameMutation represents an operation that mutates the Game nodes in the graph.
func (*GameMutation) AddAssassinChance ¶
func (m *GameMutation) AddAssassinChance(u int8)
AddAssassinChance adds u to the "assassin_chance" field.
func (*GameMutation) AddCapacity ¶
func (m *GameMutation) AddCapacity(u int8)
AddCapacity adds u to the "capacity" field.
func (*GameMutation) AddCreatedBy ¶
func (m *GameMutation) AddCreatedBy(i int64)
AddCreatedBy adds i to the "created_by" field.
func (*GameMutation) AddField ¶
func (m *GameMutation) 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 (*GameMutation) AddGameUserIDs ¶
func (m *GameMutation) AddGameUserIDs(ids ...int64)
AddGameUserIDs adds the "game_users" edge to the GameUser entity by ids.
func (*GameMutation) AddMissionIDs ¶
func (m *GameMutation) AddMissionIDs(ids ...int64)
AddMissionIDs adds the "missions" edge to the Mission entity by ids.
func (*GameMutation) AddUpdatedBy ¶
func (m *GameMutation) AddUpdatedBy(i int64)
AddUpdatedBy adds i to the "updated_by" field.
func (*GameMutation) AddedAssassinChance ¶
func (m *GameMutation) AddedAssassinChance() (r int8, exists bool)
AddedAssassinChance returns the value that was added to the "assassin_chance" field in this mutation.
func (*GameMutation) AddedCapacity ¶
func (m *GameMutation) AddedCapacity() (r int8, exists bool)
AddedCapacity returns the value that was added to the "capacity" field in this mutation.
func (*GameMutation) AddedCreatedBy ¶
func (m *GameMutation) AddedCreatedBy() (r int64, exists bool)
AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.
func (*GameMutation) AddedEdges ¶
func (m *GameMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GameMutation) AddedField ¶
func (m *GameMutation) 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 (*GameMutation) AddedFields ¶
func (m *GameMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GameMutation) AddedIDs ¶
func (m *GameMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GameMutation) AddedUpdatedBy ¶
func (m *GameMutation) AddedUpdatedBy() (r int64, exists bool)
AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.
func (*GameMutation) AppendTheAssassinatedIds ¶
func (m *GameMutation) AppendTheAssassinatedIds(s []string)
AppendTheAssassinatedIds adds s to the "the_assassinated_ids" field.
func (*GameMutation) AppendedTheAssassinatedIds ¶
func (m *GameMutation) AppendedTheAssassinatedIds() ([]string, bool)
AppendedTheAssassinatedIds returns the list of values that were appended to the "the_assassinated_ids" field in this mutation.
func (*GameMutation) AssassinChance ¶
func (m *GameMutation) AssassinChance() (r uint8, exists bool)
AssassinChance returns the value of the "assassin_chance" field in the mutation.
func (*GameMutation) Capacity ¶
func (m *GameMutation) Capacity() (r uint8, exists bool)
Capacity returns the value of the "capacity" field in the mutation.
func (*GameMutation) ClearEdge ¶
func (m *GameMutation) 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 (*GameMutation) ClearField ¶
func (m *GameMutation) 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 (*GameMutation) ClearGameUsers ¶
func (m *GameMutation) ClearGameUsers()
ClearGameUsers clears the "game_users" edge to the GameUser entity.
func (*GameMutation) ClearMissions ¶
func (m *GameMutation) ClearMissions()
ClearMissions clears the "missions" edge to the Mission entity.
func (*GameMutation) ClearRoom ¶
func (m *GameMutation) ClearRoom()
ClearRoom clears the "room" edge to the Room entity.
func (*GameMutation) ClearTheAssassinatedIds ¶
func (m *GameMutation) ClearTheAssassinatedIds()
ClearTheAssassinatedIds clears the value of the "the_assassinated_ids" field.
func (*GameMutation) ClearedEdges ¶
func (m *GameMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GameMutation) ClearedFields ¶
func (m *GameMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GameMutation) Client ¶
func (m GameMutation) 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 (*GameMutation) Closed ¶
func (m *GameMutation) Closed() (r bool, exists bool)
Closed returns the value of the "closed" field in the mutation.
func (*GameMutation) CreatedAt ¶
func (m *GameMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*GameMutation) CreatedBy ¶
func (m *GameMutation) CreatedBy() (r int64, exists bool)
CreatedBy returns the value of the "created_by" field in the mutation.
func (*GameMutation) DeletedAt ¶
func (m *GameMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*GameMutation) EdgeCleared ¶
func (m *GameMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GameMutation) Field ¶
func (m *GameMutation) 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 (*GameMutation) FieldCleared ¶
func (m *GameMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GameMutation) Fields ¶
func (m *GameMutation) 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 (*GameMutation) GameUsersCleared ¶
func (m *GameMutation) GameUsersCleared() bool
GameUsersCleared reports if the "game_users" edge to the GameUser entity was cleared.
func (*GameMutation) GameUsersIDs ¶
func (m *GameMutation) GameUsersIDs() (ids []int64)
GameUsersIDs returns the "game_users" edge IDs in the mutation.
func (*GameMutation) ID ¶
func (m *GameMutation) ID() (id int64, 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 (*GameMutation) IDs ¶
func (m *GameMutation) IDs(ctx context.Context) ([]int64, 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 (*GameMutation) MissionsCleared ¶
func (m *GameMutation) MissionsCleared() bool
MissionsCleared reports if the "missions" edge to the Mission entity was cleared.
func (*GameMutation) MissionsIDs ¶
func (m *GameMutation) MissionsIDs() (ids []int64)
MissionsIDs returns the "missions" edge IDs in the mutation.
func (*GameMutation) OldAssassinChance ¶
func (m *GameMutation) OldAssassinChance(ctx context.Context) (v uint8, err error)
OldAssassinChance returns the old "assassin_chance" field's value of the Game entity. If the Game 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 (*GameMutation) OldCapacity ¶
func (m *GameMutation) OldCapacity(ctx context.Context) (v uint8, err error)
OldCapacity returns the old "capacity" field's value of the Game entity. If the Game 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 (*GameMutation) OldClosed ¶
func (m *GameMutation) OldClosed(ctx context.Context) (v bool, err error)
OldClosed returns the old "closed" field's value of the Game entity. If the Game 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 (*GameMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Game entity. If the Game 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 (*GameMutation) OldCreatedBy ¶
func (m *GameMutation) OldCreatedBy(ctx context.Context) (v int64, err error)
OldCreatedBy returns the old "created_by" field's value of the Game entity. If the Game 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 (*GameMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Game entity. If the Game 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 (*GameMutation) 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 (*GameMutation) OldResult ¶
OldResult returns the old "result" field's value of the Game entity. If the Game 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 (*GameMutation) OldRoomID ¶
func (m *GameMutation) OldRoomID(ctx context.Context) (v int64, err error)
OldRoomID returns the old "room_id" field's value of the Game entity. If the Game 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 (*GameMutation) OldTheAssassinatedIds ¶
func (m *GameMutation) OldTheAssassinatedIds(ctx context.Context) (v []string, err error)
OldTheAssassinatedIds returns the old "the_assassinated_ids" field's value of the Game entity. If the Game 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 (*GameMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Game entity. If the Game 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 (*GameMutation) OldUpdatedBy ¶
func (m *GameMutation) OldUpdatedBy(ctx context.Context) (v int64, err error)
OldUpdatedBy returns the old "updated_by" field's value of the Game entity. If the Game 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 (*GameMutation) RemoveGameUserIDs ¶
func (m *GameMutation) RemoveGameUserIDs(ids ...int64)
RemoveGameUserIDs removes the "game_users" edge to the GameUser entity by IDs.
func (*GameMutation) RemoveMissionIDs ¶
func (m *GameMutation) RemoveMissionIDs(ids ...int64)
RemoveMissionIDs removes the "missions" edge to the Mission entity by IDs.
func (*GameMutation) RemovedEdges ¶
func (m *GameMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GameMutation) RemovedGameUsersIDs ¶
func (m *GameMutation) RemovedGameUsersIDs() (ids []int64)
RemovedGameUsers returns the removed IDs of the "game_users" edge to the GameUser entity.
func (*GameMutation) RemovedIDs ¶
func (m *GameMutation) 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 (*GameMutation) RemovedMissionsIDs ¶
func (m *GameMutation) RemovedMissionsIDs() (ids []int64)
RemovedMissions returns the removed IDs of the "missions" edge to the Mission entity.
func (*GameMutation) ResetAssassinChance ¶
func (m *GameMutation) ResetAssassinChance()
ResetAssassinChance resets all changes to the "assassin_chance" field.
func (*GameMutation) ResetCapacity ¶
func (m *GameMutation) ResetCapacity()
ResetCapacity resets all changes to the "capacity" field.
func (*GameMutation) ResetClosed ¶
func (m *GameMutation) ResetClosed()
ResetClosed resets all changes to the "closed" field.
func (*GameMutation) ResetCreatedAt ¶
func (m *GameMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*GameMutation) ResetCreatedBy ¶
func (m *GameMutation) ResetCreatedBy()
ResetCreatedBy resets all changes to the "created_by" field.
func (*GameMutation) ResetDeletedAt ¶
func (m *GameMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*GameMutation) ResetEdge ¶
func (m *GameMutation) 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 (*GameMutation) ResetField ¶
func (m *GameMutation) 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 (*GameMutation) ResetGameUsers ¶
func (m *GameMutation) ResetGameUsers()
ResetGameUsers resets all changes to the "game_users" edge.
func (*GameMutation) ResetMissions ¶
func (m *GameMutation) ResetMissions()
ResetMissions resets all changes to the "missions" edge.
func (*GameMutation) ResetResult ¶
func (m *GameMutation) ResetResult()
ResetResult resets all changes to the "result" field.
func (*GameMutation) ResetRoom ¶
func (m *GameMutation) ResetRoom()
ResetRoom resets all changes to the "room" edge.
func (*GameMutation) ResetRoomID ¶
func (m *GameMutation) ResetRoomID()
ResetRoomID resets all changes to the "room_id" field.
func (*GameMutation) ResetTheAssassinatedIds ¶
func (m *GameMutation) ResetTheAssassinatedIds()
ResetTheAssassinatedIds resets all changes to the "the_assassinated_ids" field.
func (*GameMutation) ResetUpdatedAt ¶
func (m *GameMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*GameMutation) ResetUpdatedBy ¶
func (m *GameMutation) ResetUpdatedBy()
ResetUpdatedBy resets all changes to the "updated_by" field.
func (*GameMutation) Result ¶
func (m *GameMutation) Result() (r game.Result, exists bool)
Result returns the value of the "result" field in the mutation.
func (*GameMutation) RoomCleared ¶
func (m *GameMutation) RoomCleared() bool
RoomCleared reports if the "room" edge to the Room entity was cleared.
func (*GameMutation) RoomID ¶
func (m *GameMutation) RoomID() (r int64, exists bool)
RoomID returns the value of the "room_id" field in the mutation.
func (*GameMutation) RoomIDs ¶
func (m *GameMutation) RoomIDs() (ids []int64)
RoomIDs returns the "room" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RoomID instead. It exists only for internal usage by the builders.
func (*GameMutation) SetAssassinChance ¶
func (m *GameMutation) SetAssassinChance(u uint8)
SetAssassinChance sets the "assassin_chance" field.
func (*GameMutation) SetCapacity ¶
func (m *GameMutation) SetCapacity(u uint8)
SetCapacity sets the "capacity" field.
func (*GameMutation) SetClosed ¶
func (m *GameMutation) SetClosed(b bool)
SetClosed sets the "closed" field.
func (*GameMutation) SetCreatedAt ¶
func (m *GameMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*GameMutation) SetCreatedBy ¶
func (m *GameMutation) SetCreatedBy(i int64)
SetCreatedBy sets the "created_by" field.
func (*GameMutation) SetDeletedAt ¶
func (m *GameMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*GameMutation) SetField ¶
func (m *GameMutation) 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 (*GameMutation) SetID ¶
func (m *GameMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Game entities.
func (*GameMutation) SetResult ¶
func (m *GameMutation) SetResult(ga game.Result)
SetResult sets the "result" field.
func (*GameMutation) SetRoomID ¶
func (m *GameMutation) SetRoomID(i int64)
SetRoomID sets the "room_id" field.
func (*GameMutation) SetTheAssassinatedIds ¶
func (m *GameMutation) SetTheAssassinatedIds(s []string)
SetTheAssassinatedIds sets the "the_assassinated_ids" field.
func (*GameMutation) SetUpdatedAt ¶
func (m *GameMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*GameMutation) SetUpdatedBy ¶
func (m *GameMutation) SetUpdatedBy(i int64)
SetUpdatedBy sets the "updated_by" field.
func (*GameMutation) TheAssassinatedIds ¶
func (m *GameMutation) TheAssassinatedIds() (r []string, exists bool)
TheAssassinatedIds returns the value of the "the_assassinated_ids" field in the mutation.
func (*GameMutation) TheAssassinatedIdsCleared ¶
func (m *GameMutation) TheAssassinatedIdsCleared() bool
TheAssassinatedIdsCleared returns if the "the_assassinated_ids" field was cleared in this mutation.
func (GameMutation) Tx ¶
func (m GameMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GameMutation) Type ¶
func (m *GameMutation) Type() string
Type returns the node type of this mutation (Game).
func (*GameMutation) UpdatedAt ¶
func (m *GameMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*GameMutation) UpdatedBy ¶
func (m *GameMutation) UpdatedBy() (r int64, exists bool)
UpdatedBy returns the value of the "updated_by" field in the mutation.
func (*GameMutation) Where ¶
func (m *GameMutation) Where(ps ...predicate.Game)
Where appends a list predicates to the GameMutation builder.
type GameOrder ¶
type GameOrder struct { Direction OrderDirection `json:"direction"` Field *GameOrderField `json:"field"` }
GameOrder defines the ordering of Game.
type GameOrderField ¶
type GameOrderField struct {
// contains filtered or unexported fields
}
GameOrderField defines the ordering field of Game.
func (GameOrderField) MarshalGQL ¶
func (f GameOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (GameOrderField) String ¶
func (f GameOrderField) String() string
String implement fmt.Stringer interface.
func (*GameOrderField) UnmarshalGQL ¶
func (f *GameOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type GamePaginateOption ¶
type GamePaginateOption func(*gamePager) error
GamePaginateOption enables pagination customization.
func WithGameFilter ¶
func WithGameFilter(filter func(*GameQuery) (*GameQuery, error)) GamePaginateOption
WithGameFilter configures pagination filter.
func WithGameOrder ¶
func WithGameOrder(order *GameOrder) GamePaginateOption
WithGameOrder configures pagination ordering.
type GameQuery ¶
type GameQuery struct {
// contains filtered or unexported fields
}
GameQuery is the builder for querying Game entities.
func (*GameQuery) Aggregate ¶
func (gq *GameQuery) Aggregate(fns ...AggregateFunc) *GameSelect
Aggregate returns a GameSelect configured with the given aggregations.
func (*GameQuery) Clone ¶
Clone returns a duplicate of the GameQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GameQuery) CollectFields ¶
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*GameQuery) First ¶
First returns the first Game entity from the query. Returns a *NotFoundError when no Game was found.
func (*GameQuery) FirstID ¶
FirstID returns the first Game ID from the query. Returns a *NotFoundError when no Game ID was found.
func (*GameQuery) GroupBy ¶
func (gq *GameQuery) GroupBy(field string, fields ...string) *GameGroupBy
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 { CreatedBy int64 `json:"created_by"` Count int `json:"count,omitempty"` } client.Game.Query(). GroupBy(game.FieldCreatedBy). Aggregate(ent.Count()). Scan(ctx, &v)
func (*GameQuery) Only ¶
Only returns a single Game entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Game entity is found. Returns a *NotFoundError when no Game entities are found.
func (*GameQuery) OnlyID ¶
OnlyID is like Only, but returns the only Game ID in the query. Returns a *NotSingularError when more than one Game ID is found. Returns a *NotFoundError when no entities are found.
func (*GameQuery) Paginate ¶
func (ga *GameQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...GamePaginateOption, ) (*GameConnection, error)
Paginate executes the query and returns a relay based cursor connection to Game.
func (*GameQuery) QueryGameUsers ¶
func (gq *GameQuery) QueryGameUsers() *GameUserQuery
QueryGameUsers chains the current query on the "game_users" edge.
func (*GameQuery) QueryMissions ¶
func (gq *GameQuery) QueryMissions() *MissionQuery
QueryMissions chains the current query on the "missions" edge.
func (*GameQuery) Select ¶
func (gq *GameQuery) Select(fields ...string) *GameSelect
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 { CreatedBy int64 `json:"created_by"` } client.Game.Query(). Select(game.FieldCreatedBy). Scan(ctx, &v)
func (*GameQuery) Unique ¶
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 (*GameQuery) WithGameUsers ¶
func (gq *GameQuery) WithGameUsers(opts ...func(*GameUserQuery)) *GameQuery
WithGameUsers tells the query-builder to eager-load the nodes that are connected to the "game_users" edge. The optional arguments are used to configure the query builder of the edge.
func (*GameQuery) WithMissions ¶
func (gq *GameQuery) WithMissions(opts ...func(*MissionQuery)) *GameQuery
WithMissions tells the query-builder to eager-load the nodes that are connected to the "missions" edge. The optional arguments are used to configure the query builder of the edge.
func (*GameQuery) WithNamedGameUsers ¶
func (gq *GameQuery) WithNamedGameUsers(name string, opts ...func(*GameUserQuery)) *GameQuery
WithNamedGameUsers tells the query-builder to eager-load the nodes that are connected to the "game_users" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*GameQuery) WithNamedMissions ¶
func (gq *GameQuery) WithNamedMissions(name string, opts ...func(*MissionQuery)) *GameQuery
WithNamedMissions tells the query-builder to eager-load the nodes that are connected to the "missions" edge with the given name. The optional arguments are used to configure the query builder of the edge.
type GameSelect ¶
type GameSelect struct { *GameQuery // contains filtered or unexported fields }
GameSelect is the builder for selecting fields of Game entities.
func (*GameSelect) Aggregate ¶
func (gs *GameSelect) Aggregate(fns ...AggregateFunc) *GameSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GameSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GameSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GameSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GameSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GameSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GameSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GameSelect) Scan ¶
func (gs *GameSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GameSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GameUpdate ¶
type GameUpdate struct {
// contains filtered or unexported fields
}
GameUpdate is the builder for updating Game entities.
func (*GameUpdate) AddAssassinChance ¶
func (gu *GameUpdate) AddAssassinChance(u int8) *GameUpdate
AddAssassinChance adds u to the "assassin_chance" field.
func (*GameUpdate) AddCapacity ¶
func (gu *GameUpdate) AddCapacity(u int8) *GameUpdate
AddCapacity adds u to the "capacity" field.
func (*GameUpdate) AddCreatedBy ¶
func (gu *GameUpdate) AddCreatedBy(i int64) *GameUpdate
AddCreatedBy adds i to the "created_by" field.
func (*GameUpdate) AddGameUserIDs ¶
func (gu *GameUpdate) AddGameUserIDs(ids ...int64) *GameUpdate
AddGameUserIDs adds the "game_users" edge to the GameUser entity by IDs.
func (*GameUpdate) AddGameUsers ¶
func (gu *GameUpdate) AddGameUsers(g ...*GameUser) *GameUpdate
AddGameUsers adds the "game_users" edges to the GameUser entity.
func (*GameUpdate) AddMissionIDs ¶
func (gu *GameUpdate) AddMissionIDs(ids ...int64) *GameUpdate
AddMissionIDs adds the "missions" edge to the Mission entity by IDs.
func (*GameUpdate) AddMissions ¶
func (gu *GameUpdate) AddMissions(m ...*Mission) *GameUpdate
AddMissions adds the "missions" edges to the Mission entity.
func (*GameUpdate) AddUpdatedBy ¶
func (gu *GameUpdate) AddUpdatedBy(i int64) *GameUpdate
AddUpdatedBy adds i to the "updated_by" field.
func (*GameUpdate) AppendTheAssassinatedIds ¶
func (gu *GameUpdate) AppendTheAssassinatedIds(s []string) *GameUpdate
AppendTheAssassinatedIds appends s to the "the_assassinated_ids" field.
func (*GameUpdate) ClearGameUsers ¶
func (gu *GameUpdate) ClearGameUsers() *GameUpdate
ClearGameUsers clears all "game_users" edges to the GameUser entity.
func (*GameUpdate) ClearMissions ¶
func (gu *GameUpdate) ClearMissions() *GameUpdate
ClearMissions clears all "missions" edges to the Mission entity.
func (*GameUpdate) ClearRoom ¶
func (gu *GameUpdate) ClearRoom() *GameUpdate
ClearRoom clears the "room" edge to the Room entity.
func (*GameUpdate) ClearTheAssassinatedIds ¶
func (gu *GameUpdate) ClearTheAssassinatedIds() *GameUpdate
ClearTheAssassinatedIds clears the value of the "the_assassinated_ids" field.
func (*GameUpdate) Exec ¶
func (gu *GameUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GameUpdate) ExecX ¶
func (gu *GameUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameUpdate) Mutation ¶
func (gu *GameUpdate) Mutation() *GameMutation
Mutation returns the GameMutation object of the builder.
func (*GameUpdate) RemoveGameUserIDs ¶
func (gu *GameUpdate) RemoveGameUserIDs(ids ...int64) *GameUpdate
RemoveGameUserIDs removes the "game_users" edge to GameUser entities by IDs.
func (*GameUpdate) RemoveGameUsers ¶
func (gu *GameUpdate) RemoveGameUsers(g ...*GameUser) *GameUpdate
RemoveGameUsers removes "game_users" edges to GameUser entities.
func (*GameUpdate) RemoveMissionIDs ¶
func (gu *GameUpdate) RemoveMissionIDs(ids ...int64) *GameUpdate
RemoveMissionIDs removes the "missions" edge to Mission entities by IDs.
func (*GameUpdate) RemoveMissions ¶
func (gu *GameUpdate) RemoveMissions(m ...*Mission) *GameUpdate
RemoveMissions removes "missions" edges to Mission entities.
func (*GameUpdate) Save ¶
func (gu *GameUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GameUpdate) SaveX ¶
func (gu *GameUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GameUpdate) SetAssassinChance ¶
func (gu *GameUpdate) SetAssassinChance(u uint8) *GameUpdate
SetAssassinChance sets the "assassin_chance" field.
func (*GameUpdate) SetCapacity ¶
func (gu *GameUpdate) SetCapacity(u uint8) *GameUpdate
SetCapacity sets the "capacity" field.
func (*GameUpdate) SetClosed ¶
func (gu *GameUpdate) SetClosed(b bool) *GameUpdate
SetClosed sets the "closed" field.
func (*GameUpdate) SetCreatedBy ¶
func (gu *GameUpdate) SetCreatedBy(i int64) *GameUpdate
SetCreatedBy sets the "created_by" field.
func (*GameUpdate) SetDeletedAt ¶
func (gu *GameUpdate) SetDeletedAt(t time.Time) *GameUpdate
SetDeletedAt sets the "deleted_at" field.
func (*GameUpdate) SetInput ¶
func (c *GameUpdate) SetInput(i UpdateGameInput) *GameUpdate
SetInput applies the change-set in the UpdateGameInput on the GameUpdate builder.
func (*GameUpdate) SetNillableAssassinChance ¶
func (gu *GameUpdate) SetNillableAssassinChance(u *uint8) *GameUpdate
SetNillableAssassinChance sets the "assassin_chance" field if the given value is not nil.
func (*GameUpdate) SetNillableCapacity ¶
func (gu *GameUpdate) SetNillableCapacity(u *uint8) *GameUpdate
SetNillableCapacity sets the "capacity" field if the given value is not nil.
func (*GameUpdate) SetNillableClosed ¶
func (gu *GameUpdate) SetNillableClosed(b *bool) *GameUpdate
SetNillableClosed sets the "closed" field if the given value is not nil.
func (*GameUpdate) SetNillableCreatedBy ¶
func (gu *GameUpdate) SetNillableCreatedBy(i *int64) *GameUpdate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*GameUpdate) SetNillableDeletedAt ¶
func (gu *GameUpdate) SetNillableDeletedAt(t *time.Time) *GameUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*GameUpdate) SetNillableResult ¶
func (gu *GameUpdate) SetNillableResult(ga *game.Result) *GameUpdate
SetNillableResult sets the "result" field if the given value is not nil.
func (*GameUpdate) SetNillableUpdatedBy ¶
func (gu *GameUpdate) SetNillableUpdatedBy(i *int64) *GameUpdate
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*GameUpdate) SetResult ¶
func (gu *GameUpdate) SetResult(ga game.Result) *GameUpdate
SetResult sets the "result" field.
func (*GameUpdate) SetRoom ¶
func (gu *GameUpdate) SetRoom(r *Room) *GameUpdate
SetRoom sets the "room" edge to the Room entity.
func (*GameUpdate) SetRoomID ¶
func (gu *GameUpdate) SetRoomID(i int64) *GameUpdate
SetRoomID sets the "room_id" field.
func (*GameUpdate) SetTheAssassinatedIds ¶
func (gu *GameUpdate) SetTheAssassinatedIds(s []string) *GameUpdate
SetTheAssassinatedIds sets the "the_assassinated_ids" field.
func (*GameUpdate) SetUpdatedAt ¶
func (gu *GameUpdate) SetUpdatedAt(t time.Time) *GameUpdate
SetUpdatedAt sets the "updated_at" field.
func (*GameUpdate) SetUpdatedBy ¶
func (gu *GameUpdate) SetUpdatedBy(i int64) *GameUpdate
SetUpdatedBy sets the "updated_by" field.
func (*GameUpdate) Where ¶
func (gu *GameUpdate) Where(ps ...predicate.Game) *GameUpdate
Where appends a list predicates to the GameUpdate builder.
type GameUpdateOne ¶
type GameUpdateOne struct {
// contains filtered or unexported fields
}
GameUpdateOne is the builder for updating a single Game entity.
func (*GameUpdateOne) AddAssassinChance ¶
func (guo *GameUpdateOne) AddAssassinChance(u int8) *GameUpdateOne
AddAssassinChance adds u to the "assassin_chance" field.
func (*GameUpdateOne) AddCapacity ¶
func (guo *GameUpdateOne) AddCapacity(u int8) *GameUpdateOne
AddCapacity adds u to the "capacity" field.
func (*GameUpdateOne) AddCreatedBy ¶
func (guo *GameUpdateOne) AddCreatedBy(i int64) *GameUpdateOne
AddCreatedBy adds i to the "created_by" field.
func (*GameUpdateOne) AddGameUserIDs ¶
func (guo *GameUpdateOne) AddGameUserIDs(ids ...int64) *GameUpdateOne
AddGameUserIDs adds the "game_users" edge to the GameUser entity by IDs.
func (*GameUpdateOne) AddGameUsers ¶
func (guo *GameUpdateOne) AddGameUsers(g ...*GameUser) *GameUpdateOne
AddGameUsers adds the "game_users" edges to the GameUser entity.
func (*GameUpdateOne) AddMissionIDs ¶
func (guo *GameUpdateOne) AddMissionIDs(ids ...int64) *GameUpdateOne
AddMissionIDs adds the "missions" edge to the Mission entity by IDs.
func (*GameUpdateOne) AddMissions ¶
func (guo *GameUpdateOne) AddMissions(m ...*Mission) *GameUpdateOne
AddMissions adds the "missions" edges to the Mission entity.
func (*GameUpdateOne) AddUpdatedBy ¶
func (guo *GameUpdateOne) AddUpdatedBy(i int64) *GameUpdateOne
AddUpdatedBy adds i to the "updated_by" field.
func (*GameUpdateOne) AppendTheAssassinatedIds ¶
func (guo *GameUpdateOne) AppendTheAssassinatedIds(s []string) *GameUpdateOne
AppendTheAssassinatedIds appends s to the "the_assassinated_ids" field.
func (*GameUpdateOne) ClearGameUsers ¶
func (guo *GameUpdateOne) ClearGameUsers() *GameUpdateOne
ClearGameUsers clears all "game_users" edges to the GameUser entity.
func (*GameUpdateOne) ClearMissions ¶
func (guo *GameUpdateOne) ClearMissions() *GameUpdateOne
ClearMissions clears all "missions" edges to the Mission entity.
func (*GameUpdateOne) ClearRoom ¶
func (guo *GameUpdateOne) ClearRoom() *GameUpdateOne
ClearRoom clears the "room" edge to the Room entity.
func (*GameUpdateOne) ClearTheAssassinatedIds ¶
func (guo *GameUpdateOne) ClearTheAssassinatedIds() *GameUpdateOne
ClearTheAssassinatedIds clears the value of the "the_assassinated_ids" field.
func (*GameUpdateOne) Exec ¶
func (guo *GameUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GameUpdateOne) ExecX ¶
func (guo *GameUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameUpdateOne) Mutation ¶
func (guo *GameUpdateOne) Mutation() *GameMutation
Mutation returns the GameMutation object of the builder.
func (*GameUpdateOne) RemoveGameUserIDs ¶
func (guo *GameUpdateOne) RemoveGameUserIDs(ids ...int64) *GameUpdateOne
RemoveGameUserIDs removes the "game_users" edge to GameUser entities by IDs.
func (*GameUpdateOne) RemoveGameUsers ¶
func (guo *GameUpdateOne) RemoveGameUsers(g ...*GameUser) *GameUpdateOne
RemoveGameUsers removes "game_users" edges to GameUser entities.
func (*GameUpdateOne) RemoveMissionIDs ¶
func (guo *GameUpdateOne) RemoveMissionIDs(ids ...int64) *GameUpdateOne
RemoveMissionIDs removes the "missions" edge to Mission entities by IDs.
func (*GameUpdateOne) RemoveMissions ¶
func (guo *GameUpdateOne) RemoveMissions(m ...*Mission) *GameUpdateOne
RemoveMissions removes "missions" edges to Mission entities.
func (*GameUpdateOne) Save ¶
func (guo *GameUpdateOne) Save(ctx context.Context) (*Game, error)
Save executes the query and returns the updated Game entity.
func (*GameUpdateOne) SaveX ¶
func (guo *GameUpdateOne) SaveX(ctx context.Context) *Game
SaveX is like Save, but panics if an error occurs.
func (*GameUpdateOne) Select ¶
func (guo *GameUpdateOne) Select(field string, fields ...string) *GameUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GameUpdateOne) SetAssassinChance ¶
func (guo *GameUpdateOne) SetAssassinChance(u uint8) *GameUpdateOne
SetAssassinChance sets the "assassin_chance" field.
func (*GameUpdateOne) SetCapacity ¶
func (guo *GameUpdateOne) SetCapacity(u uint8) *GameUpdateOne
SetCapacity sets the "capacity" field.
func (*GameUpdateOne) SetClosed ¶
func (guo *GameUpdateOne) SetClosed(b bool) *GameUpdateOne
SetClosed sets the "closed" field.
func (*GameUpdateOne) SetCreatedBy ¶
func (guo *GameUpdateOne) SetCreatedBy(i int64) *GameUpdateOne
SetCreatedBy sets the "created_by" field.
func (*GameUpdateOne) SetDeletedAt ¶
func (guo *GameUpdateOne) SetDeletedAt(t time.Time) *GameUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*GameUpdateOne) SetInput ¶
func (c *GameUpdateOne) SetInput(i UpdateGameInput) *GameUpdateOne
SetInput applies the change-set in the UpdateGameInput on the GameUpdateOne builder.
func (*GameUpdateOne) SetNillableAssassinChance ¶
func (guo *GameUpdateOne) SetNillableAssassinChance(u *uint8) *GameUpdateOne
SetNillableAssassinChance sets the "assassin_chance" field if the given value is not nil.
func (*GameUpdateOne) SetNillableCapacity ¶
func (guo *GameUpdateOne) SetNillableCapacity(u *uint8) *GameUpdateOne
SetNillableCapacity sets the "capacity" field if the given value is not nil.
func (*GameUpdateOne) SetNillableClosed ¶
func (guo *GameUpdateOne) SetNillableClosed(b *bool) *GameUpdateOne
SetNillableClosed sets the "closed" field if the given value is not nil.
func (*GameUpdateOne) SetNillableCreatedBy ¶
func (guo *GameUpdateOne) SetNillableCreatedBy(i *int64) *GameUpdateOne
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*GameUpdateOne) SetNillableDeletedAt ¶
func (guo *GameUpdateOne) SetNillableDeletedAt(t *time.Time) *GameUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*GameUpdateOne) SetNillableResult ¶
func (guo *GameUpdateOne) SetNillableResult(ga *game.Result) *GameUpdateOne
SetNillableResult sets the "result" field if the given value is not nil.
func (*GameUpdateOne) SetNillableUpdatedBy ¶
func (guo *GameUpdateOne) SetNillableUpdatedBy(i *int64) *GameUpdateOne
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*GameUpdateOne) SetResult ¶
func (guo *GameUpdateOne) SetResult(ga game.Result) *GameUpdateOne
SetResult sets the "result" field.
func (*GameUpdateOne) SetRoom ¶
func (guo *GameUpdateOne) SetRoom(r *Room) *GameUpdateOne
SetRoom sets the "room" edge to the Room entity.
func (*GameUpdateOne) SetRoomID ¶
func (guo *GameUpdateOne) SetRoomID(i int64) *GameUpdateOne
SetRoomID sets the "room_id" field.
func (*GameUpdateOne) SetTheAssassinatedIds ¶
func (guo *GameUpdateOne) SetTheAssassinatedIds(s []string) *GameUpdateOne
SetTheAssassinatedIds sets the "the_assassinated_ids" field.
func (*GameUpdateOne) SetUpdatedAt ¶
func (guo *GameUpdateOne) SetUpdatedAt(t time.Time) *GameUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*GameUpdateOne) SetUpdatedBy ¶
func (guo *GameUpdateOne) SetUpdatedBy(i int64) *GameUpdateOne
SetUpdatedBy sets the "updated_by" field.
type GameUser ¶
type GameUser struct { // ID of the ent. ID int64 `json:"id,omitempty"` // CreatedBy holds the value of the "created_by" field. CreatedBy int64 `json:"created_by"` // UpdatedBy holds the value of the "updated_by" field. UpdatedBy int64 `json:"updated_by"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt time.Time `json:"deleted_at"` // 用户 ID UserID int64 `json:"user_id"` // 游戏 ID GameID int64 `json:"game_id"` // 卡牌 ID CardID int64 `json:"card_id"` // 排序,号数 Number uint8 `json:"number"` // 用户是否已经退出游戏,都退出游戏时游戏关闭,为了让游戏结束时用户还可以进去查看结果 Exited bool `json:"exited"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the GameUserQuery when eager-loading is set. Edges GameUserEdges `json:"edges"` // contains filtered or unexported fields }
GameUser is the model entity for the GameUser schema.
func (*GameUser) ToEdge ¶
func (gu *GameUser) ToEdge(order *GameUserOrder) *GameUserEdge
ToEdge converts GameUser into GameUserEdge.
func (*GameUser) Unwrap ¶
Unwrap unwraps the GameUser 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 (*GameUser) Update ¶
func (gu *GameUser) Update() *GameUserUpdateOne
Update returns a builder for updating this GameUser. Note that you need to call GameUser.Unwrap() before calling this method if this GameUser was returned from a transaction, and the transaction was committed or rolled back.
type GameUserClient ¶
type GameUserClient struct {
// contains filtered or unexported fields
}
GameUserClient is a client for the GameUser schema.
func NewGameUserClient ¶
func NewGameUserClient(c config) *GameUserClient
NewGameUserClient returns a client for the GameUser from the given config.
func (*GameUserClient) Create ¶
func (c *GameUserClient) Create() *GameUserCreate
Create returns a builder for creating a GameUser entity.
func (*GameUserClient) CreateBulk ¶
func (c *GameUserClient) CreateBulk(builders ...*GameUserCreate) *GameUserCreateBulk
CreateBulk returns a builder for creating a bulk of GameUser entities.
func (*GameUserClient) Delete ¶
func (c *GameUserClient) Delete() *GameUserDelete
Delete returns a delete builder for GameUser.
func (*GameUserClient) DeleteOne ¶
func (c *GameUserClient) DeleteOne(gu *GameUser) *GameUserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GameUserClient) DeleteOneID ¶
func (c *GameUserClient) DeleteOneID(id int64) *GameUserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GameUserClient) GetX ¶
func (c *GameUserClient) GetX(ctx context.Context, id int64) *GameUser
GetX is like Get, but panics if an error occurs.
func (*GameUserClient) Hooks ¶
func (c *GameUserClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GameUserClient) Query ¶
func (c *GameUserClient) Query() *GameUserQuery
Query returns a query builder for GameUser.
func (*GameUserClient) QueryCard ¶
func (c *GameUserClient) QueryCard(gu *GameUser) *CardQuery
QueryCard queries the card edge of a GameUser.
func (*GameUserClient) QueryGame ¶
func (c *GameUserClient) QueryGame(gu *GameUser) *GameQuery
QueryGame queries the game edge of a GameUser.
func (*GameUserClient) Update ¶
func (c *GameUserClient) Update() *GameUserUpdate
Update returns an update builder for GameUser.
func (*GameUserClient) UpdateOne ¶
func (c *GameUserClient) UpdateOne(gu *GameUser) *GameUserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GameUserClient) UpdateOneID ¶
func (c *GameUserClient) UpdateOneID(id int64) *GameUserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GameUserClient) Use ¶
func (c *GameUserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `gameuser.Hooks(f(g(h())))`.
type GameUserConnection ¶
type GameUserConnection struct { Edges []*GameUserEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
GameUserConnection is the connection containing edges to GameUser.
type GameUserCreate ¶
type GameUserCreate struct {
// contains filtered or unexported fields
}
GameUserCreate is the builder for creating a GameUser entity.
func (*GameUserCreate) Exec ¶
func (guc *GameUserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GameUserCreate) ExecX ¶
func (guc *GameUserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameUserCreate) Mutation ¶
func (guc *GameUserCreate) Mutation() *GameUserMutation
Mutation returns the GameUserMutation object of the builder.
func (*GameUserCreate) Save ¶
func (guc *GameUserCreate) Save(ctx context.Context) (*GameUser, error)
Save creates the GameUser in the database.
func (*GameUserCreate) SaveX ¶
func (guc *GameUserCreate) SaveX(ctx context.Context) *GameUser
SaveX calls Save and panics if Save returns an error.
func (*GameUserCreate) SetCard ¶
func (guc *GameUserCreate) SetCard(c *Card) *GameUserCreate
SetCard sets the "card" edge to the Card entity.
func (*GameUserCreate) SetCardID ¶
func (guc *GameUserCreate) SetCardID(i int64) *GameUserCreate
SetCardID sets the "card_id" field.
func (*GameUserCreate) SetCreatedAt ¶
func (guc *GameUserCreate) SetCreatedAt(t time.Time) *GameUserCreate
SetCreatedAt sets the "created_at" field.
func (*GameUserCreate) SetCreatedBy ¶
func (guc *GameUserCreate) SetCreatedBy(i int64) *GameUserCreate
SetCreatedBy sets the "created_by" field.
func (*GameUserCreate) SetDeletedAt ¶
func (guc *GameUserCreate) SetDeletedAt(t time.Time) *GameUserCreate
SetDeletedAt sets the "deleted_at" field.
func (*GameUserCreate) SetExited ¶
func (guc *GameUserCreate) SetExited(b bool) *GameUserCreate
SetExited sets the "exited" field.
func (*GameUserCreate) SetGame ¶
func (guc *GameUserCreate) SetGame(g *Game) *GameUserCreate
SetGame sets the "game" edge to the Game entity.
func (*GameUserCreate) SetGameID ¶
func (guc *GameUserCreate) SetGameID(i int64) *GameUserCreate
SetGameID sets the "game_id" field.
func (*GameUserCreate) SetID ¶
func (guc *GameUserCreate) SetID(i int64) *GameUserCreate
SetID sets the "id" field.
func (*GameUserCreate) SetInput ¶
func (c *GameUserCreate) SetInput(i CreateGameUserInput) *GameUserCreate
SetInput applies the change-set in the CreateGameUserInput on the GameUserCreate builder.
func (*GameUserCreate) SetNillableCreatedAt ¶
func (guc *GameUserCreate) SetNillableCreatedAt(t *time.Time) *GameUserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*GameUserCreate) SetNillableCreatedBy ¶
func (guc *GameUserCreate) SetNillableCreatedBy(i *int64) *GameUserCreate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*GameUserCreate) SetNillableDeletedAt ¶
func (guc *GameUserCreate) SetNillableDeletedAt(t *time.Time) *GameUserCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*GameUserCreate) SetNillableExited ¶
func (guc *GameUserCreate) SetNillableExited(b *bool) *GameUserCreate
SetNillableExited sets the "exited" field if the given value is not nil.
func (*GameUserCreate) SetNillableID ¶
func (guc *GameUserCreate) SetNillableID(i *int64) *GameUserCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*GameUserCreate) SetNillableUpdatedAt ¶
func (guc *GameUserCreate) SetNillableUpdatedAt(t *time.Time) *GameUserCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*GameUserCreate) SetNillableUpdatedBy ¶
func (guc *GameUserCreate) SetNillableUpdatedBy(i *int64) *GameUserCreate
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*GameUserCreate) SetNumber ¶
func (guc *GameUserCreate) SetNumber(u uint8) *GameUserCreate
SetNumber sets the "number" field.
func (*GameUserCreate) SetUpdatedAt ¶
func (guc *GameUserCreate) SetUpdatedAt(t time.Time) *GameUserCreate
SetUpdatedAt sets the "updated_at" field.
func (*GameUserCreate) SetUpdatedBy ¶
func (guc *GameUserCreate) SetUpdatedBy(i int64) *GameUserCreate
SetUpdatedBy sets the "updated_by" field.
func (*GameUserCreate) SetUserID ¶
func (guc *GameUserCreate) SetUserID(i int64) *GameUserCreate
SetUserID sets the "user_id" field.
type GameUserCreateBulk ¶
type GameUserCreateBulk struct {
// contains filtered or unexported fields
}
GameUserCreateBulk is the builder for creating many GameUser entities in bulk.
func (*GameUserCreateBulk) Exec ¶
func (gucb *GameUserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GameUserCreateBulk) ExecX ¶
func (gucb *GameUserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type GameUserDelete ¶
type GameUserDelete struct {
// contains filtered or unexported fields
}
GameUserDelete is the builder for deleting a GameUser entity.
func (*GameUserDelete) Exec ¶
func (gud *GameUserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GameUserDelete) ExecX ¶
func (gud *GameUserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GameUserDelete) Where ¶
func (gud *GameUserDelete) Where(ps ...predicate.GameUser) *GameUserDelete
Where appends a list predicates to the GameUserDelete builder.
type GameUserDeleteOne ¶
type GameUserDeleteOne struct {
// contains filtered or unexported fields
}
GameUserDeleteOne is the builder for deleting a single GameUser entity.
func (*GameUserDeleteOne) Exec ¶
func (gudo *GameUserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GameUserDeleteOne) ExecX ¶
func (gudo *GameUserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type GameUserEdge ¶
GameUserEdge is the edge representation of GameUser.
type GameUserEdges ¶
type GameUserEdges struct { // Game holds the value of the game edge. Game *Game `json:"game,omitempty"` // Card holds the value of the card edge. Card *Card `json:"card,omitempty"` // contains filtered or unexported fields }
GameUserEdges holds the relations/edges for other nodes in the graph.
func (GameUserEdges) CardOrErr ¶
func (e GameUserEdges) CardOrErr() (*Card, error)
CardOrErr returns the Card value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (GameUserEdges) GameOrErr ¶
func (e GameUserEdges) GameOrErr() (*Game, error)
GameOrErr returns the Game value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type GameUserGroupBy ¶
type GameUserGroupBy struct {
// contains filtered or unexported fields
}
GameUserGroupBy is the group-by builder for GameUser entities.
func (*GameUserGroupBy) Aggregate ¶
func (gugb *GameUserGroupBy) Aggregate(fns ...AggregateFunc) *GameUserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GameUserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GameUserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GameUserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GameUserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GameUserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GameUserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GameUserGroupBy) Scan ¶
func (gugb *GameUserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*GameUserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GameUserMutation ¶
type GameUserMutation struct {
// contains filtered or unexported fields
}
GameUserMutation represents an operation that mutates the GameUser nodes in the graph.
func (*GameUserMutation) AddCreatedBy ¶
func (m *GameUserMutation) AddCreatedBy(i int64)
AddCreatedBy adds i to the "created_by" field.
func (*GameUserMutation) AddField ¶
func (m *GameUserMutation) 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 (*GameUserMutation) AddNumber ¶
func (m *GameUserMutation) AddNumber(u int8)
AddNumber adds u to the "number" field.
func (*GameUserMutation) AddUpdatedBy ¶
func (m *GameUserMutation) AddUpdatedBy(i int64)
AddUpdatedBy adds i to the "updated_by" field.
func (*GameUserMutation) AddUserID ¶
func (m *GameUserMutation) AddUserID(i int64)
AddUserID adds i to the "user_id" field.
func (*GameUserMutation) AddedCreatedBy ¶
func (m *GameUserMutation) AddedCreatedBy() (r int64, exists bool)
AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.
func (*GameUserMutation) AddedEdges ¶
func (m *GameUserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GameUserMutation) AddedField ¶
func (m *GameUserMutation) 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 (*GameUserMutation) AddedFields ¶
func (m *GameUserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GameUserMutation) AddedIDs ¶
func (m *GameUserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GameUserMutation) AddedNumber ¶
func (m *GameUserMutation) AddedNumber() (r int8, exists bool)
AddedNumber returns the value that was added to the "number" field in this mutation.
func (*GameUserMutation) AddedUpdatedBy ¶
func (m *GameUserMutation) AddedUpdatedBy() (r int64, exists bool)
AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.
func (*GameUserMutation) AddedUserID ¶
func (m *GameUserMutation) AddedUserID() (r int64, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*GameUserMutation) CardCleared ¶
func (m *GameUserMutation) CardCleared() bool
CardCleared reports if the "card" edge to the Card entity was cleared.
func (*GameUserMutation) CardID ¶
func (m *GameUserMutation) CardID() (r int64, exists bool)
CardID returns the value of the "card_id" field in the mutation.
func (*GameUserMutation) CardIDs ¶
func (m *GameUserMutation) CardIDs() (ids []int64)
CardIDs returns the "card" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CardID instead. It exists only for internal usage by the builders.
func (*GameUserMutation) ClearCard ¶
func (m *GameUserMutation) ClearCard()
ClearCard clears the "card" edge to the Card entity.
func (*GameUserMutation) ClearEdge ¶
func (m *GameUserMutation) 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 (*GameUserMutation) ClearField ¶
func (m *GameUserMutation) 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 (*GameUserMutation) ClearGame ¶
func (m *GameUserMutation) ClearGame()
ClearGame clears the "game" edge to the Game entity.
func (*GameUserMutation) ClearedEdges ¶
func (m *GameUserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GameUserMutation) ClearedFields ¶
func (m *GameUserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GameUserMutation) Client ¶
func (m GameUserMutation) 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 (*GameUserMutation) CreatedAt ¶
func (m *GameUserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*GameUserMutation) CreatedBy ¶
func (m *GameUserMutation) CreatedBy() (r int64, exists bool)
CreatedBy returns the value of the "created_by" field in the mutation.
func (*GameUserMutation) DeletedAt ¶
func (m *GameUserMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*GameUserMutation) EdgeCleared ¶
func (m *GameUserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GameUserMutation) Exited ¶
func (m *GameUserMutation) Exited() (r bool, exists bool)
Exited returns the value of the "exited" field in the mutation.
func (*GameUserMutation) Field ¶
func (m *GameUserMutation) 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 (*GameUserMutation) FieldCleared ¶
func (m *GameUserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GameUserMutation) Fields ¶
func (m *GameUserMutation) 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 (*GameUserMutation) GameCleared ¶
func (m *GameUserMutation) GameCleared() bool
GameCleared reports if the "game" edge to the Game entity was cleared.
func (*GameUserMutation) GameID ¶
func (m *GameUserMutation) GameID() (r int64, exists bool)
GameID returns the value of the "game_id" field in the mutation.
func (*GameUserMutation) GameIDs ¶
func (m *GameUserMutation) GameIDs() (ids []int64)
GameIDs returns the "game" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GameID instead. It exists only for internal usage by the builders.
func (*GameUserMutation) ID ¶
func (m *GameUserMutation) ID() (id int64, 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 (*GameUserMutation) IDs ¶
func (m *GameUserMutation) IDs(ctx context.Context) ([]int64, 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 (*GameUserMutation) Number ¶
func (m *GameUserMutation) Number() (r uint8, exists bool)
Number returns the value of the "number" field in the mutation.
func (*GameUserMutation) OldCardID ¶
func (m *GameUserMutation) OldCardID(ctx context.Context) (v int64, err error)
OldCardID returns the old "card_id" field's value of the GameUser entity. If the GameUser 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 (*GameUserMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the GameUser entity. If the GameUser 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 (*GameUserMutation) OldCreatedBy ¶
func (m *GameUserMutation) OldCreatedBy(ctx context.Context) (v int64, err error)
OldCreatedBy returns the old "created_by" field's value of the GameUser entity. If the GameUser 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 (*GameUserMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the GameUser entity. If the GameUser 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 (*GameUserMutation) OldExited ¶
func (m *GameUserMutation) OldExited(ctx context.Context) (v bool, err error)
OldExited returns the old "exited" field's value of the GameUser entity. If the GameUser 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 (*GameUserMutation) 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 (*GameUserMutation) OldGameID ¶
func (m *GameUserMutation) OldGameID(ctx context.Context) (v int64, err error)
OldGameID returns the old "game_id" field's value of the GameUser entity. If the GameUser 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 (*GameUserMutation) OldNumber ¶
func (m *GameUserMutation) OldNumber(ctx context.Context) (v uint8, err error)
OldNumber returns the old "number" field's value of the GameUser entity. If the GameUser 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 (*GameUserMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the GameUser entity. If the GameUser 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 (*GameUserMutation) OldUpdatedBy ¶
func (m *GameUserMutation) OldUpdatedBy(ctx context.Context) (v int64, err error)
OldUpdatedBy returns the old "updated_by" field's value of the GameUser entity. If the GameUser 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 (*GameUserMutation) OldUserID ¶
func (m *GameUserMutation) OldUserID(ctx context.Context) (v int64, err error)
OldUserID returns the old "user_id" field's value of the GameUser entity. If the GameUser 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 (*GameUserMutation) RemovedEdges ¶
func (m *GameUserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GameUserMutation) RemovedIDs ¶
func (m *GameUserMutation) 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 (*GameUserMutation) ResetCard ¶
func (m *GameUserMutation) ResetCard()
ResetCard resets all changes to the "card" edge.
func (*GameUserMutation) ResetCardID ¶
func (m *GameUserMutation) ResetCardID()
ResetCardID resets all changes to the "card_id" field.
func (*GameUserMutation) ResetCreatedAt ¶
func (m *GameUserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*GameUserMutation) ResetCreatedBy ¶
func (m *GameUserMutation) ResetCreatedBy()
ResetCreatedBy resets all changes to the "created_by" field.
func (*GameUserMutation) ResetDeletedAt ¶
func (m *GameUserMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*GameUserMutation) ResetEdge ¶
func (m *GameUserMutation) 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 (*GameUserMutation) ResetExited ¶
func (m *GameUserMutation) ResetExited()
ResetExited resets all changes to the "exited" field.
func (*GameUserMutation) ResetField ¶
func (m *GameUserMutation) 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 (*GameUserMutation) ResetGame ¶
func (m *GameUserMutation) ResetGame()
ResetGame resets all changes to the "game" edge.
func (*GameUserMutation) ResetGameID ¶
func (m *GameUserMutation) ResetGameID()
ResetGameID resets all changes to the "game_id" field.
func (*GameUserMutation) ResetNumber ¶
func (m *GameUserMutation) ResetNumber()
ResetNumber resets all changes to the "number" field.
func (*GameUserMutation) ResetUpdatedAt ¶
func (m *GameUserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*GameUserMutation) ResetUpdatedBy ¶
func (m *GameUserMutation) ResetUpdatedBy()
ResetUpdatedBy resets all changes to the "updated_by" field.
func (*GameUserMutation) ResetUserID ¶
func (m *GameUserMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*GameUserMutation) SetCardID ¶
func (m *GameUserMutation) SetCardID(i int64)
SetCardID sets the "card_id" field.
func (*GameUserMutation) SetCreatedAt ¶
func (m *GameUserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*GameUserMutation) SetCreatedBy ¶
func (m *GameUserMutation) SetCreatedBy(i int64)
SetCreatedBy sets the "created_by" field.
func (*GameUserMutation) SetDeletedAt ¶
func (m *GameUserMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*GameUserMutation) SetExited ¶
func (m *GameUserMutation) SetExited(b bool)
SetExited sets the "exited" field.
func (*GameUserMutation) SetField ¶
func (m *GameUserMutation) 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 (*GameUserMutation) SetGameID ¶
func (m *GameUserMutation) SetGameID(i int64)
SetGameID sets the "game_id" field.
func (*GameUserMutation) SetID ¶
func (m *GameUserMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of GameUser entities.
func (*GameUserMutation) SetNumber ¶
func (m *GameUserMutation) SetNumber(u uint8)
SetNumber sets the "number" field.
func (*GameUserMutation) SetUpdatedAt ¶
func (m *GameUserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*GameUserMutation) SetUpdatedBy ¶
func (m *GameUserMutation) SetUpdatedBy(i int64)
SetUpdatedBy sets the "updated_by" field.
func (*GameUserMutation) SetUserID ¶
func (m *GameUserMutation) SetUserID(i int64)
SetUserID sets the "user_id" field.
func (GameUserMutation) Tx ¶
func (m GameUserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GameUserMutation) Type ¶
func (m *GameUserMutation) Type() string
Type returns the node type of this mutation (GameUser).
func (*GameUserMutation) UpdatedAt ¶
func (m *GameUserMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*GameUserMutation) UpdatedBy ¶
func (m *GameUserMutation) UpdatedBy() (r int64, exists bool)
UpdatedBy returns the value of the "updated_by" field in the mutation.
func (*GameUserMutation) UserID ¶
func (m *GameUserMutation) UserID() (r int64, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*GameUserMutation) Where ¶
func (m *GameUserMutation) Where(ps ...predicate.GameUser)
Where appends a list predicates to the GameUserMutation builder.
type GameUserOrder ¶
type GameUserOrder struct { Direction OrderDirection `json:"direction"` Field *GameUserOrderField `json:"field"` }
GameUserOrder defines the ordering of GameUser.
type GameUserOrderField ¶
type GameUserOrderField struct {
// contains filtered or unexported fields
}
GameUserOrderField defines the ordering field of GameUser.
func (GameUserOrderField) MarshalGQL ¶
func (f GameUserOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (GameUserOrderField) String ¶
func (f GameUserOrderField) String() string
String implement fmt.Stringer interface.
func (*GameUserOrderField) UnmarshalGQL ¶
func (f *GameUserOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type GameUserPaginateOption ¶
type GameUserPaginateOption func(*gameuserPager) error
GameUserPaginateOption enables pagination customization.
func WithGameUserFilter ¶
func WithGameUserFilter(filter func(*GameUserQuery) (*GameUserQuery, error)) GameUserPaginateOption
WithGameUserFilter configures pagination filter.
func WithGameUserOrder ¶
func WithGameUserOrder(order *GameUserOrder) GameUserPaginateOption
WithGameUserOrder configures pagination ordering.
type GameUserQuery ¶
type GameUserQuery struct {
// contains filtered or unexported fields
}
GameUserQuery is the builder for querying GameUser entities.
func (*GameUserQuery) Aggregate ¶
func (guq *GameUserQuery) Aggregate(fns ...AggregateFunc) *GameUserSelect
Aggregate returns a GameUserSelect configured with the given aggregations.
func (*GameUserQuery) All ¶
func (guq *GameUserQuery) All(ctx context.Context) ([]*GameUser, error)
All executes the query and returns a list of GameUsers.
func (*GameUserQuery) AllX ¶
func (guq *GameUserQuery) AllX(ctx context.Context) []*GameUser
AllX is like All, but panics if an error occurs.
func (*GameUserQuery) Clone ¶
func (guq *GameUserQuery) Clone() *GameUserQuery
Clone returns a duplicate of the GameUserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GameUserQuery) CollectFields ¶
func (gu *GameUserQuery) CollectFields(ctx context.Context, satisfies ...string) (*GameUserQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*GameUserQuery) Count ¶
func (guq *GameUserQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GameUserQuery) CountX ¶
func (guq *GameUserQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GameUserQuery) Exist ¶
func (guq *GameUserQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GameUserQuery) ExistX ¶
func (guq *GameUserQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GameUserQuery) First ¶
func (guq *GameUserQuery) First(ctx context.Context) (*GameUser, error)
First returns the first GameUser entity from the query. Returns a *NotFoundError when no GameUser was found.
func (*GameUserQuery) FirstID ¶
func (guq *GameUserQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first GameUser ID from the query. Returns a *NotFoundError when no GameUser ID was found.
func (*GameUserQuery) FirstIDX ¶
func (guq *GameUserQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*GameUserQuery) FirstX ¶
func (guq *GameUserQuery) FirstX(ctx context.Context) *GameUser
FirstX is like First, but panics if an error occurs.
func (*GameUserQuery) GroupBy ¶
func (guq *GameUserQuery) GroupBy(field string, fields ...string) *GameUserGroupBy
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 { CreatedBy int64 `json:"created_by"` Count int `json:"count,omitempty"` } client.GameUser.Query(). GroupBy(gameuser.FieldCreatedBy). Aggregate(ent.Count()). Scan(ctx, &v)
func (*GameUserQuery) IDs ¶
func (guq *GameUserQuery) IDs(ctx context.Context) ([]int64, error)
IDs executes the query and returns a list of GameUser IDs.
func (*GameUserQuery) IDsX ¶
func (guq *GameUserQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*GameUserQuery) Limit ¶
func (guq *GameUserQuery) Limit(limit int) *GameUserQuery
Limit adds a limit step to the query.
func (*GameUserQuery) Offset ¶
func (guq *GameUserQuery) Offset(offset int) *GameUserQuery
Offset adds an offset step to the query.
func (*GameUserQuery) Only ¶
func (guq *GameUserQuery) Only(ctx context.Context) (*GameUser, error)
Only returns a single GameUser entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GameUser entity is found. Returns a *NotFoundError when no GameUser entities are found.
func (*GameUserQuery) OnlyID ¶
func (guq *GameUserQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only GameUser ID in the query. Returns a *NotSingularError when more than one GameUser ID is found. Returns a *NotFoundError when no entities are found.
func (*GameUserQuery) OnlyIDX ¶
func (guq *GameUserQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GameUserQuery) OnlyX ¶
func (guq *GameUserQuery) OnlyX(ctx context.Context) *GameUser
OnlyX is like Only, but panics if an error occurs.
func (*GameUserQuery) Order ¶
func (guq *GameUserQuery) Order(o ...OrderFunc) *GameUserQuery
Order adds an order step to the query.
func (*GameUserQuery) Paginate ¶
func (gu *GameUserQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...GameUserPaginateOption, ) (*GameUserConnection, error)
Paginate executes the query and returns a relay based cursor connection to GameUser.
func (*GameUserQuery) QueryCard ¶
func (guq *GameUserQuery) QueryCard() *CardQuery
QueryCard chains the current query on the "card" edge.
func (*GameUserQuery) QueryGame ¶
func (guq *GameUserQuery) QueryGame() *GameQuery
QueryGame chains the current query on the "game" edge.
func (*GameUserQuery) Select ¶
func (guq *GameUserQuery) Select(fields ...string) *GameUserSelect
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 { CreatedBy int64 `json:"created_by"` } client.GameUser.Query(). Select(gameuser.FieldCreatedBy). Scan(ctx, &v)
func (*GameUserQuery) Unique ¶
func (guq *GameUserQuery) Unique(unique bool) *GameUserQuery
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 (*GameUserQuery) Where ¶
func (guq *GameUserQuery) Where(ps ...predicate.GameUser) *GameUserQuery
Where adds a new predicate for the GameUserQuery builder.
func (*GameUserQuery) WithCard ¶
func (guq *GameUserQuery) WithCard(opts ...func(*CardQuery)) *GameUserQuery
WithCard tells the query-builder to eager-load the nodes that are connected to the "card" edge. The optional arguments are used to configure the query builder of the edge.
func (*GameUserQuery) WithGame ¶
func (guq *GameUserQuery) WithGame(opts ...func(*GameQuery)) *GameUserQuery
WithGame tells the query-builder to eager-load the nodes that are connected to the "game" edge. The optional arguments are used to configure the query builder of the edge.
type GameUserSelect ¶
type GameUserSelect struct { *GameUserQuery // contains filtered or unexported fields }
GameUserSelect is the builder for selecting fields of GameUser entities.
func (*GameUserSelect) Aggregate ¶
func (gus *GameUserSelect) Aggregate(fns ...AggregateFunc) *GameUserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GameUserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GameUserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GameUserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GameUserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GameUserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GameUserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GameUserSelect) Scan ¶
func (gus *GameUserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GameUserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GameUserUpdate ¶
type GameUserUpdate struct {
// contains filtered or unexported fields
}
GameUserUpdate is the builder for updating GameUser entities.
func (*GameUserUpdate) AddCreatedBy ¶
func (guu *GameUserUpdate) AddCreatedBy(i int64) *GameUserUpdate
AddCreatedBy adds i to the "created_by" field.
func (*GameUserUpdate) AddNumber ¶
func (guu *GameUserUpdate) AddNumber(u int8) *GameUserUpdate
AddNumber adds u to the "number" field.
func (*GameUserUpdate) AddUpdatedBy ¶
func (guu *GameUserUpdate) AddUpdatedBy(i int64) *GameUserUpdate
AddUpdatedBy adds i to the "updated_by" field.
func (*GameUserUpdate) AddUserID ¶
func (guu *GameUserUpdate) AddUserID(i int64) *GameUserUpdate
AddUserID adds i to the "user_id" field.
func (*GameUserUpdate) ClearCard ¶
func (guu *GameUserUpdate) ClearCard() *GameUserUpdate
ClearCard clears the "card" edge to the Card entity.
func (*GameUserUpdate) ClearGame ¶
func (guu *GameUserUpdate) ClearGame() *GameUserUpdate
ClearGame clears the "game" edge to the Game entity.
func (*GameUserUpdate) Exec ¶
func (guu *GameUserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GameUserUpdate) ExecX ¶
func (guu *GameUserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameUserUpdate) Mutation ¶
func (guu *GameUserUpdate) Mutation() *GameUserMutation
Mutation returns the GameUserMutation object of the builder.
func (*GameUserUpdate) Save ¶
func (guu *GameUserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GameUserUpdate) SaveX ¶
func (guu *GameUserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GameUserUpdate) SetCard ¶
func (guu *GameUserUpdate) SetCard(c *Card) *GameUserUpdate
SetCard sets the "card" edge to the Card entity.
func (*GameUserUpdate) SetCardID ¶
func (guu *GameUserUpdate) SetCardID(i int64) *GameUserUpdate
SetCardID sets the "card_id" field.
func (*GameUserUpdate) SetCreatedBy ¶
func (guu *GameUserUpdate) SetCreatedBy(i int64) *GameUserUpdate
SetCreatedBy sets the "created_by" field.
func (*GameUserUpdate) SetDeletedAt ¶
func (guu *GameUserUpdate) SetDeletedAt(t time.Time) *GameUserUpdate
SetDeletedAt sets the "deleted_at" field.
func (*GameUserUpdate) SetExited ¶
func (guu *GameUserUpdate) SetExited(b bool) *GameUserUpdate
SetExited sets the "exited" field.
func (*GameUserUpdate) SetGame ¶
func (guu *GameUserUpdate) SetGame(g *Game) *GameUserUpdate
SetGame sets the "game" edge to the Game entity.
func (*GameUserUpdate) SetGameID ¶
func (guu *GameUserUpdate) SetGameID(i int64) *GameUserUpdate
SetGameID sets the "game_id" field.
func (*GameUserUpdate) SetInput ¶
func (c *GameUserUpdate) SetInput(i UpdateGameUserInput) *GameUserUpdate
SetInput applies the change-set in the UpdateGameUserInput on the GameUserUpdate builder.
func (*GameUserUpdate) SetNillableCreatedBy ¶
func (guu *GameUserUpdate) SetNillableCreatedBy(i *int64) *GameUserUpdate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*GameUserUpdate) SetNillableDeletedAt ¶
func (guu *GameUserUpdate) SetNillableDeletedAt(t *time.Time) *GameUserUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*GameUserUpdate) SetNillableExited ¶
func (guu *GameUserUpdate) SetNillableExited(b *bool) *GameUserUpdate
SetNillableExited sets the "exited" field if the given value is not nil.
func (*GameUserUpdate) SetNillableUpdatedBy ¶
func (guu *GameUserUpdate) SetNillableUpdatedBy(i *int64) *GameUserUpdate
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*GameUserUpdate) SetNumber ¶
func (guu *GameUserUpdate) SetNumber(u uint8) *GameUserUpdate
SetNumber sets the "number" field.
func (*GameUserUpdate) SetUpdatedAt ¶
func (guu *GameUserUpdate) SetUpdatedAt(t time.Time) *GameUserUpdate
SetUpdatedAt sets the "updated_at" field.
func (*GameUserUpdate) SetUpdatedBy ¶
func (guu *GameUserUpdate) SetUpdatedBy(i int64) *GameUserUpdate
SetUpdatedBy sets the "updated_by" field.
func (*GameUserUpdate) SetUserID ¶
func (guu *GameUserUpdate) SetUserID(i int64) *GameUserUpdate
SetUserID sets the "user_id" field.
func (*GameUserUpdate) Where ¶
func (guu *GameUserUpdate) Where(ps ...predicate.GameUser) *GameUserUpdate
Where appends a list predicates to the GameUserUpdate builder.
type GameUserUpdateOne ¶
type GameUserUpdateOne struct {
// contains filtered or unexported fields
}
GameUserUpdateOne is the builder for updating a single GameUser entity.
func (*GameUserUpdateOne) AddCreatedBy ¶
func (guuo *GameUserUpdateOne) AddCreatedBy(i int64) *GameUserUpdateOne
AddCreatedBy adds i to the "created_by" field.
func (*GameUserUpdateOne) AddNumber ¶
func (guuo *GameUserUpdateOne) AddNumber(u int8) *GameUserUpdateOne
AddNumber adds u to the "number" field.
func (*GameUserUpdateOne) AddUpdatedBy ¶
func (guuo *GameUserUpdateOne) AddUpdatedBy(i int64) *GameUserUpdateOne
AddUpdatedBy adds i to the "updated_by" field.
func (*GameUserUpdateOne) AddUserID ¶
func (guuo *GameUserUpdateOne) AddUserID(i int64) *GameUserUpdateOne
AddUserID adds i to the "user_id" field.
func (*GameUserUpdateOne) ClearCard ¶
func (guuo *GameUserUpdateOne) ClearCard() *GameUserUpdateOne
ClearCard clears the "card" edge to the Card entity.
func (*GameUserUpdateOne) ClearGame ¶
func (guuo *GameUserUpdateOne) ClearGame() *GameUserUpdateOne
ClearGame clears the "game" edge to the Game entity.
func (*GameUserUpdateOne) Exec ¶
func (guuo *GameUserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GameUserUpdateOne) ExecX ¶
func (guuo *GameUserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameUserUpdateOne) Mutation ¶
func (guuo *GameUserUpdateOne) Mutation() *GameUserMutation
Mutation returns the GameUserMutation object of the builder.
func (*GameUserUpdateOne) Save ¶
func (guuo *GameUserUpdateOne) Save(ctx context.Context) (*GameUser, error)
Save executes the query and returns the updated GameUser entity.
func (*GameUserUpdateOne) SaveX ¶
func (guuo *GameUserUpdateOne) SaveX(ctx context.Context) *GameUser
SaveX is like Save, but panics if an error occurs.
func (*GameUserUpdateOne) Select ¶
func (guuo *GameUserUpdateOne) Select(field string, fields ...string) *GameUserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GameUserUpdateOne) SetCard ¶
func (guuo *GameUserUpdateOne) SetCard(c *Card) *GameUserUpdateOne
SetCard sets the "card" edge to the Card entity.
func (*GameUserUpdateOne) SetCardID ¶
func (guuo *GameUserUpdateOne) SetCardID(i int64) *GameUserUpdateOne
SetCardID sets the "card_id" field.
func (*GameUserUpdateOne) SetCreatedBy ¶
func (guuo *GameUserUpdateOne) SetCreatedBy(i int64) *GameUserUpdateOne
SetCreatedBy sets the "created_by" field.
func (*GameUserUpdateOne) SetDeletedAt ¶
func (guuo *GameUserUpdateOne) SetDeletedAt(t time.Time) *GameUserUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*GameUserUpdateOne) SetExited ¶
func (guuo *GameUserUpdateOne) SetExited(b bool) *GameUserUpdateOne
SetExited sets the "exited" field.
func (*GameUserUpdateOne) SetGame ¶
func (guuo *GameUserUpdateOne) SetGame(g *Game) *GameUserUpdateOne
SetGame sets the "game" edge to the Game entity.
func (*GameUserUpdateOne) SetGameID ¶
func (guuo *GameUserUpdateOne) SetGameID(i int64) *GameUserUpdateOne
SetGameID sets the "game_id" field.
func (*GameUserUpdateOne) SetInput ¶
func (c *GameUserUpdateOne) SetInput(i UpdateGameUserInput) *GameUserUpdateOne
SetInput applies the change-set in the UpdateGameUserInput on the GameUserUpdateOne builder.
func (*GameUserUpdateOne) SetNillableCreatedBy ¶
func (guuo *GameUserUpdateOne) SetNillableCreatedBy(i *int64) *GameUserUpdateOne
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*GameUserUpdateOne) SetNillableDeletedAt ¶
func (guuo *GameUserUpdateOne) SetNillableDeletedAt(t *time.Time) *GameUserUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*GameUserUpdateOne) SetNillableExited ¶
func (guuo *GameUserUpdateOne) SetNillableExited(b *bool) *GameUserUpdateOne
SetNillableExited sets the "exited" field if the given value is not nil.
func (*GameUserUpdateOne) SetNillableUpdatedBy ¶
func (guuo *GameUserUpdateOne) SetNillableUpdatedBy(i *int64) *GameUserUpdateOne
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*GameUserUpdateOne) SetNumber ¶
func (guuo *GameUserUpdateOne) SetNumber(u uint8) *GameUserUpdateOne
SetNumber sets the "number" field.
func (*GameUserUpdateOne) SetUpdatedAt ¶
func (guuo *GameUserUpdateOne) SetUpdatedAt(t time.Time) *GameUserUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*GameUserUpdateOne) SetUpdatedBy ¶
func (guuo *GameUserUpdateOne) SetUpdatedBy(i int64) *GameUserUpdateOne
SetUpdatedBy sets the "updated_by" field.
func (*GameUserUpdateOne) SetUserID ¶
func (guuo *GameUserUpdateOne) SetUserID(i int64) *GameUserUpdateOne
SetUserID sets the "user_id" field.
type GameUserWhereInput ¶
type GameUserWhereInput struct { Predicates []predicate.GameUser `json:"-"` Not *GameUserWhereInput `json:"not,omitempty"` Or []*GameUserWhereInput `json:"or,omitempty"` And []*GameUserWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int64 `json:"id,omitempty"` IDNEQ *int64 `json:"idNEQ,omitempty"` IDIn []int64 `json:"idIn,omitempty"` IDNotIn []int64 `json:"idNotIn,omitempty"` IDGT *int64 `json:"idGT,omitempty"` IDGTE *int64 `json:"idGTE,omitempty"` IDLT *int64 `json:"idLT,omitempty"` IDLTE *int64 `json:"idLTE,omitempty"` // "created_by" field predicates. CreatedBy *int64 `json:"createdBy,omitempty"` CreatedByNEQ *int64 `json:"createdByNEQ,omitempty"` CreatedByIn []int64 `json:"createdByIn,omitempty"` CreatedByNotIn []int64 `json:"createdByNotIn,omitempty"` CreatedByGT *int64 `json:"createdByGT,omitempty"` CreatedByGTE *int64 `json:"createdByGTE,omitempty"` CreatedByLT *int64 `json:"createdByLT,omitempty"` CreatedByLTE *int64 `json:"createdByLTE,omitempty"` // "updated_by" field predicates. UpdatedBy *int64 `json:"updatedBy,omitempty"` UpdatedByNEQ *int64 `json:"updatedByNEQ,omitempty"` UpdatedByIn []int64 `json:"updatedByIn,omitempty"` UpdatedByNotIn []int64 `json:"updatedByNotIn,omitempty"` UpdatedByGT *int64 `json:"updatedByGT,omitempty"` UpdatedByGTE *int64 `json:"updatedByGTE,omitempty"` UpdatedByLT *int64 `json:"updatedByLT,omitempty"` UpdatedByLTE *int64 `json:"updatedByLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "deleted_at" field predicates. DeletedAt *time.Time `json:"deletedAt,omitempty"` DeletedAtNEQ *time.Time `json:"deletedAtNEQ,omitempty"` DeletedAtIn []time.Time `json:"deletedAtIn,omitempty"` DeletedAtNotIn []time.Time `json:"deletedAtNotIn,omitempty"` DeletedAtGT *time.Time `json:"deletedAtGT,omitempty"` DeletedAtGTE *time.Time `json:"deletedAtGTE,omitempty"` DeletedAtLT *time.Time `json:"deletedAtLT,omitempty"` DeletedAtLTE *time.Time `json:"deletedAtLTE,omitempty"` // "user_id" field predicates. UserID *int64 `json:"userID,omitempty"` UserIDNEQ *int64 `json:"userIDNEQ,omitempty"` UserIDIn []int64 `json:"userIDIn,omitempty"` UserIDNotIn []int64 `json:"userIDNotIn,omitempty"` UserIDGT *int64 `json:"userIDGT,omitempty"` UserIDGTE *int64 `json:"userIDGTE,omitempty"` UserIDLT *int64 `json:"userIDLT,omitempty"` UserIDLTE *int64 `json:"userIDLTE,omitempty"` // "game_id" field predicates. GameID *int64 `json:"gameID,omitempty"` GameIDNEQ *int64 `json:"gameIDNEQ,omitempty"` GameIDIn []int64 `json:"gameIDIn,omitempty"` GameIDNotIn []int64 `json:"gameIDNotIn,omitempty"` // "card_id" field predicates. CardID *int64 `json:"cardID,omitempty"` CardIDNEQ *int64 `json:"cardIDNEQ,omitempty"` CardIDIn []int64 `json:"cardIDIn,omitempty"` CardIDNotIn []int64 `json:"cardIDNotIn,omitempty"` // "number" field predicates. Number *uint8 `json:"number,omitempty"` NumberNEQ *uint8 `json:"numberNEQ,omitempty"` NumberIn []uint8 `json:"numberIn,omitempty"` NumberNotIn []uint8 `json:"numberNotIn,omitempty"` NumberGT *uint8 `json:"numberGT,omitempty"` NumberGTE *uint8 `json:"numberGTE,omitempty"` NumberLT *uint8 `json:"numberLT,omitempty"` NumberLTE *uint8 `json:"numberLTE,omitempty"` // "exited" field predicates. Exited *bool `json:"exited,omitempty"` ExitedNEQ *bool `json:"exitedNEQ,omitempty"` // "game" edge predicates. HasGame *bool `json:"hasGame,omitempty"` HasGameWith []*GameWhereInput `json:"hasGameWith,omitempty"` // "card" edge predicates. HasCard *bool `json:"hasCard,omitempty"` HasCardWith []*CardWhereInput `json:"hasCardWith,omitempty"` }
GameUserWhereInput represents a where input for filtering GameUser queries.
func (*GameUserWhereInput) AddPredicates ¶
func (i *GameUserWhereInput) AddPredicates(predicates ...predicate.GameUser)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*GameUserWhereInput) Filter ¶
func (i *GameUserWhereInput) Filter(q *GameUserQuery) (*GameUserQuery, error)
Filter applies the GameUserWhereInput filter on the GameUserQuery builder.
type GameWhereInput ¶
type GameWhereInput struct { Predicates []predicate.Game `json:"-"` Not *GameWhereInput `json:"not,omitempty"` Or []*GameWhereInput `json:"or,omitempty"` And []*GameWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int64 `json:"id,omitempty"` IDNEQ *int64 `json:"idNEQ,omitempty"` IDIn []int64 `json:"idIn,omitempty"` IDNotIn []int64 `json:"idNotIn,omitempty"` IDGT *int64 `json:"idGT,omitempty"` IDGTE *int64 `json:"idGTE,omitempty"` IDLT *int64 `json:"idLT,omitempty"` IDLTE *int64 `json:"idLTE,omitempty"` // "created_by" field predicates. CreatedBy *int64 `json:"createdBy,omitempty"` CreatedByNEQ *int64 `json:"createdByNEQ,omitempty"` CreatedByIn []int64 `json:"createdByIn,omitempty"` CreatedByNotIn []int64 `json:"createdByNotIn,omitempty"` CreatedByGT *int64 `json:"createdByGT,omitempty"` CreatedByGTE *int64 `json:"createdByGTE,omitempty"` CreatedByLT *int64 `json:"createdByLT,omitempty"` CreatedByLTE *int64 `json:"createdByLTE,omitempty"` // "updated_by" field predicates. UpdatedBy *int64 `json:"updatedBy,omitempty"` UpdatedByNEQ *int64 `json:"updatedByNEQ,omitempty"` UpdatedByIn []int64 `json:"updatedByIn,omitempty"` UpdatedByNotIn []int64 `json:"updatedByNotIn,omitempty"` UpdatedByGT *int64 `json:"updatedByGT,omitempty"` UpdatedByGTE *int64 `json:"updatedByGTE,omitempty"` UpdatedByLT *int64 `json:"updatedByLT,omitempty"` UpdatedByLTE *int64 `json:"updatedByLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "deleted_at" field predicates. DeletedAt *time.Time `json:"deletedAt,omitempty"` DeletedAtNEQ *time.Time `json:"deletedAtNEQ,omitempty"` DeletedAtIn []time.Time `json:"deletedAtIn,omitempty"` DeletedAtNotIn []time.Time `json:"deletedAtNotIn,omitempty"` DeletedAtGT *time.Time `json:"deletedAtGT,omitempty"` DeletedAtGTE *time.Time `json:"deletedAtGTE,omitempty"` DeletedAtLT *time.Time `json:"deletedAtLT,omitempty"` DeletedAtLTE *time.Time `json:"deletedAtLTE,omitempty"` // "room_id" field predicates. RoomID *int64 `json:"roomID,omitempty"` RoomIDNEQ *int64 `json:"roomIDNEQ,omitempty"` RoomIDIn []int64 `json:"roomIDIn,omitempty"` RoomIDNotIn []int64 `json:"roomIDNotIn,omitempty"` // "result" field predicates. Result *game.Result `json:"result,omitempty"` ResultNEQ *game.Result `json:"resultNEQ,omitempty"` ResultIn []game.Result `json:"resultIn,omitempty"` ResultNotIn []game.Result `json:"resultNotIn,omitempty"` // "capacity" field predicates. Capacity *uint8 `json:"capacity,omitempty"` CapacityNEQ *uint8 `json:"capacityNEQ,omitempty"` CapacityIn []uint8 `json:"capacityIn,omitempty"` CapacityNotIn []uint8 `json:"capacityNotIn,omitempty"` CapacityGT *uint8 `json:"capacityGT,omitempty"` CapacityGTE *uint8 `json:"capacityGTE,omitempty"` CapacityLT *uint8 `json:"capacityLT,omitempty"` CapacityLTE *uint8 `json:"capacityLTE,omitempty"` // "assassin_chance" field predicates. AssassinChance *uint8 `json:"assassinChance,omitempty"` AssassinChanceNEQ *uint8 `json:"assassinChanceNEQ,omitempty"` AssassinChanceIn []uint8 `json:"assassinChanceIn,omitempty"` AssassinChanceNotIn []uint8 `json:"assassinChanceNotIn,omitempty"` AssassinChanceGT *uint8 `json:"assassinChanceGT,omitempty"` AssassinChanceGTE *uint8 `json:"assassinChanceGTE,omitempty"` AssassinChanceLT *uint8 `json:"assassinChanceLT,omitempty"` AssassinChanceLTE *uint8 `json:"assassinChanceLTE,omitempty"` // "closed" field predicates. Closed *bool `json:"closed,omitempty"` ClosedNEQ *bool `json:"closedNEQ,omitempty"` // "game_users" edge predicates. HasGameUsers *bool `json:"hasGameUsers,omitempty"` HasGameUsersWith []*GameUserWhereInput `json:"hasGameUsersWith,omitempty"` // "missions" edge predicates. HasMissions *bool `json:"hasMissions,omitempty"` HasMissionsWith []*MissionWhereInput `json:"hasMissionsWith,omitempty"` // "room" edge predicates. HasRoom *bool `json:"hasRoom,omitempty"` HasRoomWith []*RoomWhereInput `json:"hasRoomWith,omitempty"` }
GameWhereInput represents a where input for filtering Game queries.
func (*GameWhereInput) AddPredicates ¶
func (i *GameWhereInput) AddPredicates(predicates ...predicate.Game)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
type Mission ¶
type Mission struct { // ID of the ent. ID int64 `json:"id,omitempty"` // CreatedBy holds the value of the "created_by" field. CreatedBy int64 `json:"created_by"` // UpdatedBy holds the value of the "updated_by" field. UpdatedBy int64 `json:"updated_by"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt time.Time `json:"deleted_at"` // 排序 Sequence uint8 `json:"sequence"` // 任务状态 Status mission.Status `json:"status"` // 是否失败 Failed bool `json:"failed"` // 所属游戏 ID GameID int64 `json:"game_id"` // 需出征人数 Capacity uint8 `json:"capacity"` // 队长用户 ID LeaderID int64 `json:"leader_id"` // 是否保护轮 Protected bool `json:"protected"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MissionQuery when eager-loading is set. Edges MissionEdges `json:"edges"` // contains filtered or unexported fields }
Mission is the model entity for the Mission schema.
func (*Mission) NamedSquads ¶
NamedSquads returns the Squads named value or an error if the edge was not loaded in eager-loading with this name.
func (*Mission) NamedVotes ¶
NamedVotes returns the Votes named value or an error if the edge was not loaded in eager-loading with this name.
func (*Mission) QuerySquads ¶
func (m *Mission) QuerySquads() *SquadQuery
QuerySquads queries the "squads" edge of the Mission entity.
func (*Mission) QueryVotes ¶
QueryVotes queries the "votes" edge of the Mission entity.
func (*Mission) ToEdge ¶
func (m *Mission) ToEdge(order *MissionOrder) *MissionEdge
ToEdge converts Mission into MissionEdge.
func (*Mission) Unwrap ¶
Unwrap unwraps the Mission 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 (*Mission) Update ¶
func (m *Mission) Update() *MissionUpdateOne
Update returns a builder for updating this Mission. Note that you need to call Mission.Unwrap() before calling this method if this Mission was returned from a transaction, and the transaction was committed or rolled back.
type MissionClient ¶
type MissionClient struct {
// contains filtered or unexported fields
}
MissionClient is a client for the Mission schema.
func NewMissionClient ¶
func NewMissionClient(c config) *MissionClient
NewMissionClient returns a client for the Mission from the given config.
func (*MissionClient) Create ¶
func (c *MissionClient) Create() *MissionCreate
Create returns a builder for creating a Mission entity.
func (*MissionClient) CreateBulk ¶
func (c *MissionClient) CreateBulk(builders ...*MissionCreate) *MissionCreateBulk
CreateBulk returns a builder for creating a bulk of Mission entities.
func (*MissionClient) Delete ¶
func (c *MissionClient) Delete() *MissionDelete
Delete returns a delete builder for Mission.
func (*MissionClient) DeleteOne ¶
func (c *MissionClient) DeleteOne(m *Mission) *MissionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MissionClient) DeleteOneID ¶
func (c *MissionClient) DeleteOneID(id int64) *MissionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MissionClient) GetX ¶
func (c *MissionClient) GetX(ctx context.Context, id int64) *Mission
GetX is like Get, but panics if an error occurs.
func (*MissionClient) Hooks ¶
func (c *MissionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MissionClient) Query ¶
func (c *MissionClient) Query() *MissionQuery
Query returns a query builder for Mission.
func (*MissionClient) QueryGame ¶
func (c *MissionClient) QueryGame(m *Mission) *GameQuery
QueryGame queries the game edge of a Mission.
func (*MissionClient) QuerySquads ¶
func (c *MissionClient) QuerySquads(m *Mission) *SquadQuery
QuerySquads queries the squads edge of a Mission.
func (*MissionClient) QueryVotes ¶
func (c *MissionClient) QueryVotes(m *Mission) *VoteQuery
QueryVotes queries the votes edge of a Mission.
func (*MissionClient) Update ¶
func (c *MissionClient) Update() *MissionUpdate
Update returns an update builder for Mission.
func (*MissionClient) UpdateOne ¶
func (c *MissionClient) UpdateOne(m *Mission) *MissionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MissionClient) UpdateOneID ¶
func (c *MissionClient) UpdateOneID(id int64) *MissionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MissionClient) Use ¶
func (c *MissionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `mission.Hooks(f(g(h())))`.
type MissionConnection ¶
type MissionConnection struct { Edges []*MissionEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
MissionConnection is the connection containing edges to Mission.
type MissionCreate ¶
type MissionCreate struct {
// contains filtered or unexported fields
}
MissionCreate is the builder for creating a Mission entity.
func (*MissionCreate) AddSquadIDs ¶
func (mc *MissionCreate) AddSquadIDs(ids ...int64) *MissionCreate
AddSquadIDs adds the "squads" edge to the Squad entity by IDs.
func (*MissionCreate) AddSquads ¶
func (mc *MissionCreate) AddSquads(s ...*Squad) *MissionCreate
AddSquads adds the "squads" edges to the Squad entity.
func (*MissionCreate) AddVoteIDs ¶
func (mc *MissionCreate) AddVoteIDs(ids ...int64) *MissionCreate
AddVoteIDs adds the "votes" edge to the Vote entity by IDs.
func (*MissionCreate) AddVotes ¶
func (mc *MissionCreate) AddVotes(v ...*Vote) *MissionCreate
AddVotes adds the "votes" edges to the Vote entity.
func (*MissionCreate) Exec ¶
func (mc *MissionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MissionCreate) ExecX ¶
func (mc *MissionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MissionCreate) Mutation ¶
func (mc *MissionCreate) Mutation() *MissionMutation
Mutation returns the MissionMutation object of the builder.
func (*MissionCreate) Save ¶
func (mc *MissionCreate) Save(ctx context.Context) (*Mission, error)
Save creates the Mission in the database.
func (*MissionCreate) SaveX ¶
func (mc *MissionCreate) SaveX(ctx context.Context) *Mission
SaveX calls Save and panics if Save returns an error.
func (*MissionCreate) SetCapacity ¶
func (mc *MissionCreate) SetCapacity(u uint8) *MissionCreate
SetCapacity sets the "capacity" field.
func (*MissionCreate) SetCreatedAt ¶
func (mc *MissionCreate) SetCreatedAt(t time.Time) *MissionCreate
SetCreatedAt sets the "created_at" field.
func (*MissionCreate) SetCreatedBy ¶
func (mc *MissionCreate) SetCreatedBy(i int64) *MissionCreate
SetCreatedBy sets the "created_by" field.
func (*MissionCreate) SetDeletedAt ¶
func (mc *MissionCreate) SetDeletedAt(t time.Time) *MissionCreate
SetDeletedAt sets the "deleted_at" field.
func (*MissionCreate) SetFailed ¶
func (mc *MissionCreate) SetFailed(b bool) *MissionCreate
SetFailed sets the "failed" field.
func (*MissionCreate) SetGame ¶
func (mc *MissionCreate) SetGame(g *Game) *MissionCreate
SetGame sets the "game" edge to the Game entity.
func (*MissionCreate) SetGameID ¶
func (mc *MissionCreate) SetGameID(i int64) *MissionCreate
SetGameID sets the "game_id" field.
func (*MissionCreate) SetID ¶
func (mc *MissionCreate) SetID(i int64) *MissionCreate
SetID sets the "id" field.
func (*MissionCreate) SetInput ¶
func (c *MissionCreate) SetInput(i CreateMissionInput) *MissionCreate
SetInput applies the change-set in the CreateMissionInput on the MissionCreate builder.
func (*MissionCreate) SetLeaderID ¶
func (mc *MissionCreate) SetLeaderID(i int64) *MissionCreate
SetLeaderID sets the "leader_id" field.
func (*MissionCreate) SetNillableCapacity ¶
func (mc *MissionCreate) SetNillableCapacity(u *uint8) *MissionCreate
SetNillableCapacity sets the "capacity" field if the given value is not nil.
func (*MissionCreate) SetNillableCreatedAt ¶
func (mc *MissionCreate) SetNillableCreatedAt(t *time.Time) *MissionCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MissionCreate) SetNillableCreatedBy ¶
func (mc *MissionCreate) SetNillableCreatedBy(i *int64) *MissionCreate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*MissionCreate) SetNillableDeletedAt ¶
func (mc *MissionCreate) SetNillableDeletedAt(t *time.Time) *MissionCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*MissionCreate) SetNillableFailed ¶
func (mc *MissionCreate) SetNillableFailed(b *bool) *MissionCreate
SetNillableFailed sets the "failed" field if the given value is not nil.
func (*MissionCreate) SetNillableID ¶
func (mc *MissionCreate) SetNillableID(i *int64) *MissionCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*MissionCreate) SetNillableLeaderID ¶
func (mc *MissionCreate) SetNillableLeaderID(i *int64) *MissionCreate
SetNillableLeaderID sets the "leader_id" field if the given value is not nil.
func (*MissionCreate) SetNillableProtected ¶
func (mc *MissionCreate) SetNillableProtected(b *bool) *MissionCreate
SetNillableProtected sets the "protected" field if the given value is not nil.
func (*MissionCreate) SetNillableStatus ¶
func (mc *MissionCreate) SetNillableStatus(m *mission.Status) *MissionCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*MissionCreate) SetNillableUpdatedAt ¶
func (mc *MissionCreate) SetNillableUpdatedAt(t *time.Time) *MissionCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*MissionCreate) SetNillableUpdatedBy ¶
func (mc *MissionCreate) SetNillableUpdatedBy(i *int64) *MissionCreate
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*MissionCreate) SetProtected ¶
func (mc *MissionCreate) SetProtected(b bool) *MissionCreate
SetProtected sets the "protected" field.
func (*MissionCreate) SetSequence ¶
func (mc *MissionCreate) SetSequence(u uint8) *MissionCreate
SetSequence sets the "sequence" field.
func (*MissionCreate) SetStatus ¶
func (mc *MissionCreate) SetStatus(m mission.Status) *MissionCreate
SetStatus sets the "status" field.
func (*MissionCreate) SetUpdatedAt ¶
func (mc *MissionCreate) SetUpdatedAt(t time.Time) *MissionCreate
SetUpdatedAt sets the "updated_at" field.
func (*MissionCreate) SetUpdatedBy ¶
func (mc *MissionCreate) SetUpdatedBy(i int64) *MissionCreate
SetUpdatedBy sets the "updated_by" field.
type MissionCreateBulk ¶
type MissionCreateBulk struct {
// contains filtered or unexported fields
}
MissionCreateBulk is the builder for creating many Mission entities in bulk.
func (*MissionCreateBulk) Exec ¶
func (mcb *MissionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MissionCreateBulk) ExecX ¶
func (mcb *MissionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MissionDelete ¶
type MissionDelete struct {
// contains filtered or unexported fields
}
MissionDelete is the builder for deleting a Mission entity.
func (*MissionDelete) Exec ¶
func (md *MissionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MissionDelete) ExecX ¶
func (md *MissionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MissionDelete) Where ¶
func (md *MissionDelete) Where(ps ...predicate.Mission) *MissionDelete
Where appends a list predicates to the MissionDelete builder.
type MissionDeleteOne ¶
type MissionDeleteOne struct {
// contains filtered or unexported fields
}
MissionDeleteOne is the builder for deleting a single Mission entity.
func (*MissionDeleteOne) Exec ¶
func (mdo *MissionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MissionDeleteOne) ExecX ¶
func (mdo *MissionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MissionEdge ¶
MissionEdge is the edge representation of Mission.
type MissionEdges ¶
type MissionEdges struct { // Game holds the value of the game edge. Game *Game `json:"game,omitempty"` // Squads holds the value of the squads edge. Squads []*Squad `json:"squads,omitempty"` // Votes holds the value of the votes edge. Votes []*Vote `json:"votes,omitempty"` // contains filtered or unexported fields }
MissionEdges holds the relations/edges for other nodes in the graph.
func (MissionEdges) GameOrErr ¶
func (e MissionEdges) GameOrErr() (*Game, error)
GameOrErr returns the Game value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (MissionEdges) SquadsOrErr ¶
func (e MissionEdges) SquadsOrErr() ([]*Squad, error)
SquadsOrErr returns the Squads value or an error if the edge was not loaded in eager-loading.
func (MissionEdges) VotesOrErr ¶
func (e MissionEdges) VotesOrErr() ([]*Vote, error)
VotesOrErr returns the Votes value or an error if the edge was not loaded in eager-loading.
type MissionGroupBy ¶
type MissionGroupBy struct {
// contains filtered or unexported fields
}
MissionGroupBy is the group-by builder for Mission entities.
func (*MissionGroupBy) Aggregate ¶
func (mgb *MissionGroupBy) Aggregate(fns ...AggregateFunc) *MissionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MissionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MissionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MissionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MissionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MissionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MissionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MissionGroupBy) Scan ¶
func (mgb *MissionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*MissionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MissionMutation ¶
type MissionMutation struct {
// contains filtered or unexported fields
}
MissionMutation represents an operation that mutates the Mission nodes in the graph.
func (*MissionMutation) AddCapacity ¶
func (m *MissionMutation) AddCapacity(u int8)
AddCapacity adds u to the "capacity" field.
func (*MissionMutation) AddCreatedBy ¶
func (m *MissionMutation) AddCreatedBy(i int64)
AddCreatedBy adds i to the "created_by" field.
func (*MissionMutation) AddField ¶
func (m *MissionMutation) 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 (*MissionMutation) AddLeaderID ¶
func (m *MissionMutation) AddLeaderID(i int64)
AddLeaderID adds i to the "leader_id" field.
func (*MissionMutation) AddSequence ¶
func (m *MissionMutation) AddSequence(u int8)
AddSequence adds u to the "sequence" field.
func (*MissionMutation) AddSquadIDs ¶
func (m *MissionMutation) AddSquadIDs(ids ...int64)
AddSquadIDs adds the "squads" edge to the Squad entity by ids.
func (*MissionMutation) AddUpdatedBy ¶
func (m *MissionMutation) AddUpdatedBy(i int64)
AddUpdatedBy adds i to the "updated_by" field.
func (*MissionMutation) AddVoteIDs ¶
func (m *MissionMutation) AddVoteIDs(ids ...int64)
AddVoteIDs adds the "votes" edge to the Vote entity by ids.
func (*MissionMutation) AddedCapacity ¶
func (m *MissionMutation) AddedCapacity() (r int8, exists bool)
AddedCapacity returns the value that was added to the "capacity" field in this mutation.
func (*MissionMutation) AddedCreatedBy ¶
func (m *MissionMutation) AddedCreatedBy() (r int64, exists bool)
AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.
func (*MissionMutation) AddedEdges ¶
func (m *MissionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MissionMutation) AddedField ¶
func (m *MissionMutation) 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 (*MissionMutation) AddedFields ¶
func (m *MissionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MissionMutation) AddedIDs ¶
func (m *MissionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MissionMutation) AddedLeaderID ¶
func (m *MissionMutation) AddedLeaderID() (r int64, exists bool)
AddedLeaderID returns the value that was added to the "leader_id" field in this mutation.
func (*MissionMutation) AddedSequence ¶
func (m *MissionMutation) AddedSequence() (r int8, exists bool)
AddedSequence returns the value that was added to the "sequence" field in this mutation.
func (*MissionMutation) AddedUpdatedBy ¶
func (m *MissionMutation) AddedUpdatedBy() (r int64, exists bool)
AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.
func (*MissionMutation) Capacity ¶
func (m *MissionMutation) Capacity() (r uint8, exists bool)
Capacity returns the value of the "capacity" field in the mutation.
func (*MissionMutation) ClearEdge ¶
func (m *MissionMutation) 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 (*MissionMutation) ClearField ¶
func (m *MissionMutation) 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 (*MissionMutation) ClearGame ¶
func (m *MissionMutation) ClearGame()
ClearGame clears the "game" edge to the Game entity.
func (*MissionMutation) ClearSquads ¶
func (m *MissionMutation) ClearSquads()
ClearSquads clears the "squads" edge to the Squad entity.
func (*MissionMutation) ClearVotes ¶
func (m *MissionMutation) ClearVotes()
ClearVotes clears the "votes" edge to the Vote entity.
func (*MissionMutation) ClearedEdges ¶
func (m *MissionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MissionMutation) ClearedFields ¶
func (m *MissionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MissionMutation) Client ¶
func (m MissionMutation) 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 (*MissionMutation) CreatedAt ¶
func (m *MissionMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*MissionMutation) CreatedBy ¶
func (m *MissionMutation) CreatedBy() (r int64, exists bool)
CreatedBy returns the value of the "created_by" field in the mutation.
func (*MissionMutation) DeletedAt ¶
func (m *MissionMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*MissionMutation) EdgeCleared ¶
func (m *MissionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MissionMutation) Failed ¶
func (m *MissionMutation) Failed() (r bool, exists bool)
Failed returns the value of the "failed" field in the mutation.
func (*MissionMutation) Field ¶
func (m *MissionMutation) 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 (*MissionMutation) FieldCleared ¶
func (m *MissionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MissionMutation) Fields ¶
func (m *MissionMutation) 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 (*MissionMutation) GameCleared ¶
func (m *MissionMutation) GameCleared() bool
GameCleared reports if the "game" edge to the Game entity was cleared.
func (*MissionMutation) GameID ¶
func (m *MissionMutation) GameID() (r int64, exists bool)
GameID returns the value of the "game_id" field in the mutation.
func (*MissionMutation) GameIDs ¶
func (m *MissionMutation) GameIDs() (ids []int64)
GameIDs returns the "game" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GameID instead. It exists only for internal usage by the builders.
func (*MissionMutation) ID ¶
func (m *MissionMutation) ID() (id int64, 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 (*MissionMutation) IDs ¶
func (m *MissionMutation) IDs(ctx context.Context) ([]int64, 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 (*MissionMutation) LeaderID ¶
func (m *MissionMutation) LeaderID() (r int64, exists bool)
LeaderID returns the value of the "leader_id" field in the mutation.
func (*MissionMutation) OldCapacity ¶
func (m *MissionMutation) OldCapacity(ctx context.Context) (v uint8, err error)
OldCapacity returns the old "capacity" field's value of the Mission entity. If the Mission 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 (*MissionMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Mission entity. If the Mission 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 (*MissionMutation) OldCreatedBy ¶
func (m *MissionMutation) OldCreatedBy(ctx context.Context) (v int64, err error)
OldCreatedBy returns the old "created_by" field's value of the Mission entity. If the Mission 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 (*MissionMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Mission entity. If the Mission 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 (*MissionMutation) OldFailed ¶
func (m *MissionMutation) OldFailed(ctx context.Context) (v bool, err error)
OldFailed returns the old "failed" field's value of the Mission entity. If the Mission 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 (*MissionMutation) 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 (*MissionMutation) OldGameID ¶
func (m *MissionMutation) OldGameID(ctx context.Context) (v int64, err error)
OldGameID returns the old "game_id" field's value of the Mission entity. If the Mission 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 (*MissionMutation) OldLeaderID ¶
func (m *MissionMutation) OldLeaderID(ctx context.Context) (v int64, err error)
OldLeaderID returns the old "leader_id" field's value of the Mission entity. If the Mission 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 (*MissionMutation) OldProtected ¶
func (m *MissionMutation) OldProtected(ctx context.Context) (v bool, err error)
OldProtected returns the old "protected" field's value of the Mission entity. If the Mission 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 (*MissionMutation) OldSequence ¶
func (m *MissionMutation) OldSequence(ctx context.Context) (v uint8, err error)
OldSequence returns the old "sequence" field's value of the Mission entity. If the Mission 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 (*MissionMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the Mission entity. If the Mission 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 (*MissionMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Mission entity. If the Mission 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 (*MissionMutation) OldUpdatedBy ¶
func (m *MissionMutation) OldUpdatedBy(ctx context.Context) (v int64, err error)
OldUpdatedBy returns the old "updated_by" field's value of the Mission entity. If the Mission 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 (*MissionMutation) Protected ¶
func (m *MissionMutation) Protected() (r bool, exists bool)
Protected returns the value of the "protected" field in the mutation.
func (*MissionMutation) RemoveSquadIDs ¶
func (m *MissionMutation) RemoveSquadIDs(ids ...int64)
RemoveSquadIDs removes the "squads" edge to the Squad entity by IDs.
func (*MissionMutation) RemoveVoteIDs ¶
func (m *MissionMutation) RemoveVoteIDs(ids ...int64)
RemoveVoteIDs removes the "votes" edge to the Vote entity by IDs.
func (*MissionMutation) RemovedEdges ¶
func (m *MissionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MissionMutation) RemovedIDs ¶
func (m *MissionMutation) 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 (*MissionMutation) RemovedSquadsIDs ¶
func (m *MissionMutation) RemovedSquadsIDs() (ids []int64)
RemovedSquads returns the removed IDs of the "squads" edge to the Squad entity.
func (*MissionMutation) RemovedVotesIDs ¶
func (m *MissionMutation) RemovedVotesIDs() (ids []int64)
RemovedVotes returns the removed IDs of the "votes" edge to the Vote entity.
func (*MissionMutation) ResetCapacity ¶
func (m *MissionMutation) ResetCapacity()
ResetCapacity resets all changes to the "capacity" field.
func (*MissionMutation) ResetCreatedAt ¶
func (m *MissionMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*MissionMutation) ResetCreatedBy ¶
func (m *MissionMutation) ResetCreatedBy()
ResetCreatedBy resets all changes to the "created_by" field.
func (*MissionMutation) ResetDeletedAt ¶
func (m *MissionMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*MissionMutation) ResetEdge ¶
func (m *MissionMutation) 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 (*MissionMutation) ResetFailed ¶
func (m *MissionMutation) ResetFailed()
ResetFailed resets all changes to the "failed" field.
func (*MissionMutation) ResetField ¶
func (m *MissionMutation) 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 (*MissionMutation) ResetGame ¶
func (m *MissionMutation) ResetGame()
ResetGame resets all changes to the "game" edge.
func (*MissionMutation) ResetGameID ¶
func (m *MissionMutation) ResetGameID()
ResetGameID resets all changes to the "game_id" field.
func (*MissionMutation) ResetLeaderID ¶
func (m *MissionMutation) ResetLeaderID()
ResetLeaderID resets all changes to the "leader_id" field.
func (*MissionMutation) ResetProtected ¶
func (m *MissionMutation) ResetProtected()
ResetProtected resets all changes to the "protected" field.
func (*MissionMutation) ResetSequence ¶
func (m *MissionMutation) ResetSequence()
ResetSequence resets all changes to the "sequence" field.
func (*MissionMutation) ResetSquads ¶
func (m *MissionMutation) ResetSquads()
ResetSquads resets all changes to the "squads" edge.
func (*MissionMutation) ResetStatus ¶
func (m *MissionMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*MissionMutation) ResetUpdatedAt ¶
func (m *MissionMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*MissionMutation) ResetUpdatedBy ¶
func (m *MissionMutation) ResetUpdatedBy()
ResetUpdatedBy resets all changes to the "updated_by" field.
func (*MissionMutation) ResetVotes ¶
func (m *MissionMutation) ResetVotes()
ResetVotes resets all changes to the "votes" edge.
func (*MissionMutation) Sequence ¶
func (m *MissionMutation) Sequence() (r uint8, exists bool)
Sequence returns the value of the "sequence" field in the mutation.
func (*MissionMutation) SetCapacity ¶
func (m *MissionMutation) SetCapacity(u uint8)
SetCapacity sets the "capacity" field.
func (*MissionMutation) SetCreatedAt ¶
func (m *MissionMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*MissionMutation) SetCreatedBy ¶
func (m *MissionMutation) SetCreatedBy(i int64)
SetCreatedBy sets the "created_by" field.
func (*MissionMutation) SetDeletedAt ¶
func (m *MissionMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*MissionMutation) SetFailed ¶
func (m *MissionMutation) SetFailed(b bool)
SetFailed sets the "failed" field.
func (*MissionMutation) SetField ¶
func (m *MissionMutation) 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 (*MissionMutation) SetGameID ¶
func (m *MissionMutation) SetGameID(i int64)
SetGameID sets the "game_id" field.
func (*MissionMutation) SetID ¶
func (m *MissionMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Mission entities.
func (*MissionMutation) SetLeaderID ¶
func (m *MissionMutation) SetLeaderID(i int64)
SetLeaderID sets the "leader_id" field.
func (*MissionMutation) SetProtected ¶
func (m *MissionMutation) SetProtected(b bool)
SetProtected sets the "protected" field.
func (*MissionMutation) SetSequence ¶
func (m *MissionMutation) SetSequence(u uint8)
SetSequence sets the "sequence" field.
func (*MissionMutation) SetStatus ¶
func (m *MissionMutation) SetStatus(value mission.Status)
SetStatus sets the "status" field.
func (*MissionMutation) SetUpdatedAt ¶
func (m *MissionMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*MissionMutation) SetUpdatedBy ¶
func (m *MissionMutation) SetUpdatedBy(i int64)
SetUpdatedBy sets the "updated_by" field.
func (*MissionMutation) SquadsCleared ¶
func (m *MissionMutation) SquadsCleared() bool
SquadsCleared reports if the "squads" edge to the Squad entity was cleared.
func (*MissionMutation) SquadsIDs ¶
func (m *MissionMutation) SquadsIDs() (ids []int64)
SquadsIDs returns the "squads" edge IDs in the mutation.
func (*MissionMutation) Status ¶
func (m *MissionMutation) Status() (r mission.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (MissionMutation) Tx ¶
func (m MissionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MissionMutation) Type ¶
func (m *MissionMutation) Type() string
Type returns the node type of this mutation (Mission).
func (*MissionMutation) UpdatedAt ¶
func (m *MissionMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*MissionMutation) UpdatedBy ¶
func (m *MissionMutation) UpdatedBy() (r int64, exists bool)
UpdatedBy returns the value of the "updated_by" field in the mutation.
func (*MissionMutation) VotesCleared ¶
func (m *MissionMutation) VotesCleared() bool
VotesCleared reports if the "votes" edge to the Vote entity was cleared.
func (*MissionMutation) VotesIDs ¶
func (m *MissionMutation) VotesIDs() (ids []int64)
VotesIDs returns the "votes" edge IDs in the mutation.
func (*MissionMutation) Where ¶
func (m *MissionMutation) Where(ps ...predicate.Mission)
Where appends a list predicates to the MissionMutation builder.
type MissionOrder ¶
type MissionOrder struct { Direction OrderDirection `json:"direction"` Field *MissionOrderField `json:"field"` }
MissionOrder defines the ordering of Mission.
type MissionOrderField ¶
type MissionOrderField struct {
// contains filtered or unexported fields
}
MissionOrderField defines the ordering field of Mission.
func (MissionOrderField) MarshalGQL ¶
func (f MissionOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (MissionOrderField) String ¶
func (f MissionOrderField) String() string
String implement fmt.Stringer interface.
func (*MissionOrderField) UnmarshalGQL ¶
func (f *MissionOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type MissionPaginateOption ¶
type MissionPaginateOption func(*missionPager) error
MissionPaginateOption enables pagination customization.
func WithMissionFilter ¶
func WithMissionFilter(filter func(*MissionQuery) (*MissionQuery, error)) MissionPaginateOption
WithMissionFilter configures pagination filter.
func WithMissionOrder ¶
func WithMissionOrder(order *MissionOrder) MissionPaginateOption
WithMissionOrder configures pagination ordering.
type MissionQuery ¶
type MissionQuery struct {
// contains filtered or unexported fields
}
MissionQuery is the builder for querying Mission entities.
func (*MissionQuery) Aggregate ¶
func (mq *MissionQuery) Aggregate(fns ...AggregateFunc) *MissionSelect
Aggregate returns a MissionSelect configured with the given aggregations.
func (*MissionQuery) All ¶
func (mq *MissionQuery) All(ctx context.Context) ([]*Mission, error)
All executes the query and returns a list of Missions.
func (*MissionQuery) AllX ¶
func (mq *MissionQuery) AllX(ctx context.Context) []*Mission
AllX is like All, but panics if an error occurs.
func (*MissionQuery) Clone ¶
func (mq *MissionQuery) Clone() *MissionQuery
Clone returns a duplicate of the MissionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MissionQuery) CollectFields ¶
func (m *MissionQuery) CollectFields(ctx context.Context, satisfies ...string) (*MissionQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*MissionQuery) Count ¶
func (mq *MissionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MissionQuery) CountX ¶
func (mq *MissionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MissionQuery) Exist ¶
func (mq *MissionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MissionQuery) ExistX ¶
func (mq *MissionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MissionQuery) First ¶
func (mq *MissionQuery) First(ctx context.Context) (*Mission, error)
First returns the first Mission entity from the query. Returns a *NotFoundError when no Mission was found.
func (*MissionQuery) FirstID ¶
func (mq *MissionQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first Mission ID from the query. Returns a *NotFoundError when no Mission ID was found.
func (*MissionQuery) FirstIDX ¶
func (mq *MissionQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*MissionQuery) FirstX ¶
func (mq *MissionQuery) FirstX(ctx context.Context) *Mission
FirstX is like First, but panics if an error occurs.
func (*MissionQuery) GroupBy ¶
func (mq *MissionQuery) GroupBy(field string, fields ...string) *MissionGroupBy
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 { CreatedBy int64 `json:"created_by"` Count int `json:"count,omitempty"` } client.Mission.Query(). GroupBy(mission.FieldCreatedBy). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MissionQuery) IDs ¶
func (mq *MissionQuery) IDs(ctx context.Context) ([]int64, error)
IDs executes the query and returns a list of Mission IDs.
func (*MissionQuery) IDsX ¶
func (mq *MissionQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*MissionQuery) Limit ¶
func (mq *MissionQuery) Limit(limit int) *MissionQuery
Limit adds a limit step to the query.
func (*MissionQuery) Offset ¶
func (mq *MissionQuery) Offset(offset int) *MissionQuery
Offset adds an offset step to the query.
func (*MissionQuery) Only ¶
func (mq *MissionQuery) Only(ctx context.Context) (*Mission, error)
Only returns a single Mission entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Mission entity is found. Returns a *NotFoundError when no Mission entities are found.
func (*MissionQuery) OnlyID ¶
func (mq *MissionQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only Mission ID in the query. Returns a *NotSingularError when more than one Mission ID is found. Returns a *NotFoundError when no entities are found.
func (*MissionQuery) OnlyIDX ¶
func (mq *MissionQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MissionQuery) OnlyX ¶
func (mq *MissionQuery) OnlyX(ctx context.Context) *Mission
OnlyX is like Only, but panics if an error occurs.
func (*MissionQuery) Order ¶
func (mq *MissionQuery) Order(o ...OrderFunc) *MissionQuery
Order adds an order step to the query.
func (*MissionQuery) Paginate ¶
func (m *MissionQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...MissionPaginateOption, ) (*MissionConnection, error)
Paginate executes the query and returns a relay based cursor connection to Mission.
func (*MissionQuery) QueryGame ¶
func (mq *MissionQuery) QueryGame() *GameQuery
QueryGame chains the current query on the "game" edge.
func (*MissionQuery) QuerySquads ¶
func (mq *MissionQuery) QuerySquads() *SquadQuery
QuerySquads chains the current query on the "squads" edge.
func (*MissionQuery) QueryVotes ¶
func (mq *MissionQuery) QueryVotes() *VoteQuery
QueryVotes chains the current query on the "votes" edge.
func (*MissionQuery) Select ¶
func (mq *MissionQuery) Select(fields ...string) *MissionSelect
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 { CreatedBy int64 `json:"created_by"` } client.Mission.Query(). Select(mission.FieldCreatedBy). Scan(ctx, &v)
func (*MissionQuery) Unique ¶
func (mq *MissionQuery) Unique(unique bool) *MissionQuery
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 (*MissionQuery) Where ¶
func (mq *MissionQuery) Where(ps ...predicate.Mission) *MissionQuery
Where adds a new predicate for the MissionQuery builder.
func (*MissionQuery) WithGame ¶
func (mq *MissionQuery) WithGame(opts ...func(*GameQuery)) *MissionQuery
WithGame tells the query-builder to eager-load the nodes that are connected to the "game" edge. The optional arguments are used to configure the query builder of the edge.
func (*MissionQuery) WithNamedSquads ¶
func (mq *MissionQuery) WithNamedSquads(name string, opts ...func(*SquadQuery)) *MissionQuery
WithNamedSquads tells the query-builder to eager-load the nodes that are connected to the "squads" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*MissionQuery) WithNamedVotes ¶
func (mq *MissionQuery) WithNamedVotes(name string, opts ...func(*VoteQuery)) *MissionQuery
WithNamedVotes tells the query-builder to eager-load the nodes that are connected to the "votes" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*MissionQuery) WithSquads ¶
func (mq *MissionQuery) WithSquads(opts ...func(*SquadQuery)) *MissionQuery
WithSquads tells the query-builder to eager-load the nodes that are connected to the "squads" edge. The optional arguments are used to configure the query builder of the edge.
func (*MissionQuery) WithVotes ¶
func (mq *MissionQuery) WithVotes(opts ...func(*VoteQuery)) *MissionQuery
WithVotes tells the query-builder to eager-load the nodes that are connected to the "votes" edge. The optional arguments are used to configure the query builder of the edge.
type MissionSelect ¶
type MissionSelect struct { *MissionQuery // contains filtered or unexported fields }
MissionSelect is the builder for selecting fields of Mission entities.
func (*MissionSelect) Aggregate ¶
func (ms *MissionSelect) Aggregate(fns ...AggregateFunc) *MissionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MissionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MissionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MissionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MissionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MissionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MissionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MissionSelect) Scan ¶
func (ms *MissionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MissionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MissionUpdate ¶
type MissionUpdate struct {
// contains filtered or unexported fields
}
MissionUpdate is the builder for updating Mission entities.
func (*MissionUpdate) AddCapacity ¶
func (mu *MissionUpdate) AddCapacity(u int8) *MissionUpdate
AddCapacity adds u to the "capacity" field.
func (*MissionUpdate) AddCreatedBy ¶
func (mu *MissionUpdate) AddCreatedBy(i int64) *MissionUpdate
AddCreatedBy adds i to the "created_by" field.
func (*MissionUpdate) AddLeaderID ¶
func (mu *MissionUpdate) AddLeaderID(i int64) *MissionUpdate
AddLeaderID adds i to the "leader_id" field.
func (*MissionUpdate) AddSequence ¶
func (mu *MissionUpdate) AddSequence(u int8) *MissionUpdate
AddSequence adds u to the "sequence" field.
func (*MissionUpdate) AddSquadIDs ¶
func (mu *MissionUpdate) AddSquadIDs(ids ...int64) *MissionUpdate
AddSquadIDs adds the "squads" edge to the Squad entity by IDs.
func (*MissionUpdate) AddSquads ¶
func (mu *MissionUpdate) AddSquads(s ...*Squad) *MissionUpdate
AddSquads adds the "squads" edges to the Squad entity.
func (*MissionUpdate) AddUpdatedBy ¶
func (mu *MissionUpdate) AddUpdatedBy(i int64) *MissionUpdate
AddUpdatedBy adds i to the "updated_by" field.
func (*MissionUpdate) AddVoteIDs ¶
func (mu *MissionUpdate) AddVoteIDs(ids ...int64) *MissionUpdate
AddVoteIDs adds the "votes" edge to the Vote entity by IDs.
func (*MissionUpdate) AddVotes ¶
func (mu *MissionUpdate) AddVotes(v ...*Vote) *MissionUpdate
AddVotes adds the "votes" edges to the Vote entity.
func (*MissionUpdate) ClearGame ¶
func (mu *MissionUpdate) ClearGame() *MissionUpdate
ClearGame clears the "game" edge to the Game entity.
func (*MissionUpdate) ClearSquads ¶
func (mu *MissionUpdate) ClearSquads() *MissionUpdate
ClearSquads clears all "squads" edges to the Squad entity.
func (*MissionUpdate) ClearVotes ¶
func (mu *MissionUpdate) ClearVotes() *MissionUpdate
ClearVotes clears all "votes" edges to the Vote entity.
func (*MissionUpdate) Exec ¶
func (mu *MissionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MissionUpdate) ExecX ¶
func (mu *MissionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MissionUpdate) Mutation ¶
func (mu *MissionUpdate) Mutation() *MissionMutation
Mutation returns the MissionMutation object of the builder.
func (*MissionUpdate) RemoveSquadIDs ¶
func (mu *MissionUpdate) RemoveSquadIDs(ids ...int64) *MissionUpdate
RemoveSquadIDs removes the "squads" edge to Squad entities by IDs.
func (*MissionUpdate) RemoveSquads ¶
func (mu *MissionUpdate) RemoveSquads(s ...*Squad) *MissionUpdate
RemoveSquads removes "squads" edges to Squad entities.
func (*MissionUpdate) RemoveVoteIDs ¶
func (mu *MissionUpdate) RemoveVoteIDs(ids ...int64) *MissionUpdate
RemoveVoteIDs removes the "votes" edge to Vote entities by IDs.
func (*MissionUpdate) RemoveVotes ¶
func (mu *MissionUpdate) RemoveVotes(v ...*Vote) *MissionUpdate
RemoveVotes removes "votes" edges to Vote entities.
func (*MissionUpdate) Save ¶
func (mu *MissionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MissionUpdate) SaveX ¶
func (mu *MissionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MissionUpdate) SetCapacity ¶
func (mu *MissionUpdate) SetCapacity(u uint8) *MissionUpdate
SetCapacity sets the "capacity" field.
func (*MissionUpdate) SetCreatedBy ¶
func (mu *MissionUpdate) SetCreatedBy(i int64) *MissionUpdate
SetCreatedBy sets the "created_by" field.
func (*MissionUpdate) SetDeletedAt ¶
func (mu *MissionUpdate) SetDeletedAt(t time.Time) *MissionUpdate
SetDeletedAt sets the "deleted_at" field.
func (*MissionUpdate) SetFailed ¶
func (mu *MissionUpdate) SetFailed(b bool) *MissionUpdate
SetFailed sets the "failed" field.
func (*MissionUpdate) SetGame ¶
func (mu *MissionUpdate) SetGame(g *Game) *MissionUpdate
SetGame sets the "game" edge to the Game entity.
func (*MissionUpdate) SetGameID ¶
func (mu *MissionUpdate) SetGameID(i int64) *MissionUpdate
SetGameID sets the "game_id" field.
func (*MissionUpdate) SetInput ¶
func (c *MissionUpdate) SetInput(i UpdateMissionInput) *MissionUpdate
SetInput applies the change-set in the UpdateMissionInput on the MissionUpdate builder.
func (*MissionUpdate) SetLeaderID ¶
func (mu *MissionUpdate) SetLeaderID(i int64) *MissionUpdate
SetLeaderID sets the "leader_id" field.
func (*MissionUpdate) SetNillableCapacity ¶
func (mu *MissionUpdate) SetNillableCapacity(u *uint8) *MissionUpdate
SetNillableCapacity sets the "capacity" field if the given value is not nil.
func (*MissionUpdate) SetNillableCreatedBy ¶
func (mu *MissionUpdate) SetNillableCreatedBy(i *int64) *MissionUpdate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*MissionUpdate) SetNillableDeletedAt ¶
func (mu *MissionUpdate) SetNillableDeletedAt(t *time.Time) *MissionUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*MissionUpdate) SetNillableFailed ¶
func (mu *MissionUpdate) SetNillableFailed(b *bool) *MissionUpdate
SetNillableFailed sets the "failed" field if the given value is not nil.
func (*MissionUpdate) SetNillableLeaderID ¶
func (mu *MissionUpdate) SetNillableLeaderID(i *int64) *MissionUpdate
SetNillableLeaderID sets the "leader_id" field if the given value is not nil.
func (*MissionUpdate) SetNillableProtected ¶
func (mu *MissionUpdate) SetNillableProtected(b *bool) *MissionUpdate
SetNillableProtected sets the "protected" field if the given value is not nil.
func (*MissionUpdate) SetNillableStatus ¶
func (mu *MissionUpdate) SetNillableStatus(m *mission.Status) *MissionUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*MissionUpdate) SetNillableUpdatedBy ¶
func (mu *MissionUpdate) SetNillableUpdatedBy(i *int64) *MissionUpdate
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*MissionUpdate) SetProtected ¶
func (mu *MissionUpdate) SetProtected(b bool) *MissionUpdate
SetProtected sets the "protected" field.
func (*MissionUpdate) SetSequence ¶
func (mu *MissionUpdate) SetSequence(u uint8) *MissionUpdate
SetSequence sets the "sequence" field.
func (*MissionUpdate) SetStatus ¶
func (mu *MissionUpdate) SetStatus(m mission.Status) *MissionUpdate
SetStatus sets the "status" field.
func (*MissionUpdate) SetUpdatedAt ¶
func (mu *MissionUpdate) SetUpdatedAt(t time.Time) *MissionUpdate
SetUpdatedAt sets the "updated_at" field.
func (*MissionUpdate) SetUpdatedBy ¶
func (mu *MissionUpdate) SetUpdatedBy(i int64) *MissionUpdate
SetUpdatedBy sets the "updated_by" field.
func (*MissionUpdate) Where ¶
func (mu *MissionUpdate) Where(ps ...predicate.Mission) *MissionUpdate
Where appends a list predicates to the MissionUpdate builder.
type MissionUpdateOne ¶
type MissionUpdateOne struct {
// contains filtered or unexported fields
}
MissionUpdateOne is the builder for updating a single Mission entity.
func (*MissionUpdateOne) AddCapacity ¶
func (muo *MissionUpdateOne) AddCapacity(u int8) *MissionUpdateOne
AddCapacity adds u to the "capacity" field.
func (*MissionUpdateOne) AddCreatedBy ¶
func (muo *MissionUpdateOne) AddCreatedBy(i int64) *MissionUpdateOne
AddCreatedBy adds i to the "created_by" field.
func (*MissionUpdateOne) AddLeaderID ¶
func (muo *MissionUpdateOne) AddLeaderID(i int64) *MissionUpdateOne
AddLeaderID adds i to the "leader_id" field.
func (*MissionUpdateOne) AddSequence ¶
func (muo *MissionUpdateOne) AddSequence(u int8) *MissionUpdateOne
AddSequence adds u to the "sequence" field.
func (*MissionUpdateOne) AddSquadIDs ¶
func (muo *MissionUpdateOne) AddSquadIDs(ids ...int64) *MissionUpdateOne
AddSquadIDs adds the "squads" edge to the Squad entity by IDs.
func (*MissionUpdateOne) AddSquads ¶
func (muo *MissionUpdateOne) AddSquads(s ...*Squad) *MissionUpdateOne
AddSquads adds the "squads" edges to the Squad entity.
func (*MissionUpdateOne) AddUpdatedBy ¶
func (muo *MissionUpdateOne) AddUpdatedBy(i int64) *MissionUpdateOne
AddUpdatedBy adds i to the "updated_by" field.
func (*MissionUpdateOne) AddVoteIDs ¶
func (muo *MissionUpdateOne) AddVoteIDs(ids ...int64) *MissionUpdateOne
AddVoteIDs adds the "votes" edge to the Vote entity by IDs.
func (*MissionUpdateOne) AddVotes ¶
func (muo *MissionUpdateOne) AddVotes(v ...*Vote) *MissionUpdateOne
AddVotes adds the "votes" edges to the Vote entity.
func (*MissionUpdateOne) ClearGame ¶
func (muo *MissionUpdateOne) ClearGame() *MissionUpdateOne
ClearGame clears the "game" edge to the Game entity.
func (*MissionUpdateOne) ClearSquads ¶
func (muo *MissionUpdateOne) ClearSquads() *MissionUpdateOne
ClearSquads clears all "squads" edges to the Squad entity.
func (*MissionUpdateOne) ClearVotes ¶
func (muo *MissionUpdateOne) ClearVotes() *MissionUpdateOne
ClearVotes clears all "votes" edges to the Vote entity.
func (*MissionUpdateOne) Exec ¶
func (muo *MissionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MissionUpdateOne) ExecX ¶
func (muo *MissionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MissionUpdateOne) Mutation ¶
func (muo *MissionUpdateOne) Mutation() *MissionMutation
Mutation returns the MissionMutation object of the builder.
func (*MissionUpdateOne) RemoveSquadIDs ¶
func (muo *MissionUpdateOne) RemoveSquadIDs(ids ...int64) *MissionUpdateOne
RemoveSquadIDs removes the "squads" edge to Squad entities by IDs.
func (*MissionUpdateOne) RemoveSquads ¶
func (muo *MissionUpdateOne) RemoveSquads(s ...*Squad) *MissionUpdateOne
RemoveSquads removes "squads" edges to Squad entities.
func (*MissionUpdateOne) RemoveVoteIDs ¶
func (muo *MissionUpdateOne) RemoveVoteIDs(ids ...int64) *MissionUpdateOne
RemoveVoteIDs removes the "votes" edge to Vote entities by IDs.
func (*MissionUpdateOne) RemoveVotes ¶
func (muo *MissionUpdateOne) RemoveVotes(v ...*Vote) *MissionUpdateOne
RemoveVotes removes "votes" edges to Vote entities.
func (*MissionUpdateOne) Save ¶
func (muo *MissionUpdateOne) Save(ctx context.Context) (*Mission, error)
Save executes the query and returns the updated Mission entity.
func (*MissionUpdateOne) SaveX ¶
func (muo *MissionUpdateOne) SaveX(ctx context.Context) *Mission
SaveX is like Save, but panics if an error occurs.
func (*MissionUpdateOne) Select ¶
func (muo *MissionUpdateOne) Select(field string, fields ...string) *MissionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MissionUpdateOne) SetCapacity ¶
func (muo *MissionUpdateOne) SetCapacity(u uint8) *MissionUpdateOne
SetCapacity sets the "capacity" field.
func (*MissionUpdateOne) SetCreatedBy ¶
func (muo *MissionUpdateOne) SetCreatedBy(i int64) *MissionUpdateOne
SetCreatedBy sets the "created_by" field.
func (*MissionUpdateOne) SetDeletedAt ¶
func (muo *MissionUpdateOne) SetDeletedAt(t time.Time) *MissionUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*MissionUpdateOne) SetFailed ¶
func (muo *MissionUpdateOne) SetFailed(b bool) *MissionUpdateOne
SetFailed sets the "failed" field.
func (*MissionUpdateOne) SetGame ¶
func (muo *MissionUpdateOne) SetGame(g *Game) *MissionUpdateOne
SetGame sets the "game" edge to the Game entity.
func (*MissionUpdateOne) SetGameID ¶
func (muo *MissionUpdateOne) SetGameID(i int64) *MissionUpdateOne
SetGameID sets the "game_id" field.
func (*MissionUpdateOne) SetInput ¶
func (c *MissionUpdateOne) SetInput(i UpdateMissionInput) *MissionUpdateOne
SetInput applies the change-set in the UpdateMissionInput on the MissionUpdateOne builder.
func (*MissionUpdateOne) SetLeaderID ¶
func (muo *MissionUpdateOne) SetLeaderID(i int64) *MissionUpdateOne
SetLeaderID sets the "leader_id" field.
func (*MissionUpdateOne) SetNillableCapacity ¶
func (muo *MissionUpdateOne) SetNillableCapacity(u *uint8) *MissionUpdateOne
SetNillableCapacity sets the "capacity" field if the given value is not nil.
func (*MissionUpdateOne) SetNillableCreatedBy ¶
func (muo *MissionUpdateOne) SetNillableCreatedBy(i *int64) *MissionUpdateOne
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*MissionUpdateOne) SetNillableDeletedAt ¶
func (muo *MissionUpdateOne) SetNillableDeletedAt(t *time.Time) *MissionUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*MissionUpdateOne) SetNillableFailed ¶
func (muo *MissionUpdateOne) SetNillableFailed(b *bool) *MissionUpdateOne
SetNillableFailed sets the "failed" field if the given value is not nil.
func (*MissionUpdateOne) SetNillableLeaderID ¶
func (muo *MissionUpdateOne) SetNillableLeaderID(i *int64) *MissionUpdateOne
SetNillableLeaderID sets the "leader_id" field if the given value is not nil.
func (*MissionUpdateOne) SetNillableProtected ¶
func (muo *MissionUpdateOne) SetNillableProtected(b *bool) *MissionUpdateOne
SetNillableProtected sets the "protected" field if the given value is not nil.
func (*MissionUpdateOne) SetNillableStatus ¶
func (muo *MissionUpdateOne) SetNillableStatus(m *mission.Status) *MissionUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*MissionUpdateOne) SetNillableUpdatedBy ¶
func (muo *MissionUpdateOne) SetNillableUpdatedBy(i *int64) *MissionUpdateOne
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*MissionUpdateOne) SetProtected ¶
func (muo *MissionUpdateOne) SetProtected(b bool) *MissionUpdateOne
SetProtected sets the "protected" field.
func (*MissionUpdateOne) SetSequence ¶
func (muo *MissionUpdateOne) SetSequence(u uint8) *MissionUpdateOne
SetSequence sets the "sequence" field.
func (*MissionUpdateOne) SetStatus ¶
func (muo *MissionUpdateOne) SetStatus(m mission.Status) *MissionUpdateOne
SetStatus sets the "status" field.
func (*MissionUpdateOne) SetUpdatedAt ¶
func (muo *MissionUpdateOne) SetUpdatedAt(t time.Time) *MissionUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*MissionUpdateOne) SetUpdatedBy ¶
func (muo *MissionUpdateOne) SetUpdatedBy(i int64) *MissionUpdateOne
SetUpdatedBy sets the "updated_by" field.
type MissionWhereInput ¶
type MissionWhereInput struct { Predicates []predicate.Mission `json:"-"` Not *MissionWhereInput `json:"not,omitempty"` Or []*MissionWhereInput `json:"or,omitempty"` And []*MissionWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int64 `json:"id,omitempty"` IDNEQ *int64 `json:"idNEQ,omitempty"` IDIn []int64 `json:"idIn,omitempty"` IDNotIn []int64 `json:"idNotIn,omitempty"` IDGT *int64 `json:"idGT,omitempty"` IDGTE *int64 `json:"idGTE,omitempty"` IDLT *int64 `json:"idLT,omitempty"` IDLTE *int64 `json:"idLTE,omitempty"` // "created_by" field predicates. CreatedBy *int64 `json:"createdBy,omitempty"` CreatedByNEQ *int64 `json:"createdByNEQ,omitempty"` CreatedByIn []int64 `json:"createdByIn,omitempty"` CreatedByNotIn []int64 `json:"createdByNotIn,omitempty"` CreatedByGT *int64 `json:"createdByGT,omitempty"` CreatedByGTE *int64 `json:"createdByGTE,omitempty"` CreatedByLT *int64 `json:"createdByLT,omitempty"` CreatedByLTE *int64 `json:"createdByLTE,omitempty"` // "updated_by" field predicates. UpdatedBy *int64 `json:"updatedBy,omitempty"` UpdatedByNEQ *int64 `json:"updatedByNEQ,omitempty"` UpdatedByIn []int64 `json:"updatedByIn,omitempty"` UpdatedByNotIn []int64 `json:"updatedByNotIn,omitempty"` UpdatedByGT *int64 `json:"updatedByGT,omitempty"` UpdatedByGTE *int64 `json:"updatedByGTE,omitempty"` UpdatedByLT *int64 `json:"updatedByLT,omitempty"` UpdatedByLTE *int64 `json:"updatedByLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "deleted_at" field predicates. DeletedAt *time.Time `json:"deletedAt,omitempty"` DeletedAtNEQ *time.Time `json:"deletedAtNEQ,omitempty"` DeletedAtIn []time.Time `json:"deletedAtIn,omitempty"` DeletedAtNotIn []time.Time `json:"deletedAtNotIn,omitempty"` DeletedAtGT *time.Time `json:"deletedAtGT,omitempty"` DeletedAtGTE *time.Time `json:"deletedAtGTE,omitempty"` DeletedAtLT *time.Time `json:"deletedAtLT,omitempty"` DeletedAtLTE *time.Time `json:"deletedAtLTE,omitempty"` // "sequence" field predicates. Sequence *uint8 `json:"sequence,omitempty"` SequenceNEQ *uint8 `json:"sequenceNEQ,omitempty"` SequenceIn []uint8 `json:"sequenceIn,omitempty"` SequenceNotIn []uint8 `json:"sequenceNotIn,omitempty"` SequenceGT *uint8 `json:"sequenceGT,omitempty"` SequenceGTE *uint8 `json:"sequenceGTE,omitempty"` SequenceLT *uint8 `json:"sequenceLT,omitempty"` SequenceLTE *uint8 `json:"sequenceLTE,omitempty"` // "status" field predicates. Status *mission.Status `json:"status,omitempty"` StatusNEQ *mission.Status `json:"statusNEQ,omitempty"` StatusIn []mission.Status `json:"statusIn,omitempty"` StatusNotIn []mission.Status `json:"statusNotIn,omitempty"` // "failed" field predicates. Failed *bool `json:"failed,omitempty"` FailedNEQ *bool `json:"failedNEQ,omitempty"` // "game_id" field predicates. GameID *int64 `json:"gameID,omitempty"` GameIDNEQ *int64 `json:"gameIDNEQ,omitempty"` GameIDIn []int64 `json:"gameIDIn,omitempty"` GameIDNotIn []int64 `json:"gameIDNotIn,omitempty"` // "capacity" field predicates. Capacity *uint8 `json:"capacity,omitempty"` CapacityNEQ *uint8 `json:"capacityNEQ,omitempty"` CapacityIn []uint8 `json:"capacityIn,omitempty"` CapacityNotIn []uint8 `json:"capacityNotIn,omitempty"` CapacityGT *uint8 `json:"capacityGT,omitempty"` CapacityGTE *uint8 `json:"capacityGTE,omitempty"` CapacityLT *uint8 `json:"capacityLT,omitempty"` CapacityLTE *uint8 `json:"capacityLTE,omitempty"` // "leader_id" field predicates. LeaderID *int64 `json:"leaderID,omitempty"` LeaderIDNEQ *int64 `json:"leaderIDNEQ,omitempty"` LeaderIDIn []int64 `json:"leaderIDIn,omitempty"` LeaderIDNotIn []int64 `json:"leaderIDNotIn,omitempty"` LeaderIDGT *int64 `json:"leaderIDGT,omitempty"` LeaderIDGTE *int64 `json:"leaderIDGTE,omitempty"` LeaderIDLT *int64 `json:"leaderIDLT,omitempty"` LeaderIDLTE *int64 `json:"leaderIDLTE,omitempty"` // "protected" field predicates. Protected *bool `json:"protected,omitempty"` ProtectedNEQ *bool `json:"protectedNEQ,omitempty"` // "game" edge predicates. HasGame *bool `json:"hasGame,omitempty"` HasGameWith []*GameWhereInput `json:"hasGameWith,omitempty"` // "squads" edge predicates. HasSquads *bool `json:"hasSquads,omitempty"` HasSquadsWith []*SquadWhereInput `json:"hasSquadsWith,omitempty"` // "votes" edge predicates. HasVotes *bool `json:"hasVotes,omitempty"` HasVotesWith []*VoteWhereInput `json:"hasVotesWith,omitempty"` }
MissionWhereInput represents a where input for filtering Mission queries.
func (*MissionWhereInput) AddPredicates ¶
func (i *MissionWhereInput) AddPredicates(predicates ...predicate.Mission)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*MissionWhereInput) Filter ¶
func (i *MissionWhereInput) Filter(q *MissionQuery) (*MissionQuery, error)
Filter applies the MissionWhereInput filter on the MissionQuery builder.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type Node ¶
type Node struct { ID int64 `json:"id,omitempty"` // node id. Type string `json:"type,omitempty"` // node type. Fields []*Field `json:"fields,omitempty"` // node fields. Edges []*Edge `json:"edges,omitempty"` // node edges. }
Node in the graph.
type NodeOption ¶
type NodeOption func(*nodeOptions)
NodeOption allows configuring the Noder execution using functional options.
func WithFixedNodeType ¶
func WithFixedNodeType(t string) NodeOption
WithFixedNodeType sets the Type of the node to a fixed value.
func WithNodeType ¶
WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.
type 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 OrderDirection ¶
type OrderDirection string
OrderDirection defines the directions in which to order a list of items.
const ( // OrderDirectionAsc specifies an ascending order. OrderDirectionAsc OrderDirection = "ASC" // OrderDirectionDesc specifies a descending order. OrderDirectionDesc OrderDirection = "DESC" )
func (OrderDirection) MarshalGQL ¶
func (o OrderDirection) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (OrderDirection) String ¶
func (o OrderDirection) String() string
String implements fmt.Stringer interface.
func (*OrderDirection) UnmarshalGQL ¶
func (o *OrderDirection) UnmarshalGQL(val interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
func (OrderDirection) Validate ¶
func (o OrderDirection) Validate() error
Validate the order direction value.
type PageInfo ¶
type PageInfo struct { HasNextPage bool `json:"hasNextPage"` HasPreviousPage bool `json:"hasPreviousPage"` StartCursor *Cursor `json:"startCursor"` EndCursor *Cursor `json:"endCursor"` }
PageInfo of a connection type.
type Record ¶
type Record struct { // ID of the ent. ID int64 `json:"id,omitempty"` // CreatedBy holds the value of the "created_by" field. CreatedBy int64 `json:"created_by"` // UpdatedBy holds the value of the "updated_by" field. UpdatedBy int64 `json:"updated_by"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt time.Time `json:"deleted_at"` // 用户 ID UserID int64 `json:"user_id"` // 房间 ID RoomID int64 `json:"room_id"` // 分数 Score int32 `json:"score"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the RecordQuery when eager-loading is set. Edges RecordEdges `json:"edges"` // contains filtered or unexported fields }
Record is the model entity for the Record schema.
func (*Record) ToEdge ¶
func (r *Record) ToEdge(order *RecordOrder) *RecordEdge
ToEdge converts Record into RecordEdge.
func (*Record) Unwrap ¶
Unwrap unwraps the Record 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 (*Record) Update ¶
func (r *Record) Update() *RecordUpdateOne
Update returns a builder for updating this Record. Note that you need to call Record.Unwrap() before calling this method if this Record was returned from a transaction, and the transaction was committed or rolled back.
type RecordClient ¶
type RecordClient struct {
// contains filtered or unexported fields
}
RecordClient is a client for the Record schema.
func NewRecordClient ¶
func NewRecordClient(c config) *RecordClient
NewRecordClient returns a client for the Record from the given config.
func (*RecordClient) Create ¶
func (c *RecordClient) Create() *RecordCreate
Create returns a builder for creating a Record entity.
func (*RecordClient) CreateBulk ¶
func (c *RecordClient) CreateBulk(builders ...*RecordCreate) *RecordCreateBulk
CreateBulk returns a builder for creating a bulk of Record entities.
func (*RecordClient) Delete ¶
func (c *RecordClient) Delete() *RecordDelete
Delete returns a delete builder for Record.
func (*RecordClient) DeleteOne ¶
func (c *RecordClient) DeleteOne(r *Record) *RecordDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RecordClient) DeleteOneID ¶
func (c *RecordClient) DeleteOneID(id int64) *RecordDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RecordClient) GetX ¶
func (c *RecordClient) GetX(ctx context.Context, id int64) *Record
GetX is like Get, but panics if an error occurs.
func (*RecordClient) Query ¶
func (c *RecordClient) Query() *RecordQuery
Query returns a query builder for Record.
func (*RecordClient) QueryRoom ¶
func (c *RecordClient) QueryRoom(r *Record) *RoomQuery
QueryRoom queries the room edge of a Record.
func (*RecordClient) Update ¶
func (c *RecordClient) Update() *RecordUpdate
Update returns an update builder for Record.
func (*RecordClient) UpdateOne ¶
func (c *RecordClient) UpdateOne(r *Record) *RecordUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RecordClient) UpdateOneID ¶
func (c *RecordClient) UpdateOneID(id int64) *RecordUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RecordClient) Use ¶
func (c *RecordClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `record.Hooks(f(g(h())))`.
type RecordConnection ¶
type RecordConnection struct { Edges []*RecordEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
RecordConnection is the connection containing edges to Record.
type RecordCreate ¶
type RecordCreate struct {
// contains filtered or unexported fields
}
RecordCreate is the builder for creating a Record entity.
func (*RecordCreate) Exec ¶
func (rc *RecordCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RecordCreate) ExecX ¶
func (rc *RecordCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RecordCreate) Mutation ¶
func (rc *RecordCreate) Mutation() *RecordMutation
Mutation returns the RecordMutation object of the builder.
func (*RecordCreate) Save ¶
func (rc *RecordCreate) Save(ctx context.Context) (*Record, error)
Save creates the Record in the database.
func (*RecordCreate) SaveX ¶
func (rc *RecordCreate) SaveX(ctx context.Context) *Record
SaveX calls Save and panics if Save returns an error.
func (*RecordCreate) SetCreatedAt ¶
func (rc *RecordCreate) SetCreatedAt(t time.Time) *RecordCreate
SetCreatedAt sets the "created_at" field.
func (*RecordCreate) SetCreatedBy ¶
func (rc *RecordCreate) SetCreatedBy(i int64) *RecordCreate
SetCreatedBy sets the "created_by" field.
func (*RecordCreate) SetDeletedAt ¶
func (rc *RecordCreate) SetDeletedAt(t time.Time) *RecordCreate
SetDeletedAt sets the "deleted_at" field.
func (*RecordCreate) SetID ¶
func (rc *RecordCreate) SetID(i int64) *RecordCreate
SetID sets the "id" field.
func (*RecordCreate) SetInput ¶
func (c *RecordCreate) SetInput(i CreateRecordInput) *RecordCreate
SetInput applies the change-set in the CreateRecordInput on the RecordCreate builder.
func (*RecordCreate) SetNillableCreatedAt ¶
func (rc *RecordCreate) SetNillableCreatedAt(t *time.Time) *RecordCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*RecordCreate) SetNillableCreatedBy ¶
func (rc *RecordCreate) SetNillableCreatedBy(i *int64) *RecordCreate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*RecordCreate) SetNillableDeletedAt ¶
func (rc *RecordCreate) SetNillableDeletedAt(t *time.Time) *RecordCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*RecordCreate) SetNillableID ¶
func (rc *RecordCreate) SetNillableID(i *int64) *RecordCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*RecordCreate) SetNillableScore ¶
func (rc *RecordCreate) SetNillableScore(i *int32) *RecordCreate
SetNillableScore sets the "score" field if the given value is not nil.
func (*RecordCreate) SetNillableUpdatedAt ¶
func (rc *RecordCreate) SetNillableUpdatedAt(t *time.Time) *RecordCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*RecordCreate) SetNillableUpdatedBy ¶
func (rc *RecordCreate) SetNillableUpdatedBy(i *int64) *RecordCreate
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*RecordCreate) SetRoom ¶
func (rc *RecordCreate) SetRoom(r *Room) *RecordCreate
SetRoom sets the "room" edge to the Room entity.
func (*RecordCreate) SetRoomID ¶
func (rc *RecordCreate) SetRoomID(i int64) *RecordCreate
SetRoomID sets the "room_id" field.
func (*RecordCreate) SetScore ¶
func (rc *RecordCreate) SetScore(i int32) *RecordCreate
SetScore sets the "score" field.
func (*RecordCreate) SetUpdatedAt ¶
func (rc *RecordCreate) SetUpdatedAt(t time.Time) *RecordCreate
SetUpdatedAt sets the "updated_at" field.
func (*RecordCreate) SetUpdatedBy ¶
func (rc *RecordCreate) SetUpdatedBy(i int64) *RecordCreate
SetUpdatedBy sets the "updated_by" field.
func (*RecordCreate) SetUserID ¶
func (rc *RecordCreate) SetUserID(i int64) *RecordCreate
SetUserID sets the "user_id" field.
type RecordCreateBulk ¶
type RecordCreateBulk struct {
// contains filtered or unexported fields
}
RecordCreateBulk is the builder for creating many Record entities in bulk.
func (*RecordCreateBulk) Exec ¶
func (rcb *RecordCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RecordCreateBulk) ExecX ¶
func (rcb *RecordCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RecordDelete ¶
type RecordDelete struct {
// contains filtered or unexported fields
}
RecordDelete is the builder for deleting a Record entity.
func (*RecordDelete) Exec ¶
func (rd *RecordDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RecordDelete) ExecX ¶
func (rd *RecordDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RecordDelete) Where ¶
func (rd *RecordDelete) Where(ps ...predicate.Record) *RecordDelete
Where appends a list predicates to the RecordDelete builder.
type RecordDeleteOne ¶
type RecordDeleteOne struct {
// contains filtered or unexported fields
}
RecordDeleteOne is the builder for deleting a single Record entity.
func (*RecordDeleteOne) Exec ¶
func (rdo *RecordDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RecordDeleteOne) ExecX ¶
func (rdo *RecordDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RecordEdge ¶
RecordEdge is the edge representation of Record.
type RecordEdges ¶
type RecordEdges struct { // Room holds the value of the room edge. Room *Room `json:"room,omitempty"` // contains filtered or unexported fields }
RecordEdges holds the relations/edges for other nodes in the graph.
func (RecordEdges) RoomOrErr ¶
func (e RecordEdges) RoomOrErr() (*Room, error)
RoomOrErr returns the Room value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type RecordGroupBy ¶
type RecordGroupBy struct {
// contains filtered or unexported fields
}
RecordGroupBy is the group-by builder for Record entities.
func (*RecordGroupBy) Aggregate ¶
func (rgb *RecordGroupBy) Aggregate(fns ...AggregateFunc) *RecordGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RecordGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RecordGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RecordGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RecordGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RecordGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RecordGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RecordGroupBy) Scan ¶
func (rgb *RecordGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*RecordGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RecordMutation ¶
type RecordMutation struct {
// contains filtered or unexported fields
}
RecordMutation represents an operation that mutates the Record nodes in the graph.
func (*RecordMutation) AddCreatedBy ¶
func (m *RecordMutation) AddCreatedBy(i int64)
AddCreatedBy adds i to the "created_by" field.
func (*RecordMutation) AddField ¶
func (m *RecordMutation) 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 (*RecordMutation) AddScore ¶
func (m *RecordMutation) AddScore(i int32)
AddScore adds i to the "score" field.
func (*RecordMutation) AddUpdatedBy ¶
func (m *RecordMutation) AddUpdatedBy(i int64)
AddUpdatedBy adds i to the "updated_by" field.
func (*RecordMutation) AddUserID ¶
func (m *RecordMutation) AddUserID(i int64)
AddUserID adds i to the "user_id" field.
func (*RecordMutation) AddedCreatedBy ¶
func (m *RecordMutation) AddedCreatedBy() (r int64, exists bool)
AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.
func (*RecordMutation) AddedEdges ¶
func (m *RecordMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RecordMutation) AddedField ¶
func (m *RecordMutation) 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 (*RecordMutation) AddedFields ¶
func (m *RecordMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RecordMutation) AddedIDs ¶
func (m *RecordMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RecordMutation) AddedScore ¶
func (m *RecordMutation) AddedScore() (r int32, exists bool)
AddedScore returns the value that was added to the "score" field in this mutation.
func (*RecordMutation) AddedUpdatedBy ¶
func (m *RecordMutation) AddedUpdatedBy() (r int64, exists bool)
AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.
func (*RecordMutation) AddedUserID ¶
func (m *RecordMutation) AddedUserID() (r int64, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*RecordMutation) ClearEdge ¶
func (m *RecordMutation) 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 (*RecordMutation) ClearField ¶
func (m *RecordMutation) 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 (*RecordMutation) ClearRoom ¶
func (m *RecordMutation) ClearRoom()
ClearRoom clears the "room" edge to the Room entity.
func (*RecordMutation) ClearedEdges ¶
func (m *RecordMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RecordMutation) ClearedFields ¶
func (m *RecordMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RecordMutation) Client ¶
func (m RecordMutation) 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 (*RecordMutation) CreatedAt ¶
func (m *RecordMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*RecordMutation) CreatedBy ¶
func (m *RecordMutation) CreatedBy() (r int64, exists bool)
CreatedBy returns the value of the "created_by" field in the mutation.
func (*RecordMutation) DeletedAt ¶
func (m *RecordMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*RecordMutation) EdgeCleared ¶
func (m *RecordMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RecordMutation) Field ¶
func (m *RecordMutation) 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 (*RecordMutation) FieldCleared ¶
func (m *RecordMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RecordMutation) Fields ¶
func (m *RecordMutation) 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 (*RecordMutation) ID ¶
func (m *RecordMutation) ID() (id int64, 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 (*RecordMutation) IDs ¶
func (m *RecordMutation) IDs(ctx context.Context) ([]int64, 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 (*RecordMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Record entity. If the Record 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 (*RecordMutation) OldCreatedBy ¶
func (m *RecordMutation) OldCreatedBy(ctx context.Context) (v int64, err error)
OldCreatedBy returns the old "created_by" field's value of the Record entity. If the Record 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 (*RecordMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Record entity. If the Record 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 (*RecordMutation) 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 (*RecordMutation) OldRoomID ¶
func (m *RecordMutation) OldRoomID(ctx context.Context) (v int64, err error)
OldRoomID returns the old "room_id" field's value of the Record entity. If the Record 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 (*RecordMutation) OldScore ¶
func (m *RecordMutation) OldScore(ctx context.Context) (v int32, err error)
OldScore returns the old "score" field's value of the Record entity. If the Record 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 (*RecordMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Record entity. If the Record 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 (*RecordMutation) OldUpdatedBy ¶
func (m *RecordMutation) OldUpdatedBy(ctx context.Context) (v int64, err error)
OldUpdatedBy returns the old "updated_by" field's value of the Record entity. If the Record 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 (*RecordMutation) OldUserID ¶
func (m *RecordMutation) OldUserID(ctx context.Context) (v int64, err error)
OldUserID returns the old "user_id" field's value of the Record entity. If the Record 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 (*RecordMutation) RemovedEdges ¶
func (m *RecordMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RecordMutation) RemovedIDs ¶
func (m *RecordMutation) 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 (*RecordMutation) ResetCreatedAt ¶
func (m *RecordMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*RecordMutation) ResetCreatedBy ¶
func (m *RecordMutation) ResetCreatedBy()
ResetCreatedBy resets all changes to the "created_by" field.
func (*RecordMutation) ResetDeletedAt ¶
func (m *RecordMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*RecordMutation) ResetEdge ¶
func (m *RecordMutation) 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 (*RecordMutation) ResetField ¶
func (m *RecordMutation) 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 (*RecordMutation) ResetRoom ¶
func (m *RecordMutation) ResetRoom()
ResetRoom resets all changes to the "room" edge.
func (*RecordMutation) ResetRoomID ¶
func (m *RecordMutation) ResetRoomID()
ResetRoomID resets all changes to the "room_id" field.
func (*RecordMutation) ResetScore ¶
func (m *RecordMutation) ResetScore()
ResetScore resets all changes to the "score" field.
func (*RecordMutation) ResetUpdatedAt ¶
func (m *RecordMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*RecordMutation) ResetUpdatedBy ¶
func (m *RecordMutation) ResetUpdatedBy()
ResetUpdatedBy resets all changes to the "updated_by" field.
func (*RecordMutation) ResetUserID ¶
func (m *RecordMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*RecordMutation) RoomCleared ¶
func (m *RecordMutation) RoomCleared() bool
RoomCleared reports if the "room" edge to the Room entity was cleared.
func (*RecordMutation) RoomID ¶
func (m *RecordMutation) RoomID() (r int64, exists bool)
RoomID returns the value of the "room_id" field in the mutation.
func (*RecordMutation) RoomIDs ¶
func (m *RecordMutation) RoomIDs() (ids []int64)
RoomIDs returns the "room" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RoomID instead. It exists only for internal usage by the builders.
func (*RecordMutation) Score ¶
func (m *RecordMutation) Score() (r int32, exists bool)
Score returns the value of the "score" field in the mutation.
func (*RecordMutation) SetCreatedAt ¶
func (m *RecordMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*RecordMutation) SetCreatedBy ¶
func (m *RecordMutation) SetCreatedBy(i int64)
SetCreatedBy sets the "created_by" field.
func (*RecordMutation) SetDeletedAt ¶
func (m *RecordMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*RecordMutation) SetField ¶
func (m *RecordMutation) 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 (*RecordMutation) SetID ¶
func (m *RecordMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Record entities.
func (*RecordMutation) SetRoomID ¶
func (m *RecordMutation) SetRoomID(i int64)
SetRoomID sets the "room_id" field.
func (*RecordMutation) SetScore ¶
func (m *RecordMutation) SetScore(i int32)
SetScore sets the "score" field.
func (*RecordMutation) SetUpdatedAt ¶
func (m *RecordMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*RecordMutation) SetUpdatedBy ¶
func (m *RecordMutation) SetUpdatedBy(i int64)
SetUpdatedBy sets the "updated_by" field.
func (*RecordMutation) SetUserID ¶
func (m *RecordMutation) SetUserID(i int64)
SetUserID sets the "user_id" field.
func (RecordMutation) Tx ¶
func (m RecordMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RecordMutation) Type ¶
func (m *RecordMutation) Type() string
Type returns the node type of this mutation (Record).
func (*RecordMutation) UpdatedAt ¶
func (m *RecordMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*RecordMutation) UpdatedBy ¶
func (m *RecordMutation) UpdatedBy() (r int64, exists bool)
UpdatedBy returns the value of the "updated_by" field in the mutation.
func (*RecordMutation) UserID ¶
func (m *RecordMutation) UserID() (r int64, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*RecordMutation) Where ¶
func (m *RecordMutation) Where(ps ...predicate.Record)
Where appends a list predicates to the RecordMutation builder.
type RecordOrder ¶
type RecordOrder struct { Direction OrderDirection `json:"direction"` Field *RecordOrderField `json:"field"` }
RecordOrder defines the ordering of Record.
type RecordOrderField ¶
type RecordOrderField struct {
// contains filtered or unexported fields
}
RecordOrderField defines the ordering field of Record.
func (RecordOrderField) MarshalGQL ¶
func (f RecordOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (RecordOrderField) String ¶
func (f RecordOrderField) String() string
String implement fmt.Stringer interface.
func (*RecordOrderField) UnmarshalGQL ¶
func (f *RecordOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type RecordPaginateOption ¶
type RecordPaginateOption func(*recordPager) error
RecordPaginateOption enables pagination customization.
func WithRecordFilter ¶
func WithRecordFilter(filter func(*RecordQuery) (*RecordQuery, error)) RecordPaginateOption
WithRecordFilter configures pagination filter.
func WithRecordOrder ¶
func WithRecordOrder(order *RecordOrder) RecordPaginateOption
WithRecordOrder configures pagination ordering.
type RecordQuery ¶
type RecordQuery struct {
// contains filtered or unexported fields
}
RecordQuery is the builder for querying Record entities.
func (*RecordQuery) Aggregate ¶
func (rq *RecordQuery) Aggregate(fns ...AggregateFunc) *RecordSelect
Aggregate returns a RecordSelect configured with the given aggregations.
func (*RecordQuery) All ¶
func (rq *RecordQuery) All(ctx context.Context) ([]*Record, error)
All executes the query and returns a list of Records.
func (*RecordQuery) AllX ¶
func (rq *RecordQuery) AllX(ctx context.Context) []*Record
AllX is like All, but panics if an error occurs.
func (*RecordQuery) Clone ¶
func (rq *RecordQuery) Clone() *RecordQuery
Clone returns a duplicate of the RecordQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RecordQuery) CollectFields ¶
func (r *RecordQuery) CollectFields(ctx context.Context, satisfies ...string) (*RecordQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*RecordQuery) Count ¶
func (rq *RecordQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RecordQuery) CountX ¶
func (rq *RecordQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RecordQuery) Exist ¶
func (rq *RecordQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RecordQuery) ExistX ¶
func (rq *RecordQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RecordQuery) First ¶
func (rq *RecordQuery) First(ctx context.Context) (*Record, error)
First returns the first Record entity from the query. Returns a *NotFoundError when no Record was found.
func (*RecordQuery) FirstID ¶
func (rq *RecordQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first Record ID from the query. Returns a *NotFoundError when no Record ID was found.
func (*RecordQuery) FirstIDX ¶
func (rq *RecordQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*RecordQuery) FirstX ¶
func (rq *RecordQuery) FirstX(ctx context.Context) *Record
FirstX is like First, but panics if an error occurs.
func (*RecordQuery) GroupBy ¶
func (rq *RecordQuery) GroupBy(field string, fields ...string) *RecordGroupBy
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 { CreatedBy int64 `json:"created_by"` Count int `json:"count,omitempty"` } client.Record.Query(). GroupBy(record.FieldCreatedBy). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RecordQuery) IDs ¶
func (rq *RecordQuery) IDs(ctx context.Context) ([]int64, error)
IDs executes the query and returns a list of Record IDs.
func (*RecordQuery) IDsX ¶
func (rq *RecordQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*RecordQuery) Limit ¶
func (rq *RecordQuery) Limit(limit int) *RecordQuery
Limit adds a limit step to the query.
func (*RecordQuery) Offset ¶
func (rq *RecordQuery) Offset(offset int) *RecordQuery
Offset adds an offset step to the query.
func (*RecordQuery) Only ¶
func (rq *RecordQuery) Only(ctx context.Context) (*Record, error)
Only returns a single Record entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Record entity is found. Returns a *NotFoundError when no Record entities are found.
func (*RecordQuery) OnlyID ¶
func (rq *RecordQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only Record ID in the query. Returns a *NotSingularError when more than one Record ID is found. Returns a *NotFoundError when no entities are found.
func (*RecordQuery) OnlyIDX ¶
func (rq *RecordQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RecordQuery) OnlyX ¶
func (rq *RecordQuery) OnlyX(ctx context.Context) *Record
OnlyX is like Only, but panics if an error occurs.
func (*RecordQuery) Order ¶
func (rq *RecordQuery) Order(o ...OrderFunc) *RecordQuery
Order adds an order step to the query.
func (*RecordQuery) Paginate ¶
func (r *RecordQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...RecordPaginateOption, ) (*RecordConnection, error)
Paginate executes the query and returns a relay based cursor connection to Record.
func (*RecordQuery) QueryRoom ¶
func (rq *RecordQuery) QueryRoom() *RoomQuery
QueryRoom chains the current query on the "room" edge.
func (*RecordQuery) Select ¶
func (rq *RecordQuery) Select(fields ...string) *RecordSelect
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 { CreatedBy int64 `json:"created_by"` } client.Record.Query(). Select(record.FieldCreatedBy). Scan(ctx, &v)
func (*RecordQuery) Unique ¶
func (rq *RecordQuery) Unique(unique bool) *RecordQuery
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 (*RecordQuery) Where ¶
func (rq *RecordQuery) Where(ps ...predicate.Record) *RecordQuery
Where adds a new predicate for the RecordQuery builder.
func (*RecordQuery) WithRoom ¶
func (rq *RecordQuery) WithRoom(opts ...func(*RoomQuery)) *RecordQuery
WithRoom tells the query-builder to eager-load the nodes that are connected to the "room" edge. The optional arguments are used to configure the query builder of the edge.
type RecordSelect ¶
type RecordSelect struct { *RecordQuery // contains filtered or unexported fields }
RecordSelect is the builder for selecting fields of Record entities.
func (*RecordSelect) Aggregate ¶
func (rs *RecordSelect) Aggregate(fns ...AggregateFunc) *RecordSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RecordSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RecordSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RecordSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RecordSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RecordSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RecordSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RecordSelect) Scan ¶
func (rs *RecordSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RecordSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RecordUpdate ¶
type RecordUpdate struct {
// contains filtered or unexported fields
}
RecordUpdate is the builder for updating Record entities.
func (*RecordUpdate) AddCreatedBy ¶
func (ru *RecordUpdate) AddCreatedBy(i int64) *RecordUpdate
AddCreatedBy adds i to the "created_by" field.
func (*RecordUpdate) AddScore ¶
func (ru *RecordUpdate) AddScore(i int32) *RecordUpdate
AddScore adds i to the "score" field.
func (*RecordUpdate) AddUpdatedBy ¶
func (ru *RecordUpdate) AddUpdatedBy(i int64) *RecordUpdate
AddUpdatedBy adds i to the "updated_by" field.
func (*RecordUpdate) AddUserID ¶
func (ru *RecordUpdate) AddUserID(i int64) *RecordUpdate
AddUserID adds i to the "user_id" field.
func (*RecordUpdate) ClearRoom ¶
func (ru *RecordUpdate) ClearRoom() *RecordUpdate
ClearRoom clears the "room" edge to the Room entity.
func (*RecordUpdate) Exec ¶
func (ru *RecordUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RecordUpdate) ExecX ¶
func (ru *RecordUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RecordUpdate) Mutation ¶
func (ru *RecordUpdate) Mutation() *RecordMutation
Mutation returns the RecordMutation object of the builder.
func (*RecordUpdate) Save ¶
func (ru *RecordUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RecordUpdate) SaveX ¶
func (ru *RecordUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RecordUpdate) SetCreatedBy ¶
func (ru *RecordUpdate) SetCreatedBy(i int64) *RecordUpdate
SetCreatedBy sets the "created_by" field.
func (*RecordUpdate) SetDeletedAt ¶
func (ru *RecordUpdate) SetDeletedAt(t time.Time) *RecordUpdate
SetDeletedAt sets the "deleted_at" field.
func (*RecordUpdate) SetInput ¶
func (c *RecordUpdate) SetInput(i UpdateRecordInput) *RecordUpdate
SetInput applies the change-set in the UpdateRecordInput on the RecordUpdate builder.
func (*RecordUpdate) SetNillableCreatedBy ¶
func (ru *RecordUpdate) SetNillableCreatedBy(i *int64) *RecordUpdate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*RecordUpdate) SetNillableDeletedAt ¶
func (ru *RecordUpdate) SetNillableDeletedAt(t *time.Time) *RecordUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*RecordUpdate) SetNillableScore ¶
func (ru *RecordUpdate) SetNillableScore(i *int32) *RecordUpdate
SetNillableScore sets the "score" field if the given value is not nil.
func (*RecordUpdate) SetNillableUpdatedBy ¶
func (ru *RecordUpdate) SetNillableUpdatedBy(i *int64) *RecordUpdate
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*RecordUpdate) SetRoom ¶
func (ru *RecordUpdate) SetRoom(r *Room) *RecordUpdate
SetRoom sets the "room" edge to the Room entity.
func (*RecordUpdate) SetRoomID ¶
func (ru *RecordUpdate) SetRoomID(i int64) *RecordUpdate
SetRoomID sets the "room_id" field.
func (*RecordUpdate) SetScore ¶
func (ru *RecordUpdate) SetScore(i int32) *RecordUpdate
SetScore sets the "score" field.
func (*RecordUpdate) SetUpdatedAt ¶
func (ru *RecordUpdate) SetUpdatedAt(t time.Time) *RecordUpdate
SetUpdatedAt sets the "updated_at" field.
func (*RecordUpdate) SetUpdatedBy ¶
func (ru *RecordUpdate) SetUpdatedBy(i int64) *RecordUpdate
SetUpdatedBy sets the "updated_by" field.
func (*RecordUpdate) SetUserID ¶
func (ru *RecordUpdate) SetUserID(i int64) *RecordUpdate
SetUserID sets the "user_id" field.
func (*RecordUpdate) Where ¶
func (ru *RecordUpdate) Where(ps ...predicate.Record) *RecordUpdate
Where appends a list predicates to the RecordUpdate builder.
type RecordUpdateOne ¶
type RecordUpdateOne struct {
// contains filtered or unexported fields
}
RecordUpdateOne is the builder for updating a single Record entity.
func (*RecordUpdateOne) AddCreatedBy ¶
func (ruo *RecordUpdateOne) AddCreatedBy(i int64) *RecordUpdateOne
AddCreatedBy adds i to the "created_by" field.
func (*RecordUpdateOne) AddScore ¶
func (ruo *RecordUpdateOne) AddScore(i int32) *RecordUpdateOne
AddScore adds i to the "score" field.
func (*RecordUpdateOne) AddUpdatedBy ¶
func (ruo *RecordUpdateOne) AddUpdatedBy(i int64) *RecordUpdateOne
AddUpdatedBy adds i to the "updated_by" field.
func (*RecordUpdateOne) AddUserID ¶
func (ruo *RecordUpdateOne) AddUserID(i int64) *RecordUpdateOne
AddUserID adds i to the "user_id" field.
func (*RecordUpdateOne) ClearRoom ¶
func (ruo *RecordUpdateOne) ClearRoom() *RecordUpdateOne
ClearRoom clears the "room" edge to the Room entity.
func (*RecordUpdateOne) Exec ¶
func (ruo *RecordUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RecordUpdateOne) ExecX ¶
func (ruo *RecordUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RecordUpdateOne) Mutation ¶
func (ruo *RecordUpdateOne) Mutation() *RecordMutation
Mutation returns the RecordMutation object of the builder.
func (*RecordUpdateOne) Save ¶
func (ruo *RecordUpdateOne) Save(ctx context.Context) (*Record, error)
Save executes the query and returns the updated Record entity.
func (*RecordUpdateOne) SaveX ¶
func (ruo *RecordUpdateOne) SaveX(ctx context.Context) *Record
SaveX is like Save, but panics if an error occurs.
func (*RecordUpdateOne) Select ¶
func (ruo *RecordUpdateOne) Select(field string, fields ...string) *RecordUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RecordUpdateOne) SetCreatedBy ¶
func (ruo *RecordUpdateOne) SetCreatedBy(i int64) *RecordUpdateOne
SetCreatedBy sets the "created_by" field.
func (*RecordUpdateOne) SetDeletedAt ¶
func (ruo *RecordUpdateOne) SetDeletedAt(t time.Time) *RecordUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*RecordUpdateOne) SetInput ¶
func (c *RecordUpdateOne) SetInput(i UpdateRecordInput) *RecordUpdateOne
SetInput applies the change-set in the UpdateRecordInput on the RecordUpdateOne builder.
func (*RecordUpdateOne) SetNillableCreatedBy ¶
func (ruo *RecordUpdateOne) SetNillableCreatedBy(i *int64) *RecordUpdateOne
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*RecordUpdateOne) SetNillableDeletedAt ¶
func (ruo *RecordUpdateOne) SetNillableDeletedAt(t *time.Time) *RecordUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*RecordUpdateOne) SetNillableScore ¶
func (ruo *RecordUpdateOne) SetNillableScore(i *int32) *RecordUpdateOne
SetNillableScore sets the "score" field if the given value is not nil.
func (*RecordUpdateOne) SetNillableUpdatedBy ¶
func (ruo *RecordUpdateOne) SetNillableUpdatedBy(i *int64) *RecordUpdateOne
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*RecordUpdateOne) SetRoom ¶
func (ruo *RecordUpdateOne) SetRoom(r *Room) *RecordUpdateOne
SetRoom sets the "room" edge to the Room entity.
func (*RecordUpdateOne) SetRoomID ¶
func (ruo *RecordUpdateOne) SetRoomID(i int64) *RecordUpdateOne
SetRoomID sets the "room_id" field.
func (*RecordUpdateOne) SetScore ¶
func (ruo *RecordUpdateOne) SetScore(i int32) *RecordUpdateOne
SetScore sets the "score" field.
func (*RecordUpdateOne) SetUpdatedAt ¶
func (ruo *RecordUpdateOne) SetUpdatedAt(t time.Time) *RecordUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*RecordUpdateOne) SetUpdatedBy ¶
func (ruo *RecordUpdateOne) SetUpdatedBy(i int64) *RecordUpdateOne
SetUpdatedBy sets the "updated_by" field.
func (*RecordUpdateOne) SetUserID ¶
func (ruo *RecordUpdateOne) SetUserID(i int64) *RecordUpdateOne
SetUserID sets the "user_id" field.
type RecordWhereInput ¶
type RecordWhereInput struct { Predicates []predicate.Record `json:"-"` Not *RecordWhereInput `json:"not,omitempty"` Or []*RecordWhereInput `json:"or,omitempty"` And []*RecordWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int64 `json:"id,omitempty"` IDNEQ *int64 `json:"idNEQ,omitempty"` IDIn []int64 `json:"idIn,omitempty"` IDNotIn []int64 `json:"idNotIn,omitempty"` IDGT *int64 `json:"idGT,omitempty"` IDGTE *int64 `json:"idGTE,omitempty"` IDLT *int64 `json:"idLT,omitempty"` IDLTE *int64 `json:"idLTE,omitempty"` // "created_by" field predicates. CreatedBy *int64 `json:"createdBy,omitempty"` CreatedByNEQ *int64 `json:"createdByNEQ,omitempty"` CreatedByIn []int64 `json:"createdByIn,omitempty"` CreatedByNotIn []int64 `json:"createdByNotIn,omitempty"` CreatedByGT *int64 `json:"createdByGT,omitempty"` CreatedByGTE *int64 `json:"createdByGTE,omitempty"` CreatedByLT *int64 `json:"createdByLT,omitempty"` CreatedByLTE *int64 `json:"createdByLTE,omitempty"` // "updated_by" field predicates. UpdatedBy *int64 `json:"updatedBy,omitempty"` UpdatedByNEQ *int64 `json:"updatedByNEQ,omitempty"` UpdatedByIn []int64 `json:"updatedByIn,omitempty"` UpdatedByNotIn []int64 `json:"updatedByNotIn,omitempty"` UpdatedByGT *int64 `json:"updatedByGT,omitempty"` UpdatedByGTE *int64 `json:"updatedByGTE,omitempty"` UpdatedByLT *int64 `json:"updatedByLT,omitempty"` UpdatedByLTE *int64 `json:"updatedByLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "deleted_at" field predicates. DeletedAt *time.Time `json:"deletedAt,omitempty"` DeletedAtNEQ *time.Time `json:"deletedAtNEQ,omitempty"` DeletedAtIn []time.Time `json:"deletedAtIn,omitempty"` DeletedAtNotIn []time.Time `json:"deletedAtNotIn,omitempty"` DeletedAtGT *time.Time `json:"deletedAtGT,omitempty"` DeletedAtGTE *time.Time `json:"deletedAtGTE,omitempty"` DeletedAtLT *time.Time `json:"deletedAtLT,omitempty"` DeletedAtLTE *time.Time `json:"deletedAtLTE,omitempty"` // "user_id" field predicates. UserID *int64 `json:"userID,omitempty"` UserIDNEQ *int64 `json:"userIDNEQ,omitempty"` UserIDIn []int64 `json:"userIDIn,omitempty"` UserIDNotIn []int64 `json:"userIDNotIn,omitempty"` UserIDGT *int64 `json:"userIDGT,omitempty"` UserIDGTE *int64 `json:"userIDGTE,omitempty"` UserIDLT *int64 `json:"userIDLT,omitempty"` UserIDLTE *int64 `json:"userIDLTE,omitempty"` // "room_id" field predicates. RoomID *int64 `json:"roomID,omitempty"` RoomIDNEQ *int64 `json:"roomIDNEQ,omitempty"` RoomIDIn []int64 `json:"roomIDIn,omitempty"` RoomIDNotIn []int64 `json:"roomIDNotIn,omitempty"` // "score" field predicates. Score *int32 `json:"score,omitempty"` ScoreNEQ *int32 `json:"scoreNEQ,omitempty"` ScoreIn []int32 `json:"scoreIn,omitempty"` ScoreNotIn []int32 `json:"scoreNotIn,omitempty"` ScoreGT *int32 `json:"scoreGT,omitempty"` ScoreGTE *int32 `json:"scoreGTE,omitempty"` ScoreLT *int32 `json:"scoreLT,omitempty"` ScoreLTE *int32 `json:"scoreLTE,omitempty"` // "room" edge predicates. HasRoom *bool `json:"hasRoom,omitempty"` HasRoomWith []*RoomWhereInput `json:"hasRoomWith,omitempty"` }
RecordWhereInput represents a where input for filtering Record queries.
func (*RecordWhereInput) AddPredicates ¶
func (i *RecordWhereInput) AddPredicates(predicates ...predicate.Record)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*RecordWhereInput) Filter ¶
func (i *RecordWhereInput) Filter(q *RecordQuery) (*RecordQuery, error)
Filter applies the RecordWhereInput filter on the RecordQuery builder.
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 Room ¶
type Room struct { // ID of the ent. ID int64 `json:"id,omitempty"` // CreatedBy holds the value of the "created_by" field. CreatedBy int64 `json:"created_by"` // UpdatedBy holds the value of the "updated_by" field. UpdatedBy int64 `json:"updated_by"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt time.Time `json:"deleted_at"` // 房间名 Name string `json:"name"` // 房间是否已关闭 Closed bool `json:"closed"` // 房间是否有游戏进行中 GameOn bool `json:"game_on"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the RoomQuery when eager-loading is set. Edges RoomEdges `json:"edges"` // contains filtered or unexported fields }
Room is the model entity for the Room schema.
func (*Room) NamedGames ¶
NamedGames returns the Games named value or an error if the edge was not loaded in eager-loading with this name.
func (*Room) NamedRecords ¶
NamedRecords returns the Records named value or an error if the edge was not loaded in eager-loading with this name.
func (*Room) NamedRoomUsers ¶
NamedRoomUsers returns the RoomUsers named value or an error if the edge was not loaded in eager-loading with this name.
func (*Room) QueryGames ¶
QueryGames queries the "games" edge of the Room entity.
func (*Room) QueryRecords ¶
func (r *Room) QueryRecords() *RecordQuery
QueryRecords queries the "records" edge of the Room entity.
func (*Room) QueryRoomUsers ¶
func (r *Room) QueryRoomUsers() *RoomUserQuery
QueryRoomUsers queries the "room_users" edge of the Room entity.
func (*Room) Unwrap ¶
Unwrap unwraps the Room 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 (*Room) Update ¶
func (r *Room) Update() *RoomUpdateOne
Update returns a builder for updating this Room. Note that you need to call Room.Unwrap() before calling this method if this Room was returned from a transaction, and the transaction was committed or rolled back.
type RoomClient ¶
type RoomClient struct {
// contains filtered or unexported fields
}
RoomClient is a client for the Room schema.
func NewRoomClient ¶
func NewRoomClient(c config) *RoomClient
NewRoomClient returns a client for the Room from the given config.
func (*RoomClient) Create ¶
func (c *RoomClient) Create() *RoomCreate
Create returns a builder for creating a Room entity.
func (*RoomClient) CreateBulk ¶
func (c *RoomClient) CreateBulk(builders ...*RoomCreate) *RoomCreateBulk
CreateBulk returns a builder for creating a bulk of Room entities.
func (*RoomClient) Delete ¶
func (c *RoomClient) Delete() *RoomDelete
Delete returns a delete builder for Room.
func (*RoomClient) DeleteOne ¶
func (c *RoomClient) DeleteOne(r *Room) *RoomDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RoomClient) DeleteOneID ¶
func (c *RoomClient) DeleteOneID(id int64) *RoomDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RoomClient) GetX ¶
func (c *RoomClient) GetX(ctx context.Context, id int64) *Room
GetX is like Get, but panics if an error occurs.
func (*RoomClient) Query ¶
func (c *RoomClient) Query() *RoomQuery
Query returns a query builder for Room.
func (*RoomClient) QueryGames ¶
func (c *RoomClient) QueryGames(r *Room) *GameQuery
QueryGames queries the games edge of a Room.
func (*RoomClient) QueryRecords ¶
func (c *RoomClient) QueryRecords(r *Room) *RecordQuery
QueryRecords queries the records edge of a Room.
func (*RoomClient) QueryRoomUsers ¶
func (c *RoomClient) QueryRoomUsers(r *Room) *RoomUserQuery
QueryRoomUsers queries the room_users edge of a Room.
func (*RoomClient) Update ¶
func (c *RoomClient) Update() *RoomUpdate
Update returns an update builder for Room.
func (*RoomClient) UpdateOne ¶
func (c *RoomClient) UpdateOne(r *Room) *RoomUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RoomClient) UpdateOneID ¶
func (c *RoomClient) UpdateOneID(id int64) *RoomUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RoomClient) Use ¶
func (c *RoomClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `room.Hooks(f(g(h())))`.
type RoomConnection ¶
type RoomConnection struct { Edges []*RoomEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
RoomConnection is the connection containing edges to Room.
type RoomCreate ¶
type RoomCreate struct {
// contains filtered or unexported fields
}
RoomCreate is the builder for creating a Room entity.
func (*RoomCreate) AddGameIDs ¶
func (rc *RoomCreate) AddGameIDs(ids ...int64) *RoomCreate
AddGameIDs adds the "games" edge to the Game entity by IDs.
func (*RoomCreate) AddGames ¶
func (rc *RoomCreate) AddGames(g ...*Game) *RoomCreate
AddGames adds the "games" edges to the Game entity.
func (*RoomCreate) AddRecordIDs ¶
func (rc *RoomCreate) AddRecordIDs(ids ...int64) *RoomCreate
AddRecordIDs adds the "records" edge to the Record entity by IDs.
func (*RoomCreate) AddRecords ¶
func (rc *RoomCreate) AddRecords(r ...*Record) *RoomCreate
AddRecords adds the "records" edges to the Record entity.
func (*RoomCreate) AddRoomUserIDs ¶
func (rc *RoomCreate) AddRoomUserIDs(ids ...int64) *RoomCreate
AddRoomUserIDs adds the "room_users" edge to the RoomUser entity by IDs.
func (*RoomCreate) AddRoomUsers ¶
func (rc *RoomCreate) AddRoomUsers(r ...*RoomUser) *RoomCreate
AddRoomUsers adds the "room_users" edges to the RoomUser entity.
func (*RoomCreate) Exec ¶
func (rc *RoomCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RoomCreate) ExecX ¶
func (rc *RoomCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoomCreate) Mutation ¶
func (rc *RoomCreate) Mutation() *RoomMutation
Mutation returns the RoomMutation object of the builder.
func (*RoomCreate) Save ¶
func (rc *RoomCreate) Save(ctx context.Context) (*Room, error)
Save creates the Room in the database.
func (*RoomCreate) SaveX ¶
func (rc *RoomCreate) SaveX(ctx context.Context) *Room
SaveX calls Save and panics if Save returns an error.
func (*RoomCreate) SetClosed ¶
func (rc *RoomCreate) SetClosed(b bool) *RoomCreate
SetClosed sets the "closed" field.
func (*RoomCreate) SetCreatedAt ¶
func (rc *RoomCreate) SetCreatedAt(t time.Time) *RoomCreate
SetCreatedAt sets the "created_at" field.
func (*RoomCreate) SetCreatedBy ¶
func (rc *RoomCreate) SetCreatedBy(i int64) *RoomCreate
SetCreatedBy sets the "created_by" field.
func (*RoomCreate) SetDeletedAt ¶
func (rc *RoomCreate) SetDeletedAt(t time.Time) *RoomCreate
SetDeletedAt sets the "deleted_at" field.
func (*RoomCreate) SetGameOn ¶
func (rc *RoomCreate) SetGameOn(b bool) *RoomCreate
SetGameOn sets the "game_on" field.
func (*RoomCreate) SetID ¶
func (rc *RoomCreate) SetID(i int64) *RoomCreate
SetID sets the "id" field.
func (*RoomCreate) SetInput ¶
func (c *RoomCreate) SetInput(i CreateRoomInput) *RoomCreate
SetInput applies the change-set in the CreateRoomInput on the RoomCreate builder.
func (*RoomCreate) SetName ¶
func (rc *RoomCreate) SetName(s string) *RoomCreate
SetName sets the "name" field.
func (*RoomCreate) SetNillableClosed ¶
func (rc *RoomCreate) SetNillableClosed(b *bool) *RoomCreate
SetNillableClosed sets the "closed" field if the given value is not nil.
func (*RoomCreate) SetNillableCreatedAt ¶
func (rc *RoomCreate) SetNillableCreatedAt(t *time.Time) *RoomCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*RoomCreate) SetNillableCreatedBy ¶
func (rc *RoomCreate) SetNillableCreatedBy(i *int64) *RoomCreate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*RoomCreate) SetNillableDeletedAt ¶
func (rc *RoomCreate) SetNillableDeletedAt(t *time.Time) *RoomCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*RoomCreate) SetNillableGameOn ¶
func (rc *RoomCreate) SetNillableGameOn(b *bool) *RoomCreate
SetNillableGameOn sets the "game_on" field if the given value is not nil.
func (*RoomCreate) SetNillableID ¶
func (rc *RoomCreate) SetNillableID(i *int64) *RoomCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*RoomCreate) SetNillableName ¶
func (rc *RoomCreate) SetNillableName(s *string) *RoomCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*RoomCreate) SetNillableUpdatedAt ¶
func (rc *RoomCreate) SetNillableUpdatedAt(t *time.Time) *RoomCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*RoomCreate) SetNillableUpdatedBy ¶
func (rc *RoomCreate) SetNillableUpdatedBy(i *int64) *RoomCreate
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*RoomCreate) SetUpdatedAt ¶
func (rc *RoomCreate) SetUpdatedAt(t time.Time) *RoomCreate
SetUpdatedAt sets the "updated_at" field.
func (*RoomCreate) SetUpdatedBy ¶
func (rc *RoomCreate) SetUpdatedBy(i int64) *RoomCreate
SetUpdatedBy sets the "updated_by" field.
type RoomCreateBulk ¶
type RoomCreateBulk struct {
// contains filtered or unexported fields
}
RoomCreateBulk is the builder for creating many Room entities in bulk.
func (*RoomCreateBulk) Exec ¶
func (rcb *RoomCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RoomCreateBulk) ExecX ¶
func (rcb *RoomCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RoomDelete ¶
type RoomDelete struct {
// contains filtered or unexported fields
}
RoomDelete is the builder for deleting a Room entity.
func (*RoomDelete) Exec ¶
func (rd *RoomDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RoomDelete) ExecX ¶
func (rd *RoomDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RoomDelete) Where ¶
func (rd *RoomDelete) Where(ps ...predicate.Room) *RoomDelete
Where appends a list predicates to the RoomDelete builder.
type RoomDeleteOne ¶
type RoomDeleteOne struct {
// contains filtered or unexported fields
}
RoomDeleteOne is the builder for deleting a single Room entity.
func (*RoomDeleteOne) Exec ¶
func (rdo *RoomDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RoomDeleteOne) ExecX ¶
func (rdo *RoomDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RoomEdges ¶
type RoomEdges struct { // RoomUsers holds the value of the room_users edge. RoomUsers []*RoomUser `json:"room_users,omitempty"` // Games holds the value of the games edge. Games []*Game `json:"games,omitempty"` // Records holds the value of the records edge. Records []*Record `json:"records,omitempty"` // contains filtered or unexported fields }
RoomEdges holds the relations/edges for other nodes in the graph.
func (RoomEdges) GamesOrErr ¶
GamesOrErr returns the Games value or an error if the edge was not loaded in eager-loading.
func (RoomEdges) RecordsOrErr ¶
RecordsOrErr returns the Records value or an error if the edge was not loaded in eager-loading.
func (RoomEdges) RoomUsersOrErr ¶
RoomUsersOrErr returns the RoomUsers value or an error if the edge was not loaded in eager-loading.
type RoomGroupBy ¶
type RoomGroupBy struct {
// contains filtered or unexported fields
}
RoomGroupBy is the group-by builder for Room entities.
func (*RoomGroupBy) Aggregate ¶
func (rgb *RoomGroupBy) Aggregate(fns ...AggregateFunc) *RoomGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RoomGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RoomGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RoomGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RoomGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RoomGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RoomGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RoomGroupBy) Scan ¶
func (rgb *RoomGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*RoomGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RoomMutation ¶
type RoomMutation struct {
// contains filtered or unexported fields
}
RoomMutation represents an operation that mutates the Room nodes in the graph.
func (*RoomMutation) AddCreatedBy ¶
func (m *RoomMutation) AddCreatedBy(i int64)
AddCreatedBy adds i to the "created_by" field.
func (*RoomMutation) AddField ¶
func (m *RoomMutation) 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 (*RoomMutation) AddGameIDs ¶
func (m *RoomMutation) AddGameIDs(ids ...int64)
AddGameIDs adds the "games" edge to the Game entity by ids.
func (*RoomMutation) AddRecordIDs ¶
func (m *RoomMutation) AddRecordIDs(ids ...int64)
AddRecordIDs adds the "records" edge to the Record entity by ids.
func (*RoomMutation) AddRoomUserIDs ¶
func (m *RoomMutation) AddRoomUserIDs(ids ...int64)
AddRoomUserIDs adds the "room_users" edge to the RoomUser entity by ids.
func (*RoomMutation) AddUpdatedBy ¶
func (m *RoomMutation) AddUpdatedBy(i int64)
AddUpdatedBy adds i to the "updated_by" field.
func (*RoomMutation) AddedCreatedBy ¶
func (m *RoomMutation) AddedCreatedBy() (r int64, exists bool)
AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.
func (*RoomMutation) AddedEdges ¶
func (m *RoomMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RoomMutation) AddedField ¶
func (m *RoomMutation) 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 (*RoomMutation) AddedFields ¶
func (m *RoomMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RoomMutation) AddedIDs ¶
func (m *RoomMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RoomMutation) AddedUpdatedBy ¶
func (m *RoomMutation) AddedUpdatedBy() (r int64, exists bool)
AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.
func (*RoomMutation) ClearEdge ¶
func (m *RoomMutation) 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 (*RoomMutation) ClearField ¶
func (m *RoomMutation) 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 (*RoomMutation) ClearGames ¶
func (m *RoomMutation) ClearGames()
ClearGames clears the "games" edge to the Game entity.
func (*RoomMutation) ClearRecords ¶
func (m *RoomMutation) ClearRecords()
ClearRecords clears the "records" edge to the Record entity.
func (*RoomMutation) ClearRoomUsers ¶
func (m *RoomMutation) ClearRoomUsers()
ClearRoomUsers clears the "room_users" edge to the RoomUser entity.
func (*RoomMutation) ClearedEdges ¶
func (m *RoomMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RoomMutation) ClearedFields ¶
func (m *RoomMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RoomMutation) Client ¶
func (m RoomMutation) 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 (*RoomMutation) Closed ¶
func (m *RoomMutation) Closed() (r bool, exists bool)
Closed returns the value of the "closed" field in the mutation.
func (*RoomMutation) CreatedAt ¶
func (m *RoomMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*RoomMutation) CreatedBy ¶
func (m *RoomMutation) CreatedBy() (r int64, exists bool)
CreatedBy returns the value of the "created_by" field in the mutation.
func (*RoomMutation) DeletedAt ¶
func (m *RoomMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*RoomMutation) EdgeCleared ¶
func (m *RoomMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RoomMutation) Field ¶
func (m *RoomMutation) 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 (*RoomMutation) FieldCleared ¶
func (m *RoomMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RoomMutation) Fields ¶
func (m *RoomMutation) 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 (*RoomMutation) GameOn ¶
func (m *RoomMutation) GameOn() (r bool, exists bool)
GameOn returns the value of the "game_on" field in the mutation.
func (*RoomMutation) GamesCleared ¶
func (m *RoomMutation) GamesCleared() bool
GamesCleared reports if the "games" edge to the Game entity was cleared.
func (*RoomMutation) GamesIDs ¶
func (m *RoomMutation) GamesIDs() (ids []int64)
GamesIDs returns the "games" edge IDs in the mutation.
func (*RoomMutation) ID ¶
func (m *RoomMutation) ID() (id int64, 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 (*RoomMutation) IDs ¶
func (m *RoomMutation) IDs(ctx context.Context) ([]int64, 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 (*RoomMutation) Name ¶
func (m *RoomMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*RoomMutation) OldClosed ¶
func (m *RoomMutation) OldClosed(ctx context.Context) (v bool, err error)
OldClosed returns the old "closed" field's value of the Room entity. If the Room 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 (*RoomMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Room entity. If the Room 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 (*RoomMutation) OldCreatedBy ¶
func (m *RoomMutation) OldCreatedBy(ctx context.Context) (v int64, err error)
OldCreatedBy returns the old "created_by" field's value of the Room entity. If the Room 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 (*RoomMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Room entity. If the Room 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 (*RoomMutation) 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 (*RoomMutation) OldGameOn ¶
func (m *RoomMutation) OldGameOn(ctx context.Context) (v bool, err error)
OldGameOn returns the old "game_on" field's value of the Room entity. If the Room 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 (*RoomMutation) OldName ¶
func (m *RoomMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Room entity. If the Room 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 (*RoomMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Room entity. If the Room 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 (*RoomMutation) OldUpdatedBy ¶
func (m *RoomMutation) OldUpdatedBy(ctx context.Context) (v int64, err error)
OldUpdatedBy returns the old "updated_by" field's value of the Room entity. If the Room 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 (*RoomMutation) RecordsCleared ¶
func (m *RoomMutation) RecordsCleared() bool
RecordsCleared reports if the "records" edge to the Record entity was cleared.
func (*RoomMutation) RecordsIDs ¶
func (m *RoomMutation) RecordsIDs() (ids []int64)
RecordsIDs returns the "records" edge IDs in the mutation.
func (*RoomMutation) RemoveGameIDs ¶
func (m *RoomMutation) RemoveGameIDs(ids ...int64)
RemoveGameIDs removes the "games" edge to the Game entity by IDs.
func (*RoomMutation) RemoveRecordIDs ¶
func (m *RoomMutation) RemoveRecordIDs(ids ...int64)
RemoveRecordIDs removes the "records" edge to the Record entity by IDs.
func (*RoomMutation) RemoveRoomUserIDs ¶
func (m *RoomMutation) RemoveRoomUserIDs(ids ...int64)
RemoveRoomUserIDs removes the "room_users" edge to the RoomUser entity by IDs.
func (*RoomMutation) RemovedEdges ¶
func (m *RoomMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RoomMutation) RemovedGamesIDs ¶
func (m *RoomMutation) RemovedGamesIDs() (ids []int64)
RemovedGames returns the removed IDs of the "games" edge to the Game entity.
func (*RoomMutation) RemovedIDs ¶
func (m *RoomMutation) 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 (*RoomMutation) RemovedRecordsIDs ¶
func (m *RoomMutation) RemovedRecordsIDs() (ids []int64)
RemovedRecords returns the removed IDs of the "records" edge to the Record entity.
func (*RoomMutation) RemovedRoomUsersIDs ¶
func (m *RoomMutation) RemovedRoomUsersIDs() (ids []int64)
RemovedRoomUsers returns the removed IDs of the "room_users" edge to the RoomUser entity.
func (*RoomMutation) ResetClosed ¶
func (m *RoomMutation) ResetClosed()
ResetClosed resets all changes to the "closed" field.
func (*RoomMutation) ResetCreatedAt ¶
func (m *RoomMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*RoomMutation) ResetCreatedBy ¶
func (m *RoomMutation) ResetCreatedBy()
ResetCreatedBy resets all changes to the "created_by" field.
func (*RoomMutation) ResetDeletedAt ¶
func (m *RoomMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*RoomMutation) ResetEdge ¶
func (m *RoomMutation) 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 (*RoomMutation) ResetField ¶
func (m *RoomMutation) 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 (*RoomMutation) ResetGameOn ¶
func (m *RoomMutation) ResetGameOn()
ResetGameOn resets all changes to the "game_on" field.
func (*RoomMutation) ResetGames ¶
func (m *RoomMutation) ResetGames()
ResetGames resets all changes to the "games" edge.
func (*RoomMutation) ResetName ¶
func (m *RoomMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*RoomMutation) ResetRecords ¶
func (m *RoomMutation) ResetRecords()
ResetRecords resets all changes to the "records" edge.
func (*RoomMutation) ResetRoomUsers ¶
func (m *RoomMutation) ResetRoomUsers()
ResetRoomUsers resets all changes to the "room_users" edge.
func (*RoomMutation) ResetUpdatedAt ¶
func (m *RoomMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*RoomMutation) ResetUpdatedBy ¶
func (m *RoomMutation) ResetUpdatedBy()
ResetUpdatedBy resets all changes to the "updated_by" field.
func (*RoomMutation) RoomUsersCleared ¶
func (m *RoomMutation) RoomUsersCleared() bool
RoomUsersCleared reports if the "room_users" edge to the RoomUser entity was cleared.
func (*RoomMutation) RoomUsersIDs ¶
func (m *RoomMutation) RoomUsersIDs() (ids []int64)
RoomUsersIDs returns the "room_users" edge IDs in the mutation.
func (*RoomMutation) SetClosed ¶
func (m *RoomMutation) SetClosed(b bool)
SetClosed sets the "closed" field.
func (*RoomMutation) SetCreatedAt ¶
func (m *RoomMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*RoomMutation) SetCreatedBy ¶
func (m *RoomMutation) SetCreatedBy(i int64)
SetCreatedBy sets the "created_by" field.
func (*RoomMutation) SetDeletedAt ¶
func (m *RoomMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*RoomMutation) SetField ¶
func (m *RoomMutation) 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 (*RoomMutation) SetGameOn ¶
func (m *RoomMutation) SetGameOn(b bool)
SetGameOn sets the "game_on" field.
func (*RoomMutation) SetID ¶
func (m *RoomMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Room entities.
func (*RoomMutation) SetName ¶
func (m *RoomMutation) SetName(s string)
SetName sets the "name" field.
func (*RoomMutation) SetUpdatedAt ¶
func (m *RoomMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*RoomMutation) SetUpdatedBy ¶
func (m *RoomMutation) SetUpdatedBy(i int64)
SetUpdatedBy sets the "updated_by" field.
func (RoomMutation) Tx ¶
func (m RoomMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RoomMutation) Type ¶
func (m *RoomMutation) Type() string
Type returns the node type of this mutation (Room).
func (*RoomMutation) UpdatedAt ¶
func (m *RoomMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*RoomMutation) UpdatedBy ¶
func (m *RoomMutation) UpdatedBy() (r int64, exists bool)
UpdatedBy returns the value of the "updated_by" field in the mutation.
func (*RoomMutation) Where ¶
func (m *RoomMutation) Where(ps ...predicate.Room)
Where appends a list predicates to the RoomMutation builder.
type RoomOrder ¶
type RoomOrder struct { Direction OrderDirection `json:"direction"` Field *RoomOrderField `json:"field"` }
RoomOrder defines the ordering of Room.
type RoomOrderField ¶
type RoomOrderField struct {
// contains filtered or unexported fields
}
RoomOrderField defines the ordering field of Room.
func (RoomOrderField) MarshalGQL ¶
func (f RoomOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (RoomOrderField) String ¶
func (f RoomOrderField) String() string
String implement fmt.Stringer interface.
func (*RoomOrderField) UnmarshalGQL ¶
func (f *RoomOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type RoomPaginateOption ¶
type RoomPaginateOption func(*roomPager) error
RoomPaginateOption enables pagination customization.
func WithRoomFilter ¶
func WithRoomFilter(filter func(*RoomQuery) (*RoomQuery, error)) RoomPaginateOption
WithRoomFilter configures pagination filter.
func WithRoomOrder ¶
func WithRoomOrder(order *RoomOrder) RoomPaginateOption
WithRoomOrder configures pagination ordering.
type RoomQuery ¶
type RoomQuery struct {
// contains filtered or unexported fields
}
RoomQuery is the builder for querying Room entities.
func (*RoomQuery) Aggregate ¶
func (rq *RoomQuery) Aggregate(fns ...AggregateFunc) *RoomSelect
Aggregate returns a RoomSelect configured with the given aggregations.
func (*RoomQuery) Clone ¶
Clone returns a duplicate of the RoomQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RoomQuery) CollectFields ¶
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*RoomQuery) First ¶
First returns the first Room entity from the query. Returns a *NotFoundError when no Room was found.
func (*RoomQuery) FirstID ¶
FirstID returns the first Room ID from the query. Returns a *NotFoundError when no Room ID was found.
func (*RoomQuery) GroupBy ¶
func (rq *RoomQuery) GroupBy(field string, fields ...string) *RoomGroupBy
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 { CreatedBy int64 `json:"created_by"` Count int `json:"count,omitempty"` } client.Room.Query(). GroupBy(room.FieldCreatedBy). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RoomQuery) Only ¶
Only returns a single Room entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Room entity is found. Returns a *NotFoundError when no Room entities are found.
func (*RoomQuery) OnlyID ¶
OnlyID is like Only, but returns the only Room ID in the query. Returns a *NotSingularError when more than one Room ID is found. Returns a *NotFoundError when no entities are found.
func (*RoomQuery) Paginate ¶
func (r *RoomQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...RoomPaginateOption, ) (*RoomConnection, error)
Paginate executes the query and returns a relay based cursor connection to Room.
func (*RoomQuery) QueryGames ¶
QueryGames chains the current query on the "games" edge.
func (*RoomQuery) QueryRecords ¶
func (rq *RoomQuery) QueryRecords() *RecordQuery
QueryRecords chains the current query on the "records" edge.
func (*RoomQuery) QueryRoomUsers ¶
func (rq *RoomQuery) QueryRoomUsers() *RoomUserQuery
QueryRoomUsers chains the current query on the "room_users" edge.
func (*RoomQuery) Select ¶
func (rq *RoomQuery) Select(fields ...string) *RoomSelect
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 { CreatedBy int64 `json:"created_by"` } client.Room.Query(). Select(room.FieldCreatedBy). Scan(ctx, &v)
func (*RoomQuery) Unique ¶
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 (*RoomQuery) WithGames ¶
WithGames tells the query-builder to eager-load the nodes that are connected to the "games" edge. The optional arguments are used to configure the query builder of the edge.
func (*RoomQuery) WithNamedGames ¶
WithNamedGames tells the query-builder to eager-load the nodes that are connected to the "games" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*RoomQuery) WithNamedRecords ¶
func (rq *RoomQuery) WithNamedRecords(name string, opts ...func(*RecordQuery)) *RoomQuery
WithNamedRecords tells the query-builder to eager-load the nodes that are connected to the "records" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*RoomQuery) WithNamedRoomUsers ¶
func (rq *RoomQuery) WithNamedRoomUsers(name string, opts ...func(*RoomUserQuery)) *RoomQuery
WithNamedRoomUsers tells the query-builder to eager-load the nodes that are connected to the "room_users" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*RoomQuery) WithRecords ¶
func (rq *RoomQuery) WithRecords(opts ...func(*RecordQuery)) *RoomQuery
WithRecords tells the query-builder to eager-load the nodes that are connected to the "records" edge. The optional arguments are used to configure the query builder of the edge.
func (*RoomQuery) WithRoomUsers ¶
func (rq *RoomQuery) WithRoomUsers(opts ...func(*RoomUserQuery)) *RoomQuery
WithRoomUsers tells the query-builder to eager-load the nodes that are connected to the "room_users" edge. The optional arguments are used to configure the query builder of the edge.
type RoomSelect ¶
type RoomSelect struct { *RoomQuery // contains filtered or unexported fields }
RoomSelect is the builder for selecting fields of Room entities.
func (*RoomSelect) Aggregate ¶
func (rs *RoomSelect) Aggregate(fns ...AggregateFunc) *RoomSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RoomSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RoomSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RoomSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RoomSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RoomSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RoomSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RoomSelect) Scan ¶
func (rs *RoomSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RoomSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RoomUpdate ¶
type RoomUpdate struct {
// contains filtered or unexported fields
}
RoomUpdate is the builder for updating Room entities.
func (*RoomUpdate) AddCreatedBy ¶
func (ru *RoomUpdate) AddCreatedBy(i int64) *RoomUpdate
AddCreatedBy adds i to the "created_by" field.
func (*RoomUpdate) AddGameIDs ¶
func (ru *RoomUpdate) AddGameIDs(ids ...int64) *RoomUpdate
AddGameIDs adds the "games" edge to the Game entity by IDs.
func (*RoomUpdate) AddGames ¶
func (ru *RoomUpdate) AddGames(g ...*Game) *RoomUpdate
AddGames adds the "games" edges to the Game entity.
func (*RoomUpdate) AddRecordIDs ¶
func (ru *RoomUpdate) AddRecordIDs(ids ...int64) *RoomUpdate
AddRecordIDs adds the "records" edge to the Record entity by IDs.
func (*RoomUpdate) AddRecords ¶
func (ru *RoomUpdate) AddRecords(r ...*Record) *RoomUpdate
AddRecords adds the "records" edges to the Record entity.
func (*RoomUpdate) AddRoomUserIDs ¶
func (ru *RoomUpdate) AddRoomUserIDs(ids ...int64) *RoomUpdate
AddRoomUserIDs adds the "room_users" edge to the RoomUser entity by IDs.
func (*RoomUpdate) AddRoomUsers ¶
func (ru *RoomUpdate) AddRoomUsers(r ...*RoomUser) *RoomUpdate
AddRoomUsers adds the "room_users" edges to the RoomUser entity.
func (*RoomUpdate) AddUpdatedBy ¶
func (ru *RoomUpdate) AddUpdatedBy(i int64) *RoomUpdate
AddUpdatedBy adds i to the "updated_by" field.
func (*RoomUpdate) ClearGames ¶
func (ru *RoomUpdate) ClearGames() *RoomUpdate
ClearGames clears all "games" edges to the Game entity.
func (*RoomUpdate) ClearRecords ¶
func (ru *RoomUpdate) ClearRecords() *RoomUpdate
ClearRecords clears all "records" edges to the Record entity.
func (*RoomUpdate) ClearRoomUsers ¶
func (ru *RoomUpdate) ClearRoomUsers() *RoomUpdate
ClearRoomUsers clears all "room_users" edges to the RoomUser entity.
func (*RoomUpdate) Exec ¶
func (ru *RoomUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RoomUpdate) ExecX ¶
func (ru *RoomUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoomUpdate) Mutation ¶
func (ru *RoomUpdate) Mutation() *RoomMutation
Mutation returns the RoomMutation object of the builder.
func (*RoomUpdate) RemoveGameIDs ¶
func (ru *RoomUpdate) RemoveGameIDs(ids ...int64) *RoomUpdate
RemoveGameIDs removes the "games" edge to Game entities by IDs.
func (*RoomUpdate) RemoveGames ¶
func (ru *RoomUpdate) RemoveGames(g ...*Game) *RoomUpdate
RemoveGames removes "games" edges to Game entities.
func (*RoomUpdate) RemoveRecordIDs ¶
func (ru *RoomUpdate) RemoveRecordIDs(ids ...int64) *RoomUpdate
RemoveRecordIDs removes the "records" edge to Record entities by IDs.
func (*RoomUpdate) RemoveRecords ¶
func (ru *RoomUpdate) RemoveRecords(r ...*Record) *RoomUpdate
RemoveRecords removes "records" edges to Record entities.
func (*RoomUpdate) RemoveRoomUserIDs ¶
func (ru *RoomUpdate) RemoveRoomUserIDs(ids ...int64) *RoomUpdate
RemoveRoomUserIDs removes the "room_users" edge to RoomUser entities by IDs.
func (*RoomUpdate) RemoveRoomUsers ¶
func (ru *RoomUpdate) RemoveRoomUsers(r ...*RoomUser) *RoomUpdate
RemoveRoomUsers removes "room_users" edges to RoomUser entities.
func (*RoomUpdate) Save ¶
func (ru *RoomUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RoomUpdate) SaveX ¶
func (ru *RoomUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RoomUpdate) SetClosed ¶
func (ru *RoomUpdate) SetClosed(b bool) *RoomUpdate
SetClosed sets the "closed" field.
func (*RoomUpdate) SetCreatedBy ¶
func (ru *RoomUpdate) SetCreatedBy(i int64) *RoomUpdate
SetCreatedBy sets the "created_by" field.
func (*RoomUpdate) SetDeletedAt ¶
func (ru *RoomUpdate) SetDeletedAt(t time.Time) *RoomUpdate
SetDeletedAt sets the "deleted_at" field.
func (*RoomUpdate) SetGameOn ¶
func (ru *RoomUpdate) SetGameOn(b bool) *RoomUpdate
SetGameOn sets the "game_on" field.
func (*RoomUpdate) SetInput ¶
func (c *RoomUpdate) SetInput(i UpdateRoomInput) *RoomUpdate
SetInput applies the change-set in the UpdateRoomInput on the RoomUpdate builder.
func (*RoomUpdate) SetName ¶
func (ru *RoomUpdate) SetName(s string) *RoomUpdate
SetName sets the "name" field.
func (*RoomUpdate) SetNillableClosed ¶
func (ru *RoomUpdate) SetNillableClosed(b *bool) *RoomUpdate
SetNillableClosed sets the "closed" field if the given value is not nil.
func (*RoomUpdate) SetNillableCreatedBy ¶
func (ru *RoomUpdate) SetNillableCreatedBy(i *int64) *RoomUpdate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*RoomUpdate) SetNillableDeletedAt ¶
func (ru *RoomUpdate) SetNillableDeletedAt(t *time.Time) *RoomUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*RoomUpdate) SetNillableGameOn ¶
func (ru *RoomUpdate) SetNillableGameOn(b *bool) *RoomUpdate
SetNillableGameOn sets the "game_on" field if the given value is not nil.
func (*RoomUpdate) SetNillableName ¶
func (ru *RoomUpdate) SetNillableName(s *string) *RoomUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*RoomUpdate) SetNillableUpdatedBy ¶
func (ru *RoomUpdate) SetNillableUpdatedBy(i *int64) *RoomUpdate
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*RoomUpdate) SetUpdatedAt ¶
func (ru *RoomUpdate) SetUpdatedAt(t time.Time) *RoomUpdate
SetUpdatedAt sets the "updated_at" field.
func (*RoomUpdate) SetUpdatedBy ¶
func (ru *RoomUpdate) SetUpdatedBy(i int64) *RoomUpdate
SetUpdatedBy sets the "updated_by" field.
func (*RoomUpdate) Where ¶
func (ru *RoomUpdate) Where(ps ...predicate.Room) *RoomUpdate
Where appends a list predicates to the RoomUpdate builder.
type RoomUpdateOne ¶
type RoomUpdateOne struct {
// contains filtered or unexported fields
}
RoomUpdateOne is the builder for updating a single Room entity.
func (*RoomUpdateOne) AddCreatedBy ¶
func (ruo *RoomUpdateOne) AddCreatedBy(i int64) *RoomUpdateOne
AddCreatedBy adds i to the "created_by" field.
func (*RoomUpdateOne) AddGameIDs ¶
func (ruo *RoomUpdateOne) AddGameIDs(ids ...int64) *RoomUpdateOne
AddGameIDs adds the "games" edge to the Game entity by IDs.
func (*RoomUpdateOne) AddGames ¶
func (ruo *RoomUpdateOne) AddGames(g ...*Game) *RoomUpdateOne
AddGames adds the "games" edges to the Game entity.
func (*RoomUpdateOne) AddRecordIDs ¶
func (ruo *RoomUpdateOne) AddRecordIDs(ids ...int64) *RoomUpdateOne
AddRecordIDs adds the "records" edge to the Record entity by IDs.
func (*RoomUpdateOne) AddRecords ¶
func (ruo *RoomUpdateOne) AddRecords(r ...*Record) *RoomUpdateOne
AddRecords adds the "records" edges to the Record entity.
func (*RoomUpdateOne) AddRoomUserIDs ¶
func (ruo *RoomUpdateOne) AddRoomUserIDs(ids ...int64) *RoomUpdateOne
AddRoomUserIDs adds the "room_users" edge to the RoomUser entity by IDs.
func (*RoomUpdateOne) AddRoomUsers ¶
func (ruo *RoomUpdateOne) AddRoomUsers(r ...*RoomUser) *RoomUpdateOne
AddRoomUsers adds the "room_users" edges to the RoomUser entity.
func (*RoomUpdateOne) AddUpdatedBy ¶
func (ruo *RoomUpdateOne) AddUpdatedBy(i int64) *RoomUpdateOne
AddUpdatedBy adds i to the "updated_by" field.
func (*RoomUpdateOne) ClearGames ¶
func (ruo *RoomUpdateOne) ClearGames() *RoomUpdateOne
ClearGames clears all "games" edges to the Game entity.
func (*RoomUpdateOne) ClearRecords ¶
func (ruo *RoomUpdateOne) ClearRecords() *RoomUpdateOne
ClearRecords clears all "records" edges to the Record entity.
func (*RoomUpdateOne) ClearRoomUsers ¶
func (ruo *RoomUpdateOne) ClearRoomUsers() *RoomUpdateOne
ClearRoomUsers clears all "room_users" edges to the RoomUser entity.
func (*RoomUpdateOne) Exec ¶
func (ruo *RoomUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RoomUpdateOne) ExecX ¶
func (ruo *RoomUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoomUpdateOne) Mutation ¶
func (ruo *RoomUpdateOne) Mutation() *RoomMutation
Mutation returns the RoomMutation object of the builder.
func (*RoomUpdateOne) RemoveGameIDs ¶
func (ruo *RoomUpdateOne) RemoveGameIDs(ids ...int64) *RoomUpdateOne
RemoveGameIDs removes the "games" edge to Game entities by IDs.
func (*RoomUpdateOne) RemoveGames ¶
func (ruo *RoomUpdateOne) RemoveGames(g ...*Game) *RoomUpdateOne
RemoveGames removes "games" edges to Game entities.
func (*RoomUpdateOne) RemoveRecordIDs ¶
func (ruo *RoomUpdateOne) RemoveRecordIDs(ids ...int64) *RoomUpdateOne
RemoveRecordIDs removes the "records" edge to Record entities by IDs.
func (*RoomUpdateOne) RemoveRecords ¶
func (ruo *RoomUpdateOne) RemoveRecords(r ...*Record) *RoomUpdateOne
RemoveRecords removes "records" edges to Record entities.
func (*RoomUpdateOne) RemoveRoomUserIDs ¶
func (ruo *RoomUpdateOne) RemoveRoomUserIDs(ids ...int64) *RoomUpdateOne
RemoveRoomUserIDs removes the "room_users" edge to RoomUser entities by IDs.
func (*RoomUpdateOne) RemoveRoomUsers ¶
func (ruo *RoomUpdateOne) RemoveRoomUsers(r ...*RoomUser) *RoomUpdateOne
RemoveRoomUsers removes "room_users" edges to RoomUser entities.
func (*RoomUpdateOne) Save ¶
func (ruo *RoomUpdateOne) Save(ctx context.Context) (*Room, error)
Save executes the query and returns the updated Room entity.
func (*RoomUpdateOne) SaveX ¶
func (ruo *RoomUpdateOne) SaveX(ctx context.Context) *Room
SaveX is like Save, but panics if an error occurs.
func (*RoomUpdateOne) Select ¶
func (ruo *RoomUpdateOne) Select(field string, fields ...string) *RoomUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RoomUpdateOne) SetClosed ¶
func (ruo *RoomUpdateOne) SetClosed(b bool) *RoomUpdateOne
SetClosed sets the "closed" field.
func (*RoomUpdateOne) SetCreatedBy ¶
func (ruo *RoomUpdateOne) SetCreatedBy(i int64) *RoomUpdateOne
SetCreatedBy sets the "created_by" field.
func (*RoomUpdateOne) SetDeletedAt ¶
func (ruo *RoomUpdateOne) SetDeletedAt(t time.Time) *RoomUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*RoomUpdateOne) SetGameOn ¶
func (ruo *RoomUpdateOne) SetGameOn(b bool) *RoomUpdateOne
SetGameOn sets the "game_on" field.
func (*RoomUpdateOne) SetInput ¶
func (c *RoomUpdateOne) SetInput(i UpdateRoomInput) *RoomUpdateOne
SetInput applies the change-set in the UpdateRoomInput on the RoomUpdateOne builder.
func (*RoomUpdateOne) SetName ¶
func (ruo *RoomUpdateOne) SetName(s string) *RoomUpdateOne
SetName sets the "name" field.
func (*RoomUpdateOne) SetNillableClosed ¶
func (ruo *RoomUpdateOne) SetNillableClosed(b *bool) *RoomUpdateOne
SetNillableClosed sets the "closed" field if the given value is not nil.
func (*RoomUpdateOne) SetNillableCreatedBy ¶
func (ruo *RoomUpdateOne) SetNillableCreatedBy(i *int64) *RoomUpdateOne
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*RoomUpdateOne) SetNillableDeletedAt ¶
func (ruo *RoomUpdateOne) SetNillableDeletedAt(t *time.Time) *RoomUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*RoomUpdateOne) SetNillableGameOn ¶
func (ruo *RoomUpdateOne) SetNillableGameOn(b *bool) *RoomUpdateOne
SetNillableGameOn sets the "game_on" field if the given value is not nil.
func (*RoomUpdateOne) SetNillableName ¶
func (ruo *RoomUpdateOne) SetNillableName(s *string) *RoomUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*RoomUpdateOne) SetNillableUpdatedBy ¶
func (ruo *RoomUpdateOne) SetNillableUpdatedBy(i *int64) *RoomUpdateOne
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*RoomUpdateOne) SetUpdatedAt ¶
func (ruo *RoomUpdateOne) SetUpdatedAt(t time.Time) *RoomUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*RoomUpdateOne) SetUpdatedBy ¶
func (ruo *RoomUpdateOne) SetUpdatedBy(i int64) *RoomUpdateOne
SetUpdatedBy sets the "updated_by" field.
type RoomUser ¶
type RoomUser struct { // ID of the ent. ID int64 `json:"id,omitempty"` // CreatedBy holds the value of the "created_by" field. CreatedBy int64 `json:"created_by"` // UpdatedBy holds the value of the "updated_by" field. UpdatedBy int64 `json:"updated_by"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt time.Time `json:"deleted_at"` // 用户 ID UserID int64 `json:"user_id"` // 房间 ID RoomID int64 `json:"room_id"` // 是否为房主 Host bool `json:"host"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the RoomUserQuery when eager-loading is set. Edges RoomUserEdges `json:"edges"` // contains filtered or unexported fields }
RoomUser is the model entity for the RoomUser schema.
func (*RoomUser) ToEdge ¶
func (ru *RoomUser) ToEdge(order *RoomUserOrder) *RoomUserEdge
ToEdge converts RoomUser into RoomUserEdge.
func (*RoomUser) Unwrap ¶
Unwrap unwraps the RoomUser 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 (*RoomUser) Update ¶
func (ru *RoomUser) Update() *RoomUserUpdateOne
Update returns a builder for updating this RoomUser. Note that you need to call RoomUser.Unwrap() before calling this method if this RoomUser was returned from a transaction, and the transaction was committed or rolled back.
type RoomUserClient ¶
type RoomUserClient struct {
// contains filtered or unexported fields
}
RoomUserClient is a client for the RoomUser schema.
func NewRoomUserClient ¶
func NewRoomUserClient(c config) *RoomUserClient
NewRoomUserClient returns a client for the RoomUser from the given config.
func (*RoomUserClient) Create ¶
func (c *RoomUserClient) Create() *RoomUserCreate
Create returns a builder for creating a RoomUser entity.
func (*RoomUserClient) CreateBulk ¶
func (c *RoomUserClient) CreateBulk(builders ...*RoomUserCreate) *RoomUserCreateBulk
CreateBulk returns a builder for creating a bulk of RoomUser entities.
func (*RoomUserClient) Delete ¶
func (c *RoomUserClient) Delete() *RoomUserDelete
Delete returns a delete builder for RoomUser.
func (*RoomUserClient) DeleteOne ¶
func (c *RoomUserClient) DeleteOne(ru *RoomUser) *RoomUserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RoomUserClient) DeleteOneID ¶
func (c *RoomUserClient) DeleteOneID(id int64) *RoomUserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RoomUserClient) GetX ¶
func (c *RoomUserClient) GetX(ctx context.Context, id int64) *RoomUser
GetX is like Get, but panics if an error occurs.
func (*RoomUserClient) Hooks ¶
func (c *RoomUserClient) Hooks() []Hook
Hooks returns the client hooks.
func (*RoomUserClient) Query ¶
func (c *RoomUserClient) Query() *RoomUserQuery
Query returns a query builder for RoomUser.
func (*RoomUserClient) QueryRoom ¶
func (c *RoomUserClient) QueryRoom(ru *RoomUser) *RoomQuery
QueryRoom queries the room edge of a RoomUser.
func (*RoomUserClient) Update ¶
func (c *RoomUserClient) Update() *RoomUserUpdate
Update returns an update builder for RoomUser.
func (*RoomUserClient) UpdateOne ¶
func (c *RoomUserClient) UpdateOne(ru *RoomUser) *RoomUserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RoomUserClient) UpdateOneID ¶
func (c *RoomUserClient) UpdateOneID(id int64) *RoomUserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RoomUserClient) Use ¶
func (c *RoomUserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `roomuser.Hooks(f(g(h())))`.
type RoomUserConnection ¶
type RoomUserConnection struct { Edges []*RoomUserEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
RoomUserConnection is the connection containing edges to RoomUser.
type RoomUserCreate ¶
type RoomUserCreate struct {
// contains filtered or unexported fields
}
RoomUserCreate is the builder for creating a RoomUser entity.
func (*RoomUserCreate) Exec ¶
func (ruc *RoomUserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RoomUserCreate) ExecX ¶
func (ruc *RoomUserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoomUserCreate) Mutation ¶
func (ruc *RoomUserCreate) Mutation() *RoomUserMutation
Mutation returns the RoomUserMutation object of the builder.
func (*RoomUserCreate) Save ¶
func (ruc *RoomUserCreate) Save(ctx context.Context) (*RoomUser, error)
Save creates the RoomUser in the database.
func (*RoomUserCreate) SaveX ¶
func (ruc *RoomUserCreate) SaveX(ctx context.Context) *RoomUser
SaveX calls Save and panics if Save returns an error.
func (*RoomUserCreate) SetCreatedAt ¶
func (ruc *RoomUserCreate) SetCreatedAt(t time.Time) *RoomUserCreate
SetCreatedAt sets the "created_at" field.
func (*RoomUserCreate) SetCreatedBy ¶
func (ruc *RoomUserCreate) SetCreatedBy(i int64) *RoomUserCreate
SetCreatedBy sets the "created_by" field.
func (*RoomUserCreate) SetDeletedAt ¶
func (ruc *RoomUserCreate) SetDeletedAt(t time.Time) *RoomUserCreate
SetDeletedAt sets the "deleted_at" field.
func (*RoomUserCreate) SetHost ¶
func (ruc *RoomUserCreate) SetHost(b bool) *RoomUserCreate
SetHost sets the "host" field.
func (*RoomUserCreate) SetID ¶
func (ruc *RoomUserCreate) SetID(i int64) *RoomUserCreate
SetID sets the "id" field.
func (*RoomUserCreate) SetInput ¶
func (c *RoomUserCreate) SetInput(i CreateRoomUserInput) *RoomUserCreate
SetInput applies the change-set in the CreateRoomUserInput on the RoomUserCreate builder.
func (*RoomUserCreate) SetNillableCreatedAt ¶
func (ruc *RoomUserCreate) SetNillableCreatedAt(t *time.Time) *RoomUserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*RoomUserCreate) SetNillableCreatedBy ¶
func (ruc *RoomUserCreate) SetNillableCreatedBy(i *int64) *RoomUserCreate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*RoomUserCreate) SetNillableDeletedAt ¶
func (ruc *RoomUserCreate) SetNillableDeletedAt(t *time.Time) *RoomUserCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*RoomUserCreate) SetNillableHost ¶
func (ruc *RoomUserCreate) SetNillableHost(b *bool) *RoomUserCreate
SetNillableHost sets the "host" field if the given value is not nil.
func (*RoomUserCreate) SetNillableID ¶
func (ruc *RoomUserCreate) SetNillableID(i *int64) *RoomUserCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*RoomUserCreate) SetNillableUpdatedAt ¶
func (ruc *RoomUserCreate) SetNillableUpdatedAt(t *time.Time) *RoomUserCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*RoomUserCreate) SetNillableUpdatedBy ¶
func (ruc *RoomUserCreate) SetNillableUpdatedBy(i *int64) *RoomUserCreate
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*RoomUserCreate) SetRoom ¶
func (ruc *RoomUserCreate) SetRoom(r *Room) *RoomUserCreate
SetRoom sets the "room" edge to the Room entity.
func (*RoomUserCreate) SetRoomID ¶
func (ruc *RoomUserCreate) SetRoomID(i int64) *RoomUserCreate
SetRoomID sets the "room_id" field.
func (*RoomUserCreate) SetUpdatedAt ¶
func (ruc *RoomUserCreate) SetUpdatedAt(t time.Time) *RoomUserCreate
SetUpdatedAt sets the "updated_at" field.
func (*RoomUserCreate) SetUpdatedBy ¶
func (ruc *RoomUserCreate) SetUpdatedBy(i int64) *RoomUserCreate
SetUpdatedBy sets the "updated_by" field.
func (*RoomUserCreate) SetUserID ¶
func (ruc *RoomUserCreate) SetUserID(i int64) *RoomUserCreate
SetUserID sets the "user_id" field.
type RoomUserCreateBulk ¶
type RoomUserCreateBulk struct {
// contains filtered or unexported fields
}
RoomUserCreateBulk is the builder for creating many RoomUser entities in bulk.
func (*RoomUserCreateBulk) Exec ¶
func (rucb *RoomUserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RoomUserCreateBulk) ExecX ¶
func (rucb *RoomUserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RoomUserDelete ¶
type RoomUserDelete struct {
// contains filtered or unexported fields
}
RoomUserDelete is the builder for deleting a RoomUser entity.
func (*RoomUserDelete) Exec ¶
func (rud *RoomUserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RoomUserDelete) ExecX ¶
func (rud *RoomUserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RoomUserDelete) Where ¶
func (rud *RoomUserDelete) Where(ps ...predicate.RoomUser) *RoomUserDelete
Where appends a list predicates to the RoomUserDelete builder.
type RoomUserDeleteOne ¶
type RoomUserDeleteOne struct {
// contains filtered or unexported fields
}
RoomUserDeleteOne is the builder for deleting a single RoomUser entity.
func (*RoomUserDeleteOne) Exec ¶
func (rudo *RoomUserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RoomUserDeleteOne) ExecX ¶
func (rudo *RoomUserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RoomUserEdge ¶
RoomUserEdge is the edge representation of RoomUser.
type RoomUserEdges ¶
type RoomUserEdges struct { // Room holds the value of the room edge. Room *Room `json:"room,omitempty"` // contains filtered or unexported fields }
RoomUserEdges holds the relations/edges for other nodes in the graph.
func (RoomUserEdges) RoomOrErr ¶
func (e RoomUserEdges) RoomOrErr() (*Room, error)
RoomOrErr returns the Room value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type RoomUserGroupBy ¶
type RoomUserGroupBy struct {
// contains filtered or unexported fields
}
RoomUserGroupBy is the group-by builder for RoomUser entities.
func (*RoomUserGroupBy) Aggregate ¶
func (rugb *RoomUserGroupBy) Aggregate(fns ...AggregateFunc) *RoomUserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RoomUserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RoomUserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RoomUserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RoomUserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RoomUserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RoomUserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RoomUserGroupBy) Scan ¶
func (rugb *RoomUserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*RoomUserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RoomUserMutation ¶
type RoomUserMutation struct {
// contains filtered or unexported fields
}
RoomUserMutation represents an operation that mutates the RoomUser nodes in the graph.
func (*RoomUserMutation) AddCreatedBy ¶
func (m *RoomUserMutation) AddCreatedBy(i int64)
AddCreatedBy adds i to the "created_by" field.
func (*RoomUserMutation) AddField ¶
func (m *RoomUserMutation) 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 (*RoomUserMutation) AddUpdatedBy ¶
func (m *RoomUserMutation) AddUpdatedBy(i int64)
AddUpdatedBy adds i to the "updated_by" field.
func (*RoomUserMutation) AddUserID ¶
func (m *RoomUserMutation) AddUserID(i int64)
AddUserID adds i to the "user_id" field.
func (*RoomUserMutation) AddedCreatedBy ¶
func (m *RoomUserMutation) AddedCreatedBy() (r int64, exists bool)
AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.
func (*RoomUserMutation) AddedEdges ¶
func (m *RoomUserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RoomUserMutation) AddedField ¶
func (m *RoomUserMutation) 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 (*RoomUserMutation) AddedFields ¶
func (m *RoomUserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RoomUserMutation) AddedIDs ¶
func (m *RoomUserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RoomUserMutation) AddedUpdatedBy ¶
func (m *RoomUserMutation) AddedUpdatedBy() (r int64, exists bool)
AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.
func (*RoomUserMutation) AddedUserID ¶
func (m *RoomUserMutation) AddedUserID() (r int64, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*RoomUserMutation) ClearEdge ¶
func (m *RoomUserMutation) 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 (*RoomUserMutation) ClearField ¶
func (m *RoomUserMutation) 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 (*RoomUserMutation) ClearRoom ¶
func (m *RoomUserMutation) ClearRoom()
ClearRoom clears the "room" edge to the Room entity.
func (*RoomUserMutation) ClearedEdges ¶
func (m *RoomUserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RoomUserMutation) ClearedFields ¶
func (m *RoomUserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RoomUserMutation) Client ¶
func (m RoomUserMutation) 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 (*RoomUserMutation) CreatedAt ¶
func (m *RoomUserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*RoomUserMutation) CreatedBy ¶
func (m *RoomUserMutation) CreatedBy() (r int64, exists bool)
CreatedBy returns the value of the "created_by" field in the mutation.
func (*RoomUserMutation) DeletedAt ¶
func (m *RoomUserMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*RoomUserMutation) EdgeCleared ¶
func (m *RoomUserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RoomUserMutation) Field ¶
func (m *RoomUserMutation) 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 (*RoomUserMutation) FieldCleared ¶
func (m *RoomUserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RoomUserMutation) Fields ¶
func (m *RoomUserMutation) 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 (*RoomUserMutation) Host ¶
func (m *RoomUserMutation) Host() (r bool, exists bool)
Host returns the value of the "host" field in the mutation.
func (*RoomUserMutation) ID ¶
func (m *RoomUserMutation) ID() (id int64, 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 (*RoomUserMutation) IDs ¶
func (m *RoomUserMutation) IDs(ctx context.Context) ([]int64, 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 (*RoomUserMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the RoomUser entity. If the RoomUser 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 (*RoomUserMutation) OldCreatedBy ¶
func (m *RoomUserMutation) OldCreatedBy(ctx context.Context) (v int64, err error)
OldCreatedBy returns the old "created_by" field's value of the RoomUser entity. If the RoomUser 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 (*RoomUserMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the RoomUser entity. If the RoomUser 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 (*RoomUserMutation) 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 (*RoomUserMutation) OldHost ¶
func (m *RoomUserMutation) OldHost(ctx context.Context) (v bool, err error)
OldHost returns the old "host" field's value of the RoomUser entity. If the RoomUser 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 (*RoomUserMutation) OldRoomID ¶
func (m *RoomUserMutation) OldRoomID(ctx context.Context) (v int64, err error)
OldRoomID returns the old "room_id" field's value of the RoomUser entity. If the RoomUser 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 (*RoomUserMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the RoomUser entity. If the RoomUser 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 (*RoomUserMutation) OldUpdatedBy ¶
func (m *RoomUserMutation) OldUpdatedBy(ctx context.Context) (v int64, err error)
OldUpdatedBy returns the old "updated_by" field's value of the RoomUser entity. If the RoomUser 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 (*RoomUserMutation) OldUserID ¶
func (m *RoomUserMutation) OldUserID(ctx context.Context) (v int64, err error)
OldUserID returns the old "user_id" field's value of the RoomUser entity. If the RoomUser 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 (*RoomUserMutation) RemovedEdges ¶
func (m *RoomUserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RoomUserMutation) RemovedIDs ¶
func (m *RoomUserMutation) 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 (*RoomUserMutation) ResetCreatedAt ¶
func (m *RoomUserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*RoomUserMutation) ResetCreatedBy ¶
func (m *RoomUserMutation) ResetCreatedBy()
ResetCreatedBy resets all changes to the "created_by" field.
func (*RoomUserMutation) ResetDeletedAt ¶
func (m *RoomUserMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*RoomUserMutation) ResetEdge ¶
func (m *RoomUserMutation) 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 (*RoomUserMutation) ResetField ¶
func (m *RoomUserMutation) 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 (*RoomUserMutation) ResetHost ¶
func (m *RoomUserMutation) ResetHost()
ResetHost resets all changes to the "host" field.
func (*RoomUserMutation) ResetRoom ¶
func (m *RoomUserMutation) ResetRoom()
ResetRoom resets all changes to the "room" edge.
func (*RoomUserMutation) ResetRoomID ¶
func (m *RoomUserMutation) ResetRoomID()
ResetRoomID resets all changes to the "room_id" field.
func (*RoomUserMutation) ResetUpdatedAt ¶
func (m *RoomUserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*RoomUserMutation) ResetUpdatedBy ¶
func (m *RoomUserMutation) ResetUpdatedBy()
ResetUpdatedBy resets all changes to the "updated_by" field.
func (*RoomUserMutation) ResetUserID ¶
func (m *RoomUserMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*RoomUserMutation) RoomCleared ¶
func (m *RoomUserMutation) RoomCleared() bool
RoomCleared reports if the "room" edge to the Room entity was cleared.
func (*RoomUserMutation) RoomID ¶
func (m *RoomUserMutation) RoomID() (r int64, exists bool)
RoomID returns the value of the "room_id" field in the mutation.
func (*RoomUserMutation) RoomIDs ¶
func (m *RoomUserMutation) RoomIDs() (ids []int64)
RoomIDs returns the "room" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RoomID instead. It exists only for internal usage by the builders.
func (*RoomUserMutation) SetCreatedAt ¶
func (m *RoomUserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*RoomUserMutation) SetCreatedBy ¶
func (m *RoomUserMutation) SetCreatedBy(i int64)
SetCreatedBy sets the "created_by" field.
func (*RoomUserMutation) SetDeletedAt ¶
func (m *RoomUserMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*RoomUserMutation) SetField ¶
func (m *RoomUserMutation) 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 (*RoomUserMutation) SetHost ¶
func (m *RoomUserMutation) SetHost(b bool)
SetHost sets the "host" field.
func (*RoomUserMutation) SetID ¶
func (m *RoomUserMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of RoomUser entities.
func (*RoomUserMutation) SetRoomID ¶
func (m *RoomUserMutation) SetRoomID(i int64)
SetRoomID sets the "room_id" field.
func (*RoomUserMutation) SetUpdatedAt ¶
func (m *RoomUserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*RoomUserMutation) SetUpdatedBy ¶
func (m *RoomUserMutation) SetUpdatedBy(i int64)
SetUpdatedBy sets the "updated_by" field.
func (*RoomUserMutation) SetUserID ¶
func (m *RoomUserMutation) SetUserID(i int64)
SetUserID sets the "user_id" field.
func (RoomUserMutation) Tx ¶
func (m RoomUserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RoomUserMutation) Type ¶
func (m *RoomUserMutation) Type() string
Type returns the node type of this mutation (RoomUser).
func (*RoomUserMutation) UpdatedAt ¶
func (m *RoomUserMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*RoomUserMutation) UpdatedBy ¶
func (m *RoomUserMutation) UpdatedBy() (r int64, exists bool)
UpdatedBy returns the value of the "updated_by" field in the mutation.
func (*RoomUserMutation) UserID ¶
func (m *RoomUserMutation) UserID() (r int64, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*RoomUserMutation) Where ¶
func (m *RoomUserMutation) Where(ps ...predicate.RoomUser)
Where appends a list predicates to the RoomUserMutation builder.
type RoomUserOrder ¶
type RoomUserOrder struct { Direction OrderDirection `json:"direction"` Field *RoomUserOrderField `json:"field"` }
RoomUserOrder defines the ordering of RoomUser.
type RoomUserOrderField ¶
type RoomUserOrderField struct {
// contains filtered or unexported fields
}
RoomUserOrderField defines the ordering field of RoomUser.
func (RoomUserOrderField) MarshalGQL ¶
func (f RoomUserOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (RoomUserOrderField) String ¶
func (f RoomUserOrderField) String() string
String implement fmt.Stringer interface.
func (*RoomUserOrderField) UnmarshalGQL ¶
func (f *RoomUserOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type RoomUserPaginateOption ¶
type RoomUserPaginateOption func(*roomuserPager) error
RoomUserPaginateOption enables pagination customization.
func WithRoomUserFilter ¶
func WithRoomUserFilter(filter func(*RoomUserQuery) (*RoomUserQuery, error)) RoomUserPaginateOption
WithRoomUserFilter configures pagination filter.
func WithRoomUserOrder ¶
func WithRoomUserOrder(order *RoomUserOrder) RoomUserPaginateOption
WithRoomUserOrder configures pagination ordering.
type RoomUserQuery ¶
type RoomUserQuery struct {
// contains filtered or unexported fields
}
RoomUserQuery is the builder for querying RoomUser entities.
func (*RoomUserQuery) Aggregate ¶
func (ruq *RoomUserQuery) Aggregate(fns ...AggregateFunc) *RoomUserSelect
Aggregate returns a RoomUserSelect configured with the given aggregations.
func (*RoomUserQuery) All ¶
func (ruq *RoomUserQuery) All(ctx context.Context) ([]*RoomUser, error)
All executes the query and returns a list of RoomUsers.
func (*RoomUserQuery) AllX ¶
func (ruq *RoomUserQuery) AllX(ctx context.Context) []*RoomUser
AllX is like All, but panics if an error occurs.
func (*RoomUserQuery) Clone ¶
func (ruq *RoomUserQuery) Clone() *RoomUserQuery
Clone returns a duplicate of the RoomUserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RoomUserQuery) CollectFields ¶
func (ru *RoomUserQuery) CollectFields(ctx context.Context, satisfies ...string) (*RoomUserQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*RoomUserQuery) Count ¶
func (ruq *RoomUserQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RoomUserQuery) CountX ¶
func (ruq *RoomUserQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RoomUserQuery) Exist ¶
func (ruq *RoomUserQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RoomUserQuery) ExistX ¶
func (ruq *RoomUserQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RoomUserQuery) First ¶
func (ruq *RoomUserQuery) First(ctx context.Context) (*RoomUser, error)
First returns the first RoomUser entity from the query. Returns a *NotFoundError when no RoomUser was found.
func (*RoomUserQuery) FirstID ¶
func (ruq *RoomUserQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first RoomUser ID from the query. Returns a *NotFoundError when no RoomUser ID was found.
func (*RoomUserQuery) FirstIDX ¶
func (ruq *RoomUserQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*RoomUserQuery) FirstX ¶
func (ruq *RoomUserQuery) FirstX(ctx context.Context) *RoomUser
FirstX is like First, but panics if an error occurs.
func (*RoomUserQuery) GroupBy ¶
func (ruq *RoomUserQuery) GroupBy(field string, fields ...string) *RoomUserGroupBy
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 { CreatedBy int64 `json:"created_by"` Count int `json:"count,omitempty"` } client.RoomUser.Query(). GroupBy(roomuser.FieldCreatedBy). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RoomUserQuery) IDs ¶
func (ruq *RoomUserQuery) IDs(ctx context.Context) ([]int64, error)
IDs executes the query and returns a list of RoomUser IDs.
func (*RoomUserQuery) IDsX ¶
func (ruq *RoomUserQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*RoomUserQuery) Limit ¶
func (ruq *RoomUserQuery) Limit(limit int) *RoomUserQuery
Limit adds a limit step to the query.
func (*RoomUserQuery) Offset ¶
func (ruq *RoomUserQuery) Offset(offset int) *RoomUserQuery
Offset adds an offset step to the query.
func (*RoomUserQuery) Only ¶
func (ruq *RoomUserQuery) Only(ctx context.Context) (*RoomUser, error)
Only returns a single RoomUser entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one RoomUser entity is found. Returns a *NotFoundError when no RoomUser entities are found.
func (*RoomUserQuery) OnlyID ¶
func (ruq *RoomUserQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only RoomUser ID in the query. Returns a *NotSingularError when more than one RoomUser ID is found. Returns a *NotFoundError when no entities are found.
func (*RoomUserQuery) OnlyIDX ¶
func (ruq *RoomUserQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RoomUserQuery) OnlyX ¶
func (ruq *RoomUserQuery) OnlyX(ctx context.Context) *RoomUser
OnlyX is like Only, but panics if an error occurs.
func (*RoomUserQuery) Order ¶
func (ruq *RoomUserQuery) Order(o ...OrderFunc) *RoomUserQuery
Order adds an order step to the query.
func (*RoomUserQuery) Paginate ¶
func (ru *RoomUserQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...RoomUserPaginateOption, ) (*RoomUserConnection, error)
Paginate executes the query and returns a relay based cursor connection to RoomUser.
func (*RoomUserQuery) QueryRoom ¶
func (ruq *RoomUserQuery) QueryRoom() *RoomQuery
QueryRoom chains the current query on the "room" edge.
func (*RoomUserQuery) Select ¶
func (ruq *RoomUserQuery) Select(fields ...string) *RoomUserSelect
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 { CreatedBy int64 `json:"created_by"` } client.RoomUser.Query(). Select(roomuser.FieldCreatedBy). Scan(ctx, &v)
func (*RoomUserQuery) Unique ¶
func (ruq *RoomUserQuery) Unique(unique bool) *RoomUserQuery
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 (*RoomUserQuery) Where ¶
func (ruq *RoomUserQuery) Where(ps ...predicate.RoomUser) *RoomUserQuery
Where adds a new predicate for the RoomUserQuery builder.
func (*RoomUserQuery) WithRoom ¶
func (ruq *RoomUserQuery) WithRoom(opts ...func(*RoomQuery)) *RoomUserQuery
WithRoom tells the query-builder to eager-load the nodes that are connected to the "room" edge. The optional arguments are used to configure the query builder of the edge.
type RoomUserSelect ¶
type RoomUserSelect struct { *RoomUserQuery // contains filtered or unexported fields }
RoomUserSelect is the builder for selecting fields of RoomUser entities.
func (*RoomUserSelect) Aggregate ¶
func (rus *RoomUserSelect) Aggregate(fns ...AggregateFunc) *RoomUserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RoomUserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RoomUserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RoomUserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RoomUserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RoomUserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RoomUserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RoomUserSelect) Scan ¶
func (rus *RoomUserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RoomUserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RoomUserUpdate ¶
type RoomUserUpdate struct {
// contains filtered or unexported fields
}
RoomUserUpdate is the builder for updating RoomUser entities.
func (*RoomUserUpdate) AddCreatedBy ¶
func (ruu *RoomUserUpdate) AddCreatedBy(i int64) *RoomUserUpdate
AddCreatedBy adds i to the "created_by" field.
func (*RoomUserUpdate) AddUpdatedBy ¶
func (ruu *RoomUserUpdate) AddUpdatedBy(i int64) *RoomUserUpdate
AddUpdatedBy adds i to the "updated_by" field.
func (*RoomUserUpdate) AddUserID ¶
func (ruu *RoomUserUpdate) AddUserID(i int64) *RoomUserUpdate
AddUserID adds i to the "user_id" field.
func (*RoomUserUpdate) ClearRoom ¶
func (ruu *RoomUserUpdate) ClearRoom() *RoomUserUpdate
ClearRoom clears the "room" edge to the Room entity.
func (*RoomUserUpdate) Exec ¶
func (ruu *RoomUserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RoomUserUpdate) ExecX ¶
func (ruu *RoomUserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoomUserUpdate) Mutation ¶
func (ruu *RoomUserUpdate) Mutation() *RoomUserMutation
Mutation returns the RoomUserMutation object of the builder.
func (*RoomUserUpdate) Save ¶
func (ruu *RoomUserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RoomUserUpdate) SaveX ¶
func (ruu *RoomUserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RoomUserUpdate) SetCreatedBy ¶
func (ruu *RoomUserUpdate) SetCreatedBy(i int64) *RoomUserUpdate
SetCreatedBy sets the "created_by" field.
func (*RoomUserUpdate) SetDeletedAt ¶
func (ruu *RoomUserUpdate) SetDeletedAt(t time.Time) *RoomUserUpdate
SetDeletedAt sets the "deleted_at" field.
func (*RoomUserUpdate) SetHost ¶
func (ruu *RoomUserUpdate) SetHost(b bool) *RoomUserUpdate
SetHost sets the "host" field.
func (*RoomUserUpdate) SetInput ¶
func (c *RoomUserUpdate) SetInput(i UpdateRoomUserInput) *RoomUserUpdate
SetInput applies the change-set in the UpdateRoomUserInput on the RoomUserUpdate builder.
func (*RoomUserUpdate) SetNillableCreatedBy ¶
func (ruu *RoomUserUpdate) SetNillableCreatedBy(i *int64) *RoomUserUpdate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*RoomUserUpdate) SetNillableDeletedAt ¶
func (ruu *RoomUserUpdate) SetNillableDeletedAt(t *time.Time) *RoomUserUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*RoomUserUpdate) SetNillableHost ¶
func (ruu *RoomUserUpdate) SetNillableHost(b *bool) *RoomUserUpdate
SetNillableHost sets the "host" field if the given value is not nil.
func (*RoomUserUpdate) SetNillableUpdatedBy ¶
func (ruu *RoomUserUpdate) SetNillableUpdatedBy(i *int64) *RoomUserUpdate
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*RoomUserUpdate) SetRoom ¶
func (ruu *RoomUserUpdate) SetRoom(r *Room) *RoomUserUpdate
SetRoom sets the "room" edge to the Room entity.
func (*RoomUserUpdate) SetRoomID ¶
func (ruu *RoomUserUpdate) SetRoomID(i int64) *RoomUserUpdate
SetRoomID sets the "room_id" field.
func (*RoomUserUpdate) SetUpdatedAt ¶
func (ruu *RoomUserUpdate) SetUpdatedAt(t time.Time) *RoomUserUpdate
SetUpdatedAt sets the "updated_at" field.
func (*RoomUserUpdate) SetUpdatedBy ¶
func (ruu *RoomUserUpdate) SetUpdatedBy(i int64) *RoomUserUpdate
SetUpdatedBy sets the "updated_by" field.
func (*RoomUserUpdate) SetUserID ¶
func (ruu *RoomUserUpdate) SetUserID(i int64) *RoomUserUpdate
SetUserID sets the "user_id" field.
func (*RoomUserUpdate) Where ¶
func (ruu *RoomUserUpdate) Where(ps ...predicate.RoomUser) *RoomUserUpdate
Where appends a list predicates to the RoomUserUpdate builder.
type RoomUserUpdateOne ¶
type RoomUserUpdateOne struct {
// contains filtered or unexported fields
}
RoomUserUpdateOne is the builder for updating a single RoomUser entity.
func (*RoomUserUpdateOne) AddCreatedBy ¶
func (ruuo *RoomUserUpdateOne) AddCreatedBy(i int64) *RoomUserUpdateOne
AddCreatedBy adds i to the "created_by" field.
func (*RoomUserUpdateOne) AddUpdatedBy ¶
func (ruuo *RoomUserUpdateOne) AddUpdatedBy(i int64) *RoomUserUpdateOne
AddUpdatedBy adds i to the "updated_by" field.
func (*RoomUserUpdateOne) AddUserID ¶
func (ruuo *RoomUserUpdateOne) AddUserID(i int64) *RoomUserUpdateOne
AddUserID adds i to the "user_id" field.
func (*RoomUserUpdateOne) ClearRoom ¶
func (ruuo *RoomUserUpdateOne) ClearRoom() *RoomUserUpdateOne
ClearRoom clears the "room" edge to the Room entity.
func (*RoomUserUpdateOne) Exec ¶
func (ruuo *RoomUserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RoomUserUpdateOne) ExecX ¶
func (ruuo *RoomUserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoomUserUpdateOne) Mutation ¶
func (ruuo *RoomUserUpdateOne) Mutation() *RoomUserMutation
Mutation returns the RoomUserMutation object of the builder.
func (*RoomUserUpdateOne) Save ¶
func (ruuo *RoomUserUpdateOne) Save(ctx context.Context) (*RoomUser, error)
Save executes the query and returns the updated RoomUser entity.
func (*RoomUserUpdateOne) SaveX ¶
func (ruuo *RoomUserUpdateOne) SaveX(ctx context.Context) *RoomUser
SaveX is like Save, but panics if an error occurs.
func (*RoomUserUpdateOne) Select ¶
func (ruuo *RoomUserUpdateOne) Select(field string, fields ...string) *RoomUserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RoomUserUpdateOne) SetCreatedBy ¶
func (ruuo *RoomUserUpdateOne) SetCreatedBy(i int64) *RoomUserUpdateOne
SetCreatedBy sets the "created_by" field.
func (*RoomUserUpdateOne) SetDeletedAt ¶
func (ruuo *RoomUserUpdateOne) SetDeletedAt(t time.Time) *RoomUserUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*RoomUserUpdateOne) SetHost ¶
func (ruuo *RoomUserUpdateOne) SetHost(b bool) *RoomUserUpdateOne
SetHost sets the "host" field.
func (*RoomUserUpdateOne) SetInput ¶
func (c *RoomUserUpdateOne) SetInput(i UpdateRoomUserInput) *RoomUserUpdateOne
SetInput applies the change-set in the UpdateRoomUserInput on the RoomUserUpdateOne builder.
func (*RoomUserUpdateOne) SetNillableCreatedBy ¶
func (ruuo *RoomUserUpdateOne) SetNillableCreatedBy(i *int64) *RoomUserUpdateOne
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*RoomUserUpdateOne) SetNillableDeletedAt ¶
func (ruuo *RoomUserUpdateOne) SetNillableDeletedAt(t *time.Time) *RoomUserUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*RoomUserUpdateOne) SetNillableHost ¶
func (ruuo *RoomUserUpdateOne) SetNillableHost(b *bool) *RoomUserUpdateOne
SetNillableHost sets the "host" field if the given value is not nil.
func (*RoomUserUpdateOne) SetNillableUpdatedBy ¶
func (ruuo *RoomUserUpdateOne) SetNillableUpdatedBy(i *int64) *RoomUserUpdateOne
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*RoomUserUpdateOne) SetRoom ¶
func (ruuo *RoomUserUpdateOne) SetRoom(r *Room) *RoomUserUpdateOne
SetRoom sets the "room" edge to the Room entity.
func (*RoomUserUpdateOne) SetRoomID ¶
func (ruuo *RoomUserUpdateOne) SetRoomID(i int64) *RoomUserUpdateOne
SetRoomID sets the "room_id" field.
func (*RoomUserUpdateOne) SetUpdatedAt ¶
func (ruuo *RoomUserUpdateOne) SetUpdatedAt(t time.Time) *RoomUserUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*RoomUserUpdateOne) SetUpdatedBy ¶
func (ruuo *RoomUserUpdateOne) SetUpdatedBy(i int64) *RoomUserUpdateOne
SetUpdatedBy sets the "updated_by" field.
func (*RoomUserUpdateOne) SetUserID ¶
func (ruuo *RoomUserUpdateOne) SetUserID(i int64) *RoomUserUpdateOne
SetUserID sets the "user_id" field.
type RoomUserWhereInput ¶
type RoomUserWhereInput struct { Predicates []predicate.RoomUser `json:"-"` Not *RoomUserWhereInput `json:"not,omitempty"` Or []*RoomUserWhereInput `json:"or,omitempty"` And []*RoomUserWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int64 `json:"id,omitempty"` IDNEQ *int64 `json:"idNEQ,omitempty"` IDIn []int64 `json:"idIn,omitempty"` IDNotIn []int64 `json:"idNotIn,omitempty"` IDGT *int64 `json:"idGT,omitempty"` IDGTE *int64 `json:"idGTE,omitempty"` IDLT *int64 `json:"idLT,omitempty"` IDLTE *int64 `json:"idLTE,omitempty"` // "created_by" field predicates. CreatedBy *int64 `json:"createdBy,omitempty"` CreatedByNEQ *int64 `json:"createdByNEQ,omitempty"` CreatedByIn []int64 `json:"createdByIn,omitempty"` CreatedByNotIn []int64 `json:"createdByNotIn,omitempty"` CreatedByGT *int64 `json:"createdByGT,omitempty"` CreatedByGTE *int64 `json:"createdByGTE,omitempty"` CreatedByLT *int64 `json:"createdByLT,omitempty"` CreatedByLTE *int64 `json:"createdByLTE,omitempty"` // "updated_by" field predicates. UpdatedBy *int64 `json:"updatedBy,omitempty"` UpdatedByNEQ *int64 `json:"updatedByNEQ,omitempty"` UpdatedByIn []int64 `json:"updatedByIn,omitempty"` UpdatedByNotIn []int64 `json:"updatedByNotIn,omitempty"` UpdatedByGT *int64 `json:"updatedByGT,omitempty"` UpdatedByGTE *int64 `json:"updatedByGTE,omitempty"` UpdatedByLT *int64 `json:"updatedByLT,omitempty"` UpdatedByLTE *int64 `json:"updatedByLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "deleted_at" field predicates. DeletedAt *time.Time `json:"deletedAt,omitempty"` DeletedAtNEQ *time.Time `json:"deletedAtNEQ,omitempty"` DeletedAtIn []time.Time `json:"deletedAtIn,omitempty"` DeletedAtNotIn []time.Time `json:"deletedAtNotIn,omitempty"` DeletedAtGT *time.Time `json:"deletedAtGT,omitempty"` DeletedAtGTE *time.Time `json:"deletedAtGTE,omitempty"` DeletedAtLT *time.Time `json:"deletedAtLT,omitempty"` DeletedAtLTE *time.Time `json:"deletedAtLTE,omitempty"` // "user_id" field predicates. UserID *int64 `json:"userID,omitempty"` UserIDNEQ *int64 `json:"userIDNEQ,omitempty"` UserIDIn []int64 `json:"userIDIn,omitempty"` UserIDNotIn []int64 `json:"userIDNotIn,omitempty"` UserIDGT *int64 `json:"userIDGT,omitempty"` UserIDGTE *int64 `json:"userIDGTE,omitempty"` UserIDLT *int64 `json:"userIDLT,omitempty"` UserIDLTE *int64 `json:"userIDLTE,omitempty"` // "room_id" field predicates. RoomID *int64 `json:"roomID,omitempty"` RoomIDNEQ *int64 `json:"roomIDNEQ,omitempty"` RoomIDIn []int64 `json:"roomIDIn,omitempty"` RoomIDNotIn []int64 `json:"roomIDNotIn,omitempty"` // "host" field predicates. Host *bool `json:"host,omitempty"` HostNEQ *bool `json:"hostNEQ,omitempty"` // "room" edge predicates. HasRoom *bool `json:"hasRoom,omitempty"` HasRoomWith []*RoomWhereInput `json:"hasRoomWith,omitempty"` }
RoomUserWhereInput represents a where input for filtering RoomUser queries.
func (*RoomUserWhereInput) AddPredicates ¶
func (i *RoomUserWhereInput) AddPredicates(predicates ...predicate.RoomUser)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*RoomUserWhereInput) Filter ¶
func (i *RoomUserWhereInput) Filter(q *RoomUserQuery) (*RoomUserQuery, error)
Filter applies the RoomUserWhereInput filter on the RoomUserQuery builder.
type RoomWhereInput ¶
type RoomWhereInput struct { Predicates []predicate.Room `json:"-"` Not *RoomWhereInput `json:"not,omitempty"` Or []*RoomWhereInput `json:"or,omitempty"` And []*RoomWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int64 `json:"id,omitempty"` IDNEQ *int64 `json:"idNEQ,omitempty"` IDIn []int64 `json:"idIn,omitempty"` IDNotIn []int64 `json:"idNotIn,omitempty"` IDGT *int64 `json:"idGT,omitempty"` IDGTE *int64 `json:"idGTE,omitempty"` IDLT *int64 `json:"idLT,omitempty"` IDLTE *int64 `json:"idLTE,omitempty"` // "created_by" field predicates. CreatedBy *int64 `json:"createdBy,omitempty"` CreatedByNEQ *int64 `json:"createdByNEQ,omitempty"` CreatedByIn []int64 `json:"createdByIn,omitempty"` CreatedByNotIn []int64 `json:"createdByNotIn,omitempty"` CreatedByGT *int64 `json:"createdByGT,omitempty"` CreatedByGTE *int64 `json:"createdByGTE,omitempty"` CreatedByLT *int64 `json:"createdByLT,omitempty"` CreatedByLTE *int64 `json:"createdByLTE,omitempty"` // "updated_by" field predicates. UpdatedBy *int64 `json:"updatedBy,omitempty"` UpdatedByNEQ *int64 `json:"updatedByNEQ,omitempty"` UpdatedByIn []int64 `json:"updatedByIn,omitempty"` UpdatedByNotIn []int64 `json:"updatedByNotIn,omitempty"` UpdatedByGT *int64 `json:"updatedByGT,omitempty"` UpdatedByGTE *int64 `json:"updatedByGTE,omitempty"` UpdatedByLT *int64 `json:"updatedByLT,omitempty"` UpdatedByLTE *int64 `json:"updatedByLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "deleted_at" field predicates. DeletedAt *time.Time `json:"deletedAt,omitempty"` DeletedAtNEQ *time.Time `json:"deletedAtNEQ,omitempty"` DeletedAtIn []time.Time `json:"deletedAtIn,omitempty"` DeletedAtNotIn []time.Time `json:"deletedAtNotIn,omitempty"` DeletedAtGT *time.Time `json:"deletedAtGT,omitempty"` DeletedAtGTE *time.Time `json:"deletedAtGTE,omitempty"` DeletedAtLT *time.Time `json:"deletedAtLT,omitempty"` DeletedAtLTE *time.Time `json:"deletedAtLTE,omitempty"` // "name" field predicates. Name *string `json:"name,omitempty"` NameNEQ *string `json:"nameNEQ,omitempty"` NameIn []string `json:"nameIn,omitempty"` NameNotIn []string `json:"nameNotIn,omitempty"` NameGT *string `json:"nameGT,omitempty"` NameGTE *string `json:"nameGTE,omitempty"` NameLT *string `json:"nameLT,omitempty"` NameLTE *string `json:"nameLTE,omitempty"` NameContains *string `json:"nameContains,omitempty"` NameHasPrefix *string `json:"nameHasPrefix,omitempty"` NameHasSuffix *string `json:"nameHasSuffix,omitempty"` NameEqualFold *string `json:"nameEqualFold,omitempty"` NameContainsFold *string `json:"nameContainsFold,omitempty"` // "closed" field predicates. Closed *bool `json:"closed,omitempty"` ClosedNEQ *bool `json:"closedNEQ,omitempty"` // "game_on" field predicates. GameOn *bool `json:"gameOn,omitempty"` GameOnNEQ *bool `json:"gameOnNEQ,omitempty"` // "room_users" edge predicates. HasRoomUsers *bool `json:"hasRoomUsers,omitempty"` HasRoomUsersWith []*RoomUserWhereInput `json:"hasRoomUsersWith,omitempty"` // "games" edge predicates. HasGames *bool `json:"hasGames,omitempty"` HasGamesWith []*GameWhereInput `json:"hasGamesWith,omitempty"` // "records" edge predicates. HasRecords *bool `json:"hasRecords,omitempty"` HasRecordsWith []*RecordWhereInput `json:"hasRecordsWith,omitempty"` }
RoomWhereInput represents a where input for filtering Room queries.
func (*RoomWhereInput) AddPredicates ¶
func (i *RoomWhereInput) AddPredicates(predicates ...predicate.Room)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
type Squad ¶
type Squad struct { // ID of the ent. ID int64 `json:"id,omitempty"` // CreatedBy holds the value of the "created_by" field. CreatedBy int64 `json:"created_by"` // UpdatedBy holds the value of the "updated_by" field. UpdatedBy int64 `json:"updated_by"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt time.Time `json:"deleted_at"` // 所属任务 ID MissionID int64 `json:"mission_id"` // 用户 ID UserID int64 `json:"user_id"` // 是否破坏任务 Rat bool `json:"rat"` // 是否已经行动 Acted bool `json:"acted"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SquadQuery when eager-loading is set. Edges SquadEdges `json:"edges"` // contains filtered or unexported fields }
Squad is the model entity for the Squad schema.
func (*Squad) QueryMission ¶
func (s *Squad) QueryMission() *MissionQuery
QueryMission queries the "mission" edge of the Squad entity.
func (*Squad) ToEdge ¶
func (s *Squad) ToEdge(order *SquadOrder) *SquadEdge
ToEdge converts Squad into SquadEdge.
func (*Squad) Unwrap ¶
Unwrap unwraps the Squad 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 (*Squad) Update ¶
func (s *Squad) Update() *SquadUpdateOne
Update returns a builder for updating this Squad. Note that you need to call Squad.Unwrap() before calling this method if this Squad was returned from a transaction, and the transaction was committed or rolled back.
type SquadClient ¶
type SquadClient struct {
// contains filtered or unexported fields
}
SquadClient is a client for the Squad schema.
func NewSquadClient ¶
func NewSquadClient(c config) *SquadClient
NewSquadClient returns a client for the Squad from the given config.
func (*SquadClient) Create ¶
func (c *SquadClient) Create() *SquadCreate
Create returns a builder for creating a Squad entity.
func (*SquadClient) CreateBulk ¶
func (c *SquadClient) CreateBulk(builders ...*SquadCreate) *SquadCreateBulk
CreateBulk returns a builder for creating a bulk of Squad entities.
func (*SquadClient) Delete ¶
func (c *SquadClient) Delete() *SquadDelete
Delete returns a delete builder for Squad.
func (*SquadClient) DeleteOne ¶
func (c *SquadClient) DeleteOne(s *Squad) *SquadDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SquadClient) DeleteOneID ¶
func (c *SquadClient) DeleteOneID(id int64) *SquadDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SquadClient) GetX ¶
func (c *SquadClient) GetX(ctx context.Context, id int64) *Squad
GetX is like Get, but panics if an error occurs.
func (*SquadClient) Query ¶
func (c *SquadClient) Query() *SquadQuery
Query returns a query builder for Squad.
func (*SquadClient) QueryMission ¶
func (c *SquadClient) QueryMission(s *Squad) *MissionQuery
QueryMission queries the mission edge of a Squad.
func (*SquadClient) Update ¶
func (c *SquadClient) Update() *SquadUpdate
Update returns an update builder for Squad.
func (*SquadClient) UpdateOne ¶
func (c *SquadClient) UpdateOne(s *Squad) *SquadUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SquadClient) UpdateOneID ¶
func (c *SquadClient) UpdateOneID(id int64) *SquadUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SquadClient) Use ¶
func (c *SquadClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `squad.Hooks(f(g(h())))`.
type SquadConnection ¶
type SquadConnection struct { Edges []*SquadEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
SquadConnection is the connection containing edges to Squad.
type SquadCreate ¶
type SquadCreate struct {
// contains filtered or unexported fields
}
SquadCreate is the builder for creating a Squad entity.
func (*SquadCreate) Exec ¶
func (sc *SquadCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SquadCreate) ExecX ¶
func (sc *SquadCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SquadCreate) Mutation ¶
func (sc *SquadCreate) Mutation() *SquadMutation
Mutation returns the SquadMutation object of the builder.
func (*SquadCreate) Save ¶
func (sc *SquadCreate) Save(ctx context.Context) (*Squad, error)
Save creates the Squad in the database.
func (*SquadCreate) SaveX ¶
func (sc *SquadCreate) SaveX(ctx context.Context) *Squad
SaveX calls Save and panics if Save returns an error.
func (*SquadCreate) SetActed ¶
func (sc *SquadCreate) SetActed(b bool) *SquadCreate
SetActed sets the "acted" field.
func (*SquadCreate) SetCreatedAt ¶
func (sc *SquadCreate) SetCreatedAt(t time.Time) *SquadCreate
SetCreatedAt sets the "created_at" field.
func (*SquadCreate) SetCreatedBy ¶
func (sc *SquadCreate) SetCreatedBy(i int64) *SquadCreate
SetCreatedBy sets the "created_by" field.
func (*SquadCreate) SetDeletedAt ¶
func (sc *SquadCreate) SetDeletedAt(t time.Time) *SquadCreate
SetDeletedAt sets the "deleted_at" field.
func (*SquadCreate) SetID ¶
func (sc *SquadCreate) SetID(i int64) *SquadCreate
SetID sets the "id" field.
func (*SquadCreate) SetInput ¶
func (c *SquadCreate) SetInput(i CreateSquadInput) *SquadCreate
SetInput applies the change-set in the CreateSquadInput on the SquadCreate builder.
func (*SquadCreate) SetMission ¶
func (sc *SquadCreate) SetMission(m *Mission) *SquadCreate
SetMission sets the "mission" edge to the Mission entity.
func (*SquadCreate) SetMissionID ¶
func (sc *SquadCreate) SetMissionID(i int64) *SquadCreate
SetMissionID sets the "mission_id" field.
func (*SquadCreate) SetNillableActed ¶
func (sc *SquadCreate) SetNillableActed(b *bool) *SquadCreate
SetNillableActed sets the "acted" field if the given value is not nil.
func (*SquadCreate) SetNillableCreatedAt ¶
func (sc *SquadCreate) SetNillableCreatedAt(t *time.Time) *SquadCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SquadCreate) SetNillableCreatedBy ¶
func (sc *SquadCreate) SetNillableCreatedBy(i *int64) *SquadCreate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*SquadCreate) SetNillableDeletedAt ¶
func (sc *SquadCreate) SetNillableDeletedAt(t *time.Time) *SquadCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*SquadCreate) SetNillableID ¶
func (sc *SquadCreate) SetNillableID(i *int64) *SquadCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*SquadCreate) SetNillableRat ¶
func (sc *SquadCreate) SetNillableRat(b *bool) *SquadCreate
SetNillableRat sets the "rat" field if the given value is not nil.
func (*SquadCreate) SetNillableUpdatedAt ¶
func (sc *SquadCreate) SetNillableUpdatedAt(t *time.Time) *SquadCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*SquadCreate) SetNillableUpdatedBy ¶
func (sc *SquadCreate) SetNillableUpdatedBy(i *int64) *SquadCreate
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*SquadCreate) SetRat ¶
func (sc *SquadCreate) SetRat(b bool) *SquadCreate
SetRat sets the "rat" field.
func (*SquadCreate) SetUpdatedAt ¶
func (sc *SquadCreate) SetUpdatedAt(t time.Time) *SquadCreate
SetUpdatedAt sets the "updated_at" field.
func (*SquadCreate) SetUpdatedBy ¶
func (sc *SquadCreate) SetUpdatedBy(i int64) *SquadCreate
SetUpdatedBy sets the "updated_by" field.
func (*SquadCreate) SetUserID ¶
func (sc *SquadCreate) SetUserID(i int64) *SquadCreate
SetUserID sets the "user_id" field.
type SquadCreateBulk ¶
type SquadCreateBulk struct {
// contains filtered or unexported fields
}
SquadCreateBulk is the builder for creating many Squad entities in bulk.
func (*SquadCreateBulk) Exec ¶
func (scb *SquadCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SquadCreateBulk) ExecX ¶
func (scb *SquadCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SquadDelete ¶
type SquadDelete struct {
// contains filtered or unexported fields
}
SquadDelete is the builder for deleting a Squad entity.
func (*SquadDelete) Exec ¶
func (sd *SquadDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SquadDelete) ExecX ¶
func (sd *SquadDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SquadDelete) Where ¶
func (sd *SquadDelete) Where(ps ...predicate.Squad) *SquadDelete
Where appends a list predicates to the SquadDelete builder.
type SquadDeleteOne ¶
type SquadDeleteOne struct {
// contains filtered or unexported fields
}
SquadDeleteOne is the builder for deleting a single Squad entity.
func (*SquadDeleteOne) Exec ¶
func (sdo *SquadDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SquadDeleteOne) ExecX ¶
func (sdo *SquadDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SquadEdges ¶
type SquadEdges struct { // Mission holds the value of the mission edge. Mission *Mission `json:"mission,omitempty"` // contains filtered or unexported fields }
SquadEdges holds the relations/edges for other nodes in the graph.
func (SquadEdges) MissionOrErr ¶
func (e SquadEdges) MissionOrErr() (*Mission, error)
MissionOrErr returns the Mission value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type SquadGroupBy ¶
type SquadGroupBy struct {
// contains filtered or unexported fields
}
SquadGroupBy is the group-by builder for Squad entities.
func (*SquadGroupBy) Aggregate ¶
func (sgb *SquadGroupBy) Aggregate(fns ...AggregateFunc) *SquadGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SquadGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SquadGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SquadGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SquadGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SquadGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SquadGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SquadGroupBy) Scan ¶
func (sgb *SquadGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*SquadGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SquadMutation ¶
type SquadMutation struct {
// contains filtered or unexported fields
}
SquadMutation represents an operation that mutates the Squad nodes in the graph.
func (*SquadMutation) Acted ¶
func (m *SquadMutation) Acted() (r bool, exists bool)
Acted returns the value of the "acted" field in the mutation.
func (*SquadMutation) AddCreatedBy ¶
func (m *SquadMutation) AddCreatedBy(i int64)
AddCreatedBy adds i to the "created_by" field.
func (*SquadMutation) AddField ¶
func (m *SquadMutation) 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 (*SquadMutation) AddUpdatedBy ¶
func (m *SquadMutation) AddUpdatedBy(i int64)
AddUpdatedBy adds i to the "updated_by" field.
func (*SquadMutation) AddUserID ¶
func (m *SquadMutation) AddUserID(i int64)
AddUserID adds i to the "user_id" field.
func (*SquadMutation) AddedCreatedBy ¶
func (m *SquadMutation) AddedCreatedBy() (r int64, exists bool)
AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.
func (*SquadMutation) AddedEdges ¶
func (m *SquadMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SquadMutation) AddedField ¶
func (m *SquadMutation) 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 (*SquadMutation) AddedFields ¶
func (m *SquadMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SquadMutation) AddedIDs ¶
func (m *SquadMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SquadMutation) AddedUpdatedBy ¶
func (m *SquadMutation) AddedUpdatedBy() (r int64, exists bool)
AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.
func (*SquadMutation) AddedUserID ¶
func (m *SquadMutation) AddedUserID() (r int64, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*SquadMutation) ClearEdge ¶
func (m *SquadMutation) 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 (*SquadMutation) ClearField ¶
func (m *SquadMutation) 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 (*SquadMutation) ClearMission ¶
func (m *SquadMutation) ClearMission()
ClearMission clears the "mission" edge to the Mission entity.
func (*SquadMutation) ClearedEdges ¶
func (m *SquadMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SquadMutation) ClearedFields ¶
func (m *SquadMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SquadMutation) Client ¶
func (m SquadMutation) 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 (*SquadMutation) CreatedAt ¶
func (m *SquadMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*SquadMutation) CreatedBy ¶
func (m *SquadMutation) CreatedBy() (r int64, exists bool)
CreatedBy returns the value of the "created_by" field in the mutation.
func (*SquadMutation) DeletedAt ¶
func (m *SquadMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*SquadMutation) EdgeCleared ¶
func (m *SquadMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SquadMutation) Field ¶
func (m *SquadMutation) 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 (*SquadMutation) FieldCleared ¶
func (m *SquadMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SquadMutation) Fields ¶
func (m *SquadMutation) 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 (*SquadMutation) ID ¶
func (m *SquadMutation) ID() (id int64, 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 (*SquadMutation) IDs ¶
func (m *SquadMutation) IDs(ctx context.Context) ([]int64, 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 (*SquadMutation) MissionCleared ¶
func (m *SquadMutation) MissionCleared() bool
MissionCleared reports if the "mission" edge to the Mission entity was cleared.
func (*SquadMutation) MissionID ¶
func (m *SquadMutation) MissionID() (r int64, exists bool)
MissionID returns the value of the "mission_id" field in the mutation.
func (*SquadMutation) MissionIDs ¶
func (m *SquadMutation) MissionIDs() (ids []int64)
MissionIDs returns the "mission" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MissionID instead. It exists only for internal usage by the builders.
func (*SquadMutation) OldActed ¶
func (m *SquadMutation) OldActed(ctx context.Context) (v bool, err error)
OldActed returns the old "acted" field's value of the Squad entity. If the Squad 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 (*SquadMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Squad entity. If the Squad 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 (*SquadMutation) OldCreatedBy ¶
func (m *SquadMutation) OldCreatedBy(ctx context.Context) (v int64, err error)
OldCreatedBy returns the old "created_by" field's value of the Squad entity. If the Squad 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 (*SquadMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Squad entity. If the Squad 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 (*SquadMutation) 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 (*SquadMutation) OldMissionID ¶
func (m *SquadMutation) OldMissionID(ctx context.Context) (v int64, err error)
OldMissionID returns the old "mission_id" field's value of the Squad entity. If the Squad 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 (*SquadMutation) OldRat ¶
func (m *SquadMutation) OldRat(ctx context.Context) (v bool, err error)
OldRat returns the old "rat" field's value of the Squad entity. If the Squad 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 (*SquadMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Squad entity. If the Squad 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 (*SquadMutation) OldUpdatedBy ¶
func (m *SquadMutation) OldUpdatedBy(ctx context.Context) (v int64, err error)
OldUpdatedBy returns the old "updated_by" field's value of the Squad entity. If the Squad 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 (*SquadMutation) OldUserID ¶
func (m *SquadMutation) OldUserID(ctx context.Context) (v int64, err error)
OldUserID returns the old "user_id" field's value of the Squad entity. If the Squad 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 (*SquadMutation) Rat ¶
func (m *SquadMutation) Rat() (r bool, exists bool)
Rat returns the value of the "rat" field in the mutation.
func (*SquadMutation) RemovedEdges ¶
func (m *SquadMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SquadMutation) RemovedIDs ¶
func (m *SquadMutation) 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 (*SquadMutation) ResetActed ¶
func (m *SquadMutation) ResetActed()
ResetActed resets all changes to the "acted" field.
func (*SquadMutation) ResetCreatedAt ¶
func (m *SquadMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*SquadMutation) ResetCreatedBy ¶
func (m *SquadMutation) ResetCreatedBy()
ResetCreatedBy resets all changes to the "created_by" field.
func (*SquadMutation) ResetDeletedAt ¶
func (m *SquadMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*SquadMutation) ResetEdge ¶
func (m *SquadMutation) 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 (*SquadMutation) ResetField ¶
func (m *SquadMutation) 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 (*SquadMutation) ResetMission ¶
func (m *SquadMutation) ResetMission()
ResetMission resets all changes to the "mission" edge.
func (*SquadMutation) ResetMissionID ¶
func (m *SquadMutation) ResetMissionID()
ResetMissionID resets all changes to the "mission_id" field.
func (*SquadMutation) ResetRat ¶
func (m *SquadMutation) ResetRat()
ResetRat resets all changes to the "rat" field.
func (*SquadMutation) ResetUpdatedAt ¶
func (m *SquadMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*SquadMutation) ResetUpdatedBy ¶
func (m *SquadMutation) ResetUpdatedBy()
ResetUpdatedBy resets all changes to the "updated_by" field.
func (*SquadMutation) ResetUserID ¶
func (m *SquadMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*SquadMutation) SetActed ¶
func (m *SquadMutation) SetActed(b bool)
SetActed sets the "acted" field.
func (*SquadMutation) SetCreatedAt ¶
func (m *SquadMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*SquadMutation) SetCreatedBy ¶
func (m *SquadMutation) SetCreatedBy(i int64)
SetCreatedBy sets the "created_by" field.
func (*SquadMutation) SetDeletedAt ¶
func (m *SquadMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*SquadMutation) SetField ¶
func (m *SquadMutation) 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 (*SquadMutation) SetID ¶
func (m *SquadMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Squad entities.
func (*SquadMutation) SetMissionID ¶
func (m *SquadMutation) SetMissionID(i int64)
SetMissionID sets the "mission_id" field.
func (*SquadMutation) SetUpdatedAt ¶
func (m *SquadMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*SquadMutation) SetUpdatedBy ¶
func (m *SquadMutation) SetUpdatedBy(i int64)
SetUpdatedBy sets the "updated_by" field.
func (*SquadMutation) SetUserID ¶
func (m *SquadMutation) SetUserID(i int64)
SetUserID sets the "user_id" field.
func (SquadMutation) Tx ¶
func (m SquadMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SquadMutation) Type ¶
func (m *SquadMutation) Type() string
Type returns the node type of this mutation (Squad).
func (*SquadMutation) UpdatedAt ¶
func (m *SquadMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*SquadMutation) UpdatedBy ¶
func (m *SquadMutation) UpdatedBy() (r int64, exists bool)
UpdatedBy returns the value of the "updated_by" field in the mutation.
func (*SquadMutation) UserID ¶
func (m *SquadMutation) UserID() (r int64, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*SquadMutation) Where ¶
func (m *SquadMutation) Where(ps ...predicate.Squad)
Where appends a list predicates to the SquadMutation builder.
type SquadOrder ¶
type SquadOrder struct { Direction OrderDirection `json:"direction"` Field *SquadOrderField `json:"field"` }
SquadOrder defines the ordering of Squad.
type SquadOrderField ¶
type SquadOrderField struct {
// contains filtered or unexported fields
}
SquadOrderField defines the ordering field of Squad.
func (SquadOrderField) MarshalGQL ¶
func (f SquadOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (SquadOrderField) String ¶
func (f SquadOrderField) String() string
String implement fmt.Stringer interface.
func (*SquadOrderField) UnmarshalGQL ¶
func (f *SquadOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type SquadPaginateOption ¶
type SquadPaginateOption func(*squadPager) error
SquadPaginateOption enables pagination customization.
func WithSquadFilter ¶
func WithSquadFilter(filter func(*SquadQuery) (*SquadQuery, error)) SquadPaginateOption
WithSquadFilter configures pagination filter.
func WithSquadOrder ¶
func WithSquadOrder(order *SquadOrder) SquadPaginateOption
WithSquadOrder configures pagination ordering.
type SquadQuery ¶
type SquadQuery struct {
// contains filtered or unexported fields
}
SquadQuery is the builder for querying Squad entities.
func (*SquadQuery) Aggregate ¶
func (sq *SquadQuery) Aggregate(fns ...AggregateFunc) *SquadSelect
Aggregate returns a SquadSelect configured with the given aggregations.
func (*SquadQuery) All ¶
func (sq *SquadQuery) All(ctx context.Context) ([]*Squad, error)
All executes the query and returns a list of Squads.
func (*SquadQuery) AllX ¶
func (sq *SquadQuery) AllX(ctx context.Context) []*Squad
AllX is like All, but panics if an error occurs.
func (*SquadQuery) Clone ¶
func (sq *SquadQuery) Clone() *SquadQuery
Clone returns a duplicate of the SquadQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SquadQuery) CollectFields ¶
func (s *SquadQuery) CollectFields(ctx context.Context, satisfies ...string) (*SquadQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*SquadQuery) Count ¶
func (sq *SquadQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SquadQuery) CountX ¶
func (sq *SquadQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SquadQuery) Exist ¶
func (sq *SquadQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SquadQuery) ExistX ¶
func (sq *SquadQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SquadQuery) First ¶
func (sq *SquadQuery) First(ctx context.Context) (*Squad, error)
First returns the first Squad entity from the query. Returns a *NotFoundError when no Squad was found.
func (*SquadQuery) FirstID ¶
func (sq *SquadQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first Squad ID from the query. Returns a *NotFoundError when no Squad ID was found.
func (*SquadQuery) FirstIDX ¶
func (sq *SquadQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*SquadQuery) FirstX ¶
func (sq *SquadQuery) FirstX(ctx context.Context) *Squad
FirstX is like First, but panics if an error occurs.
func (*SquadQuery) GroupBy ¶
func (sq *SquadQuery) GroupBy(field string, fields ...string) *SquadGroupBy
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 { CreatedBy int64 `json:"created_by"` Count int `json:"count,omitempty"` } client.Squad.Query(). GroupBy(squad.FieldCreatedBy). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SquadQuery) IDs ¶
func (sq *SquadQuery) IDs(ctx context.Context) ([]int64, error)
IDs executes the query and returns a list of Squad IDs.
func (*SquadQuery) IDsX ¶
func (sq *SquadQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*SquadQuery) Limit ¶
func (sq *SquadQuery) Limit(limit int) *SquadQuery
Limit adds a limit step to the query.
func (*SquadQuery) Offset ¶
func (sq *SquadQuery) Offset(offset int) *SquadQuery
Offset adds an offset step to the query.
func (*SquadQuery) Only ¶
func (sq *SquadQuery) Only(ctx context.Context) (*Squad, error)
Only returns a single Squad entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Squad entity is found. Returns a *NotFoundError when no Squad entities are found.
func (*SquadQuery) OnlyID ¶
func (sq *SquadQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only Squad ID in the query. Returns a *NotSingularError when more than one Squad ID is found. Returns a *NotFoundError when no entities are found.
func (*SquadQuery) OnlyIDX ¶
func (sq *SquadQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SquadQuery) OnlyX ¶
func (sq *SquadQuery) OnlyX(ctx context.Context) *Squad
OnlyX is like Only, but panics if an error occurs.
func (*SquadQuery) Order ¶
func (sq *SquadQuery) Order(o ...OrderFunc) *SquadQuery
Order adds an order step to the query.
func (*SquadQuery) Paginate ¶
func (s *SquadQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...SquadPaginateOption, ) (*SquadConnection, error)
Paginate executes the query and returns a relay based cursor connection to Squad.
func (*SquadQuery) QueryMission ¶
func (sq *SquadQuery) QueryMission() *MissionQuery
QueryMission chains the current query on the "mission" edge.
func (*SquadQuery) Select ¶
func (sq *SquadQuery) Select(fields ...string) *SquadSelect
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 { CreatedBy int64 `json:"created_by"` } client.Squad.Query(). Select(squad.FieldCreatedBy). Scan(ctx, &v)
func (*SquadQuery) Unique ¶
func (sq *SquadQuery) Unique(unique bool) *SquadQuery
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 (*SquadQuery) Where ¶
func (sq *SquadQuery) Where(ps ...predicate.Squad) *SquadQuery
Where adds a new predicate for the SquadQuery builder.
func (*SquadQuery) WithMission ¶
func (sq *SquadQuery) WithMission(opts ...func(*MissionQuery)) *SquadQuery
WithMission tells the query-builder to eager-load the nodes that are connected to the "mission" edge. The optional arguments are used to configure the query builder of the edge.
type SquadSelect ¶
type SquadSelect struct { *SquadQuery // contains filtered or unexported fields }
SquadSelect is the builder for selecting fields of Squad entities.
func (*SquadSelect) Aggregate ¶
func (ss *SquadSelect) Aggregate(fns ...AggregateFunc) *SquadSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SquadSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SquadSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SquadSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SquadSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SquadSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SquadSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SquadSelect) Scan ¶
func (ss *SquadSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SquadSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SquadUpdate ¶
type SquadUpdate struct {
// contains filtered or unexported fields
}
SquadUpdate is the builder for updating Squad entities.
func (*SquadUpdate) AddCreatedBy ¶
func (su *SquadUpdate) AddCreatedBy(i int64) *SquadUpdate
AddCreatedBy adds i to the "created_by" field.
func (*SquadUpdate) AddUpdatedBy ¶
func (su *SquadUpdate) AddUpdatedBy(i int64) *SquadUpdate
AddUpdatedBy adds i to the "updated_by" field.
func (*SquadUpdate) AddUserID ¶
func (su *SquadUpdate) AddUserID(i int64) *SquadUpdate
AddUserID adds i to the "user_id" field.
func (*SquadUpdate) ClearMission ¶
func (su *SquadUpdate) ClearMission() *SquadUpdate
ClearMission clears the "mission" edge to the Mission entity.
func (*SquadUpdate) Exec ¶
func (su *SquadUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SquadUpdate) ExecX ¶
func (su *SquadUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SquadUpdate) Mutation ¶
func (su *SquadUpdate) Mutation() *SquadMutation
Mutation returns the SquadMutation object of the builder.
func (*SquadUpdate) Save ¶
func (su *SquadUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SquadUpdate) SaveX ¶
func (su *SquadUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SquadUpdate) SetActed ¶
func (su *SquadUpdate) SetActed(b bool) *SquadUpdate
SetActed sets the "acted" field.
func (*SquadUpdate) SetCreatedBy ¶
func (su *SquadUpdate) SetCreatedBy(i int64) *SquadUpdate
SetCreatedBy sets the "created_by" field.
func (*SquadUpdate) SetDeletedAt ¶
func (su *SquadUpdate) SetDeletedAt(t time.Time) *SquadUpdate
SetDeletedAt sets the "deleted_at" field.
func (*SquadUpdate) SetInput ¶
func (c *SquadUpdate) SetInput(i UpdateSquadInput) *SquadUpdate
SetInput applies the change-set in the UpdateSquadInput on the SquadUpdate builder.
func (*SquadUpdate) SetMission ¶
func (su *SquadUpdate) SetMission(m *Mission) *SquadUpdate
SetMission sets the "mission" edge to the Mission entity.
func (*SquadUpdate) SetMissionID ¶
func (su *SquadUpdate) SetMissionID(i int64) *SquadUpdate
SetMissionID sets the "mission_id" field.
func (*SquadUpdate) SetNillableActed ¶
func (su *SquadUpdate) SetNillableActed(b *bool) *SquadUpdate
SetNillableActed sets the "acted" field if the given value is not nil.
func (*SquadUpdate) SetNillableCreatedBy ¶
func (su *SquadUpdate) SetNillableCreatedBy(i *int64) *SquadUpdate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*SquadUpdate) SetNillableDeletedAt ¶
func (su *SquadUpdate) SetNillableDeletedAt(t *time.Time) *SquadUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*SquadUpdate) SetNillableRat ¶
func (su *SquadUpdate) SetNillableRat(b *bool) *SquadUpdate
SetNillableRat sets the "rat" field if the given value is not nil.
func (*SquadUpdate) SetNillableUpdatedBy ¶
func (su *SquadUpdate) SetNillableUpdatedBy(i *int64) *SquadUpdate
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*SquadUpdate) SetRat ¶
func (su *SquadUpdate) SetRat(b bool) *SquadUpdate
SetRat sets the "rat" field.
func (*SquadUpdate) SetUpdatedAt ¶
func (su *SquadUpdate) SetUpdatedAt(t time.Time) *SquadUpdate
SetUpdatedAt sets the "updated_at" field.
func (*SquadUpdate) SetUpdatedBy ¶
func (su *SquadUpdate) SetUpdatedBy(i int64) *SquadUpdate
SetUpdatedBy sets the "updated_by" field.
func (*SquadUpdate) SetUserID ¶
func (su *SquadUpdate) SetUserID(i int64) *SquadUpdate
SetUserID sets the "user_id" field.
func (*SquadUpdate) Where ¶
func (su *SquadUpdate) Where(ps ...predicate.Squad) *SquadUpdate
Where appends a list predicates to the SquadUpdate builder.
type SquadUpdateOne ¶
type SquadUpdateOne struct {
// contains filtered or unexported fields
}
SquadUpdateOne is the builder for updating a single Squad entity.
func (*SquadUpdateOne) AddCreatedBy ¶
func (suo *SquadUpdateOne) AddCreatedBy(i int64) *SquadUpdateOne
AddCreatedBy adds i to the "created_by" field.
func (*SquadUpdateOne) AddUpdatedBy ¶
func (suo *SquadUpdateOne) AddUpdatedBy(i int64) *SquadUpdateOne
AddUpdatedBy adds i to the "updated_by" field.
func (*SquadUpdateOne) AddUserID ¶
func (suo *SquadUpdateOne) AddUserID(i int64) *SquadUpdateOne
AddUserID adds i to the "user_id" field.
func (*SquadUpdateOne) ClearMission ¶
func (suo *SquadUpdateOne) ClearMission() *SquadUpdateOne
ClearMission clears the "mission" edge to the Mission entity.
func (*SquadUpdateOne) Exec ¶
func (suo *SquadUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SquadUpdateOne) ExecX ¶
func (suo *SquadUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SquadUpdateOne) Mutation ¶
func (suo *SquadUpdateOne) Mutation() *SquadMutation
Mutation returns the SquadMutation object of the builder.
func (*SquadUpdateOne) Save ¶
func (suo *SquadUpdateOne) Save(ctx context.Context) (*Squad, error)
Save executes the query and returns the updated Squad entity.
func (*SquadUpdateOne) SaveX ¶
func (suo *SquadUpdateOne) SaveX(ctx context.Context) *Squad
SaveX is like Save, but panics if an error occurs.
func (*SquadUpdateOne) Select ¶
func (suo *SquadUpdateOne) Select(field string, fields ...string) *SquadUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SquadUpdateOne) SetActed ¶
func (suo *SquadUpdateOne) SetActed(b bool) *SquadUpdateOne
SetActed sets the "acted" field.
func (*SquadUpdateOne) SetCreatedBy ¶
func (suo *SquadUpdateOne) SetCreatedBy(i int64) *SquadUpdateOne
SetCreatedBy sets the "created_by" field.
func (*SquadUpdateOne) SetDeletedAt ¶
func (suo *SquadUpdateOne) SetDeletedAt(t time.Time) *SquadUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*SquadUpdateOne) SetInput ¶
func (c *SquadUpdateOne) SetInput(i UpdateSquadInput) *SquadUpdateOne
SetInput applies the change-set in the UpdateSquadInput on the SquadUpdateOne builder.
func (*SquadUpdateOne) SetMission ¶
func (suo *SquadUpdateOne) SetMission(m *Mission) *SquadUpdateOne
SetMission sets the "mission" edge to the Mission entity.
func (*SquadUpdateOne) SetMissionID ¶
func (suo *SquadUpdateOne) SetMissionID(i int64) *SquadUpdateOne
SetMissionID sets the "mission_id" field.
func (*SquadUpdateOne) SetNillableActed ¶
func (suo *SquadUpdateOne) SetNillableActed(b *bool) *SquadUpdateOne
SetNillableActed sets the "acted" field if the given value is not nil.
func (*SquadUpdateOne) SetNillableCreatedBy ¶
func (suo *SquadUpdateOne) SetNillableCreatedBy(i *int64) *SquadUpdateOne
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*SquadUpdateOne) SetNillableDeletedAt ¶
func (suo *SquadUpdateOne) SetNillableDeletedAt(t *time.Time) *SquadUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*SquadUpdateOne) SetNillableRat ¶
func (suo *SquadUpdateOne) SetNillableRat(b *bool) *SquadUpdateOne
SetNillableRat sets the "rat" field if the given value is not nil.
func (*SquadUpdateOne) SetNillableUpdatedBy ¶
func (suo *SquadUpdateOne) SetNillableUpdatedBy(i *int64) *SquadUpdateOne
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*SquadUpdateOne) SetRat ¶
func (suo *SquadUpdateOne) SetRat(b bool) *SquadUpdateOne
SetRat sets the "rat" field.
func (*SquadUpdateOne) SetUpdatedAt ¶
func (suo *SquadUpdateOne) SetUpdatedAt(t time.Time) *SquadUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*SquadUpdateOne) SetUpdatedBy ¶
func (suo *SquadUpdateOne) SetUpdatedBy(i int64) *SquadUpdateOne
SetUpdatedBy sets the "updated_by" field.
func (*SquadUpdateOne) SetUserID ¶
func (suo *SquadUpdateOne) SetUserID(i int64) *SquadUpdateOne
SetUserID sets the "user_id" field.
type SquadWhereInput ¶
type SquadWhereInput struct { Predicates []predicate.Squad `json:"-"` Not *SquadWhereInput `json:"not,omitempty"` Or []*SquadWhereInput `json:"or,omitempty"` And []*SquadWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int64 `json:"id,omitempty"` IDNEQ *int64 `json:"idNEQ,omitempty"` IDIn []int64 `json:"idIn,omitempty"` IDNotIn []int64 `json:"idNotIn,omitempty"` IDGT *int64 `json:"idGT,omitempty"` IDGTE *int64 `json:"idGTE,omitempty"` IDLT *int64 `json:"idLT,omitempty"` IDLTE *int64 `json:"idLTE,omitempty"` // "created_by" field predicates. CreatedBy *int64 `json:"createdBy,omitempty"` CreatedByNEQ *int64 `json:"createdByNEQ,omitempty"` CreatedByIn []int64 `json:"createdByIn,omitempty"` CreatedByNotIn []int64 `json:"createdByNotIn,omitempty"` CreatedByGT *int64 `json:"createdByGT,omitempty"` CreatedByGTE *int64 `json:"createdByGTE,omitempty"` CreatedByLT *int64 `json:"createdByLT,omitempty"` CreatedByLTE *int64 `json:"createdByLTE,omitempty"` // "updated_by" field predicates. UpdatedBy *int64 `json:"updatedBy,omitempty"` UpdatedByNEQ *int64 `json:"updatedByNEQ,omitempty"` UpdatedByIn []int64 `json:"updatedByIn,omitempty"` UpdatedByNotIn []int64 `json:"updatedByNotIn,omitempty"` UpdatedByGT *int64 `json:"updatedByGT,omitempty"` UpdatedByGTE *int64 `json:"updatedByGTE,omitempty"` UpdatedByLT *int64 `json:"updatedByLT,omitempty"` UpdatedByLTE *int64 `json:"updatedByLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "deleted_at" field predicates. DeletedAt *time.Time `json:"deletedAt,omitempty"` DeletedAtNEQ *time.Time `json:"deletedAtNEQ,omitempty"` DeletedAtIn []time.Time `json:"deletedAtIn,omitempty"` DeletedAtNotIn []time.Time `json:"deletedAtNotIn,omitempty"` DeletedAtGT *time.Time `json:"deletedAtGT,omitempty"` DeletedAtGTE *time.Time `json:"deletedAtGTE,omitempty"` DeletedAtLT *time.Time `json:"deletedAtLT,omitempty"` DeletedAtLTE *time.Time `json:"deletedAtLTE,omitempty"` // "mission_id" field predicates. MissionID *int64 `json:"missionID,omitempty"` MissionIDNEQ *int64 `json:"missionIDNEQ,omitempty"` MissionIDIn []int64 `json:"missionIDIn,omitempty"` MissionIDNotIn []int64 `json:"missionIDNotIn,omitempty"` // "user_id" field predicates. UserID *int64 `json:"userID,omitempty"` UserIDNEQ *int64 `json:"userIDNEQ,omitempty"` UserIDIn []int64 `json:"userIDIn,omitempty"` UserIDNotIn []int64 `json:"userIDNotIn,omitempty"` UserIDGT *int64 `json:"userIDGT,omitempty"` UserIDGTE *int64 `json:"userIDGTE,omitempty"` UserIDLT *int64 `json:"userIDLT,omitempty"` UserIDLTE *int64 `json:"userIDLTE,omitempty"` // "rat" field predicates. Rat *bool `json:"rat,omitempty"` RatNEQ *bool `json:"ratNEQ,omitempty"` // "acted" field predicates. Acted *bool `json:"acted,omitempty"` ActedNEQ *bool `json:"actedNEQ,omitempty"` // "mission" edge predicates. HasMission *bool `json:"hasMission,omitempty"` HasMissionWith []*MissionWhereInput `json:"hasMissionWith,omitempty"` }
SquadWhereInput represents a where input for filtering Squad queries.
func (*SquadWhereInput) AddPredicates ¶
func (i *SquadWhereInput) AddPredicates(predicates ...predicate.Squad)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*SquadWhereInput) Filter ¶
func (i *SquadWhereInput) Filter(q *SquadQuery) (*SquadQuery, error)
Filter applies the SquadWhereInput filter on the SquadQuery builder.
type Tx ¶
type Tx struct { // Card is the client for interacting with the Card builders. Card *CardClient // Game is the client for interacting with the Game builders. Game *GameClient // GameUser is the client for interacting with the GameUser builders. GameUser *GameUserClient // Mission is the client for interacting with the Mission builders. Mission *MissionClient // Record is the client for interacting with the Record builders. Record *RecordClient // Room is the client for interacting with the Room builders. Room *RoomClient // RoomUser is the client for interacting with the RoomUser builders. RoomUser *RoomUserClient // Squad is the client for interacting with the Squad builders. Squad *SquadClient // Vote is the client for interacting with the Vote builders. Vote *VoteClient // 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 UpdateCardInput ¶
type UpdateCardInput struct { CreatedBy *int64 UpdatedBy *int64 UpdatedAt *time.Time DeletedAt *time.Time Name *card.Name Role *card.Role Tale *string Red *bool AddGameUserIDs []int64 RemoveGameUserIDs []int64 }
UpdateCardInput represents a mutation input for updating cards.
func (*UpdateCardInput) Mutate ¶
func (i *UpdateCardInput) Mutate(m *CardMutation)
Mutate applies the UpdateCardInput on the CardMutation builder.
type UpdateGameInput ¶
type UpdateGameInput struct { CreatedBy *int64 UpdatedBy *int64 UpdatedAt *time.Time DeletedAt *time.Time Result *game.Result Capacity *uint8 ClearTheAssassinatedIds bool TheAssassinatedIds []string AppendTheAssassinatedIds []string AssassinChance *uint8 Closed *bool AddGameUserIDs []int64 RemoveGameUserIDs []int64 AddMissionIDs []int64 RemoveMissionIDs []int64 ClearRoom bool RoomID *int64 }
UpdateGameInput represents a mutation input for updating games.
func (*UpdateGameInput) Mutate ¶
func (i *UpdateGameInput) Mutate(m *GameMutation)
Mutate applies the UpdateGameInput on the GameMutation builder.
type UpdateGameUserInput ¶
type UpdateGameUserInput struct { CreatedBy *int64 UpdatedBy *int64 UpdatedAt *time.Time DeletedAt *time.Time UserID *int64 Number *uint8 Exited *bool ClearGame bool GameID *int64 ClearCard bool CardID *int64 }
UpdateGameUserInput represents a mutation input for updating gameusers.
func (*UpdateGameUserInput) Mutate ¶
func (i *UpdateGameUserInput) Mutate(m *GameUserMutation)
Mutate applies the UpdateGameUserInput on the GameUserMutation builder.
type UpdateMissionInput ¶
type UpdateMissionInput struct { CreatedBy *int64 UpdatedBy *int64 UpdatedAt *time.Time DeletedAt *time.Time Sequence *uint8 Status *mission.Status Failed *bool Capacity *uint8 LeaderID *int64 Protected *bool ClearGame bool GameID *int64 AddSquadIDs []int64 RemoveSquadIDs []int64 AddVoteIDs []int64 RemoveVoteIDs []int64 }
UpdateMissionInput represents a mutation input for updating missions.
func (*UpdateMissionInput) Mutate ¶
func (i *UpdateMissionInput) Mutate(m *MissionMutation)
Mutate applies the UpdateMissionInput on the MissionMutation builder.
type UpdateRecordInput ¶
type UpdateRecordInput struct { CreatedBy *int64 UpdatedBy *int64 UpdatedAt *time.Time DeletedAt *time.Time UserID *int64 Score *int32 ClearRoom bool RoomID *int64 }
UpdateRecordInput represents a mutation input for updating records.
func (*UpdateRecordInput) Mutate ¶
func (i *UpdateRecordInput) Mutate(m *RecordMutation)
Mutate applies the UpdateRecordInput on the RecordMutation builder.
type UpdateRoomInput ¶
type UpdateRoomInput struct { CreatedBy *int64 UpdatedBy *int64 UpdatedAt *time.Time DeletedAt *time.Time Name *string Closed *bool GameOn *bool AddRoomUserIDs []int64 RemoveRoomUserIDs []int64 AddGameIDs []int64 RemoveGameIDs []int64 AddRecordIDs []int64 RemoveRecordIDs []int64 }
UpdateRoomInput represents a mutation input for updating rooms.
func (*UpdateRoomInput) Mutate ¶
func (i *UpdateRoomInput) Mutate(m *RoomMutation)
Mutate applies the UpdateRoomInput on the RoomMutation builder.
type UpdateRoomUserInput ¶
type UpdateRoomUserInput struct { CreatedBy *int64 UpdatedBy *int64 UpdatedAt *time.Time DeletedAt *time.Time UserID *int64 Host *bool ClearRoom bool RoomID *int64 }
UpdateRoomUserInput represents a mutation input for updating roomusers.
func (*UpdateRoomUserInput) Mutate ¶
func (i *UpdateRoomUserInput) Mutate(m *RoomUserMutation)
Mutate applies the UpdateRoomUserInput on the RoomUserMutation builder.
type UpdateSquadInput ¶
type UpdateSquadInput struct { CreatedBy *int64 UpdatedBy *int64 UpdatedAt *time.Time DeletedAt *time.Time UserID *int64 Rat *bool Acted *bool ClearMission bool MissionID *int64 }
UpdateSquadInput represents a mutation input for updating squads.
func (*UpdateSquadInput) Mutate ¶
func (i *UpdateSquadInput) Mutate(m *SquadMutation)
Mutate applies the UpdateSquadInput on the SquadMutation builder.
type UpdateVoteInput ¶
type UpdateVoteInput struct { CreatedBy *int64 UpdatedBy *int64 UpdatedAt *time.Time DeletedAt *time.Time UserID *int64 Pass *bool Voted *bool ClearMission bool MissionID *int64 }
UpdateVoteInput represents a mutation input for updating votes.
func (*UpdateVoteInput) Mutate ¶
func (i *UpdateVoteInput) Mutate(m *VoteMutation)
Mutate applies the UpdateVoteInput on the VoteMutation builder.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Vote ¶
type Vote struct { // ID of the ent. ID int64 `json:"id,omitempty"` // CreatedBy holds the value of the "created_by" field. CreatedBy int64 `json:"created_by"` // UpdatedBy holds the value of the "updated_by" field. UpdatedBy int64 `json:"updated_by"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt time.Time `json:"deleted_at"` // 所属任务 ID MissionID int64 `json:"mission_id"` // 用户 ID UserID int64 `json:"user_id"` // 是否赞同目前小队出征 Pass bool `json:"pass"` // 是否已投票 Voted bool `json:"voted"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the VoteQuery when eager-loading is set. Edges VoteEdges `json:"edges"` // contains filtered or unexported fields }
Vote is the model entity for the Vote schema.
func (*Vote) QueryMission ¶
func (v *Vote) QueryMission() *MissionQuery
QueryMission queries the "mission" edge of the Vote entity.
func (*Vote) Unwrap ¶
Unwrap unwraps the Vote 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 (*Vote) Update ¶
func (v *Vote) Update() *VoteUpdateOne
Update returns a builder for updating this Vote. Note that you need to call Vote.Unwrap() before calling this method if this Vote was returned from a transaction, and the transaction was committed or rolled back.
type VoteClient ¶
type VoteClient struct {
// contains filtered or unexported fields
}
VoteClient is a client for the Vote schema.
func NewVoteClient ¶
func NewVoteClient(c config) *VoteClient
NewVoteClient returns a client for the Vote from the given config.
func (*VoteClient) Create ¶
func (c *VoteClient) Create() *VoteCreate
Create returns a builder for creating a Vote entity.
func (*VoteClient) CreateBulk ¶
func (c *VoteClient) CreateBulk(builders ...*VoteCreate) *VoteCreateBulk
CreateBulk returns a builder for creating a bulk of Vote entities.
func (*VoteClient) Delete ¶
func (c *VoteClient) Delete() *VoteDelete
Delete returns a delete builder for Vote.
func (*VoteClient) DeleteOne ¶
func (c *VoteClient) DeleteOne(v *Vote) *VoteDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*VoteClient) DeleteOneID ¶
func (c *VoteClient) DeleteOneID(id int64) *VoteDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*VoteClient) GetX ¶
func (c *VoteClient) GetX(ctx context.Context, id int64) *Vote
GetX is like Get, but panics if an error occurs.
func (*VoteClient) Query ¶
func (c *VoteClient) Query() *VoteQuery
Query returns a query builder for Vote.
func (*VoteClient) QueryMission ¶
func (c *VoteClient) QueryMission(v *Vote) *MissionQuery
QueryMission queries the mission edge of a Vote.
func (*VoteClient) Update ¶
func (c *VoteClient) Update() *VoteUpdate
Update returns an update builder for Vote.
func (*VoteClient) UpdateOne ¶
func (c *VoteClient) UpdateOne(v *Vote) *VoteUpdateOne
UpdateOne returns an update builder for the given entity.
func (*VoteClient) UpdateOneID ¶
func (c *VoteClient) UpdateOneID(id int64) *VoteUpdateOne
UpdateOneID returns an update builder for the given id.
func (*VoteClient) Use ¶
func (c *VoteClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `vote.Hooks(f(g(h())))`.
type VoteConnection ¶
type VoteConnection struct { Edges []*VoteEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
VoteConnection is the connection containing edges to Vote.
type VoteCreate ¶
type VoteCreate struct {
// contains filtered or unexported fields
}
VoteCreate is the builder for creating a Vote entity.
func (*VoteCreate) Exec ¶
func (vc *VoteCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*VoteCreate) ExecX ¶
func (vc *VoteCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VoteCreate) Mutation ¶
func (vc *VoteCreate) Mutation() *VoteMutation
Mutation returns the VoteMutation object of the builder.
func (*VoteCreate) Save ¶
func (vc *VoteCreate) Save(ctx context.Context) (*Vote, error)
Save creates the Vote in the database.
func (*VoteCreate) SaveX ¶
func (vc *VoteCreate) SaveX(ctx context.Context) *Vote
SaveX calls Save and panics if Save returns an error.
func (*VoteCreate) SetCreatedAt ¶
func (vc *VoteCreate) SetCreatedAt(t time.Time) *VoteCreate
SetCreatedAt sets the "created_at" field.
func (*VoteCreate) SetCreatedBy ¶
func (vc *VoteCreate) SetCreatedBy(i int64) *VoteCreate
SetCreatedBy sets the "created_by" field.
func (*VoteCreate) SetDeletedAt ¶
func (vc *VoteCreate) SetDeletedAt(t time.Time) *VoteCreate
SetDeletedAt sets the "deleted_at" field.
func (*VoteCreate) SetID ¶
func (vc *VoteCreate) SetID(i int64) *VoteCreate
SetID sets the "id" field.
func (*VoteCreate) SetInput ¶
func (c *VoteCreate) SetInput(i CreateVoteInput) *VoteCreate
SetInput applies the change-set in the CreateVoteInput on the VoteCreate builder.
func (*VoteCreate) SetMission ¶
func (vc *VoteCreate) SetMission(m *Mission) *VoteCreate
SetMission sets the "mission" edge to the Mission entity.
func (*VoteCreate) SetMissionID ¶
func (vc *VoteCreate) SetMissionID(i int64) *VoteCreate
SetMissionID sets the "mission_id" field.
func (*VoteCreate) SetNillableCreatedAt ¶
func (vc *VoteCreate) SetNillableCreatedAt(t *time.Time) *VoteCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*VoteCreate) SetNillableCreatedBy ¶
func (vc *VoteCreate) SetNillableCreatedBy(i *int64) *VoteCreate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*VoteCreate) SetNillableDeletedAt ¶
func (vc *VoteCreate) SetNillableDeletedAt(t *time.Time) *VoteCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*VoteCreate) SetNillableID ¶
func (vc *VoteCreate) SetNillableID(i *int64) *VoteCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*VoteCreate) SetNillablePass ¶
func (vc *VoteCreate) SetNillablePass(b *bool) *VoteCreate
SetNillablePass sets the "pass" field if the given value is not nil.
func (*VoteCreate) SetNillableUpdatedAt ¶
func (vc *VoteCreate) SetNillableUpdatedAt(t *time.Time) *VoteCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*VoteCreate) SetNillableUpdatedBy ¶
func (vc *VoteCreate) SetNillableUpdatedBy(i *int64) *VoteCreate
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*VoteCreate) SetNillableVoted ¶
func (vc *VoteCreate) SetNillableVoted(b *bool) *VoteCreate
SetNillableVoted sets the "voted" field if the given value is not nil.
func (*VoteCreate) SetPass ¶
func (vc *VoteCreate) SetPass(b bool) *VoteCreate
SetPass sets the "pass" field.
func (*VoteCreate) SetUpdatedAt ¶
func (vc *VoteCreate) SetUpdatedAt(t time.Time) *VoteCreate
SetUpdatedAt sets the "updated_at" field.
func (*VoteCreate) SetUpdatedBy ¶
func (vc *VoteCreate) SetUpdatedBy(i int64) *VoteCreate
SetUpdatedBy sets the "updated_by" field.
func (*VoteCreate) SetUserID ¶
func (vc *VoteCreate) SetUserID(i int64) *VoteCreate
SetUserID sets the "user_id" field.
func (*VoteCreate) SetVoted ¶
func (vc *VoteCreate) SetVoted(b bool) *VoteCreate
SetVoted sets the "voted" field.
type VoteCreateBulk ¶
type VoteCreateBulk struct {
// contains filtered or unexported fields
}
VoteCreateBulk is the builder for creating many Vote entities in bulk.
func (*VoteCreateBulk) Exec ¶
func (vcb *VoteCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*VoteCreateBulk) ExecX ¶
func (vcb *VoteCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type VoteDelete ¶
type VoteDelete struct {
// contains filtered or unexported fields
}
VoteDelete is the builder for deleting a Vote entity.
func (*VoteDelete) Exec ¶
func (vd *VoteDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*VoteDelete) ExecX ¶
func (vd *VoteDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*VoteDelete) Where ¶
func (vd *VoteDelete) Where(ps ...predicate.Vote) *VoteDelete
Where appends a list predicates to the VoteDelete builder.
type VoteDeleteOne ¶
type VoteDeleteOne struct {
// contains filtered or unexported fields
}
VoteDeleteOne is the builder for deleting a single Vote entity.
func (*VoteDeleteOne) Exec ¶
func (vdo *VoteDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*VoteDeleteOne) ExecX ¶
func (vdo *VoteDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type VoteEdges ¶
type VoteEdges struct { // Mission holds the value of the mission edge. Mission *Mission `json:"mission,omitempty"` // contains filtered or unexported fields }
VoteEdges holds the relations/edges for other nodes in the graph.
func (VoteEdges) MissionOrErr ¶
MissionOrErr returns the Mission value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type VoteGroupBy ¶
type VoteGroupBy struct {
// contains filtered or unexported fields
}
VoteGroupBy is the group-by builder for Vote entities.
func (*VoteGroupBy) Aggregate ¶
func (vgb *VoteGroupBy) Aggregate(fns ...AggregateFunc) *VoteGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*VoteGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*VoteGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*VoteGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*VoteGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*VoteGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*VoteGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*VoteGroupBy) Scan ¶
func (vgb *VoteGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*VoteGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type VoteMutation ¶
type VoteMutation struct {
// contains filtered or unexported fields
}
VoteMutation represents an operation that mutates the Vote nodes in the graph.
func (*VoteMutation) AddCreatedBy ¶
func (m *VoteMutation) AddCreatedBy(i int64)
AddCreatedBy adds i to the "created_by" field.
func (*VoteMutation) AddField ¶
func (m *VoteMutation) 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 (*VoteMutation) AddUpdatedBy ¶
func (m *VoteMutation) AddUpdatedBy(i int64)
AddUpdatedBy adds i to the "updated_by" field.
func (*VoteMutation) AddUserID ¶
func (m *VoteMutation) AddUserID(i int64)
AddUserID adds i to the "user_id" field.
func (*VoteMutation) AddedCreatedBy ¶
func (m *VoteMutation) AddedCreatedBy() (r int64, exists bool)
AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.
func (*VoteMutation) AddedEdges ¶
func (m *VoteMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*VoteMutation) AddedField ¶
func (m *VoteMutation) 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 (*VoteMutation) AddedFields ¶
func (m *VoteMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*VoteMutation) AddedIDs ¶
func (m *VoteMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*VoteMutation) AddedUpdatedBy ¶
func (m *VoteMutation) AddedUpdatedBy() (r int64, exists bool)
AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.
func (*VoteMutation) AddedUserID ¶
func (m *VoteMutation) AddedUserID() (r int64, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*VoteMutation) ClearEdge ¶
func (m *VoteMutation) 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 (*VoteMutation) ClearField ¶
func (m *VoteMutation) 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 (*VoteMutation) ClearMission ¶
func (m *VoteMutation) ClearMission()
ClearMission clears the "mission" edge to the Mission entity.
func (*VoteMutation) ClearedEdges ¶
func (m *VoteMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*VoteMutation) ClearedFields ¶
func (m *VoteMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (VoteMutation) Client ¶
func (m VoteMutation) 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 (*VoteMutation) CreatedAt ¶
func (m *VoteMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*VoteMutation) CreatedBy ¶
func (m *VoteMutation) CreatedBy() (r int64, exists bool)
CreatedBy returns the value of the "created_by" field in the mutation.
func (*VoteMutation) DeletedAt ¶
func (m *VoteMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*VoteMutation) EdgeCleared ¶
func (m *VoteMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*VoteMutation) Field ¶
func (m *VoteMutation) 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 (*VoteMutation) FieldCleared ¶
func (m *VoteMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*VoteMutation) Fields ¶
func (m *VoteMutation) 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 (*VoteMutation) ID ¶
func (m *VoteMutation) ID() (id int64, 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 (*VoteMutation) IDs ¶
func (m *VoteMutation) IDs(ctx context.Context) ([]int64, 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 (*VoteMutation) MissionCleared ¶
func (m *VoteMutation) MissionCleared() bool
MissionCleared reports if the "mission" edge to the Mission entity was cleared.
func (*VoteMutation) MissionID ¶
func (m *VoteMutation) MissionID() (r int64, exists bool)
MissionID returns the value of the "mission_id" field in the mutation.
func (*VoteMutation) MissionIDs ¶
func (m *VoteMutation) MissionIDs() (ids []int64)
MissionIDs returns the "mission" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MissionID instead. It exists only for internal usage by the builders.
func (*VoteMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Vote entity. If the Vote 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 (*VoteMutation) OldCreatedBy ¶
func (m *VoteMutation) OldCreatedBy(ctx context.Context) (v int64, err error)
OldCreatedBy returns the old "created_by" field's value of the Vote entity. If the Vote 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 (*VoteMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Vote entity. If the Vote 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 (*VoteMutation) 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 (*VoteMutation) OldMissionID ¶
func (m *VoteMutation) OldMissionID(ctx context.Context) (v int64, err error)
OldMissionID returns the old "mission_id" field's value of the Vote entity. If the Vote 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 (*VoteMutation) OldPass ¶
func (m *VoteMutation) OldPass(ctx context.Context) (v bool, err error)
OldPass returns the old "pass" field's value of the Vote entity. If the Vote 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 (*VoteMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Vote entity. If the Vote 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 (*VoteMutation) OldUpdatedBy ¶
func (m *VoteMutation) OldUpdatedBy(ctx context.Context) (v int64, err error)
OldUpdatedBy returns the old "updated_by" field's value of the Vote entity. If the Vote 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 (*VoteMutation) OldUserID ¶
func (m *VoteMutation) OldUserID(ctx context.Context) (v int64, err error)
OldUserID returns the old "user_id" field's value of the Vote entity. If the Vote 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 (*VoteMutation) OldVoted ¶
func (m *VoteMutation) OldVoted(ctx context.Context) (v bool, err error)
OldVoted returns the old "voted" field's value of the Vote entity. If the Vote 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 (*VoteMutation) Pass ¶
func (m *VoteMutation) Pass() (r bool, exists bool)
Pass returns the value of the "pass" field in the mutation.
func (*VoteMutation) RemovedEdges ¶
func (m *VoteMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*VoteMutation) RemovedIDs ¶
func (m *VoteMutation) 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 (*VoteMutation) ResetCreatedAt ¶
func (m *VoteMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*VoteMutation) ResetCreatedBy ¶
func (m *VoteMutation) ResetCreatedBy()
ResetCreatedBy resets all changes to the "created_by" field.
func (*VoteMutation) ResetDeletedAt ¶
func (m *VoteMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*VoteMutation) ResetEdge ¶
func (m *VoteMutation) 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 (*VoteMutation) ResetField ¶
func (m *VoteMutation) 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 (*VoteMutation) ResetMission ¶
func (m *VoteMutation) ResetMission()
ResetMission resets all changes to the "mission" edge.
func (*VoteMutation) ResetMissionID ¶
func (m *VoteMutation) ResetMissionID()
ResetMissionID resets all changes to the "mission_id" field.
func (*VoteMutation) ResetPass ¶
func (m *VoteMutation) ResetPass()
ResetPass resets all changes to the "pass" field.
func (*VoteMutation) ResetUpdatedAt ¶
func (m *VoteMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*VoteMutation) ResetUpdatedBy ¶
func (m *VoteMutation) ResetUpdatedBy()
ResetUpdatedBy resets all changes to the "updated_by" field.
func (*VoteMutation) ResetUserID ¶
func (m *VoteMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*VoteMutation) ResetVoted ¶
func (m *VoteMutation) ResetVoted()
ResetVoted resets all changes to the "voted" field.
func (*VoteMutation) SetCreatedAt ¶
func (m *VoteMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*VoteMutation) SetCreatedBy ¶
func (m *VoteMutation) SetCreatedBy(i int64)
SetCreatedBy sets the "created_by" field.
func (*VoteMutation) SetDeletedAt ¶
func (m *VoteMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*VoteMutation) SetField ¶
func (m *VoteMutation) 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 (*VoteMutation) SetID ¶
func (m *VoteMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Vote entities.
func (*VoteMutation) SetMissionID ¶
func (m *VoteMutation) SetMissionID(i int64)
SetMissionID sets the "mission_id" field.
func (*VoteMutation) SetPass ¶
func (m *VoteMutation) SetPass(b bool)
SetPass sets the "pass" field.
func (*VoteMutation) SetUpdatedAt ¶
func (m *VoteMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*VoteMutation) SetUpdatedBy ¶
func (m *VoteMutation) SetUpdatedBy(i int64)
SetUpdatedBy sets the "updated_by" field.
func (*VoteMutation) SetUserID ¶
func (m *VoteMutation) SetUserID(i int64)
SetUserID sets the "user_id" field.
func (*VoteMutation) SetVoted ¶
func (m *VoteMutation) SetVoted(b bool)
SetVoted sets the "voted" field.
func (VoteMutation) Tx ¶
func (m VoteMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*VoteMutation) Type ¶
func (m *VoteMutation) Type() string
Type returns the node type of this mutation (Vote).
func (*VoteMutation) UpdatedAt ¶
func (m *VoteMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*VoteMutation) UpdatedBy ¶
func (m *VoteMutation) UpdatedBy() (r int64, exists bool)
UpdatedBy returns the value of the "updated_by" field in the mutation.
func (*VoteMutation) UserID ¶
func (m *VoteMutation) UserID() (r int64, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*VoteMutation) Voted ¶
func (m *VoteMutation) Voted() (r bool, exists bool)
Voted returns the value of the "voted" field in the mutation.
func (*VoteMutation) Where ¶
func (m *VoteMutation) Where(ps ...predicate.Vote)
Where appends a list predicates to the VoteMutation builder.
type VoteOrder ¶
type VoteOrder struct { Direction OrderDirection `json:"direction"` Field *VoteOrderField `json:"field"` }
VoteOrder defines the ordering of Vote.
type VoteOrderField ¶
type VoteOrderField struct {
// contains filtered or unexported fields
}
VoteOrderField defines the ordering field of Vote.
func (VoteOrderField) MarshalGQL ¶
func (f VoteOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (VoteOrderField) String ¶
func (f VoteOrderField) String() string
String implement fmt.Stringer interface.
func (*VoteOrderField) UnmarshalGQL ¶
func (f *VoteOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type VotePaginateOption ¶
type VotePaginateOption func(*votePager) error
VotePaginateOption enables pagination customization.
func WithVoteFilter ¶
func WithVoteFilter(filter func(*VoteQuery) (*VoteQuery, error)) VotePaginateOption
WithVoteFilter configures pagination filter.
func WithVoteOrder ¶
func WithVoteOrder(order *VoteOrder) VotePaginateOption
WithVoteOrder configures pagination ordering.
type VoteQuery ¶
type VoteQuery struct {
// contains filtered or unexported fields
}
VoteQuery is the builder for querying Vote entities.
func (*VoteQuery) Aggregate ¶
func (vq *VoteQuery) Aggregate(fns ...AggregateFunc) *VoteSelect
Aggregate returns a VoteSelect configured with the given aggregations.
func (*VoteQuery) Clone ¶
Clone returns a duplicate of the VoteQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*VoteQuery) CollectFields ¶
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*VoteQuery) First ¶
First returns the first Vote entity from the query. Returns a *NotFoundError when no Vote was found.
func (*VoteQuery) FirstID ¶
FirstID returns the first Vote ID from the query. Returns a *NotFoundError when no Vote ID was found.
func (*VoteQuery) GroupBy ¶
func (vq *VoteQuery) GroupBy(field string, fields ...string) *VoteGroupBy
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 { CreatedBy int64 `json:"created_by"` Count int `json:"count,omitempty"` } client.Vote.Query(). GroupBy(vote.FieldCreatedBy). Aggregate(ent.Count()). Scan(ctx, &v)
func (*VoteQuery) Only ¶
Only returns a single Vote entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Vote entity is found. Returns a *NotFoundError when no Vote entities are found.
func (*VoteQuery) OnlyID ¶
OnlyID is like Only, but returns the only Vote ID in the query. Returns a *NotSingularError when more than one Vote ID is found. Returns a *NotFoundError when no entities are found.
func (*VoteQuery) Paginate ¶
func (v *VoteQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...VotePaginateOption, ) (*VoteConnection, error)
Paginate executes the query and returns a relay based cursor connection to Vote.
func (*VoteQuery) QueryMission ¶
func (vq *VoteQuery) QueryMission() *MissionQuery
QueryMission chains the current query on the "mission" edge.
func (*VoteQuery) Select ¶
func (vq *VoteQuery) Select(fields ...string) *VoteSelect
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 { CreatedBy int64 `json:"created_by"` } client.Vote.Query(). Select(vote.FieldCreatedBy). Scan(ctx, &v)
func (*VoteQuery) Unique ¶
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 (*VoteQuery) WithMission ¶
func (vq *VoteQuery) WithMission(opts ...func(*MissionQuery)) *VoteQuery
WithMission tells the query-builder to eager-load the nodes that are connected to the "mission" edge. The optional arguments are used to configure the query builder of the edge.
type VoteSelect ¶
type VoteSelect struct { *VoteQuery // contains filtered or unexported fields }
VoteSelect is the builder for selecting fields of Vote entities.
func (*VoteSelect) Aggregate ¶
func (vs *VoteSelect) Aggregate(fns ...AggregateFunc) *VoteSelect
Aggregate adds the given aggregation functions to the selector query.
func (*VoteSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*VoteSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*VoteSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*VoteSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*VoteSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*VoteSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*VoteSelect) Scan ¶
func (vs *VoteSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*VoteSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type VoteUpdate ¶
type VoteUpdate struct {
// contains filtered or unexported fields
}
VoteUpdate is the builder for updating Vote entities.
func (*VoteUpdate) AddCreatedBy ¶
func (vu *VoteUpdate) AddCreatedBy(i int64) *VoteUpdate
AddCreatedBy adds i to the "created_by" field.
func (*VoteUpdate) AddUpdatedBy ¶
func (vu *VoteUpdate) AddUpdatedBy(i int64) *VoteUpdate
AddUpdatedBy adds i to the "updated_by" field.
func (*VoteUpdate) AddUserID ¶
func (vu *VoteUpdate) AddUserID(i int64) *VoteUpdate
AddUserID adds i to the "user_id" field.
func (*VoteUpdate) ClearMission ¶
func (vu *VoteUpdate) ClearMission() *VoteUpdate
ClearMission clears the "mission" edge to the Mission entity.
func (*VoteUpdate) Exec ¶
func (vu *VoteUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*VoteUpdate) ExecX ¶
func (vu *VoteUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VoteUpdate) Mutation ¶
func (vu *VoteUpdate) Mutation() *VoteMutation
Mutation returns the VoteMutation object of the builder.
func (*VoteUpdate) Save ¶
func (vu *VoteUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*VoteUpdate) SaveX ¶
func (vu *VoteUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*VoteUpdate) SetCreatedBy ¶
func (vu *VoteUpdate) SetCreatedBy(i int64) *VoteUpdate
SetCreatedBy sets the "created_by" field.
func (*VoteUpdate) SetDeletedAt ¶
func (vu *VoteUpdate) SetDeletedAt(t time.Time) *VoteUpdate
SetDeletedAt sets the "deleted_at" field.
func (*VoteUpdate) SetInput ¶
func (c *VoteUpdate) SetInput(i UpdateVoteInput) *VoteUpdate
SetInput applies the change-set in the UpdateVoteInput on the VoteUpdate builder.
func (*VoteUpdate) SetMission ¶
func (vu *VoteUpdate) SetMission(m *Mission) *VoteUpdate
SetMission sets the "mission" edge to the Mission entity.
func (*VoteUpdate) SetMissionID ¶
func (vu *VoteUpdate) SetMissionID(i int64) *VoteUpdate
SetMissionID sets the "mission_id" field.
func (*VoteUpdate) SetNillableCreatedBy ¶
func (vu *VoteUpdate) SetNillableCreatedBy(i *int64) *VoteUpdate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*VoteUpdate) SetNillableDeletedAt ¶
func (vu *VoteUpdate) SetNillableDeletedAt(t *time.Time) *VoteUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*VoteUpdate) SetNillablePass ¶
func (vu *VoteUpdate) SetNillablePass(b *bool) *VoteUpdate
SetNillablePass sets the "pass" field if the given value is not nil.
func (*VoteUpdate) SetNillableUpdatedBy ¶
func (vu *VoteUpdate) SetNillableUpdatedBy(i *int64) *VoteUpdate
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*VoteUpdate) SetNillableVoted ¶
func (vu *VoteUpdate) SetNillableVoted(b *bool) *VoteUpdate
SetNillableVoted sets the "voted" field if the given value is not nil.
func (*VoteUpdate) SetPass ¶
func (vu *VoteUpdate) SetPass(b bool) *VoteUpdate
SetPass sets the "pass" field.
func (*VoteUpdate) SetUpdatedAt ¶
func (vu *VoteUpdate) SetUpdatedAt(t time.Time) *VoteUpdate
SetUpdatedAt sets the "updated_at" field.
func (*VoteUpdate) SetUpdatedBy ¶
func (vu *VoteUpdate) SetUpdatedBy(i int64) *VoteUpdate
SetUpdatedBy sets the "updated_by" field.
func (*VoteUpdate) SetUserID ¶
func (vu *VoteUpdate) SetUserID(i int64) *VoteUpdate
SetUserID sets the "user_id" field.
func (*VoteUpdate) SetVoted ¶
func (vu *VoteUpdate) SetVoted(b bool) *VoteUpdate
SetVoted sets the "voted" field.
func (*VoteUpdate) Where ¶
func (vu *VoteUpdate) Where(ps ...predicate.Vote) *VoteUpdate
Where appends a list predicates to the VoteUpdate builder.
type VoteUpdateOne ¶
type VoteUpdateOne struct {
// contains filtered or unexported fields
}
VoteUpdateOne is the builder for updating a single Vote entity.
func (*VoteUpdateOne) AddCreatedBy ¶
func (vuo *VoteUpdateOne) AddCreatedBy(i int64) *VoteUpdateOne
AddCreatedBy adds i to the "created_by" field.
func (*VoteUpdateOne) AddUpdatedBy ¶
func (vuo *VoteUpdateOne) AddUpdatedBy(i int64) *VoteUpdateOne
AddUpdatedBy adds i to the "updated_by" field.
func (*VoteUpdateOne) AddUserID ¶
func (vuo *VoteUpdateOne) AddUserID(i int64) *VoteUpdateOne
AddUserID adds i to the "user_id" field.
func (*VoteUpdateOne) ClearMission ¶
func (vuo *VoteUpdateOne) ClearMission() *VoteUpdateOne
ClearMission clears the "mission" edge to the Mission entity.
func (*VoteUpdateOne) Exec ¶
func (vuo *VoteUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*VoteUpdateOne) ExecX ¶
func (vuo *VoteUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VoteUpdateOne) Mutation ¶
func (vuo *VoteUpdateOne) Mutation() *VoteMutation
Mutation returns the VoteMutation object of the builder.
func (*VoteUpdateOne) Save ¶
func (vuo *VoteUpdateOne) Save(ctx context.Context) (*Vote, error)
Save executes the query and returns the updated Vote entity.
func (*VoteUpdateOne) SaveX ¶
func (vuo *VoteUpdateOne) SaveX(ctx context.Context) *Vote
SaveX is like Save, but panics if an error occurs.
func (*VoteUpdateOne) Select ¶
func (vuo *VoteUpdateOne) Select(field string, fields ...string) *VoteUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*VoteUpdateOne) SetCreatedBy ¶
func (vuo *VoteUpdateOne) SetCreatedBy(i int64) *VoteUpdateOne
SetCreatedBy sets the "created_by" field.
func (*VoteUpdateOne) SetDeletedAt ¶
func (vuo *VoteUpdateOne) SetDeletedAt(t time.Time) *VoteUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*VoteUpdateOne) SetInput ¶
func (c *VoteUpdateOne) SetInput(i UpdateVoteInput) *VoteUpdateOne
SetInput applies the change-set in the UpdateVoteInput on the VoteUpdateOne builder.
func (*VoteUpdateOne) SetMission ¶
func (vuo *VoteUpdateOne) SetMission(m *Mission) *VoteUpdateOne
SetMission sets the "mission" edge to the Mission entity.
func (*VoteUpdateOne) SetMissionID ¶
func (vuo *VoteUpdateOne) SetMissionID(i int64) *VoteUpdateOne
SetMissionID sets the "mission_id" field.
func (*VoteUpdateOne) SetNillableCreatedBy ¶
func (vuo *VoteUpdateOne) SetNillableCreatedBy(i *int64) *VoteUpdateOne
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*VoteUpdateOne) SetNillableDeletedAt ¶
func (vuo *VoteUpdateOne) SetNillableDeletedAt(t *time.Time) *VoteUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*VoteUpdateOne) SetNillablePass ¶
func (vuo *VoteUpdateOne) SetNillablePass(b *bool) *VoteUpdateOne
SetNillablePass sets the "pass" field if the given value is not nil.
func (*VoteUpdateOne) SetNillableUpdatedBy ¶
func (vuo *VoteUpdateOne) SetNillableUpdatedBy(i *int64) *VoteUpdateOne
SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.
func (*VoteUpdateOne) SetNillableVoted ¶
func (vuo *VoteUpdateOne) SetNillableVoted(b *bool) *VoteUpdateOne
SetNillableVoted sets the "voted" field if the given value is not nil.
func (*VoteUpdateOne) SetPass ¶
func (vuo *VoteUpdateOne) SetPass(b bool) *VoteUpdateOne
SetPass sets the "pass" field.
func (*VoteUpdateOne) SetUpdatedAt ¶
func (vuo *VoteUpdateOne) SetUpdatedAt(t time.Time) *VoteUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*VoteUpdateOne) SetUpdatedBy ¶
func (vuo *VoteUpdateOne) SetUpdatedBy(i int64) *VoteUpdateOne
SetUpdatedBy sets the "updated_by" field.
func (*VoteUpdateOne) SetUserID ¶
func (vuo *VoteUpdateOne) SetUserID(i int64) *VoteUpdateOne
SetUserID sets the "user_id" field.
func (*VoteUpdateOne) SetVoted ¶
func (vuo *VoteUpdateOne) SetVoted(b bool) *VoteUpdateOne
SetVoted sets the "voted" field.
type VoteWhereInput ¶
type VoteWhereInput struct { Predicates []predicate.Vote `json:"-"` Not *VoteWhereInput `json:"not,omitempty"` Or []*VoteWhereInput `json:"or,omitempty"` And []*VoteWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int64 `json:"id,omitempty"` IDNEQ *int64 `json:"idNEQ,omitempty"` IDIn []int64 `json:"idIn,omitempty"` IDNotIn []int64 `json:"idNotIn,omitempty"` IDGT *int64 `json:"idGT,omitempty"` IDGTE *int64 `json:"idGTE,omitempty"` IDLT *int64 `json:"idLT,omitempty"` IDLTE *int64 `json:"idLTE,omitempty"` // "created_by" field predicates. CreatedBy *int64 `json:"createdBy,omitempty"` CreatedByNEQ *int64 `json:"createdByNEQ,omitempty"` CreatedByIn []int64 `json:"createdByIn,omitempty"` CreatedByNotIn []int64 `json:"createdByNotIn,omitempty"` CreatedByGT *int64 `json:"createdByGT,omitempty"` CreatedByGTE *int64 `json:"createdByGTE,omitempty"` CreatedByLT *int64 `json:"createdByLT,omitempty"` CreatedByLTE *int64 `json:"createdByLTE,omitempty"` // "updated_by" field predicates. UpdatedBy *int64 `json:"updatedBy,omitempty"` UpdatedByNEQ *int64 `json:"updatedByNEQ,omitempty"` UpdatedByIn []int64 `json:"updatedByIn,omitempty"` UpdatedByNotIn []int64 `json:"updatedByNotIn,omitempty"` UpdatedByGT *int64 `json:"updatedByGT,omitempty"` UpdatedByGTE *int64 `json:"updatedByGTE,omitempty"` UpdatedByLT *int64 `json:"updatedByLT,omitempty"` UpdatedByLTE *int64 `json:"updatedByLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "updated_at" field predicates. UpdatedAt *time.Time `json:"updatedAt,omitempty"` UpdatedAtNEQ *time.Time `json:"updatedAtNEQ,omitempty"` UpdatedAtIn []time.Time `json:"updatedAtIn,omitempty"` UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"` UpdatedAtGT *time.Time `json:"updatedAtGT,omitempty"` UpdatedAtGTE *time.Time `json:"updatedAtGTE,omitempty"` UpdatedAtLT *time.Time `json:"updatedAtLT,omitempty"` UpdatedAtLTE *time.Time `json:"updatedAtLTE,omitempty"` // "deleted_at" field predicates. DeletedAt *time.Time `json:"deletedAt,omitempty"` DeletedAtNEQ *time.Time `json:"deletedAtNEQ,omitempty"` DeletedAtIn []time.Time `json:"deletedAtIn,omitempty"` DeletedAtNotIn []time.Time `json:"deletedAtNotIn,omitempty"` DeletedAtGT *time.Time `json:"deletedAtGT,omitempty"` DeletedAtGTE *time.Time `json:"deletedAtGTE,omitempty"` DeletedAtLT *time.Time `json:"deletedAtLT,omitempty"` DeletedAtLTE *time.Time `json:"deletedAtLTE,omitempty"` // "mission_id" field predicates. MissionID *int64 `json:"missionID,omitempty"` MissionIDNEQ *int64 `json:"missionIDNEQ,omitempty"` MissionIDIn []int64 `json:"missionIDIn,omitempty"` MissionIDNotIn []int64 `json:"missionIDNotIn,omitempty"` // "user_id" field predicates. UserID *int64 `json:"userID,omitempty"` UserIDNEQ *int64 `json:"userIDNEQ,omitempty"` UserIDIn []int64 `json:"userIDIn,omitempty"` UserIDNotIn []int64 `json:"userIDNotIn,omitempty"` UserIDGT *int64 `json:"userIDGT,omitempty"` UserIDGTE *int64 `json:"userIDGTE,omitempty"` UserIDLT *int64 `json:"userIDLT,omitempty"` UserIDLTE *int64 `json:"userIDLTE,omitempty"` // "pass" field predicates. Pass *bool `json:"pass,omitempty"` PassNEQ *bool `json:"passNEQ,omitempty"` // "voted" field predicates. Voted *bool `json:"voted,omitempty"` VotedNEQ *bool `json:"votedNEQ,omitempty"` // "mission" edge predicates. HasMission *bool `json:"hasMission,omitempty"` HasMissionWith []*MissionWhereInput `json:"hasMissionWith,omitempty"` }
VoteWhereInput represents a where input for filtering Vote queries.
func (*VoteWhereInput) AddPredicates ¶
func (i *VoteWhereInput) AddPredicates(predicates ...predicate.Vote)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
Source Files ¶
- card.go
- card_create.go
- card_delete.go
- card_query.go
- card_update.go
- client.go
- config.go
- context.go
- ent.go
- game.go
- game_create.go
- game_delete.go
- game_query.go
- game_update.go
- gameuser.go
- gameuser_create.go
- gameuser_delete.go
- gameuser_query.go
- gameuser_update.go
- generate.go
- gql_collection.go
- gql_edge.go
- gql_mutation_input.go
- gql_node.go
- gql_pagination.go
- gql_transaction.go
- gql_where_input.go
- mission.go
- mission_create.go
- mission_delete.go
- mission_query.go
- mission_update.go
- mutation.go
- record.go
- record_create.go
- record_delete.go
- record_query.go
- record_update.go
- room.go
- room_create.go
- room_delete.go
- room_query.go
- room_update.go
- roomuser.go
- roomuser_create.go
- roomuser_delete.go
- roomuser_query.go
- roomuser_update.go
- runtime.go
- squad.go
- squad_create.go
- squad_delete.go
- squad_query.go
- squad_update.go
- tx.go
- vote.go
- vote_create.go
- vote_delete.go
- vote_query.go
- vote_update.go