Documentation ¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Chat
- type ChatClient
- func (c *ChatClient) Create() *ChatCreate
- func (c *ChatClient) CreateBulk(builders ...*ChatCreate) *ChatCreateBulk
- func (c *ChatClient) Delete() *ChatDelete
- func (c *ChatClient) DeleteOne(ch *Chat) *ChatDeleteOne
- func (c *ChatClient) DeleteOneID(id int64) *ChatDeleteOne
- func (c *ChatClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *ChatClient) Get(ctx context.Context, id int64) (*Chat, error)
- func (c *ChatClient) GetX(ctx context.Context, id int64) *Chat
- func (c *ChatClient) Hooks() []Hook
- func (c *ChatClient) Intercept(interceptors ...Interceptor)
- func (c *ChatClient) Interceptors() []Interceptor
- func (c *ChatClient) Query() *ChatQuery
- func (c *ChatClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *ChatClient) Update() *ChatUpdate
- func (c *ChatClient) UpdateOne(ch *Chat) *ChatUpdateOne
- func (c *ChatClient) UpdateOneID(id int64) *ChatUpdateOne
- func (c *ChatClient) Use(hooks ...Hook)
- type ChatCreate
- func (cc *ChatCreate) Exec(ctx context.Context) error
- func (c *ChatCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cc *ChatCreate) ExecX(ctx context.Context)
- func (cc *ChatCreate) Mutation() *ChatMutation
- func (cc *ChatCreate) OnConflict(opts ...sql.ConflictOption) *ChatUpsertOne
- func (cc *ChatCreate) OnConflictColumns(columns ...string) *ChatUpsertOne
- func (c *ChatCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cc *ChatCreate) Save(ctx context.Context) (*Chat, error)
- func (cc *ChatCreate) SaveX(ctx context.Context) *Chat
- func (cc *ChatCreate) SetChatID(i int64) *ChatCreate
- func (cc *ChatCreate) SetCreateAt(t time.Time) *ChatCreate
- func (cc *ChatCreate) SetDescription(s string) *ChatCreate
- func (cc *ChatCreate) SetFirstName(s string) *ChatCreate
- func (cc *ChatCreate) SetID(i int64) *ChatCreate
- func (cc *ChatCreate) SetIsForum(b bool) *ChatCreate
- func (cc *ChatCreate) SetLastName(s string) *ChatCreate
- func (cc *ChatCreate) SetNillableCreateAt(t *time.Time) *ChatCreate
- func (cc *ChatCreate) SetNillableDescription(s *string) *ChatCreate
- func (cc *ChatCreate) SetNillableFirstName(s *string) *ChatCreate
- func (cc *ChatCreate) SetNillableIsForum(b *bool) *ChatCreate
- func (cc *ChatCreate) SetNillableLastName(s *string) *ChatCreate
- func (cc *ChatCreate) SetNillableTitle(s *string) *ChatCreate
- func (cc *ChatCreate) SetNillableType(s *string) *ChatCreate
- func (cc *ChatCreate) SetNillableUpdateAt(t *time.Time) *ChatCreate
- func (cc *ChatCreate) SetNillableUserName(s *string) *ChatCreate
- func (cc *ChatCreate) SetTitle(s string) *ChatCreate
- func (cc *ChatCreate) SetType(s string) *ChatCreate
- func (cc *ChatCreate) SetUpdateAt(t time.Time) *ChatCreate
- func (cc *ChatCreate) SetUserName(s string) *ChatCreate
- type ChatCreateBulk
- func (ccb *ChatCreateBulk) Exec(ctx context.Context) error
- func (c *ChatCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ccb *ChatCreateBulk) ExecX(ctx context.Context)
- func (ccb *ChatCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChatUpsertBulk
- func (ccb *ChatCreateBulk) OnConflictColumns(columns ...string) *ChatUpsertBulk
- func (c *ChatCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ccb *ChatCreateBulk) Save(ctx context.Context) ([]*Chat, error)
- func (ccb *ChatCreateBulk) SaveX(ctx context.Context) []*Chat
- type ChatDelete
- func (cd *ChatDelete) Exec(ctx context.Context) (int, error)
- func (c *ChatDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cd *ChatDelete) ExecX(ctx context.Context) int
- func (c *ChatDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cd *ChatDelete) Where(ps ...predicate.Chat) *ChatDelete
- type ChatDeleteOne
- type ChatGroupBy
- func (cgb *ChatGroupBy) Aggregate(fns ...AggregateFunc) *ChatGroupBy
- func (s *ChatGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ChatGroupBy) BoolX(ctx context.Context) bool
- func (s *ChatGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ChatGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ChatGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ChatGroupBy) Float64X(ctx context.Context) float64
- func (s *ChatGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ChatGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ChatGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ChatGroupBy) IntX(ctx context.Context) int
- func (s *ChatGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ChatGroupBy) IntsX(ctx context.Context) []int
- func (cgb *ChatGroupBy) Scan(ctx context.Context, v any) error
- func (s *ChatGroupBy) ScanX(ctx context.Context, v any)
- func (s *ChatGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ChatGroupBy) StringX(ctx context.Context) string
- func (s *ChatGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ChatGroupBy) StringsX(ctx context.Context) []string
- type ChatMutation
- func (m *ChatMutation) AddChatID(i int64)
- func (m *ChatMutation) AddField(name string, value ent.Value) error
- func (m *ChatMutation) AddedChatID() (r int64, exists bool)
- func (m *ChatMutation) AddedEdges() []string
- func (m *ChatMutation) AddedField(name string) (ent.Value, bool)
- func (m *ChatMutation) AddedFields() []string
- func (m *ChatMutation) AddedIDs(name string) []ent.Value
- func (m *ChatMutation) ChatID() (r int64, exists bool)
- func (m *ChatMutation) ClearEdge(name string) error
- func (m *ChatMutation) ClearField(name string) error
- func (m *ChatMutation) ClearedEdges() []string
- func (m *ChatMutation) ClearedFields() []string
- func (m ChatMutation) Client() *Client
- func (m *ChatMutation) CreateAt() (r time.Time, exists bool)
- func (m *ChatMutation) Description() (r string, exists bool)
- func (m *ChatMutation) EdgeCleared(name string) bool
- func (c *ChatMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *ChatMutation) Field(name string) (ent.Value, bool)
- func (m *ChatMutation) FieldCleared(name string) bool
- func (m *ChatMutation) Fields() []string
- func (m *ChatMutation) FirstName() (r string, exists bool)
- func (m *ChatMutation) GetType() (r string, exists bool)
- func (m *ChatMutation) ID() (id int64, exists bool)
- func (m *ChatMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *ChatMutation) IsForum() (r bool, exists bool)
- func (m *ChatMutation) LastName() (r string, exists bool)
- func (m *ChatMutation) OldChatID(ctx context.Context) (v int64, err error)
- func (m *ChatMutation) OldCreateAt(ctx context.Context) (v time.Time, err error)
- func (m *ChatMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *ChatMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ChatMutation) OldFirstName(ctx context.Context) (v string, err error)
- func (m *ChatMutation) OldIsForum(ctx context.Context) (v bool, err error)
- func (m *ChatMutation) OldLastName(ctx context.Context) (v string, err error)
- func (m *ChatMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *ChatMutation) OldType(ctx context.Context) (v string, err error)
- func (m *ChatMutation) OldUpdateAt(ctx context.Context) (v time.Time, err error)
- func (m *ChatMutation) OldUserName(ctx context.Context) (v string, err error)
- func (m *ChatMutation) Op() Op
- func (c *ChatMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *ChatMutation) RemovedEdges() []string
- func (m *ChatMutation) RemovedIDs(name string) []ent.Value
- func (m *ChatMutation) ResetChatID()
- func (m *ChatMutation) ResetCreateAt()
- func (m *ChatMutation) ResetDescription()
- func (m *ChatMutation) ResetEdge(name string) error
- func (m *ChatMutation) ResetField(name string) error
- func (m *ChatMutation) ResetFirstName()
- func (m *ChatMutation) ResetIsForum()
- func (m *ChatMutation) ResetLastName()
- func (m *ChatMutation) ResetTitle()
- func (m *ChatMutation) ResetType()
- func (m *ChatMutation) ResetUpdateAt()
- func (m *ChatMutation) ResetUserName()
- func (m *ChatMutation) SetChatID(i int64)
- func (m *ChatMutation) SetCreateAt(t time.Time)
- func (m *ChatMutation) SetDescription(s string)
- func (m *ChatMutation) SetField(name string, value ent.Value) error
- func (m *ChatMutation) SetFirstName(s string)
- func (m *ChatMutation) SetID(id int64)
- func (m *ChatMutation) SetIsForum(b bool)
- func (m *ChatMutation) SetLastName(s string)
- func (m *ChatMutation) SetOp(op Op)
- func (m *ChatMutation) SetTitle(s string)
- func (m *ChatMutation) SetType(s string)
- func (m *ChatMutation) SetUpdateAt(t time.Time)
- func (m *ChatMutation) SetUserName(s string)
- func (m *ChatMutation) Title() (r string, exists bool)
- func (m ChatMutation) Tx() (*Tx, error)
- func (m *ChatMutation) Type() string
- func (m *ChatMutation) UpdateAt() (r time.Time, exists bool)
- func (m *ChatMutation) UserName() (r string, exists bool)
- func (m *ChatMutation) Where(ps ...predicate.Chat)
- func (m *ChatMutation) WhereP(ps ...func(*sql.Selector))
- type ChatOption
- func (c *ChatOption) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *ChatOption) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (co *ChatOption) String() string
- func (co *ChatOption) Unwrap() *ChatOption
- func (co *ChatOption) Update() *ChatOptionUpdateOne
- type ChatOptionClient
- func (c *ChatOptionClient) Create() *ChatOptionCreate
- func (c *ChatOptionClient) CreateBulk(builders ...*ChatOptionCreate) *ChatOptionCreateBulk
- func (c *ChatOptionClient) Delete() *ChatOptionDelete
- func (c *ChatOptionClient) DeleteOne(co *ChatOption) *ChatOptionDeleteOne
- func (c *ChatOptionClient) DeleteOneID(id int64) *ChatOptionDeleteOne
- func (c *ChatOptionClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *ChatOptionClient) Get(ctx context.Context, id int64) (*ChatOption, error)
- func (c *ChatOptionClient) GetX(ctx context.Context, id int64) *ChatOption
- func (c *ChatOptionClient) Hooks() []Hook
- func (c *ChatOptionClient) Intercept(interceptors ...Interceptor)
- func (c *ChatOptionClient) Interceptors() []Interceptor
- func (c *ChatOptionClient) Query() *ChatOptionQuery
- func (c *ChatOptionClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *ChatOptionClient) Update() *ChatOptionUpdate
- func (c *ChatOptionClient) UpdateOne(co *ChatOption) *ChatOptionUpdateOne
- func (c *ChatOptionClient) UpdateOneID(id int64) *ChatOptionUpdateOne
- func (c *ChatOptionClient) Use(hooks ...Hook)
- type ChatOptionCreate
- func (coc *ChatOptionCreate) Exec(ctx context.Context) error
- func (c *ChatOptionCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (coc *ChatOptionCreate) ExecX(ctx context.Context)
- func (coc *ChatOptionCreate) Mutation() *ChatOptionMutation
- func (coc *ChatOptionCreate) OnConflict(opts ...sql.ConflictOption) *ChatOptionUpsertOne
- func (coc *ChatOptionCreate) OnConflictColumns(columns ...string) *ChatOptionUpsertOne
- func (c *ChatOptionCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (coc *ChatOptionCreate) Save(ctx context.Context) (*ChatOption, error)
- func (coc *ChatOptionCreate) SaveX(ctx context.Context) *ChatOption
- func (coc *ChatOptionCreate) SetChatID(i int64) *ChatOptionCreate
- func (coc *ChatOptionCreate) SetCreateAt(t time.Time) *ChatOptionCreate
- func (coc *ChatOptionCreate) SetID(i int64) *ChatOptionCreate
- func (coc *ChatOptionCreate) SetKey(s string) *ChatOptionCreate
- func (coc *ChatOptionCreate) SetNillableCreateAt(t *time.Time) *ChatOptionCreate
- func (coc *ChatOptionCreate) SetNillableUpdateAt(t *time.Time) *ChatOptionCreate
- func (coc *ChatOptionCreate) SetNillableValue(s *string) *ChatOptionCreate
- func (coc *ChatOptionCreate) SetUpdateAt(t time.Time) *ChatOptionCreate
- func (coc *ChatOptionCreate) SetValue(s string) *ChatOptionCreate
- type ChatOptionCreateBulk
- func (cocb *ChatOptionCreateBulk) Exec(ctx context.Context) error
- func (c *ChatOptionCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cocb *ChatOptionCreateBulk) ExecX(ctx context.Context)
- func (cocb *ChatOptionCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChatOptionUpsertBulk
- func (cocb *ChatOptionCreateBulk) OnConflictColumns(columns ...string) *ChatOptionUpsertBulk
- func (c *ChatOptionCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cocb *ChatOptionCreateBulk) Save(ctx context.Context) ([]*ChatOption, error)
- func (cocb *ChatOptionCreateBulk) SaveX(ctx context.Context) []*ChatOption
- type ChatOptionDelete
- func (cod *ChatOptionDelete) Exec(ctx context.Context) (int, error)
- func (c *ChatOptionDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cod *ChatOptionDelete) ExecX(ctx context.Context) int
- func (c *ChatOptionDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cod *ChatOptionDelete) Where(ps ...predicate.ChatOption) *ChatOptionDelete
- type ChatOptionDeleteOne
- type ChatOptionGroupBy
- func (cogb *ChatOptionGroupBy) Aggregate(fns ...AggregateFunc) *ChatOptionGroupBy
- func (s *ChatOptionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ChatOptionGroupBy) BoolX(ctx context.Context) bool
- func (s *ChatOptionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ChatOptionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ChatOptionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ChatOptionGroupBy) Float64X(ctx context.Context) float64
- func (s *ChatOptionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ChatOptionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ChatOptionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ChatOptionGroupBy) IntX(ctx context.Context) int
- func (s *ChatOptionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ChatOptionGroupBy) IntsX(ctx context.Context) []int
- func (cogb *ChatOptionGroupBy) Scan(ctx context.Context, v any) error
- func (s *ChatOptionGroupBy) ScanX(ctx context.Context, v any)
- func (s *ChatOptionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ChatOptionGroupBy) StringX(ctx context.Context) string
- func (s *ChatOptionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ChatOptionGroupBy) StringsX(ctx context.Context) []string
- type ChatOptionMutation
- func (m *ChatOptionMutation) AddChatID(i int64)
- func (m *ChatOptionMutation) AddField(name string, value ent.Value) error
- func (m *ChatOptionMutation) AddedChatID() (r int64, exists bool)
- func (m *ChatOptionMutation) AddedEdges() []string
- func (m *ChatOptionMutation) AddedField(name string) (ent.Value, bool)
- func (m *ChatOptionMutation) AddedFields() []string
- func (m *ChatOptionMutation) AddedIDs(name string) []ent.Value
- func (m *ChatOptionMutation) ChatID() (r int64, exists bool)
- func (m *ChatOptionMutation) ClearEdge(name string) error
- func (m *ChatOptionMutation) ClearField(name string) error
- func (m *ChatOptionMutation) ClearedEdges() []string
- func (m *ChatOptionMutation) ClearedFields() []string
- func (m ChatOptionMutation) Client() *Client
- func (m *ChatOptionMutation) CreateAt() (r time.Time, exists bool)
- func (m *ChatOptionMutation) EdgeCleared(name string) bool
- func (c *ChatOptionMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *ChatOptionMutation) Field(name string) (ent.Value, bool)
- func (m *ChatOptionMutation) FieldCleared(name string) bool
- func (m *ChatOptionMutation) Fields() []string
- func (m *ChatOptionMutation) ID() (id int64, exists bool)
- func (m *ChatOptionMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *ChatOptionMutation) Key() (r string, exists bool)
- func (m *ChatOptionMutation) OldChatID(ctx context.Context) (v int64, err error)
- func (m *ChatOptionMutation) OldCreateAt(ctx context.Context) (v time.Time, err error)
- func (m *ChatOptionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ChatOptionMutation) OldKey(ctx context.Context) (v string, err error)
- func (m *ChatOptionMutation) OldUpdateAt(ctx context.Context) (v time.Time, err error)
- func (m *ChatOptionMutation) OldValue(ctx context.Context) (v string, err error)
- func (m *ChatOptionMutation) Op() Op
- func (c *ChatOptionMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *ChatOptionMutation) RemovedEdges() []string
- func (m *ChatOptionMutation) RemovedIDs(name string) []ent.Value
- func (m *ChatOptionMutation) ResetChatID()
- func (m *ChatOptionMutation) ResetCreateAt()
- func (m *ChatOptionMutation) ResetEdge(name string) error
- func (m *ChatOptionMutation) ResetField(name string) error
- func (m *ChatOptionMutation) ResetKey()
- func (m *ChatOptionMutation) ResetUpdateAt()
- func (m *ChatOptionMutation) ResetValue()
- func (m *ChatOptionMutation) SetChatID(i int64)
- func (m *ChatOptionMutation) SetCreateAt(t time.Time)
- func (m *ChatOptionMutation) SetField(name string, value ent.Value) error
- func (m *ChatOptionMutation) SetID(id int64)
- func (m *ChatOptionMutation) SetKey(s string)
- func (m *ChatOptionMutation) SetOp(op Op)
- func (m *ChatOptionMutation) SetUpdateAt(t time.Time)
- func (m *ChatOptionMutation) SetValue(s string)
- func (m ChatOptionMutation) Tx() (*Tx, error)
- func (m *ChatOptionMutation) Type() string
- func (m *ChatOptionMutation) UpdateAt() (r time.Time, exists bool)
- func (m *ChatOptionMutation) Value() (r string, exists bool)
- func (m *ChatOptionMutation) Where(ps ...predicate.ChatOption)
- func (m *ChatOptionMutation) WhereP(ps ...func(*sql.Selector))
- type ChatOptionQuery
- func (coq *ChatOptionQuery) Aggregate(fns ...AggregateFunc) *ChatOptionSelect
- func (coq *ChatOptionQuery) All(ctx context.Context) ([]*ChatOption, error)
- func (coq *ChatOptionQuery) AllX(ctx context.Context) []*ChatOption
- func (coq *ChatOptionQuery) Clone() *ChatOptionQuery
- func (coq *ChatOptionQuery) Count(ctx context.Context) (int, error)
- func (coq *ChatOptionQuery) CountX(ctx context.Context) int
- func (c *ChatOptionQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (coq *ChatOptionQuery) Exist(ctx context.Context) (bool, error)
- func (coq *ChatOptionQuery) ExistX(ctx context.Context) bool
- func (coq *ChatOptionQuery) First(ctx context.Context) (*ChatOption, error)
- func (coq *ChatOptionQuery) FirstID(ctx context.Context) (id int64, err error)
- func (coq *ChatOptionQuery) FirstIDX(ctx context.Context) int64
- func (coq *ChatOptionQuery) FirstX(ctx context.Context) *ChatOption
- func (coq *ChatOptionQuery) ForShare(opts ...sql.LockOption) *ChatOptionQuery
- func (coq *ChatOptionQuery) ForUpdate(opts ...sql.LockOption) *ChatOptionQuery
- func (coq *ChatOptionQuery) GroupBy(field string, fields ...string) *ChatOptionGroupBy
- func (coq *ChatOptionQuery) IDs(ctx context.Context) (ids []int64, err error)
- func (coq *ChatOptionQuery) IDsX(ctx context.Context) []int64
- func (coq *ChatOptionQuery) Limit(limit int) *ChatOptionQuery
- func (coq *ChatOptionQuery) Modify(modifiers ...func(s *sql.Selector)) *ChatOptionSelect
- func (coq *ChatOptionQuery) Offset(offset int) *ChatOptionQuery
- func (coq *ChatOptionQuery) Only(ctx context.Context) (*ChatOption, error)
- func (coq *ChatOptionQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (coq *ChatOptionQuery) OnlyIDX(ctx context.Context) int64
- func (coq *ChatOptionQuery) OnlyX(ctx context.Context) *ChatOption
- func (coq *ChatOptionQuery) Order(o ...OrderFunc) *ChatOptionQuery
- func (c *ChatOptionQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (coq *ChatOptionQuery) Select(fields ...string) *ChatOptionSelect
- func (coq *ChatOptionQuery) Unique(unique bool) *ChatOptionQuery
- func (coq *ChatOptionQuery) Where(ps ...predicate.ChatOption) *ChatOptionQuery
- type ChatOptionSelect
- func (cos *ChatOptionSelect) Aggregate(fns ...AggregateFunc) *ChatOptionSelect
- func (s *ChatOptionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ChatOptionSelect) BoolX(ctx context.Context) bool
- func (s *ChatOptionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ChatOptionSelect) BoolsX(ctx context.Context) []bool
- func (c ChatOptionSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *ChatOptionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ChatOptionSelect) Float64X(ctx context.Context) float64
- func (s *ChatOptionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ChatOptionSelect) Float64sX(ctx context.Context) []float64
- func (s *ChatOptionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ChatOptionSelect) IntX(ctx context.Context) int
- func (s *ChatOptionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ChatOptionSelect) IntsX(ctx context.Context) []int
- func (cos *ChatOptionSelect) Modify(modifiers ...func(s *sql.Selector)) *ChatOptionSelect
- func (c ChatOptionSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cos *ChatOptionSelect) Scan(ctx context.Context, v any) error
- func (s *ChatOptionSelect) ScanX(ctx context.Context, v any)
- func (s *ChatOptionSelect) String(ctx context.Context) (_ string, err error)
- func (s *ChatOptionSelect) StringX(ctx context.Context) string
- func (s *ChatOptionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ChatOptionSelect) StringsX(ctx context.Context) []string
- type ChatOptionUpdate
- func (cou *ChatOptionUpdate) AddChatID(i int64) *ChatOptionUpdate
- func (cou *ChatOptionUpdate) Exec(ctx context.Context) error
- func (c *ChatOptionUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cou *ChatOptionUpdate) ExecX(ctx context.Context)
- func (cou *ChatOptionUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ChatOptionUpdate
- func (cou *ChatOptionUpdate) Mutation() *ChatOptionMutation
- func (c *ChatOptionUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cou *ChatOptionUpdate) Save(ctx context.Context) (int, error)
- func (cou *ChatOptionUpdate) SaveX(ctx context.Context) int
- func (cou *ChatOptionUpdate) SetChatID(i int64) *ChatOptionUpdate
- func (cou *ChatOptionUpdate) SetKey(s string) *ChatOptionUpdate
- func (cou *ChatOptionUpdate) SetNillableValue(s *string) *ChatOptionUpdate
- func (cou *ChatOptionUpdate) SetUpdateAt(t time.Time) *ChatOptionUpdate
- func (cou *ChatOptionUpdate) SetValue(s string) *ChatOptionUpdate
- func (cou *ChatOptionUpdate) Where(ps ...predicate.ChatOption) *ChatOptionUpdate
- type ChatOptionUpdateOne
- func (couo *ChatOptionUpdateOne) AddChatID(i int64) *ChatOptionUpdateOne
- func (couo *ChatOptionUpdateOne) Exec(ctx context.Context) error
- func (c *ChatOptionUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (couo *ChatOptionUpdateOne) ExecX(ctx context.Context)
- func (couo *ChatOptionUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ChatOptionUpdateOne
- func (couo *ChatOptionUpdateOne) Mutation() *ChatOptionMutation
- func (c *ChatOptionUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (couo *ChatOptionUpdateOne) Save(ctx context.Context) (*ChatOption, error)
- func (couo *ChatOptionUpdateOne) SaveX(ctx context.Context) *ChatOption
- func (couo *ChatOptionUpdateOne) Select(field string, fields ...string) *ChatOptionUpdateOne
- func (couo *ChatOptionUpdateOne) SetChatID(i int64) *ChatOptionUpdateOne
- func (couo *ChatOptionUpdateOne) SetKey(s string) *ChatOptionUpdateOne
- func (couo *ChatOptionUpdateOne) SetNillableValue(s *string) *ChatOptionUpdateOne
- func (couo *ChatOptionUpdateOne) SetUpdateAt(t time.Time) *ChatOptionUpdateOne
- func (couo *ChatOptionUpdateOne) SetValue(s string) *ChatOptionUpdateOne
- func (couo *ChatOptionUpdateOne) Where(ps ...predicate.ChatOption) *ChatOptionUpdateOne
- type ChatOptionUpsert
- func (u *ChatOptionUpsert) AddChatID(v int64) *ChatOptionUpsert
- func (u *ChatOptionUpsert) SetChatID(v int64) *ChatOptionUpsert
- func (u *ChatOptionUpsert) SetKey(v string) *ChatOptionUpsert
- func (u *ChatOptionUpsert) SetUpdateAt(v time.Time) *ChatOptionUpsert
- func (u *ChatOptionUpsert) SetValue(v string) *ChatOptionUpsert
- func (u *ChatOptionUpsert) UpdateChatID() *ChatOptionUpsert
- func (u *ChatOptionUpsert) UpdateKey() *ChatOptionUpsert
- func (u *ChatOptionUpsert) UpdateUpdateAt() *ChatOptionUpsert
- func (u *ChatOptionUpsert) UpdateValue() *ChatOptionUpsert
- type ChatOptionUpsertBulk
- func (u *ChatOptionUpsertBulk) AddChatID(v int64) *ChatOptionUpsertBulk
- func (u *ChatOptionUpsertBulk) DoNothing() *ChatOptionUpsertBulk
- func (u *ChatOptionUpsertBulk) Exec(ctx context.Context) error
- func (u *ChatOptionUpsertBulk) ExecX(ctx context.Context)
- func (u *ChatOptionUpsertBulk) Ignore() *ChatOptionUpsertBulk
- func (u *ChatOptionUpsertBulk) SetChatID(v int64) *ChatOptionUpsertBulk
- func (u *ChatOptionUpsertBulk) SetKey(v string) *ChatOptionUpsertBulk
- func (u *ChatOptionUpsertBulk) SetUpdateAt(v time.Time) *ChatOptionUpsertBulk
- func (u *ChatOptionUpsertBulk) SetValue(v string) *ChatOptionUpsertBulk
- func (u *ChatOptionUpsertBulk) Update(set func(*ChatOptionUpsert)) *ChatOptionUpsertBulk
- func (u *ChatOptionUpsertBulk) UpdateChatID() *ChatOptionUpsertBulk
- func (u *ChatOptionUpsertBulk) UpdateKey() *ChatOptionUpsertBulk
- func (u *ChatOptionUpsertBulk) UpdateNewValues() *ChatOptionUpsertBulk
- func (u *ChatOptionUpsertBulk) UpdateUpdateAt() *ChatOptionUpsertBulk
- func (u *ChatOptionUpsertBulk) UpdateValue() *ChatOptionUpsertBulk
- type ChatOptionUpsertOne
- func (u *ChatOptionUpsertOne) AddChatID(v int64) *ChatOptionUpsertOne
- func (u *ChatOptionUpsertOne) DoNothing() *ChatOptionUpsertOne
- func (u *ChatOptionUpsertOne) Exec(ctx context.Context) error
- func (u *ChatOptionUpsertOne) ExecX(ctx context.Context)
- func (u *ChatOptionUpsertOne) ID(ctx context.Context) (id int64, err error)
- func (u *ChatOptionUpsertOne) IDX(ctx context.Context) int64
- func (u *ChatOptionUpsertOne) Ignore() *ChatOptionUpsertOne
- func (u *ChatOptionUpsertOne) SetChatID(v int64) *ChatOptionUpsertOne
- func (u *ChatOptionUpsertOne) SetKey(v string) *ChatOptionUpsertOne
- func (u *ChatOptionUpsertOne) SetUpdateAt(v time.Time) *ChatOptionUpsertOne
- func (u *ChatOptionUpsertOne) SetValue(v string) *ChatOptionUpsertOne
- func (u *ChatOptionUpsertOne) Update(set func(*ChatOptionUpsert)) *ChatOptionUpsertOne
- func (u *ChatOptionUpsertOne) UpdateChatID() *ChatOptionUpsertOne
- func (u *ChatOptionUpsertOne) UpdateKey() *ChatOptionUpsertOne
- func (u *ChatOptionUpsertOne) UpdateNewValues() *ChatOptionUpsertOne
- func (u *ChatOptionUpsertOne) UpdateUpdateAt() *ChatOptionUpsertOne
- func (u *ChatOptionUpsertOne) UpdateValue() *ChatOptionUpsertOne
- type ChatOptions
- type ChatQuery
- func (cq *ChatQuery) Aggregate(fns ...AggregateFunc) *ChatSelect
- func (cq *ChatQuery) All(ctx context.Context) ([]*Chat, error)
- func (cq *ChatQuery) AllX(ctx context.Context) []*Chat
- func (cq *ChatQuery) Clone() *ChatQuery
- func (cq *ChatQuery) Count(ctx context.Context) (int, error)
- func (cq *ChatQuery) CountX(ctx context.Context) int
- func (c *ChatQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cq *ChatQuery) Exist(ctx context.Context) (bool, error)
- func (cq *ChatQuery) ExistX(ctx context.Context) bool
- func (cq *ChatQuery) First(ctx context.Context) (*Chat, error)
- func (cq *ChatQuery) FirstID(ctx context.Context) (id int64, err error)
- func (cq *ChatQuery) FirstIDX(ctx context.Context) int64
- func (cq *ChatQuery) FirstX(ctx context.Context) *Chat
- func (cq *ChatQuery) ForShare(opts ...sql.LockOption) *ChatQuery
- func (cq *ChatQuery) ForUpdate(opts ...sql.LockOption) *ChatQuery
- func (cq *ChatQuery) GroupBy(field string, fields ...string) *ChatGroupBy
- func (cq *ChatQuery) IDs(ctx context.Context) (ids []int64, err error)
- func (cq *ChatQuery) IDsX(ctx context.Context) []int64
- func (cq *ChatQuery) Limit(limit int) *ChatQuery
- func (cq *ChatQuery) Modify(modifiers ...func(s *sql.Selector)) *ChatSelect
- func (cq *ChatQuery) Offset(offset int) *ChatQuery
- func (cq *ChatQuery) Only(ctx context.Context) (*Chat, error)
- func (cq *ChatQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (cq *ChatQuery) OnlyIDX(ctx context.Context) int64
- func (cq *ChatQuery) OnlyX(ctx context.Context) *Chat
- func (cq *ChatQuery) Order(o ...OrderFunc) *ChatQuery
- func (c *ChatQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cq *ChatQuery) Select(fields ...string) *ChatSelect
- func (cq *ChatQuery) Unique(unique bool) *ChatQuery
- func (cq *ChatQuery) Where(ps ...predicate.Chat) *ChatQuery
- type ChatSelect
- func (cs *ChatSelect) Aggregate(fns ...AggregateFunc) *ChatSelect
- func (s *ChatSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ChatSelect) BoolX(ctx context.Context) bool
- func (s *ChatSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ChatSelect) BoolsX(ctx context.Context) []bool
- func (c ChatSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *ChatSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ChatSelect) Float64X(ctx context.Context) float64
- func (s *ChatSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ChatSelect) Float64sX(ctx context.Context) []float64
- func (s *ChatSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ChatSelect) IntX(ctx context.Context) int
- func (s *ChatSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ChatSelect) IntsX(ctx context.Context) []int
- func (cs *ChatSelect) Modify(modifiers ...func(s *sql.Selector)) *ChatSelect
- func (c ChatSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cs *ChatSelect) Scan(ctx context.Context, v any) error
- func (s *ChatSelect) ScanX(ctx context.Context, v any)
- func (s *ChatSelect) String(ctx context.Context) (_ string, err error)
- func (s *ChatSelect) StringX(ctx context.Context) string
- func (s *ChatSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ChatSelect) StringsX(ctx context.Context) []string
- type ChatUpdate
- func (cu *ChatUpdate) AddChatID(i int64) *ChatUpdate
- func (cu *ChatUpdate) Exec(ctx context.Context) error
- func (c *ChatUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cu *ChatUpdate) ExecX(ctx context.Context)
- func (cu *ChatUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ChatUpdate
- func (cu *ChatUpdate) Mutation() *ChatMutation
- func (c *ChatUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cu *ChatUpdate) Save(ctx context.Context) (int, error)
- func (cu *ChatUpdate) SaveX(ctx context.Context) int
- func (cu *ChatUpdate) SetChatID(i int64) *ChatUpdate
- func (cu *ChatUpdate) SetDescription(s string) *ChatUpdate
- func (cu *ChatUpdate) SetFirstName(s string) *ChatUpdate
- func (cu *ChatUpdate) SetIsForum(b bool) *ChatUpdate
- func (cu *ChatUpdate) SetLastName(s string) *ChatUpdate
- func (cu *ChatUpdate) SetNillableDescription(s *string) *ChatUpdate
- func (cu *ChatUpdate) SetNillableFirstName(s *string) *ChatUpdate
- func (cu *ChatUpdate) SetNillableIsForum(b *bool) *ChatUpdate
- func (cu *ChatUpdate) SetNillableLastName(s *string) *ChatUpdate
- func (cu *ChatUpdate) SetNillableTitle(s *string) *ChatUpdate
- func (cu *ChatUpdate) SetNillableType(s *string) *ChatUpdate
- func (cu *ChatUpdate) SetNillableUserName(s *string) *ChatUpdate
- func (cu *ChatUpdate) SetTitle(s string) *ChatUpdate
- func (cu *ChatUpdate) SetType(s string) *ChatUpdate
- func (cu *ChatUpdate) SetUpdateAt(t time.Time) *ChatUpdate
- func (cu *ChatUpdate) SetUserName(s string) *ChatUpdate
- func (cu *ChatUpdate) Where(ps ...predicate.Chat) *ChatUpdate
- type ChatUpdateOne
- func (cuo *ChatUpdateOne) AddChatID(i int64) *ChatUpdateOne
- func (cuo *ChatUpdateOne) Exec(ctx context.Context) error
- func (c *ChatUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cuo *ChatUpdateOne) ExecX(ctx context.Context)
- func (cuo *ChatUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ChatUpdateOne
- func (cuo *ChatUpdateOne) Mutation() *ChatMutation
- func (c *ChatUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cuo *ChatUpdateOne) Save(ctx context.Context) (*Chat, error)
- func (cuo *ChatUpdateOne) SaveX(ctx context.Context) *Chat
- func (cuo *ChatUpdateOne) Select(field string, fields ...string) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetChatID(i int64) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetDescription(s string) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetFirstName(s string) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetIsForum(b bool) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetLastName(s string) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetNillableDescription(s *string) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetNillableFirstName(s *string) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetNillableIsForum(b *bool) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetNillableLastName(s *string) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetNillableTitle(s *string) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetNillableType(s *string) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetNillableUserName(s *string) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetTitle(s string) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetType(s string) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetUpdateAt(t time.Time) *ChatUpdateOne
- func (cuo *ChatUpdateOne) SetUserName(s string) *ChatUpdateOne
- func (cuo *ChatUpdateOne) Where(ps ...predicate.Chat) *ChatUpdateOne
- type ChatUpsert
- func (u *ChatUpsert) AddChatID(v int64) *ChatUpsert
- func (u *ChatUpsert) SetChatID(v int64) *ChatUpsert
- func (u *ChatUpsert) SetDescription(v string) *ChatUpsert
- func (u *ChatUpsert) SetFirstName(v string) *ChatUpsert
- func (u *ChatUpsert) SetIsForum(v bool) *ChatUpsert
- func (u *ChatUpsert) SetLastName(v string) *ChatUpsert
- func (u *ChatUpsert) SetTitle(v string) *ChatUpsert
- func (u *ChatUpsert) SetType(v string) *ChatUpsert
- func (u *ChatUpsert) SetUpdateAt(v time.Time) *ChatUpsert
- func (u *ChatUpsert) SetUserName(v string) *ChatUpsert
- func (u *ChatUpsert) UpdateChatID() *ChatUpsert
- func (u *ChatUpsert) UpdateDescription() *ChatUpsert
- func (u *ChatUpsert) UpdateFirstName() *ChatUpsert
- func (u *ChatUpsert) UpdateIsForum() *ChatUpsert
- func (u *ChatUpsert) UpdateLastName() *ChatUpsert
- func (u *ChatUpsert) UpdateTitle() *ChatUpsert
- func (u *ChatUpsert) UpdateType() *ChatUpsert
- func (u *ChatUpsert) UpdateUpdateAt() *ChatUpsert
- func (u *ChatUpsert) UpdateUserName() *ChatUpsert
- type ChatUpsertBulk
- func (u *ChatUpsertBulk) AddChatID(v int64) *ChatUpsertBulk
- func (u *ChatUpsertBulk) DoNothing() *ChatUpsertBulk
- func (u *ChatUpsertBulk) Exec(ctx context.Context) error
- func (u *ChatUpsertBulk) ExecX(ctx context.Context)
- func (u *ChatUpsertBulk) Ignore() *ChatUpsertBulk
- func (u *ChatUpsertBulk) SetChatID(v int64) *ChatUpsertBulk
- func (u *ChatUpsertBulk) SetDescription(v string) *ChatUpsertBulk
- func (u *ChatUpsertBulk) SetFirstName(v string) *ChatUpsertBulk
- func (u *ChatUpsertBulk) SetIsForum(v bool) *ChatUpsertBulk
- func (u *ChatUpsertBulk) SetLastName(v string) *ChatUpsertBulk
- func (u *ChatUpsertBulk) SetTitle(v string) *ChatUpsertBulk
- func (u *ChatUpsertBulk) SetType(v string) *ChatUpsertBulk
- func (u *ChatUpsertBulk) SetUpdateAt(v time.Time) *ChatUpsertBulk
- func (u *ChatUpsertBulk) SetUserName(v string) *ChatUpsertBulk
- func (u *ChatUpsertBulk) Update(set func(*ChatUpsert)) *ChatUpsertBulk
- func (u *ChatUpsertBulk) UpdateChatID() *ChatUpsertBulk
- func (u *ChatUpsertBulk) UpdateDescription() *ChatUpsertBulk
- func (u *ChatUpsertBulk) UpdateFirstName() *ChatUpsertBulk
- func (u *ChatUpsertBulk) UpdateIsForum() *ChatUpsertBulk
- func (u *ChatUpsertBulk) UpdateLastName() *ChatUpsertBulk
- func (u *ChatUpsertBulk) UpdateNewValues() *ChatUpsertBulk
- func (u *ChatUpsertBulk) UpdateTitle() *ChatUpsertBulk
- func (u *ChatUpsertBulk) UpdateType() *ChatUpsertBulk
- func (u *ChatUpsertBulk) UpdateUpdateAt() *ChatUpsertBulk
- func (u *ChatUpsertBulk) UpdateUserName() *ChatUpsertBulk
- type ChatUpsertOne
- func (u *ChatUpsertOne) AddChatID(v int64) *ChatUpsertOne
- func (u *ChatUpsertOne) DoNothing() *ChatUpsertOne
- func (u *ChatUpsertOne) Exec(ctx context.Context) error
- func (u *ChatUpsertOne) ExecX(ctx context.Context)
- func (u *ChatUpsertOne) ID(ctx context.Context) (id int64, err error)
- func (u *ChatUpsertOne) IDX(ctx context.Context) int64
- func (u *ChatUpsertOne) Ignore() *ChatUpsertOne
- func (u *ChatUpsertOne) SetChatID(v int64) *ChatUpsertOne
- func (u *ChatUpsertOne) SetDescription(v string) *ChatUpsertOne
- func (u *ChatUpsertOne) SetFirstName(v string) *ChatUpsertOne
- func (u *ChatUpsertOne) SetIsForum(v bool) *ChatUpsertOne
- func (u *ChatUpsertOne) SetLastName(v string) *ChatUpsertOne
- func (u *ChatUpsertOne) SetTitle(v string) *ChatUpsertOne
- func (u *ChatUpsertOne) SetType(v string) *ChatUpsertOne
- func (u *ChatUpsertOne) SetUpdateAt(v time.Time) *ChatUpsertOne
- func (u *ChatUpsertOne) SetUserName(v string) *ChatUpsertOne
- func (u *ChatUpsertOne) Update(set func(*ChatUpsert)) *ChatUpsertOne
- func (u *ChatUpsertOne) UpdateChatID() *ChatUpsertOne
- func (u *ChatUpsertOne) UpdateDescription() *ChatUpsertOne
- func (u *ChatUpsertOne) UpdateFirstName() *ChatUpsertOne
- func (u *ChatUpsertOne) UpdateIsForum() *ChatUpsertOne
- func (u *ChatUpsertOne) UpdateLastName() *ChatUpsertOne
- func (u *ChatUpsertOne) UpdateNewValues() *ChatUpsertOne
- func (u *ChatUpsertOne) UpdateTitle() *ChatUpsertOne
- func (u *ChatUpsertOne) UpdateType() *ChatUpsertOne
- func (u *ChatUpsertOne) UpdateUpdateAt() *ChatUpsertOne
- func (u *ChatUpsertOne) UpdateUserName() *ChatUpsertOne
- type Chats
- 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) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, 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 GameAccount
- func (c *GameAccount) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *GameAccount) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ga *GameAccount) String() string
- func (ga *GameAccount) Unwrap() *GameAccount
- func (ga *GameAccount) Update() *GameAccountUpdateOne
- type GameAccountClient
- func (c *GameAccountClient) Create() *GameAccountCreate
- func (c *GameAccountClient) CreateBulk(builders ...*GameAccountCreate) *GameAccountCreateBulk
- func (c *GameAccountClient) Delete() *GameAccountDelete
- func (c *GameAccountClient) DeleteOne(ga *GameAccount) *GameAccountDeleteOne
- func (c *GameAccountClient) DeleteOneID(id int64) *GameAccountDeleteOne
- func (c *GameAccountClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *GameAccountClient) Get(ctx context.Context, id int64) (*GameAccount, error)
- func (c *GameAccountClient) GetX(ctx context.Context, id int64) *GameAccount
- func (c *GameAccountClient) Hooks() []Hook
- func (c *GameAccountClient) Intercept(interceptors ...Interceptor)
- func (c *GameAccountClient) Interceptors() []Interceptor
- func (c *GameAccountClient) Query() *GameAccountQuery
- func (c *GameAccountClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *GameAccountClient) Update() *GameAccountUpdate
- func (c *GameAccountClient) UpdateOne(ga *GameAccount) *GameAccountUpdateOne
- func (c *GameAccountClient) UpdateOneID(id int64) *GameAccountUpdateOne
- func (c *GameAccountClient) Use(hooks ...Hook)
- type GameAccountCreate
- func (gac *GameAccountCreate) Exec(ctx context.Context) error
- func (c *GameAccountCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (gac *GameAccountCreate) ExecX(ctx context.Context)
- func (gac *GameAccountCreate) Mutation() *GameAccountMutation
- func (gac *GameAccountCreate) OnConflict(opts ...sql.ConflictOption) *GameAccountUpsertOne
- func (gac *GameAccountCreate) OnConflictColumns(columns ...string) *GameAccountUpsertOne
- func (c *GameAccountCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (gac *GameAccountCreate) Save(ctx context.Context) (*GameAccount, error)
- func (gac *GameAccountCreate) SaveX(ctx context.Context) *GameAccount
- func (gac *GameAccountCreate) SetAccountID(s string) *GameAccountCreate
- func (gac *GameAccountCreate) SetCookieToken(s string) *GameAccountCreate
- func (gac *GameAccountCreate) SetCreateAt(t time.Time) *GameAccountCreate
- func (gac *GameAccountCreate) SetGameToken(s string) *GameAccountCreate
- func (gac *GameAccountCreate) SetID(i int64) *GameAccountCreate
- func (gac *GameAccountCreate) SetMid(s string) *GameAccountCreate
- func (gac *GameAccountCreate) SetNillableCookieToken(s *string) *GameAccountCreate
- func (gac *GameAccountCreate) SetNillableCreateAt(t *time.Time) *GameAccountCreate
- func (gac *GameAccountCreate) SetNillableGameToken(s *string) *GameAccountCreate
- func (gac *GameAccountCreate) SetNillableMid(s *string) *GameAccountCreate
- func (gac *GameAccountCreate) SetNillableStoken(s *string) *GameAccountCreate
- func (gac *GameAccountCreate) SetNillableUpdateAt(t *time.Time) *GameAccountCreate
- func (gac *GameAccountCreate) SetStoken(s string) *GameAccountCreate
- func (gac *GameAccountCreate) SetUpdateAt(t time.Time) *GameAccountCreate
- func (gac *GameAccountCreate) SetUserID(i int64) *GameAccountCreate
- type GameAccountCreateBulk
- func (gacb *GameAccountCreateBulk) Exec(ctx context.Context) error
- func (c *GameAccountCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (gacb *GameAccountCreateBulk) ExecX(ctx context.Context)
- func (gacb *GameAccountCreateBulk) OnConflict(opts ...sql.ConflictOption) *GameAccountUpsertBulk
- func (gacb *GameAccountCreateBulk) OnConflictColumns(columns ...string) *GameAccountUpsertBulk
- func (c *GameAccountCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (gacb *GameAccountCreateBulk) Save(ctx context.Context) ([]*GameAccount, error)
- func (gacb *GameAccountCreateBulk) SaveX(ctx context.Context) []*GameAccount
- type GameAccountDelete
- func (gad *GameAccountDelete) Exec(ctx context.Context) (int, error)
- func (c *GameAccountDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (gad *GameAccountDelete) ExecX(ctx context.Context) int
- func (c *GameAccountDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (gad *GameAccountDelete) Where(ps ...predicate.GameAccount) *GameAccountDelete
- type GameAccountDeleteOne
- type GameAccountGroupBy
- func (gagb *GameAccountGroupBy) Aggregate(fns ...AggregateFunc) *GameAccountGroupBy
- func (s *GameAccountGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GameAccountGroupBy) BoolX(ctx context.Context) bool
- func (s *GameAccountGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GameAccountGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GameAccountGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GameAccountGroupBy) Float64X(ctx context.Context) float64
- func (s *GameAccountGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GameAccountGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GameAccountGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GameAccountGroupBy) IntX(ctx context.Context) int
- func (s *GameAccountGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GameAccountGroupBy) IntsX(ctx context.Context) []int
- func (gagb *GameAccountGroupBy) Scan(ctx context.Context, v any) error
- func (s *GameAccountGroupBy) ScanX(ctx context.Context, v any)
- func (s *GameAccountGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GameAccountGroupBy) StringX(ctx context.Context) string
- func (s *GameAccountGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GameAccountGroupBy) StringsX(ctx context.Context) []string
- type GameAccountMutation
- func (m *GameAccountMutation) AccountID() (r string, exists bool)
- func (m *GameAccountMutation) AddField(name string, value ent.Value) error
- func (m *GameAccountMutation) AddUserID(i int64)
- func (m *GameAccountMutation) AddedEdges() []string
- func (m *GameAccountMutation) AddedField(name string) (ent.Value, bool)
- func (m *GameAccountMutation) AddedFields() []string
- func (m *GameAccountMutation) AddedIDs(name string) []ent.Value
- func (m *GameAccountMutation) AddedUserID() (r int64, exists bool)
- func (m *GameAccountMutation) ClearEdge(name string) error
- func (m *GameAccountMutation) ClearField(name string) error
- func (m *GameAccountMutation) ClearedEdges() []string
- func (m *GameAccountMutation) ClearedFields() []string
- func (m GameAccountMutation) Client() *Client
- func (m *GameAccountMutation) CookieToken() (r string, exists bool)
- func (m *GameAccountMutation) CreateAt() (r time.Time, exists bool)
- func (m *GameAccountMutation) EdgeCleared(name string) bool
- func (c *GameAccountMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *GameAccountMutation) Field(name string) (ent.Value, bool)
- func (m *GameAccountMutation) FieldCleared(name string) bool
- func (m *GameAccountMutation) Fields() []string
- func (m *GameAccountMutation) GameToken() (r string, exists bool)
- func (m *GameAccountMutation) ID() (id int64, exists bool)
- func (m *GameAccountMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *GameAccountMutation) Mid() (r string, exists bool)
- func (m *GameAccountMutation) OldAccountID(ctx context.Context) (v string, err error)
- func (m *GameAccountMutation) OldCookieToken(ctx context.Context) (v string, err error)
- func (m *GameAccountMutation) OldCreateAt(ctx context.Context) (v time.Time, err error)
- func (m *GameAccountMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GameAccountMutation) OldGameToken(ctx context.Context) (v string, err error)
- func (m *GameAccountMutation) OldMid(ctx context.Context) (v string, err error)
- func (m *GameAccountMutation) OldStoken(ctx context.Context) (v string, err error)
- func (m *GameAccountMutation) OldUpdateAt(ctx context.Context) (v time.Time, err error)
- func (m *GameAccountMutation) OldUserID(ctx context.Context) (v int64, err error)
- func (m *GameAccountMutation) Op() Op
- func (c *GameAccountMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *GameAccountMutation) RemovedEdges() []string
- func (m *GameAccountMutation) RemovedIDs(name string) []ent.Value
- func (m *GameAccountMutation) ResetAccountID()
- func (m *GameAccountMutation) ResetCookieToken()
- func (m *GameAccountMutation) ResetCreateAt()
- func (m *GameAccountMutation) ResetEdge(name string) error
- func (m *GameAccountMutation) ResetField(name string) error
- func (m *GameAccountMutation) ResetGameToken()
- func (m *GameAccountMutation) ResetMid()
- func (m *GameAccountMutation) ResetStoken()
- func (m *GameAccountMutation) ResetUpdateAt()
- func (m *GameAccountMutation) ResetUserID()
- func (m *GameAccountMutation) SetAccountID(s string)
- func (m *GameAccountMutation) SetCookieToken(s string)
- func (m *GameAccountMutation) SetCreateAt(t time.Time)
- func (m *GameAccountMutation) SetField(name string, value ent.Value) error
- func (m *GameAccountMutation) SetGameToken(s string)
- func (m *GameAccountMutation) SetID(id int64)
- func (m *GameAccountMutation) SetMid(s string)
- func (m *GameAccountMutation) SetOp(op Op)
- func (m *GameAccountMutation) SetStoken(s string)
- func (m *GameAccountMutation) SetUpdateAt(t time.Time)
- func (m *GameAccountMutation) SetUserID(i int64)
- func (m *GameAccountMutation) Stoken() (r string, exists bool)
- func (m GameAccountMutation) Tx() (*Tx, error)
- func (m *GameAccountMutation) Type() string
- func (m *GameAccountMutation) UpdateAt() (r time.Time, exists bool)
- func (m *GameAccountMutation) UserID() (r int64, exists bool)
- func (m *GameAccountMutation) Where(ps ...predicate.GameAccount)
- func (m *GameAccountMutation) WhereP(ps ...func(*sql.Selector))
- type GameAccountQuery
- func (gaq *GameAccountQuery) Aggregate(fns ...AggregateFunc) *GameAccountSelect
- func (gaq *GameAccountQuery) All(ctx context.Context) ([]*GameAccount, error)
- func (gaq *GameAccountQuery) AllX(ctx context.Context) []*GameAccount
- func (gaq *GameAccountQuery) Clone() *GameAccountQuery
- func (gaq *GameAccountQuery) Count(ctx context.Context) (int, error)
- func (gaq *GameAccountQuery) CountX(ctx context.Context) int
- func (c *GameAccountQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (gaq *GameAccountQuery) Exist(ctx context.Context) (bool, error)
- func (gaq *GameAccountQuery) ExistX(ctx context.Context) bool
- func (gaq *GameAccountQuery) First(ctx context.Context) (*GameAccount, error)
- func (gaq *GameAccountQuery) FirstID(ctx context.Context) (id int64, err error)
- func (gaq *GameAccountQuery) FirstIDX(ctx context.Context) int64
- func (gaq *GameAccountQuery) FirstX(ctx context.Context) *GameAccount
- func (gaq *GameAccountQuery) ForShare(opts ...sql.LockOption) *GameAccountQuery
- func (gaq *GameAccountQuery) ForUpdate(opts ...sql.LockOption) *GameAccountQuery
- func (gaq *GameAccountQuery) GroupBy(field string, fields ...string) *GameAccountGroupBy
- func (gaq *GameAccountQuery) IDs(ctx context.Context) (ids []int64, err error)
- func (gaq *GameAccountQuery) IDsX(ctx context.Context) []int64
- func (gaq *GameAccountQuery) Limit(limit int) *GameAccountQuery
- func (gaq *GameAccountQuery) Modify(modifiers ...func(s *sql.Selector)) *GameAccountSelect
- func (gaq *GameAccountQuery) Offset(offset int) *GameAccountQuery
- func (gaq *GameAccountQuery) Only(ctx context.Context) (*GameAccount, error)
- func (gaq *GameAccountQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (gaq *GameAccountQuery) OnlyIDX(ctx context.Context) int64
- func (gaq *GameAccountQuery) OnlyX(ctx context.Context) *GameAccount
- func (gaq *GameAccountQuery) Order(o ...OrderFunc) *GameAccountQuery
- func (c *GameAccountQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (gaq *GameAccountQuery) Select(fields ...string) *GameAccountSelect
- func (gaq *GameAccountQuery) Unique(unique bool) *GameAccountQuery
- func (gaq *GameAccountQuery) Where(ps ...predicate.GameAccount) *GameAccountQuery
- type GameAccountSelect
- func (gas *GameAccountSelect) Aggregate(fns ...AggregateFunc) *GameAccountSelect
- func (s *GameAccountSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GameAccountSelect) BoolX(ctx context.Context) bool
- func (s *GameAccountSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GameAccountSelect) BoolsX(ctx context.Context) []bool
- func (c GameAccountSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *GameAccountSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GameAccountSelect) Float64X(ctx context.Context) float64
- func (s *GameAccountSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GameAccountSelect) Float64sX(ctx context.Context) []float64
- func (s *GameAccountSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GameAccountSelect) IntX(ctx context.Context) int
- func (s *GameAccountSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GameAccountSelect) IntsX(ctx context.Context) []int
- func (gas *GameAccountSelect) Modify(modifiers ...func(s *sql.Selector)) *GameAccountSelect
- func (c GameAccountSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (gas *GameAccountSelect) Scan(ctx context.Context, v any) error
- func (s *GameAccountSelect) ScanX(ctx context.Context, v any)
- func (s *GameAccountSelect) String(ctx context.Context) (_ string, err error)
- func (s *GameAccountSelect) StringX(ctx context.Context) string
- func (s *GameAccountSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GameAccountSelect) StringsX(ctx context.Context) []string
- type GameAccountUpdate
- func (gau *GameAccountUpdate) AddUserID(i int64) *GameAccountUpdate
- func (gau *GameAccountUpdate) Exec(ctx context.Context) error
- func (c *GameAccountUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (gau *GameAccountUpdate) ExecX(ctx context.Context)
- func (gau *GameAccountUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GameAccountUpdate
- func (gau *GameAccountUpdate) Mutation() *GameAccountMutation
- func (c *GameAccountUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (gau *GameAccountUpdate) Save(ctx context.Context) (int, error)
- func (gau *GameAccountUpdate) SaveX(ctx context.Context) int
- func (gau *GameAccountUpdate) SetAccountID(s string) *GameAccountUpdate
- func (gau *GameAccountUpdate) SetCookieToken(s string) *GameAccountUpdate
- func (gau *GameAccountUpdate) SetGameToken(s string) *GameAccountUpdate
- func (gau *GameAccountUpdate) SetMid(s string) *GameAccountUpdate
- func (gau *GameAccountUpdate) SetNillableCookieToken(s *string) *GameAccountUpdate
- func (gau *GameAccountUpdate) SetNillableGameToken(s *string) *GameAccountUpdate
- func (gau *GameAccountUpdate) SetNillableMid(s *string) *GameAccountUpdate
- func (gau *GameAccountUpdate) SetNillableStoken(s *string) *GameAccountUpdate
- func (gau *GameAccountUpdate) SetStoken(s string) *GameAccountUpdate
- func (gau *GameAccountUpdate) SetUpdateAt(t time.Time) *GameAccountUpdate
- func (gau *GameAccountUpdate) SetUserID(i int64) *GameAccountUpdate
- func (gau *GameAccountUpdate) Where(ps ...predicate.GameAccount) *GameAccountUpdate
- type GameAccountUpdateOne
- func (gauo *GameAccountUpdateOne) AddUserID(i int64) *GameAccountUpdateOne
- func (gauo *GameAccountUpdateOne) Exec(ctx context.Context) error
- func (c *GameAccountUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (gauo *GameAccountUpdateOne) ExecX(ctx context.Context)
- func (gauo *GameAccountUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GameAccountUpdateOne
- func (gauo *GameAccountUpdateOne) Mutation() *GameAccountMutation
- func (c *GameAccountUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (gauo *GameAccountUpdateOne) Save(ctx context.Context) (*GameAccount, error)
- func (gauo *GameAccountUpdateOne) SaveX(ctx context.Context) *GameAccount
- func (gauo *GameAccountUpdateOne) Select(field string, fields ...string) *GameAccountUpdateOne
- func (gauo *GameAccountUpdateOne) SetAccountID(s string) *GameAccountUpdateOne
- func (gauo *GameAccountUpdateOne) SetCookieToken(s string) *GameAccountUpdateOne
- func (gauo *GameAccountUpdateOne) SetGameToken(s string) *GameAccountUpdateOne
- func (gauo *GameAccountUpdateOne) SetMid(s string) *GameAccountUpdateOne
- func (gauo *GameAccountUpdateOne) SetNillableCookieToken(s *string) *GameAccountUpdateOne
- func (gauo *GameAccountUpdateOne) SetNillableGameToken(s *string) *GameAccountUpdateOne
- func (gauo *GameAccountUpdateOne) SetNillableMid(s *string) *GameAccountUpdateOne
- func (gauo *GameAccountUpdateOne) SetNillableStoken(s *string) *GameAccountUpdateOne
- func (gauo *GameAccountUpdateOne) SetStoken(s string) *GameAccountUpdateOne
- func (gauo *GameAccountUpdateOne) SetUpdateAt(t time.Time) *GameAccountUpdateOne
- func (gauo *GameAccountUpdateOne) SetUserID(i int64) *GameAccountUpdateOne
- func (gauo *GameAccountUpdateOne) Where(ps ...predicate.GameAccount) *GameAccountUpdateOne
- type GameAccountUpsert
- func (u *GameAccountUpsert) AddUserID(v int64) *GameAccountUpsert
- func (u *GameAccountUpsert) SetAccountID(v string) *GameAccountUpsert
- func (u *GameAccountUpsert) SetCookieToken(v string) *GameAccountUpsert
- func (u *GameAccountUpsert) SetGameToken(v string) *GameAccountUpsert
- func (u *GameAccountUpsert) SetMid(v string) *GameAccountUpsert
- func (u *GameAccountUpsert) SetStoken(v string) *GameAccountUpsert
- func (u *GameAccountUpsert) SetUpdateAt(v time.Time) *GameAccountUpsert
- func (u *GameAccountUpsert) SetUserID(v int64) *GameAccountUpsert
- func (u *GameAccountUpsert) UpdateAccountID() *GameAccountUpsert
- func (u *GameAccountUpsert) UpdateCookieToken() *GameAccountUpsert
- func (u *GameAccountUpsert) UpdateGameToken() *GameAccountUpsert
- func (u *GameAccountUpsert) UpdateMid() *GameAccountUpsert
- func (u *GameAccountUpsert) UpdateStoken() *GameAccountUpsert
- func (u *GameAccountUpsert) UpdateUpdateAt() *GameAccountUpsert
- func (u *GameAccountUpsert) UpdateUserID() *GameAccountUpsert
- type GameAccountUpsertBulk
- func (u *GameAccountUpsertBulk) AddUserID(v int64) *GameAccountUpsertBulk
- func (u *GameAccountUpsertBulk) DoNothing() *GameAccountUpsertBulk
- func (u *GameAccountUpsertBulk) Exec(ctx context.Context) error
- func (u *GameAccountUpsertBulk) ExecX(ctx context.Context)
- func (u *GameAccountUpsertBulk) Ignore() *GameAccountUpsertBulk
- func (u *GameAccountUpsertBulk) SetAccountID(v string) *GameAccountUpsertBulk
- func (u *GameAccountUpsertBulk) SetCookieToken(v string) *GameAccountUpsertBulk
- func (u *GameAccountUpsertBulk) SetGameToken(v string) *GameAccountUpsertBulk
- func (u *GameAccountUpsertBulk) SetMid(v string) *GameAccountUpsertBulk
- func (u *GameAccountUpsertBulk) SetStoken(v string) *GameAccountUpsertBulk
- func (u *GameAccountUpsertBulk) SetUpdateAt(v time.Time) *GameAccountUpsertBulk
- func (u *GameAccountUpsertBulk) SetUserID(v int64) *GameAccountUpsertBulk
- func (u *GameAccountUpsertBulk) Update(set func(*GameAccountUpsert)) *GameAccountUpsertBulk
- func (u *GameAccountUpsertBulk) UpdateAccountID() *GameAccountUpsertBulk
- func (u *GameAccountUpsertBulk) UpdateCookieToken() *GameAccountUpsertBulk
- func (u *GameAccountUpsertBulk) UpdateGameToken() *GameAccountUpsertBulk
- func (u *GameAccountUpsertBulk) UpdateMid() *GameAccountUpsertBulk
- func (u *GameAccountUpsertBulk) UpdateNewValues() *GameAccountUpsertBulk
- func (u *GameAccountUpsertBulk) UpdateStoken() *GameAccountUpsertBulk
- func (u *GameAccountUpsertBulk) UpdateUpdateAt() *GameAccountUpsertBulk
- func (u *GameAccountUpsertBulk) UpdateUserID() *GameAccountUpsertBulk
- type GameAccountUpsertOne
- func (u *GameAccountUpsertOne) AddUserID(v int64) *GameAccountUpsertOne
- func (u *GameAccountUpsertOne) DoNothing() *GameAccountUpsertOne
- func (u *GameAccountUpsertOne) Exec(ctx context.Context) error
- func (u *GameAccountUpsertOne) ExecX(ctx context.Context)
- func (u *GameAccountUpsertOne) ID(ctx context.Context) (id int64, err error)
- func (u *GameAccountUpsertOne) IDX(ctx context.Context) int64
- func (u *GameAccountUpsertOne) Ignore() *GameAccountUpsertOne
- func (u *GameAccountUpsertOne) SetAccountID(v string) *GameAccountUpsertOne
- func (u *GameAccountUpsertOne) SetCookieToken(v string) *GameAccountUpsertOne
- func (u *GameAccountUpsertOne) SetGameToken(v string) *GameAccountUpsertOne
- func (u *GameAccountUpsertOne) SetMid(v string) *GameAccountUpsertOne
- func (u *GameAccountUpsertOne) SetStoken(v string) *GameAccountUpsertOne
- func (u *GameAccountUpsertOne) SetUpdateAt(v time.Time) *GameAccountUpsertOne
- func (u *GameAccountUpsertOne) SetUserID(v int64) *GameAccountUpsertOne
- func (u *GameAccountUpsertOne) Update(set func(*GameAccountUpsert)) *GameAccountUpsertOne
- func (u *GameAccountUpsertOne) UpdateAccountID() *GameAccountUpsertOne
- func (u *GameAccountUpsertOne) UpdateCookieToken() *GameAccountUpsertOne
- func (u *GameAccountUpsertOne) UpdateGameToken() *GameAccountUpsertOne
- func (u *GameAccountUpsertOne) UpdateMid() *GameAccountUpsertOne
- func (u *GameAccountUpsertOne) UpdateNewValues() *GameAccountUpsertOne
- func (u *GameAccountUpsertOne) UpdateStoken() *GameAccountUpsertOne
- func (u *GameAccountUpsertOne) UpdateUpdateAt() *GameAccountUpsertOne
- func (u *GameAccountUpsertOne) UpdateUserID() *GameAccountUpsertOne
- type GameAccounts
- type GameRole
- func (c *GameRole) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *GameRole) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (gr *GameRole) String() string
- func (gr *GameRole) Unwrap() *GameRole
- func (gr *GameRole) Update() *GameRoleUpdateOne
- type GameRoleAttribute
- func (c *GameRoleAttribute) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *GameRoleAttribute) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (gra *GameRoleAttribute) String() string
- func (gra *GameRoleAttribute) Unwrap() *GameRoleAttribute
- func (gra *GameRoleAttribute) Update() *GameRoleAttributeUpdateOne
- type GameRoleAttributeClient
- func (c *GameRoleAttributeClient) Create() *GameRoleAttributeCreate
- func (c *GameRoleAttributeClient) CreateBulk(builders ...*GameRoleAttributeCreate) *GameRoleAttributeCreateBulk
- func (c *GameRoleAttributeClient) Delete() *GameRoleAttributeDelete
- func (c *GameRoleAttributeClient) DeleteOne(gra *GameRoleAttribute) *GameRoleAttributeDeleteOne
- func (c *GameRoleAttributeClient) DeleteOneID(id int64) *GameRoleAttributeDeleteOne
- func (c *GameRoleAttributeClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *GameRoleAttributeClient) Get(ctx context.Context, id int64) (*GameRoleAttribute, error)
- func (c *GameRoleAttributeClient) GetX(ctx context.Context, id int64) *GameRoleAttribute
- func (c *GameRoleAttributeClient) Hooks() []Hook
- func (c *GameRoleAttributeClient) Intercept(interceptors ...Interceptor)
- func (c *GameRoleAttributeClient) Interceptors() []Interceptor
- func (c *GameRoleAttributeClient) Query() *GameRoleAttributeQuery
- func (c *GameRoleAttributeClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *GameRoleAttributeClient) Update() *GameRoleAttributeUpdate
- func (c *GameRoleAttributeClient) UpdateOne(gra *GameRoleAttribute) *GameRoleAttributeUpdateOne
- func (c *GameRoleAttributeClient) UpdateOneID(id int64) *GameRoleAttributeUpdateOne
- func (c *GameRoleAttributeClient) Use(hooks ...Hook)
- type GameRoleAttributeCreate
- func (grac *GameRoleAttributeCreate) Exec(ctx context.Context) error
- func (c *GameRoleAttributeCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (grac *GameRoleAttributeCreate) ExecX(ctx context.Context)
- func (grac *GameRoleAttributeCreate) Mutation() *GameRoleAttributeMutation
- func (grac *GameRoleAttributeCreate) OnConflict(opts ...sql.ConflictOption) *GameRoleAttributeUpsertOne
- func (grac *GameRoleAttributeCreate) OnConflictColumns(columns ...string) *GameRoleAttributeUpsertOne
- func (c *GameRoleAttributeCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (grac *GameRoleAttributeCreate) Save(ctx context.Context) (*GameRoleAttribute, error)
- func (grac *GameRoleAttributeCreate) SaveX(ctx context.Context) *GameRoleAttribute
- func (grac *GameRoleAttributeCreate) SetAccountID(s string) *GameRoleAttributeCreate
- func (grac *GameRoleAttributeCreate) SetCreateAt(t time.Time) *GameRoleAttributeCreate
- func (grac *GameRoleAttributeCreate) SetID(i int64) *GameRoleAttributeCreate
- func (grac *GameRoleAttributeCreate) SetName(s string) *GameRoleAttributeCreate
- func (grac *GameRoleAttributeCreate) SetNillableCreateAt(t *time.Time) *GameRoleAttributeCreate
- func (grac *GameRoleAttributeCreate) SetNillableType(i *int) *GameRoleAttributeCreate
- func (grac *GameRoleAttributeCreate) SetNillableUpdateAt(t *time.Time) *GameRoleAttributeCreate
- func (grac *GameRoleAttributeCreate) SetNillableValue(s *string) *GameRoleAttributeCreate
- func (grac *GameRoleAttributeCreate) SetRoleID(s string) *GameRoleAttributeCreate
- func (grac *GameRoleAttributeCreate) SetType(i int) *GameRoleAttributeCreate
- func (grac *GameRoleAttributeCreate) SetUpdateAt(t time.Time) *GameRoleAttributeCreate
- func (grac *GameRoleAttributeCreate) SetUserID(i int64) *GameRoleAttributeCreate
- func (grac *GameRoleAttributeCreate) SetValue(s string) *GameRoleAttributeCreate
- type GameRoleAttributeCreateBulk
- func (gracb *GameRoleAttributeCreateBulk) Exec(ctx context.Context) error
- func (c *GameRoleAttributeCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (gracb *GameRoleAttributeCreateBulk) ExecX(ctx context.Context)
- func (gracb *GameRoleAttributeCreateBulk) OnConflict(opts ...sql.ConflictOption) *GameRoleAttributeUpsertBulk
- func (gracb *GameRoleAttributeCreateBulk) OnConflictColumns(columns ...string) *GameRoleAttributeUpsertBulk
- func (c *GameRoleAttributeCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (gracb *GameRoleAttributeCreateBulk) Save(ctx context.Context) ([]*GameRoleAttribute, error)
- func (gracb *GameRoleAttributeCreateBulk) SaveX(ctx context.Context) []*GameRoleAttribute
- type GameRoleAttributeDelete
- func (grad *GameRoleAttributeDelete) Exec(ctx context.Context) (int, error)
- func (c *GameRoleAttributeDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (grad *GameRoleAttributeDelete) ExecX(ctx context.Context) int
- func (c *GameRoleAttributeDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (grad *GameRoleAttributeDelete) Where(ps ...predicate.GameRoleAttribute) *GameRoleAttributeDelete
- type GameRoleAttributeDeleteOne
- type GameRoleAttributeGroupBy
- func (gragb *GameRoleAttributeGroupBy) Aggregate(fns ...AggregateFunc) *GameRoleAttributeGroupBy
- func (s *GameRoleAttributeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GameRoleAttributeGroupBy) BoolX(ctx context.Context) bool
- func (s *GameRoleAttributeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GameRoleAttributeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GameRoleAttributeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GameRoleAttributeGroupBy) Float64X(ctx context.Context) float64
- func (s *GameRoleAttributeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GameRoleAttributeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GameRoleAttributeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GameRoleAttributeGroupBy) IntX(ctx context.Context) int
- func (s *GameRoleAttributeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GameRoleAttributeGroupBy) IntsX(ctx context.Context) []int
- func (gragb *GameRoleAttributeGroupBy) Scan(ctx context.Context, v any) error
- func (s *GameRoleAttributeGroupBy) ScanX(ctx context.Context, v any)
- func (s *GameRoleAttributeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GameRoleAttributeGroupBy) StringX(ctx context.Context) string
- func (s *GameRoleAttributeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GameRoleAttributeGroupBy) StringsX(ctx context.Context) []string
- type GameRoleAttributeMutation
- func (m *GameRoleAttributeMutation) AccountID() (r string, exists bool)
- func (m *GameRoleAttributeMutation) AddField(name string, value ent.Value) error
- func (m *GameRoleAttributeMutation) AddType(i int)
- func (m *GameRoleAttributeMutation) AddUserID(i int64)
- func (m *GameRoleAttributeMutation) AddedEdges() []string
- func (m *GameRoleAttributeMutation) AddedField(name string) (ent.Value, bool)
- func (m *GameRoleAttributeMutation) AddedFields() []string
- func (m *GameRoleAttributeMutation) AddedIDs(name string) []ent.Value
- func (m *GameRoleAttributeMutation) AddedType() (r int, exists bool)
- func (m *GameRoleAttributeMutation) AddedUserID() (r int64, exists bool)
- func (m *GameRoleAttributeMutation) ClearEdge(name string) error
- func (m *GameRoleAttributeMutation) ClearField(name string) error
- func (m *GameRoleAttributeMutation) ClearedEdges() []string
- func (m *GameRoleAttributeMutation) ClearedFields() []string
- func (m GameRoleAttributeMutation) Client() *Client
- func (m *GameRoleAttributeMutation) CreateAt() (r time.Time, exists bool)
- func (m *GameRoleAttributeMutation) EdgeCleared(name string) bool
- func (c *GameRoleAttributeMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *GameRoleAttributeMutation) Field(name string) (ent.Value, bool)
- func (m *GameRoleAttributeMutation) FieldCleared(name string) bool
- func (m *GameRoleAttributeMutation) Fields() []string
- func (m *GameRoleAttributeMutation) GetType() (r int, exists bool)
- func (m *GameRoleAttributeMutation) ID() (id int64, exists bool)
- func (m *GameRoleAttributeMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *GameRoleAttributeMutation) Name() (r string, exists bool)
- func (m *GameRoleAttributeMutation) OldAccountID(ctx context.Context) (v string, err error)
- func (m *GameRoleAttributeMutation) OldCreateAt(ctx context.Context) (v time.Time, err error)
- func (m *GameRoleAttributeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GameRoleAttributeMutation) OldName(ctx context.Context) (v string, err error)
- func (m *GameRoleAttributeMutation) OldRoleID(ctx context.Context) (v string, err error)
- func (m *GameRoleAttributeMutation) OldType(ctx context.Context) (v int, err error)
- func (m *GameRoleAttributeMutation) OldUpdateAt(ctx context.Context) (v time.Time, err error)
- func (m *GameRoleAttributeMutation) OldUserID(ctx context.Context) (v int64, err error)
- func (m *GameRoleAttributeMutation) OldValue(ctx context.Context) (v string, err error)
- func (m *GameRoleAttributeMutation) Op() Op
- func (c *GameRoleAttributeMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *GameRoleAttributeMutation) RemovedEdges() []string
- func (m *GameRoleAttributeMutation) RemovedIDs(name string) []ent.Value
- func (m *GameRoleAttributeMutation) ResetAccountID()
- func (m *GameRoleAttributeMutation) ResetCreateAt()
- func (m *GameRoleAttributeMutation) ResetEdge(name string) error
- func (m *GameRoleAttributeMutation) ResetField(name string) error
- func (m *GameRoleAttributeMutation) ResetName()
- func (m *GameRoleAttributeMutation) ResetRoleID()
- func (m *GameRoleAttributeMutation) ResetType()
- func (m *GameRoleAttributeMutation) ResetUpdateAt()
- func (m *GameRoleAttributeMutation) ResetUserID()
- func (m *GameRoleAttributeMutation) ResetValue()
- func (m *GameRoleAttributeMutation) RoleID() (r string, exists bool)
- func (m *GameRoleAttributeMutation) SetAccountID(s string)
- func (m *GameRoleAttributeMutation) SetCreateAt(t time.Time)
- func (m *GameRoleAttributeMutation) SetField(name string, value ent.Value) error
- func (m *GameRoleAttributeMutation) SetID(id int64)
- func (m *GameRoleAttributeMutation) SetName(s string)
- func (m *GameRoleAttributeMutation) SetOp(op Op)
- func (m *GameRoleAttributeMutation) SetRoleID(s string)
- func (m *GameRoleAttributeMutation) SetType(i int)
- func (m *GameRoleAttributeMutation) SetUpdateAt(t time.Time)
- func (m *GameRoleAttributeMutation) SetUserID(i int64)
- func (m *GameRoleAttributeMutation) SetValue(s string)
- func (m GameRoleAttributeMutation) Tx() (*Tx, error)
- func (m *GameRoleAttributeMutation) Type() string
- func (m *GameRoleAttributeMutation) UpdateAt() (r time.Time, exists bool)
- func (m *GameRoleAttributeMutation) UserID() (r int64, exists bool)
- func (m *GameRoleAttributeMutation) Value() (r string, exists bool)
- func (m *GameRoleAttributeMutation) Where(ps ...predicate.GameRoleAttribute)
- func (m *GameRoleAttributeMutation) WhereP(ps ...func(*sql.Selector))
- type GameRoleAttributeQuery
- func (graq *GameRoleAttributeQuery) Aggregate(fns ...AggregateFunc) *GameRoleAttributeSelect
- func (graq *GameRoleAttributeQuery) All(ctx context.Context) ([]*GameRoleAttribute, error)
- func (graq *GameRoleAttributeQuery) AllX(ctx context.Context) []*GameRoleAttribute
- func (graq *GameRoleAttributeQuery) Clone() *GameRoleAttributeQuery
- func (graq *GameRoleAttributeQuery) Count(ctx context.Context) (int, error)
- func (graq *GameRoleAttributeQuery) CountX(ctx context.Context) int
- func (c *GameRoleAttributeQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (graq *GameRoleAttributeQuery) Exist(ctx context.Context) (bool, error)
- func (graq *GameRoleAttributeQuery) ExistX(ctx context.Context) bool
- func (graq *GameRoleAttributeQuery) First(ctx context.Context) (*GameRoleAttribute, error)
- func (graq *GameRoleAttributeQuery) FirstID(ctx context.Context) (id int64, err error)
- func (graq *GameRoleAttributeQuery) FirstIDX(ctx context.Context) int64
- func (graq *GameRoleAttributeQuery) FirstX(ctx context.Context) *GameRoleAttribute
- func (graq *GameRoleAttributeQuery) ForShare(opts ...sql.LockOption) *GameRoleAttributeQuery
- func (graq *GameRoleAttributeQuery) ForUpdate(opts ...sql.LockOption) *GameRoleAttributeQuery
- func (graq *GameRoleAttributeQuery) GroupBy(field string, fields ...string) *GameRoleAttributeGroupBy
- func (graq *GameRoleAttributeQuery) IDs(ctx context.Context) (ids []int64, err error)
- func (graq *GameRoleAttributeQuery) IDsX(ctx context.Context) []int64
- func (graq *GameRoleAttributeQuery) Limit(limit int) *GameRoleAttributeQuery
- func (graq *GameRoleAttributeQuery) Modify(modifiers ...func(s *sql.Selector)) *GameRoleAttributeSelect
- func (graq *GameRoleAttributeQuery) Offset(offset int) *GameRoleAttributeQuery
- func (graq *GameRoleAttributeQuery) Only(ctx context.Context) (*GameRoleAttribute, error)
- func (graq *GameRoleAttributeQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (graq *GameRoleAttributeQuery) OnlyIDX(ctx context.Context) int64
- func (graq *GameRoleAttributeQuery) OnlyX(ctx context.Context) *GameRoleAttribute
- func (graq *GameRoleAttributeQuery) Order(o ...OrderFunc) *GameRoleAttributeQuery
- func (c *GameRoleAttributeQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (graq *GameRoleAttributeQuery) Select(fields ...string) *GameRoleAttributeSelect
- func (graq *GameRoleAttributeQuery) Unique(unique bool) *GameRoleAttributeQuery
- func (graq *GameRoleAttributeQuery) Where(ps ...predicate.GameRoleAttribute) *GameRoleAttributeQuery
- type GameRoleAttributeSelect
- func (gras *GameRoleAttributeSelect) Aggregate(fns ...AggregateFunc) *GameRoleAttributeSelect
- func (s *GameRoleAttributeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GameRoleAttributeSelect) BoolX(ctx context.Context) bool
- func (s *GameRoleAttributeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GameRoleAttributeSelect) BoolsX(ctx context.Context) []bool
- func (c GameRoleAttributeSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *GameRoleAttributeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GameRoleAttributeSelect) Float64X(ctx context.Context) float64
- func (s *GameRoleAttributeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GameRoleAttributeSelect) Float64sX(ctx context.Context) []float64
- func (s *GameRoleAttributeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GameRoleAttributeSelect) IntX(ctx context.Context) int
- func (s *GameRoleAttributeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GameRoleAttributeSelect) IntsX(ctx context.Context) []int
- func (gras *GameRoleAttributeSelect) Modify(modifiers ...func(s *sql.Selector)) *GameRoleAttributeSelect
- func (c GameRoleAttributeSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (gras *GameRoleAttributeSelect) Scan(ctx context.Context, v any) error
- func (s *GameRoleAttributeSelect) ScanX(ctx context.Context, v any)
- func (s *GameRoleAttributeSelect) String(ctx context.Context) (_ string, err error)
- func (s *GameRoleAttributeSelect) StringX(ctx context.Context) string
- func (s *GameRoleAttributeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GameRoleAttributeSelect) StringsX(ctx context.Context) []string
- type GameRoleAttributeUpdate
- func (grau *GameRoleAttributeUpdate) AddType(i int) *GameRoleAttributeUpdate
- func (grau *GameRoleAttributeUpdate) AddUserID(i int64) *GameRoleAttributeUpdate
- func (grau *GameRoleAttributeUpdate) Exec(ctx context.Context) error
- func (c *GameRoleAttributeUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (grau *GameRoleAttributeUpdate) ExecX(ctx context.Context)
- func (grau *GameRoleAttributeUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GameRoleAttributeUpdate
- func (grau *GameRoleAttributeUpdate) Mutation() *GameRoleAttributeMutation
- func (c *GameRoleAttributeUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (grau *GameRoleAttributeUpdate) Save(ctx context.Context) (int, error)
- func (grau *GameRoleAttributeUpdate) SaveX(ctx context.Context) int
- func (grau *GameRoleAttributeUpdate) SetAccountID(s string) *GameRoleAttributeUpdate
- func (grau *GameRoleAttributeUpdate) SetName(s string) *GameRoleAttributeUpdate
- func (grau *GameRoleAttributeUpdate) SetNillableType(i *int) *GameRoleAttributeUpdate
- func (grau *GameRoleAttributeUpdate) SetNillableValue(s *string) *GameRoleAttributeUpdate
- func (grau *GameRoleAttributeUpdate) SetRoleID(s string) *GameRoleAttributeUpdate
- func (grau *GameRoleAttributeUpdate) SetType(i int) *GameRoleAttributeUpdate
- func (grau *GameRoleAttributeUpdate) SetUpdateAt(t time.Time) *GameRoleAttributeUpdate
- func (grau *GameRoleAttributeUpdate) SetUserID(i int64) *GameRoleAttributeUpdate
- func (grau *GameRoleAttributeUpdate) SetValue(s string) *GameRoleAttributeUpdate
- func (grau *GameRoleAttributeUpdate) Where(ps ...predicate.GameRoleAttribute) *GameRoleAttributeUpdate
- type GameRoleAttributeUpdateOne
- func (grauo *GameRoleAttributeUpdateOne) AddType(i int) *GameRoleAttributeUpdateOne
- func (grauo *GameRoleAttributeUpdateOne) AddUserID(i int64) *GameRoleAttributeUpdateOne
- func (grauo *GameRoleAttributeUpdateOne) Exec(ctx context.Context) error
- func (c *GameRoleAttributeUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (grauo *GameRoleAttributeUpdateOne) ExecX(ctx context.Context)
- func (grauo *GameRoleAttributeUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GameRoleAttributeUpdateOne
- func (grauo *GameRoleAttributeUpdateOne) Mutation() *GameRoleAttributeMutation
- func (c *GameRoleAttributeUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (grauo *GameRoleAttributeUpdateOne) Save(ctx context.Context) (*GameRoleAttribute, error)
- func (grauo *GameRoleAttributeUpdateOne) SaveX(ctx context.Context) *GameRoleAttribute
- func (grauo *GameRoleAttributeUpdateOne) Select(field string, fields ...string) *GameRoleAttributeUpdateOne
- func (grauo *GameRoleAttributeUpdateOne) SetAccountID(s string) *GameRoleAttributeUpdateOne
- func (grauo *GameRoleAttributeUpdateOne) SetName(s string) *GameRoleAttributeUpdateOne
- func (grauo *GameRoleAttributeUpdateOne) SetNillableType(i *int) *GameRoleAttributeUpdateOne
- func (grauo *GameRoleAttributeUpdateOne) SetNillableValue(s *string) *GameRoleAttributeUpdateOne
- func (grauo *GameRoleAttributeUpdateOne) SetRoleID(s string) *GameRoleAttributeUpdateOne
- func (grauo *GameRoleAttributeUpdateOne) SetType(i int) *GameRoleAttributeUpdateOne
- func (grauo *GameRoleAttributeUpdateOne) SetUpdateAt(t time.Time) *GameRoleAttributeUpdateOne
- func (grauo *GameRoleAttributeUpdateOne) SetUserID(i int64) *GameRoleAttributeUpdateOne
- func (grauo *GameRoleAttributeUpdateOne) SetValue(s string) *GameRoleAttributeUpdateOne
- func (grauo *GameRoleAttributeUpdateOne) Where(ps ...predicate.GameRoleAttribute) *GameRoleAttributeUpdateOne
- type GameRoleAttributeUpsert
- func (u *GameRoleAttributeUpsert) AddType(v int) *GameRoleAttributeUpsert
- func (u *GameRoleAttributeUpsert) AddUserID(v int64) *GameRoleAttributeUpsert
- func (u *GameRoleAttributeUpsert) SetAccountID(v string) *GameRoleAttributeUpsert
- func (u *GameRoleAttributeUpsert) SetName(v string) *GameRoleAttributeUpsert
- func (u *GameRoleAttributeUpsert) SetRoleID(v string) *GameRoleAttributeUpsert
- func (u *GameRoleAttributeUpsert) SetType(v int) *GameRoleAttributeUpsert
- func (u *GameRoleAttributeUpsert) SetUpdateAt(v time.Time) *GameRoleAttributeUpsert
- func (u *GameRoleAttributeUpsert) SetUserID(v int64) *GameRoleAttributeUpsert
- func (u *GameRoleAttributeUpsert) SetValue(v string) *GameRoleAttributeUpsert
- func (u *GameRoleAttributeUpsert) UpdateAccountID() *GameRoleAttributeUpsert
- func (u *GameRoleAttributeUpsert) UpdateName() *GameRoleAttributeUpsert
- func (u *GameRoleAttributeUpsert) UpdateRoleID() *GameRoleAttributeUpsert
- func (u *GameRoleAttributeUpsert) UpdateType() *GameRoleAttributeUpsert
- func (u *GameRoleAttributeUpsert) UpdateUpdateAt() *GameRoleAttributeUpsert
- func (u *GameRoleAttributeUpsert) UpdateUserID() *GameRoleAttributeUpsert
- func (u *GameRoleAttributeUpsert) UpdateValue() *GameRoleAttributeUpsert
- type GameRoleAttributeUpsertBulk
- func (u *GameRoleAttributeUpsertBulk) AddType(v int) *GameRoleAttributeUpsertBulk
- func (u *GameRoleAttributeUpsertBulk) AddUserID(v int64) *GameRoleAttributeUpsertBulk
- func (u *GameRoleAttributeUpsertBulk) DoNothing() *GameRoleAttributeUpsertBulk
- func (u *GameRoleAttributeUpsertBulk) Exec(ctx context.Context) error
- func (u *GameRoleAttributeUpsertBulk) ExecX(ctx context.Context)
- func (u *GameRoleAttributeUpsertBulk) Ignore() *GameRoleAttributeUpsertBulk
- func (u *GameRoleAttributeUpsertBulk) SetAccountID(v string) *GameRoleAttributeUpsertBulk
- func (u *GameRoleAttributeUpsertBulk) SetName(v string) *GameRoleAttributeUpsertBulk
- func (u *GameRoleAttributeUpsertBulk) SetRoleID(v string) *GameRoleAttributeUpsertBulk
- func (u *GameRoleAttributeUpsertBulk) SetType(v int) *GameRoleAttributeUpsertBulk
- func (u *GameRoleAttributeUpsertBulk) SetUpdateAt(v time.Time) *GameRoleAttributeUpsertBulk
- func (u *GameRoleAttributeUpsertBulk) SetUserID(v int64) *GameRoleAttributeUpsertBulk
- func (u *GameRoleAttributeUpsertBulk) SetValue(v string) *GameRoleAttributeUpsertBulk
- func (u *GameRoleAttributeUpsertBulk) Update(set func(*GameRoleAttributeUpsert)) *GameRoleAttributeUpsertBulk
- func (u *GameRoleAttributeUpsertBulk) UpdateAccountID() *GameRoleAttributeUpsertBulk
- func (u *GameRoleAttributeUpsertBulk) UpdateName() *GameRoleAttributeUpsertBulk
- func (u *GameRoleAttributeUpsertBulk) UpdateNewValues() *GameRoleAttributeUpsertBulk
- func (u *GameRoleAttributeUpsertBulk) UpdateRoleID() *GameRoleAttributeUpsertBulk
- func (u *GameRoleAttributeUpsertBulk) UpdateType() *GameRoleAttributeUpsertBulk
- func (u *GameRoleAttributeUpsertBulk) UpdateUpdateAt() *GameRoleAttributeUpsertBulk
- func (u *GameRoleAttributeUpsertBulk) UpdateUserID() *GameRoleAttributeUpsertBulk
- func (u *GameRoleAttributeUpsertBulk) UpdateValue() *GameRoleAttributeUpsertBulk
- type GameRoleAttributeUpsertOne
- func (u *GameRoleAttributeUpsertOne) AddType(v int) *GameRoleAttributeUpsertOne
- func (u *GameRoleAttributeUpsertOne) AddUserID(v int64) *GameRoleAttributeUpsertOne
- func (u *GameRoleAttributeUpsertOne) DoNothing() *GameRoleAttributeUpsertOne
- func (u *GameRoleAttributeUpsertOne) Exec(ctx context.Context) error
- func (u *GameRoleAttributeUpsertOne) ExecX(ctx context.Context)
- func (u *GameRoleAttributeUpsertOne) ID(ctx context.Context) (id int64, err error)
- func (u *GameRoleAttributeUpsertOne) IDX(ctx context.Context) int64
- func (u *GameRoleAttributeUpsertOne) Ignore() *GameRoleAttributeUpsertOne
- func (u *GameRoleAttributeUpsertOne) SetAccountID(v string) *GameRoleAttributeUpsertOne
- func (u *GameRoleAttributeUpsertOne) SetName(v string) *GameRoleAttributeUpsertOne
- func (u *GameRoleAttributeUpsertOne) SetRoleID(v string) *GameRoleAttributeUpsertOne
- func (u *GameRoleAttributeUpsertOne) SetType(v int) *GameRoleAttributeUpsertOne
- func (u *GameRoleAttributeUpsertOne) SetUpdateAt(v time.Time) *GameRoleAttributeUpsertOne
- func (u *GameRoleAttributeUpsertOne) SetUserID(v int64) *GameRoleAttributeUpsertOne
- func (u *GameRoleAttributeUpsertOne) SetValue(v string) *GameRoleAttributeUpsertOne
- func (u *GameRoleAttributeUpsertOne) Update(set func(*GameRoleAttributeUpsert)) *GameRoleAttributeUpsertOne
- func (u *GameRoleAttributeUpsertOne) UpdateAccountID() *GameRoleAttributeUpsertOne
- func (u *GameRoleAttributeUpsertOne) UpdateName() *GameRoleAttributeUpsertOne
- func (u *GameRoleAttributeUpsertOne) UpdateNewValues() *GameRoleAttributeUpsertOne
- func (u *GameRoleAttributeUpsertOne) UpdateRoleID() *GameRoleAttributeUpsertOne
- func (u *GameRoleAttributeUpsertOne) UpdateType() *GameRoleAttributeUpsertOne
- func (u *GameRoleAttributeUpsertOne) UpdateUpdateAt() *GameRoleAttributeUpsertOne
- func (u *GameRoleAttributeUpsertOne) UpdateUserID() *GameRoleAttributeUpsertOne
- func (u *GameRoleAttributeUpsertOne) UpdateValue() *GameRoleAttributeUpsertOne
- type GameRoleAttributes
- type GameRoleClient
- func (c *GameRoleClient) Create() *GameRoleCreate
- func (c *GameRoleClient) CreateBulk(builders ...*GameRoleCreate) *GameRoleCreateBulk
- func (c *GameRoleClient) Delete() *GameRoleDelete
- func (c *GameRoleClient) DeleteOne(gr *GameRole) *GameRoleDeleteOne
- func (c *GameRoleClient) DeleteOneID(id int64) *GameRoleDeleteOne
- func (c *GameRoleClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *GameRoleClient) Get(ctx context.Context, id int64) (*GameRole, error)
- func (c *GameRoleClient) GetX(ctx context.Context, id int64) *GameRole
- func (c *GameRoleClient) Hooks() []Hook
- func (c *GameRoleClient) Intercept(interceptors ...Interceptor)
- func (c *GameRoleClient) Interceptors() []Interceptor
- func (c *GameRoleClient) Query() *GameRoleQuery
- func (c *GameRoleClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *GameRoleClient) Update() *GameRoleUpdate
- func (c *GameRoleClient) UpdateOne(gr *GameRole) *GameRoleUpdateOne
- func (c *GameRoleClient) UpdateOneID(id int64) *GameRoleUpdateOne
- func (c *GameRoleClient) Use(hooks ...Hook)
- type GameRoleCreate
- func (grc *GameRoleCreate) Exec(ctx context.Context) error
- func (c *GameRoleCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (grc *GameRoleCreate) ExecX(ctx context.Context)
- func (grc *GameRoleCreate) Mutation() *GameRoleMutation
- func (grc *GameRoleCreate) OnConflict(opts ...sql.ConflictOption) *GameRoleUpsertOne
- func (grc *GameRoleCreate) OnConflictColumns(columns ...string) *GameRoleUpsertOne
- func (c *GameRoleCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (grc *GameRoleCreate) Save(ctx context.Context) (*GameRole, error)
- func (grc *GameRoleCreate) SaveX(ctx context.Context) *GameRole
- func (grc *GameRoleCreate) SetAccountID(s string) *GameRoleCreate
- func (grc *GameRoleCreate) SetCreateAt(t time.Time) *GameRoleCreate
- func (grc *GameRoleCreate) SetID(i int64) *GameRoleCreate
- func (grc *GameRoleCreate) SetLevel(i int) *GameRoleCreate
- func (grc *GameRoleCreate) SetNickName(s string) *GameRoleCreate
- func (grc *GameRoleCreate) SetNillableCreateAt(t *time.Time) *GameRoleCreate
- func (grc *GameRoleCreate) SetNillableLevel(i *int) *GameRoleCreate
- func (grc *GameRoleCreate) SetNillableNickName(s *string) *GameRoleCreate
- func (grc *GameRoleCreate) SetNillableRegion(s *string) *GameRoleCreate
- func (grc *GameRoleCreate) SetNillableRegionName(s *string) *GameRoleCreate
- func (grc *GameRoleCreate) SetNillableUpdateAt(t *time.Time) *GameRoleCreate
- func (grc *GameRoleCreate) SetRegion(s string) *GameRoleCreate
- func (grc *GameRoleCreate) SetRegionName(s string) *GameRoleCreate
- func (grc *GameRoleCreate) SetRoleID(s string) *GameRoleCreate
- func (grc *GameRoleCreate) SetUpdateAt(t time.Time) *GameRoleCreate
- func (grc *GameRoleCreate) SetUserID(i int64) *GameRoleCreate
- type GameRoleCreateBulk
- func (grcb *GameRoleCreateBulk) Exec(ctx context.Context) error
- func (c *GameRoleCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (grcb *GameRoleCreateBulk) ExecX(ctx context.Context)
- func (grcb *GameRoleCreateBulk) OnConflict(opts ...sql.ConflictOption) *GameRoleUpsertBulk
- func (grcb *GameRoleCreateBulk) OnConflictColumns(columns ...string) *GameRoleUpsertBulk
- func (c *GameRoleCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (grcb *GameRoleCreateBulk) Save(ctx context.Context) ([]*GameRole, error)
- func (grcb *GameRoleCreateBulk) SaveX(ctx context.Context) []*GameRole
- type GameRoleDelete
- func (grd *GameRoleDelete) Exec(ctx context.Context) (int, error)
- func (c *GameRoleDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (grd *GameRoleDelete) ExecX(ctx context.Context) int
- func (c *GameRoleDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (grd *GameRoleDelete) Where(ps ...predicate.GameRole) *GameRoleDelete
- type GameRoleDeleteOne
- type GameRoleGroupBy
- func (grgb *GameRoleGroupBy) Aggregate(fns ...AggregateFunc) *GameRoleGroupBy
- func (s *GameRoleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GameRoleGroupBy) BoolX(ctx context.Context) bool
- func (s *GameRoleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GameRoleGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GameRoleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GameRoleGroupBy) Float64X(ctx context.Context) float64
- func (s *GameRoleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GameRoleGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GameRoleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GameRoleGroupBy) IntX(ctx context.Context) int
- func (s *GameRoleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GameRoleGroupBy) IntsX(ctx context.Context) []int
- func (grgb *GameRoleGroupBy) Scan(ctx context.Context, v any) error
- func (s *GameRoleGroupBy) ScanX(ctx context.Context, v any)
- func (s *GameRoleGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GameRoleGroupBy) StringX(ctx context.Context) string
- func (s *GameRoleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GameRoleGroupBy) StringsX(ctx context.Context) []string
- type GameRoleMutation
- func (m *GameRoleMutation) AccountID() (r string, exists bool)
- func (m *GameRoleMutation) AddField(name string, value ent.Value) error
- func (m *GameRoleMutation) AddLevel(i int)
- func (m *GameRoleMutation) AddUserID(i int64)
- func (m *GameRoleMutation) AddedEdges() []string
- func (m *GameRoleMutation) AddedField(name string) (ent.Value, bool)
- func (m *GameRoleMutation) AddedFields() []string
- func (m *GameRoleMutation) AddedIDs(name string) []ent.Value
- func (m *GameRoleMutation) AddedLevel() (r int, exists bool)
- func (m *GameRoleMutation) AddedUserID() (r int64, exists bool)
- func (m *GameRoleMutation) ClearEdge(name string) error
- func (m *GameRoleMutation) ClearField(name string) error
- func (m *GameRoleMutation) ClearedEdges() []string
- func (m *GameRoleMutation) ClearedFields() []string
- func (m GameRoleMutation) Client() *Client
- func (m *GameRoleMutation) CreateAt() (r time.Time, exists bool)
- func (m *GameRoleMutation) EdgeCleared(name string) bool
- func (c *GameRoleMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *GameRoleMutation) Field(name string) (ent.Value, bool)
- func (m *GameRoleMutation) FieldCleared(name string) bool
- func (m *GameRoleMutation) Fields() []string
- func (m *GameRoleMutation) ID() (id int64, exists bool)
- func (m *GameRoleMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *GameRoleMutation) Level() (r int, exists bool)
- func (m *GameRoleMutation) NickName() (r string, exists bool)
- func (m *GameRoleMutation) OldAccountID(ctx context.Context) (v string, err error)
- func (m *GameRoleMutation) OldCreateAt(ctx context.Context) (v time.Time, err error)
- func (m *GameRoleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GameRoleMutation) OldLevel(ctx context.Context) (v int, err error)
- func (m *GameRoleMutation) OldNickName(ctx context.Context) (v string, err error)
- func (m *GameRoleMutation) OldRegion(ctx context.Context) (v string, err error)
- func (m *GameRoleMutation) OldRegionName(ctx context.Context) (v string, err error)
- func (m *GameRoleMutation) OldRoleID(ctx context.Context) (v string, err error)
- func (m *GameRoleMutation) OldUpdateAt(ctx context.Context) (v time.Time, err error)
- func (m *GameRoleMutation) OldUserID(ctx context.Context) (v int64, err error)
- func (m *GameRoleMutation) Op() Op
- func (c *GameRoleMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *GameRoleMutation) Region() (r string, exists bool)
- func (m *GameRoleMutation) RegionName() (r string, exists bool)
- func (m *GameRoleMutation) RemovedEdges() []string
- func (m *GameRoleMutation) RemovedIDs(name string) []ent.Value
- func (m *GameRoleMutation) ResetAccountID()
- func (m *GameRoleMutation) ResetCreateAt()
- func (m *GameRoleMutation) ResetEdge(name string) error
- func (m *GameRoleMutation) ResetField(name string) error
- func (m *GameRoleMutation) ResetLevel()
- func (m *GameRoleMutation) ResetNickName()
- func (m *GameRoleMutation) ResetRegion()
- func (m *GameRoleMutation) ResetRegionName()
- func (m *GameRoleMutation) ResetRoleID()
- func (m *GameRoleMutation) ResetUpdateAt()
- func (m *GameRoleMutation) ResetUserID()
- func (m *GameRoleMutation) RoleID() (r string, exists bool)
- func (m *GameRoleMutation) SetAccountID(s string)
- func (m *GameRoleMutation) SetCreateAt(t time.Time)
- func (m *GameRoleMutation) SetField(name string, value ent.Value) error
- func (m *GameRoleMutation) SetID(id int64)
- func (m *GameRoleMutation) SetLevel(i int)
- func (m *GameRoleMutation) SetNickName(s string)
- func (m *GameRoleMutation) SetOp(op Op)
- func (m *GameRoleMutation) SetRegion(s string)
- func (m *GameRoleMutation) SetRegionName(s string)
- func (m *GameRoleMutation) SetRoleID(s string)
- func (m *GameRoleMutation) SetUpdateAt(t time.Time)
- func (m *GameRoleMutation) SetUserID(i int64)
- func (m GameRoleMutation) Tx() (*Tx, error)
- func (m *GameRoleMutation) Type() string
- func (m *GameRoleMutation) UpdateAt() (r time.Time, exists bool)
- func (m *GameRoleMutation) UserID() (r int64, exists bool)
- func (m *GameRoleMutation) Where(ps ...predicate.GameRole)
- func (m *GameRoleMutation) WhereP(ps ...func(*sql.Selector))
- type GameRoleQuery
- func (grq *GameRoleQuery) Aggregate(fns ...AggregateFunc) *GameRoleSelect
- func (grq *GameRoleQuery) All(ctx context.Context) ([]*GameRole, error)
- func (grq *GameRoleQuery) AllX(ctx context.Context) []*GameRole
- func (grq *GameRoleQuery) Clone() *GameRoleQuery
- func (grq *GameRoleQuery) Count(ctx context.Context) (int, error)
- func (grq *GameRoleQuery) CountX(ctx context.Context) int
- func (c *GameRoleQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (grq *GameRoleQuery) Exist(ctx context.Context) (bool, error)
- func (grq *GameRoleQuery) ExistX(ctx context.Context) bool
- func (grq *GameRoleQuery) First(ctx context.Context) (*GameRole, error)
- func (grq *GameRoleQuery) FirstID(ctx context.Context) (id int64, err error)
- func (grq *GameRoleQuery) FirstIDX(ctx context.Context) int64
- func (grq *GameRoleQuery) FirstX(ctx context.Context) *GameRole
- func (grq *GameRoleQuery) ForShare(opts ...sql.LockOption) *GameRoleQuery
- func (grq *GameRoleQuery) ForUpdate(opts ...sql.LockOption) *GameRoleQuery
- func (grq *GameRoleQuery) GroupBy(field string, fields ...string) *GameRoleGroupBy
- func (grq *GameRoleQuery) IDs(ctx context.Context) (ids []int64, err error)
- func (grq *GameRoleQuery) IDsX(ctx context.Context) []int64
- func (grq *GameRoleQuery) Limit(limit int) *GameRoleQuery
- func (grq *GameRoleQuery) Modify(modifiers ...func(s *sql.Selector)) *GameRoleSelect
- func (grq *GameRoleQuery) Offset(offset int) *GameRoleQuery
- func (grq *GameRoleQuery) Only(ctx context.Context) (*GameRole, error)
- func (grq *GameRoleQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (grq *GameRoleQuery) OnlyIDX(ctx context.Context) int64
- func (grq *GameRoleQuery) OnlyX(ctx context.Context) *GameRole
- func (grq *GameRoleQuery) Order(o ...OrderFunc) *GameRoleQuery
- func (c *GameRoleQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (grq *GameRoleQuery) Select(fields ...string) *GameRoleSelect
- func (grq *GameRoleQuery) Unique(unique bool) *GameRoleQuery
- func (grq *GameRoleQuery) Where(ps ...predicate.GameRole) *GameRoleQuery
- type GameRoleSelect
- func (grs *GameRoleSelect) Aggregate(fns ...AggregateFunc) *GameRoleSelect
- func (s *GameRoleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GameRoleSelect) BoolX(ctx context.Context) bool
- func (s *GameRoleSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GameRoleSelect) BoolsX(ctx context.Context) []bool
- func (c GameRoleSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *GameRoleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GameRoleSelect) Float64X(ctx context.Context) float64
- func (s *GameRoleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GameRoleSelect) Float64sX(ctx context.Context) []float64
- func (s *GameRoleSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GameRoleSelect) IntX(ctx context.Context) int
- func (s *GameRoleSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GameRoleSelect) IntsX(ctx context.Context) []int
- func (grs *GameRoleSelect) Modify(modifiers ...func(s *sql.Selector)) *GameRoleSelect
- func (c GameRoleSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (grs *GameRoleSelect) Scan(ctx context.Context, v any) error
- func (s *GameRoleSelect) ScanX(ctx context.Context, v any)
- func (s *GameRoleSelect) String(ctx context.Context) (_ string, err error)
- func (s *GameRoleSelect) StringX(ctx context.Context) string
- func (s *GameRoleSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GameRoleSelect) StringsX(ctx context.Context) []string
- type GameRoleUpdate
- func (gru *GameRoleUpdate) AddLevel(i int) *GameRoleUpdate
- func (gru *GameRoleUpdate) AddUserID(i int64) *GameRoleUpdate
- func (gru *GameRoleUpdate) Exec(ctx context.Context) error
- func (c *GameRoleUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (gru *GameRoleUpdate) ExecX(ctx context.Context)
- func (gru *GameRoleUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GameRoleUpdate
- func (gru *GameRoleUpdate) Mutation() *GameRoleMutation
- func (c *GameRoleUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (gru *GameRoleUpdate) Save(ctx context.Context) (int, error)
- func (gru *GameRoleUpdate) SaveX(ctx context.Context) int
- func (gru *GameRoleUpdate) SetAccountID(s string) *GameRoleUpdate
- func (gru *GameRoleUpdate) SetLevel(i int) *GameRoleUpdate
- func (gru *GameRoleUpdate) SetNickName(s string) *GameRoleUpdate
- func (gru *GameRoleUpdate) SetNillableLevel(i *int) *GameRoleUpdate
- func (gru *GameRoleUpdate) SetNillableNickName(s *string) *GameRoleUpdate
- func (gru *GameRoleUpdate) SetNillableRegion(s *string) *GameRoleUpdate
- func (gru *GameRoleUpdate) SetNillableRegionName(s *string) *GameRoleUpdate
- func (gru *GameRoleUpdate) SetRegion(s string) *GameRoleUpdate
- func (gru *GameRoleUpdate) SetRegionName(s string) *GameRoleUpdate
- func (gru *GameRoleUpdate) SetRoleID(s string) *GameRoleUpdate
- func (gru *GameRoleUpdate) SetUpdateAt(t time.Time) *GameRoleUpdate
- func (gru *GameRoleUpdate) SetUserID(i int64) *GameRoleUpdate
- func (gru *GameRoleUpdate) Where(ps ...predicate.GameRole) *GameRoleUpdate
- type GameRoleUpdateOne
- func (gruo *GameRoleUpdateOne) AddLevel(i int) *GameRoleUpdateOne
- func (gruo *GameRoleUpdateOne) AddUserID(i int64) *GameRoleUpdateOne
- func (gruo *GameRoleUpdateOne) Exec(ctx context.Context) error
- func (c *GameRoleUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (gruo *GameRoleUpdateOne) ExecX(ctx context.Context)
- func (gruo *GameRoleUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GameRoleUpdateOne
- func (gruo *GameRoleUpdateOne) Mutation() *GameRoleMutation
- func (c *GameRoleUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (gruo *GameRoleUpdateOne) Save(ctx context.Context) (*GameRole, error)
- func (gruo *GameRoleUpdateOne) SaveX(ctx context.Context) *GameRole
- func (gruo *GameRoleUpdateOne) Select(field string, fields ...string) *GameRoleUpdateOne
- func (gruo *GameRoleUpdateOne) SetAccountID(s string) *GameRoleUpdateOne
- func (gruo *GameRoleUpdateOne) SetLevel(i int) *GameRoleUpdateOne
- func (gruo *GameRoleUpdateOne) SetNickName(s string) *GameRoleUpdateOne
- func (gruo *GameRoleUpdateOne) SetNillableLevel(i *int) *GameRoleUpdateOne
- func (gruo *GameRoleUpdateOne) SetNillableNickName(s *string) *GameRoleUpdateOne
- func (gruo *GameRoleUpdateOne) SetNillableRegion(s *string) *GameRoleUpdateOne
- func (gruo *GameRoleUpdateOne) SetNillableRegionName(s *string) *GameRoleUpdateOne
- func (gruo *GameRoleUpdateOne) SetRegion(s string) *GameRoleUpdateOne
- func (gruo *GameRoleUpdateOne) SetRegionName(s string) *GameRoleUpdateOne
- func (gruo *GameRoleUpdateOne) SetRoleID(s string) *GameRoleUpdateOne
- func (gruo *GameRoleUpdateOne) SetUpdateAt(t time.Time) *GameRoleUpdateOne
- func (gruo *GameRoleUpdateOne) SetUserID(i int64) *GameRoleUpdateOne
- func (gruo *GameRoleUpdateOne) Where(ps ...predicate.GameRole) *GameRoleUpdateOne
- type GameRoleUpsert
- func (u *GameRoleUpsert) AddLevel(v int) *GameRoleUpsert
- func (u *GameRoleUpsert) AddUserID(v int64) *GameRoleUpsert
- func (u *GameRoleUpsert) SetAccountID(v string) *GameRoleUpsert
- func (u *GameRoleUpsert) SetLevel(v int) *GameRoleUpsert
- func (u *GameRoleUpsert) SetNickName(v string) *GameRoleUpsert
- func (u *GameRoleUpsert) SetRegion(v string) *GameRoleUpsert
- func (u *GameRoleUpsert) SetRegionName(v string) *GameRoleUpsert
- func (u *GameRoleUpsert) SetRoleID(v string) *GameRoleUpsert
- func (u *GameRoleUpsert) SetUpdateAt(v time.Time) *GameRoleUpsert
- func (u *GameRoleUpsert) SetUserID(v int64) *GameRoleUpsert
- func (u *GameRoleUpsert) UpdateAccountID() *GameRoleUpsert
- func (u *GameRoleUpsert) UpdateLevel() *GameRoleUpsert
- func (u *GameRoleUpsert) UpdateNickName() *GameRoleUpsert
- func (u *GameRoleUpsert) UpdateRegion() *GameRoleUpsert
- func (u *GameRoleUpsert) UpdateRegionName() *GameRoleUpsert
- func (u *GameRoleUpsert) UpdateRoleID() *GameRoleUpsert
- func (u *GameRoleUpsert) UpdateUpdateAt() *GameRoleUpsert
- func (u *GameRoleUpsert) UpdateUserID() *GameRoleUpsert
- type GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) AddLevel(v int) *GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) AddUserID(v int64) *GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) DoNothing() *GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) Exec(ctx context.Context) error
- func (u *GameRoleUpsertBulk) ExecX(ctx context.Context)
- func (u *GameRoleUpsertBulk) Ignore() *GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) SetAccountID(v string) *GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) SetLevel(v int) *GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) SetNickName(v string) *GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) SetRegion(v string) *GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) SetRegionName(v string) *GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) SetRoleID(v string) *GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) SetUpdateAt(v time.Time) *GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) SetUserID(v int64) *GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) Update(set func(*GameRoleUpsert)) *GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) UpdateAccountID() *GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) UpdateLevel() *GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) UpdateNewValues() *GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) UpdateNickName() *GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) UpdateRegion() *GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) UpdateRegionName() *GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) UpdateRoleID() *GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) UpdateUpdateAt() *GameRoleUpsertBulk
- func (u *GameRoleUpsertBulk) UpdateUserID() *GameRoleUpsertBulk
- type GameRoleUpsertOne
- func (u *GameRoleUpsertOne) AddLevel(v int) *GameRoleUpsertOne
- func (u *GameRoleUpsertOne) AddUserID(v int64) *GameRoleUpsertOne
- func (u *GameRoleUpsertOne) DoNothing() *GameRoleUpsertOne
- func (u *GameRoleUpsertOne) Exec(ctx context.Context) error
- func (u *GameRoleUpsertOne) ExecX(ctx context.Context)
- func (u *GameRoleUpsertOne) ID(ctx context.Context) (id int64, err error)
- func (u *GameRoleUpsertOne) IDX(ctx context.Context) int64
- func (u *GameRoleUpsertOne) Ignore() *GameRoleUpsertOne
- func (u *GameRoleUpsertOne) SetAccountID(v string) *GameRoleUpsertOne
- func (u *GameRoleUpsertOne) SetLevel(v int) *GameRoleUpsertOne
- func (u *GameRoleUpsertOne) SetNickName(v string) *GameRoleUpsertOne
- func (u *GameRoleUpsertOne) SetRegion(v string) *GameRoleUpsertOne
- func (u *GameRoleUpsertOne) SetRegionName(v string) *GameRoleUpsertOne
- func (u *GameRoleUpsertOne) SetRoleID(v string) *GameRoleUpsertOne
- func (u *GameRoleUpsertOne) SetUpdateAt(v time.Time) *GameRoleUpsertOne
- func (u *GameRoleUpsertOne) SetUserID(v int64) *GameRoleUpsertOne
- func (u *GameRoleUpsertOne) Update(set func(*GameRoleUpsert)) *GameRoleUpsertOne
- func (u *GameRoleUpsertOne) UpdateAccountID() *GameRoleUpsertOne
- func (u *GameRoleUpsertOne) UpdateLevel() *GameRoleUpsertOne
- func (u *GameRoleUpsertOne) UpdateNewValues() *GameRoleUpsertOne
- func (u *GameRoleUpsertOne) UpdateNickName() *GameRoleUpsertOne
- func (u *GameRoleUpsertOne) UpdateRegion() *GameRoleUpsertOne
- func (u *GameRoleUpsertOne) UpdateRegionName() *GameRoleUpsertOne
- func (u *GameRoleUpsertOne) UpdateRoleID() *GameRoleUpsertOne
- func (u *GameRoleUpsertOne) UpdateUpdateAt() *GameRoleUpsertOne
- func (u *GameRoleUpsertOne) UpdateUserID() *GameRoleUpsertOne
- type GameRoles
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- func (tx *Tx) Client() *Client
- func (tx *Tx) Commit() error
- func (c *Tx) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tx *Tx) OnCommit(f CommitHook)
- func (tx *Tx) OnRollback(f RollbackHook)
- func (c *Tx) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tx *Tx) Rollback() error
- type User
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id int64) *UserDeleteOne
- func (c *UserClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *UserClient) Get(ctx context.Context, id int64) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id int64) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id int64) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (c *UserCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
- func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
- func (c *UserCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetCreateAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetFirstName(s string) *UserCreate
- func (uc *UserCreate) SetID(i int64) *UserCreate
- func (uc *UserCreate) SetIsBot(b bool) *UserCreate
- func (uc *UserCreate) SetLastName(s string) *UserCreate
- func (uc *UserCreate) SetNillableCreateAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableFirstName(s *string) *UserCreate
- func (uc *UserCreate) SetNillableIsBot(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableLastName(s *string) *UserCreate
- func (uc *UserCreate) SetNillableUpdateAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableUserName(s *string) *UserCreate
- func (uc *UserCreate) SetUpdateAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetUserID(i int64) *UserCreate
- func (uc *UserCreate) SetUserName(s string) *UserCreate
- type UserCreateBulk
- func (ucb *UserCreateBulk) Exec(ctx context.Context) error
- func (c *UserCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ucb *UserCreateBulk) ExecX(ctx context.Context)
- func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
- func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
- func (c *UserCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)
- func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User
- type UserDelete
- func (ud *UserDelete) Exec(ctx context.Context) (int, error)
- func (c *UserDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ud *UserDelete) ExecX(ctx context.Context) int
- func (c *UserDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
- type UserDeleteOne
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddUserID(i int64)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) AddedUserID() (r int64, exists bool)
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreateAt() (r time.Time, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (c *UserMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) FirstName() (r string, exists bool)
- func (m *UserMutation) ID() (id int64, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *UserMutation) IsBot() (r bool, exists bool)
- func (m *UserMutation) LastName() (r string, exists bool)
- func (m *UserMutation) OldCreateAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldFirstName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldIsBot(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldLastName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUpdateAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldUserID(ctx context.Context) (v int64, err error)
- func (m *UserMutation) OldUserName(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (c *UserMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetCreateAt()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetFirstName()
- func (m *UserMutation) ResetIsBot()
- func (m *UserMutation) ResetLastName()
- func (m *UserMutation) ResetUpdateAt()
- func (m *UserMutation) ResetUserID()
- func (m *UserMutation) ResetUserName()
- func (m *UserMutation) SetCreateAt(t time.Time)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetFirstName(s string)
- func (m *UserMutation) SetID(id int64)
- func (m *UserMutation) SetIsBot(b bool)
- func (m *UserMutation) SetLastName(s string)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetUpdateAt(t time.Time)
- func (m *UserMutation) SetUserID(i int64)
- func (m *UserMutation) SetUserName(s string)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdateAt() (r time.Time, exists bool)
- func (m *UserMutation) UserID() (r int64, exists bool)
- func (m *UserMutation) UserName() (r string, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (c *UserQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id int64, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) int64
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) ForShare(opts ...sql.LockOption) *UserQuery
- func (uq *UserQuery) ForUpdate(opts ...sql.LockOption) *UserQuery
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []int64, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []int64
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Modify(modifiers ...func(s *sql.Selector)) *UserSelect
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) int64
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (c *UserQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (c UserSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Modify(modifiers ...func(s *sql.Selector)) *UserSelect
- func (c UserSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddUserID(i int64) *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (c *UserUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdate
- func (uu *UserUpdate) Mutation() *UserMutation
- func (c *UserUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetFirstName(s string) *UserUpdate
- func (uu *UserUpdate) SetIsBot(b bool) *UserUpdate
- func (uu *UserUpdate) SetLastName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableFirstName(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableIsBot(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableLastName(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableUserName(s *string) *UserUpdate
- func (uu *UserUpdate) SetUpdateAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetUserID(i int64) *UserUpdate
- func (uu *UserUpdate) SetUserName(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddUserID(i int64) *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (c *UserUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdateOne
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (c *UserUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetFirstName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIsBot(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLastName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableFirstName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableIsBot(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLastName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableUserName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdateAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUserID(i int64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUserName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type UserUpsert
- func (u *UserUpsert) AddUserID(v int64) *UserUpsert
- func (u *UserUpsert) SetFirstName(v string) *UserUpsert
- func (u *UserUpsert) SetIsBot(v bool) *UserUpsert
- func (u *UserUpsert) SetLastName(v string) *UserUpsert
- func (u *UserUpsert) SetUpdateAt(v time.Time) *UserUpsert
- func (u *UserUpsert) SetUserID(v int64) *UserUpsert
- func (u *UserUpsert) SetUserName(v string) *UserUpsert
- func (u *UserUpsert) UpdateFirstName() *UserUpsert
- func (u *UserUpsert) UpdateIsBot() *UserUpsert
- func (u *UserUpsert) UpdateLastName() *UserUpsert
- func (u *UserUpsert) UpdateUpdateAt() *UserUpsert
- func (u *UserUpsert) UpdateUserID() *UserUpsert
- func (u *UserUpsert) UpdateUserName() *UserUpsert
- type UserUpsertBulk
- func (u *UserUpsertBulk) AddUserID(v int64) *UserUpsertBulk
- func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
- func (u *UserUpsertBulk) Exec(ctx context.Context) error
- func (u *UserUpsertBulk) ExecX(ctx context.Context)
- func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
- func (u *UserUpsertBulk) SetFirstName(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetIsBot(v bool) *UserUpsertBulk
- func (u *UserUpsertBulk) SetLastName(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetUpdateAt(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) SetUserID(v int64) *UserUpsertBulk
- func (u *UserUpsertBulk) SetUserName(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateFirstName() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateIsBot() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateLastName() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateUpdateAt() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateUserID() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateUserName() *UserUpsertBulk
- type UserUpsertOne
- func (u *UserUpsertOne) AddUserID(v int64) *UserUpsertOne
- func (u *UserUpsertOne) DoNothing() *UserUpsertOne
- func (u *UserUpsertOne) Exec(ctx context.Context) error
- func (u *UserUpsertOne) ExecX(ctx context.Context)
- func (u *UserUpsertOne) ID(ctx context.Context) (id int64, err error)
- func (u *UserUpsertOne) IDX(ctx context.Context) int64
- func (u *UserUpsertOne) Ignore() *UserUpsertOne
- func (u *UserUpsertOne) SetFirstName(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetIsBot(v bool) *UserUpsertOne
- func (u *UserUpsertOne) SetLastName(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetUpdateAt(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) SetUserID(v int64) *UserUpsertOne
- func (u *UserUpsertOne) SetUserName(v string) *UserUpsertOne
- func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
- func (u *UserUpsertOne) UpdateFirstName() *UserUpsertOne
- func (u *UserUpsertOne) UpdateIsBot() *UserUpsertOne
- func (u *UserUpsertOne) UpdateLastName() *UserUpsertOne
- func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
- func (u *UserUpsertOne) UpdateUpdateAt() *UserUpsertOne
- func (u *UserUpsertOne) UpdateUserID() *UserUpsertOne
- func (u *UserUpsertOne) UpdateUserName() *UserUpsertOne
- type Users
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeChat = "Chat" TypeChatOption = "ChatOption" TypeGameAccount = "GameAccount" TypeGameRole = "GameRole" TypeGameRoleAttribute = "GameRoleAttribute" TypeUser = "User" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(entity.As(entity.Sum(field1), "sum_field1"), (entity.As(entity.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 Chat ¶
type Chat struct { // ID of the ent. ID int64 `json:"id,omitempty"` // ChatID holds the value of the "chat_id" field. ChatID int64 `json:"chat_id,omitempty"` // Type holds the value of the "type" field. Type string `json:"type,omitempty"` // IsForum holds the value of the "is_forum" field. IsForum bool `json:"is_forum,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // UserName holds the value of the "user_name" field. UserName string `json:"user_name,omitempty"` // FirstName holds the value of the "first_name" field. FirstName string `json:"first_name,omitempty"` // LastName holds the value of the "last_name" field. LastName string `json:"last_name,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // CreateAt holds the value of the "create_at" field. CreateAt time.Time `json:"create_at,omitempty"` // UpdateAt holds the value of the "update_at" field. UpdateAt time.Time `json:"update_at,omitempty"` // contains filtered or unexported fields }
Chat is the model entity for the Chat schema.
func (*Chat) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Chat) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Chat) Unwrap ¶
Unwrap unwraps the Chat 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 (*Chat) Update ¶
func (c *Chat) Update() *ChatUpdateOne
Update returns a builder for updating this Chat. Note that you need to call Chat.Unwrap() before calling this method if this Chat was returned from a transaction, and the transaction was committed or rolled back.
type ChatClient ¶
type ChatClient struct {
// contains filtered or unexported fields
}
ChatClient is a client for the Chat schema.
func NewChatClient ¶
func NewChatClient(c config) *ChatClient
NewChatClient returns a client for the Chat from the given config.
func (*ChatClient) Create ¶
func (c *ChatClient) Create() *ChatCreate
Create returns a builder for creating a Chat entity.
func (*ChatClient) CreateBulk ¶
func (c *ChatClient) CreateBulk(builders ...*ChatCreate) *ChatCreateBulk
CreateBulk returns a builder for creating a bulk of Chat entities.
func (*ChatClient) Delete ¶
func (c *ChatClient) Delete() *ChatDelete
Delete returns a delete builder for Chat.
func (*ChatClient) DeleteOne ¶
func (c *ChatClient) DeleteOne(ch *Chat) *ChatDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ChatClient) DeleteOneID ¶
func (c *ChatClient) DeleteOneID(id int64) *ChatDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ChatClient) ExecContext ¶
func (c *ChatClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ChatClient) GetX ¶
func (c *ChatClient) GetX(ctx context.Context, id int64) *Chat
GetX is like Get, but panics if an error occurs.
func (*ChatClient) Intercept ¶
func (c *ChatClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `chat.Intercept(f(g(h())))`.
func (*ChatClient) Interceptors ¶
func (c *ChatClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ChatClient) Query ¶
func (c *ChatClient) Query() *ChatQuery
Query returns a query builder for Chat.
func (*ChatClient) QueryContext ¶
func (c *ChatClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ChatClient) Update ¶
func (c *ChatClient) Update() *ChatUpdate
Update returns an update builder for Chat.
func (*ChatClient) UpdateOne ¶
func (c *ChatClient) UpdateOne(ch *Chat) *ChatUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ChatClient) UpdateOneID ¶
func (c *ChatClient) UpdateOneID(id int64) *ChatUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ChatClient) Use ¶
func (c *ChatClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `chat.Hooks(f(g(h())))`.
type ChatCreate ¶
type ChatCreate struct {
// contains filtered or unexported fields
}
ChatCreate is the builder for creating a Chat entity.
func (*ChatCreate) Exec ¶
func (cc *ChatCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatCreate) ExecContext ¶
func (c *ChatCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ChatCreate) ExecX ¶
func (cc *ChatCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatCreate) Mutation ¶
func (cc *ChatCreate) Mutation() *ChatMutation
Mutation returns the ChatMutation object of the builder.
func (*ChatCreate) OnConflict ¶
func (cc *ChatCreate) OnConflict(opts ...sql.ConflictOption) *ChatUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Chat.Create(). SetChatID(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.ChatUpsert) { SetChatID(v+v). }). Exec(ctx)
func (*ChatCreate) OnConflictColumns ¶
func (cc *ChatCreate) OnConflictColumns(columns ...string) *ChatUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Chat.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ChatCreate) QueryContext ¶
func (c *ChatCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ChatCreate) Save ¶
func (cc *ChatCreate) Save(ctx context.Context) (*Chat, error)
Save creates the Chat in the database.
func (*ChatCreate) SaveX ¶
func (cc *ChatCreate) SaveX(ctx context.Context) *Chat
SaveX calls Save and panics if Save returns an error.
func (*ChatCreate) SetChatID ¶
func (cc *ChatCreate) SetChatID(i int64) *ChatCreate
SetChatID sets the "chat_id" field.
func (*ChatCreate) SetCreateAt ¶
func (cc *ChatCreate) SetCreateAt(t time.Time) *ChatCreate
SetCreateAt sets the "create_at" field.
func (*ChatCreate) SetDescription ¶
func (cc *ChatCreate) SetDescription(s string) *ChatCreate
SetDescription sets the "description" field.
func (*ChatCreate) SetFirstName ¶
func (cc *ChatCreate) SetFirstName(s string) *ChatCreate
SetFirstName sets the "first_name" field.
func (*ChatCreate) SetID ¶
func (cc *ChatCreate) SetID(i int64) *ChatCreate
SetID sets the "id" field.
func (*ChatCreate) SetIsForum ¶
func (cc *ChatCreate) SetIsForum(b bool) *ChatCreate
SetIsForum sets the "is_forum" field.
func (*ChatCreate) SetLastName ¶
func (cc *ChatCreate) SetLastName(s string) *ChatCreate
SetLastName sets the "last_name" field.
func (*ChatCreate) SetNillableCreateAt ¶
func (cc *ChatCreate) SetNillableCreateAt(t *time.Time) *ChatCreate
SetNillableCreateAt sets the "create_at" field if the given value is not nil.
func (*ChatCreate) SetNillableDescription ¶
func (cc *ChatCreate) SetNillableDescription(s *string) *ChatCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ChatCreate) SetNillableFirstName ¶
func (cc *ChatCreate) SetNillableFirstName(s *string) *ChatCreate
SetNillableFirstName sets the "first_name" field if the given value is not nil.
func (*ChatCreate) SetNillableIsForum ¶
func (cc *ChatCreate) SetNillableIsForum(b *bool) *ChatCreate
SetNillableIsForum sets the "is_forum" field if the given value is not nil.
func (*ChatCreate) SetNillableLastName ¶
func (cc *ChatCreate) SetNillableLastName(s *string) *ChatCreate
SetNillableLastName sets the "last_name" field if the given value is not nil.
func (*ChatCreate) SetNillableTitle ¶
func (cc *ChatCreate) SetNillableTitle(s *string) *ChatCreate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*ChatCreate) SetNillableType ¶
func (cc *ChatCreate) SetNillableType(s *string) *ChatCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*ChatCreate) SetNillableUpdateAt ¶
func (cc *ChatCreate) SetNillableUpdateAt(t *time.Time) *ChatCreate
SetNillableUpdateAt sets the "update_at" field if the given value is not nil.
func (*ChatCreate) SetNillableUserName ¶
func (cc *ChatCreate) SetNillableUserName(s *string) *ChatCreate
SetNillableUserName sets the "user_name" field if the given value is not nil.
func (*ChatCreate) SetTitle ¶
func (cc *ChatCreate) SetTitle(s string) *ChatCreate
SetTitle sets the "title" field.
func (*ChatCreate) SetType ¶
func (cc *ChatCreate) SetType(s string) *ChatCreate
SetType sets the "type" field.
func (*ChatCreate) SetUpdateAt ¶
func (cc *ChatCreate) SetUpdateAt(t time.Time) *ChatCreate
SetUpdateAt sets the "update_at" field.
func (*ChatCreate) SetUserName ¶
func (cc *ChatCreate) SetUserName(s string) *ChatCreate
SetUserName sets the "user_name" field.
type ChatCreateBulk ¶
type ChatCreateBulk struct {
// contains filtered or unexported fields
}
ChatCreateBulk is the builder for creating many Chat entities in bulk.
func (*ChatCreateBulk) Exec ¶
func (ccb *ChatCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatCreateBulk) ExecContext ¶
func (c *ChatCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ChatCreateBulk) ExecX ¶
func (ccb *ChatCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatCreateBulk) OnConflict ¶
func (ccb *ChatCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChatUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Chat.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.ChatUpsert) { SetChatID(v+v). }). Exec(ctx)
func (*ChatCreateBulk) OnConflictColumns ¶
func (ccb *ChatCreateBulk) OnConflictColumns(columns ...string) *ChatUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Chat.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ChatCreateBulk) QueryContext ¶
func (c *ChatCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type ChatDelete ¶
type ChatDelete struct {
// contains filtered or unexported fields
}
ChatDelete is the builder for deleting a Chat entity.
func (*ChatDelete) Exec ¶
func (cd *ChatDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ChatDelete) ExecContext ¶
func (c *ChatDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ChatDelete) ExecX ¶
func (cd *ChatDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ChatDelete) QueryContext ¶
func (c *ChatDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ChatDelete) Where ¶
func (cd *ChatDelete) Where(ps ...predicate.Chat) *ChatDelete
Where appends a list predicates to the ChatDelete builder.
type ChatDeleteOne ¶
type ChatDeleteOne struct {
// contains filtered or unexported fields
}
ChatDeleteOne is the builder for deleting a single Chat entity.
func (*ChatDeleteOne) Exec ¶
func (cdo *ChatDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ChatDeleteOne) ExecX ¶
func (cdo *ChatDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatDeleteOne) Where ¶
func (cdo *ChatDeleteOne) Where(ps ...predicate.Chat) *ChatDeleteOne
Where appends a list predicates to the ChatDelete builder.
type ChatGroupBy ¶
type ChatGroupBy struct {
// contains filtered or unexported fields
}
ChatGroupBy is the group-by builder for Chat entities.
func (*ChatGroupBy) Aggregate ¶
func (cgb *ChatGroupBy) Aggregate(fns ...AggregateFunc) *ChatGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ChatGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ChatGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ChatGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ChatGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ChatGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ChatGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ChatGroupBy) Scan ¶
func (cgb *ChatGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ChatGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ChatMutation ¶
type ChatMutation struct {
// contains filtered or unexported fields
}
ChatMutation represents an operation that mutates the Chat nodes in the graph.
func (*ChatMutation) AddChatID ¶
func (m *ChatMutation) AddChatID(i int64)
AddChatID adds i to the "chat_id" field.
func (*ChatMutation) AddField ¶
func (m *ChatMutation) 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 (*ChatMutation) AddedChatID ¶
func (m *ChatMutation) AddedChatID() (r int64, exists bool)
AddedChatID returns the value that was added to the "chat_id" field in this mutation.
func (*ChatMutation) AddedEdges ¶
func (m *ChatMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ChatMutation) AddedField ¶
func (m *ChatMutation) 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 (*ChatMutation) AddedFields ¶
func (m *ChatMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ChatMutation) AddedIDs ¶
func (m *ChatMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ChatMutation) ChatID ¶
func (m *ChatMutation) ChatID() (r int64, exists bool)
ChatID returns the value of the "chat_id" field in the mutation.
func (*ChatMutation) ClearEdge ¶
func (m *ChatMutation) 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 (*ChatMutation) ClearField ¶
func (m *ChatMutation) 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 (*ChatMutation) ClearedEdges ¶
func (m *ChatMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ChatMutation) ClearedFields ¶
func (m *ChatMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ChatMutation) Client ¶
func (m ChatMutation) 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 (*ChatMutation) CreateAt ¶
func (m *ChatMutation) CreateAt() (r time.Time, exists bool)
CreateAt returns the value of the "create_at" field in the mutation.
func (*ChatMutation) Description ¶
func (m *ChatMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*ChatMutation) EdgeCleared ¶
func (m *ChatMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ChatMutation) ExecContext ¶
func (c *ChatMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ChatMutation) Field ¶
func (m *ChatMutation) 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 (*ChatMutation) FieldCleared ¶
func (m *ChatMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ChatMutation) Fields ¶
func (m *ChatMutation) 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 (*ChatMutation) FirstName ¶
func (m *ChatMutation) FirstName() (r string, exists bool)
FirstName returns the value of the "first_name" field in the mutation.
func (*ChatMutation) GetType ¶
func (m *ChatMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*ChatMutation) ID ¶
func (m *ChatMutation) 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 (*ChatMutation) IDs ¶
func (m *ChatMutation) 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 (*ChatMutation) IsForum ¶
func (m *ChatMutation) IsForum() (r bool, exists bool)
IsForum returns the value of the "is_forum" field in the mutation.
func (*ChatMutation) LastName ¶
func (m *ChatMutation) LastName() (r string, exists bool)
LastName returns the value of the "last_name" field in the mutation.
func (*ChatMutation) OldChatID ¶
func (m *ChatMutation) OldChatID(ctx context.Context) (v int64, err error)
OldChatID returns the old "chat_id" field's value of the Chat entity. If the Chat 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 (*ChatMutation) OldCreateAt ¶
OldCreateAt returns the old "create_at" field's value of the Chat entity. If the Chat 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 (*ChatMutation) OldDescription ¶
func (m *ChatMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Chat entity. If the Chat 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 (*ChatMutation) 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 (*ChatMutation) OldFirstName ¶
func (m *ChatMutation) OldFirstName(ctx context.Context) (v string, err error)
OldFirstName returns the old "first_name" field's value of the Chat entity. If the Chat 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 (*ChatMutation) OldIsForum ¶
func (m *ChatMutation) OldIsForum(ctx context.Context) (v bool, err error)
OldIsForum returns the old "is_forum" field's value of the Chat entity. If the Chat 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 (*ChatMutation) OldLastName ¶
func (m *ChatMutation) OldLastName(ctx context.Context) (v string, err error)
OldLastName returns the old "last_name" field's value of the Chat entity. If the Chat 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 (*ChatMutation) OldTitle ¶
func (m *ChatMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the Chat entity. If the Chat 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 (*ChatMutation) OldType ¶
func (m *ChatMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" field's value of the Chat entity. If the Chat 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 (*ChatMutation) OldUpdateAt ¶
OldUpdateAt returns the old "update_at" field's value of the Chat entity. If the Chat 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 (*ChatMutation) OldUserName ¶
func (m *ChatMutation) OldUserName(ctx context.Context) (v string, err error)
OldUserName returns the old "user_name" field's value of the Chat entity. If the Chat 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 (*ChatMutation) QueryContext ¶
func (c *ChatMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ChatMutation) RemovedEdges ¶
func (m *ChatMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ChatMutation) RemovedIDs ¶
func (m *ChatMutation) 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 (*ChatMutation) ResetChatID ¶
func (m *ChatMutation) ResetChatID()
ResetChatID resets all changes to the "chat_id" field.
func (*ChatMutation) ResetCreateAt ¶
func (m *ChatMutation) ResetCreateAt()
ResetCreateAt resets all changes to the "create_at" field.
func (*ChatMutation) ResetDescription ¶
func (m *ChatMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*ChatMutation) ResetEdge ¶
func (m *ChatMutation) 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 (*ChatMutation) ResetField ¶
func (m *ChatMutation) 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 (*ChatMutation) ResetFirstName ¶
func (m *ChatMutation) ResetFirstName()
ResetFirstName resets all changes to the "first_name" field.
func (*ChatMutation) ResetIsForum ¶
func (m *ChatMutation) ResetIsForum()
ResetIsForum resets all changes to the "is_forum" field.
func (*ChatMutation) ResetLastName ¶
func (m *ChatMutation) ResetLastName()
ResetLastName resets all changes to the "last_name" field.
func (*ChatMutation) ResetTitle ¶
func (m *ChatMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*ChatMutation) ResetType ¶
func (m *ChatMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*ChatMutation) ResetUpdateAt ¶
func (m *ChatMutation) ResetUpdateAt()
ResetUpdateAt resets all changes to the "update_at" field.
func (*ChatMutation) ResetUserName ¶
func (m *ChatMutation) ResetUserName()
ResetUserName resets all changes to the "user_name" field.
func (*ChatMutation) SetChatID ¶
func (m *ChatMutation) SetChatID(i int64)
SetChatID sets the "chat_id" field.
func (*ChatMutation) SetCreateAt ¶
func (m *ChatMutation) SetCreateAt(t time.Time)
SetCreateAt sets the "create_at" field.
func (*ChatMutation) SetDescription ¶
func (m *ChatMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*ChatMutation) SetField ¶
func (m *ChatMutation) 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 (*ChatMutation) SetFirstName ¶
func (m *ChatMutation) SetFirstName(s string)
SetFirstName sets the "first_name" field.
func (*ChatMutation) SetID ¶
func (m *ChatMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Chat entities.
func (*ChatMutation) SetIsForum ¶
func (m *ChatMutation) SetIsForum(b bool)
SetIsForum sets the "is_forum" field.
func (*ChatMutation) SetLastName ¶
func (m *ChatMutation) SetLastName(s string)
SetLastName sets the "last_name" field.
func (*ChatMutation) SetOp ¶
func (m *ChatMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ChatMutation) SetTitle ¶
func (m *ChatMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*ChatMutation) SetType ¶
func (m *ChatMutation) SetType(s string)
SetType sets the "type" field.
func (*ChatMutation) SetUpdateAt ¶
func (m *ChatMutation) SetUpdateAt(t time.Time)
SetUpdateAt sets the "update_at" field.
func (*ChatMutation) SetUserName ¶
func (m *ChatMutation) SetUserName(s string)
SetUserName sets the "user_name" field.
func (*ChatMutation) Title ¶
func (m *ChatMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (ChatMutation) Tx ¶
func (m ChatMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ChatMutation) Type ¶
func (m *ChatMutation) Type() string
Type returns the node type of this mutation (Chat).
func (*ChatMutation) UpdateAt ¶
func (m *ChatMutation) UpdateAt() (r time.Time, exists bool)
UpdateAt returns the value of the "update_at" field in the mutation.
func (*ChatMutation) UserName ¶
func (m *ChatMutation) UserName() (r string, exists bool)
UserName returns the value of the "user_name" field in the mutation.
func (*ChatMutation) Where ¶
func (m *ChatMutation) Where(ps ...predicate.Chat)
Where appends a list predicates to the ChatMutation builder.
func (*ChatMutation) WhereP ¶
func (m *ChatMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ChatMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ChatOption ¶
type ChatOption struct { // ID of the ent. ID int64 `json:"id,omitempty"` // ChatID holds the value of the "chat_id" field. ChatID int64 `json:"chat_id,omitempty"` // Key holds the value of the "key" field. Key string `json:"key,omitempty"` // Value holds the value of the "value" field. Value string `json:"value,omitempty"` // CreateAt holds the value of the "create_at" field. CreateAt time.Time `json:"create_at,omitempty"` // UpdateAt holds the value of the "update_at" field. UpdateAt time.Time `json:"update_at,omitempty"` // contains filtered or unexported fields }
ChatOption is the model entity for the ChatOption schema.
func (*ChatOption) ExecContext ¶
func (c *ChatOption) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ChatOption) QueryContext ¶
func (c *ChatOption) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ChatOption) String ¶
func (co *ChatOption) String() string
String implements the fmt.Stringer.
func (*ChatOption) Unwrap ¶
func (co *ChatOption) Unwrap() *ChatOption
Unwrap unwraps the ChatOption 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 (*ChatOption) Update ¶
func (co *ChatOption) Update() *ChatOptionUpdateOne
Update returns a builder for updating this ChatOption. Note that you need to call ChatOption.Unwrap() before calling this method if this ChatOption was returned from a transaction, and the transaction was committed or rolled back.
type ChatOptionClient ¶
type ChatOptionClient struct {
// contains filtered or unexported fields
}
ChatOptionClient is a client for the ChatOption schema.
func NewChatOptionClient ¶
func NewChatOptionClient(c config) *ChatOptionClient
NewChatOptionClient returns a client for the ChatOption from the given config.
func (*ChatOptionClient) Create ¶
func (c *ChatOptionClient) Create() *ChatOptionCreate
Create returns a builder for creating a ChatOption entity.
func (*ChatOptionClient) CreateBulk ¶
func (c *ChatOptionClient) CreateBulk(builders ...*ChatOptionCreate) *ChatOptionCreateBulk
CreateBulk returns a builder for creating a bulk of ChatOption entities.
func (*ChatOptionClient) Delete ¶
func (c *ChatOptionClient) Delete() *ChatOptionDelete
Delete returns a delete builder for ChatOption.
func (*ChatOptionClient) DeleteOne ¶
func (c *ChatOptionClient) DeleteOne(co *ChatOption) *ChatOptionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ChatOptionClient) DeleteOneID ¶
func (c *ChatOptionClient) DeleteOneID(id int64) *ChatOptionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ChatOptionClient) ExecContext ¶
func (c *ChatOptionClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ChatOptionClient) Get ¶
func (c *ChatOptionClient) Get(ctx context.Context, id int64) (*ChatOption, error)
Get returns a ChatOption entity by its id.
func (*ChatOptionClient) GetX ¶
func (c *ChatOptionClient) GetX(ctx context.Context, id int64) *ChatOption
GetX is like Get, but panics if an error occurs.
func (*ChatOptionClient) Hooks ¶
func (c *ChatOptionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ChatOptionClient) Intercept ¶
func (c *ChatOptionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `chatoption.Intercept(f(g(h())))`.
func (*ChatOptionClient) Interceptors ¶
func (c *ChatOptionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ChatOptionClient) Query ¶
func (c *ChatOptionClient) Query() *ChatOptionQuery
Query returns a query builder for ChatOption.
func (*ChatOptionClient) QueryContext ¶
func (c *ChatOptionClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ChatOptionClient) Update ¶
func (c *ChatOptionClient) Update() *ChatOptionUpdate
Update returns an update builder for ChatOption.
func (*ChatOptionClient) UpdateOne ¶
func (c *ChatOptionClient) UpdateOne(co *ChatOption) *ChatOptionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ChatOptionClient) UpdateOneID ¶
func (c *ChatOptionClient) UpdateOneID(id int64) *ChatOptionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ChatOptionClient) Use ¶
func (c *ChatOptionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `chatoption.Hooks(f(g(h())))`.
type ChatOptionCreate ¶
type ChatOptionCreate struct {
// contains filtered or unexported fields
}
ChatOptionCreate is the builder for creating a ChatOption entity.
func (*ChatOptionCreate) Exec ¶
func (coc *ChatOptionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatOptionCreate) ExecContext ¶
func (c *ChatOptionCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ChatOptionCreate) ExecX ¶
func (coc *ChatOptionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatOptionCreate) Mutation ¶
func (coc *ChatOptionCreate) Mutation() *ChatOptionMutation
Mutation returns the ChatOptionMutation object of the builder.
func (*ChatOptionCreate) OnConflict ¶
func (coc *ChatOptionCreate) OnConflict(opts ...sql.ConflictOption) *ChatOptionUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.ChatOption.Create(). SetChatID(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.ChatOptionUpsert) { SetChatID(v+v). }). Exec(ctx)
func (*ChatOptionCreate) OnConflictColumns ¶
func (coc *ChatOptionCreate) OnConflictColumns(columns ...string) *ChatOptionUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.ChatOption.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ChatOptionCreate) QueryContext ¶
func (c *ChatOptionCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ChatOptionCreate) Save ¶
func (coc *ChatOptionCreate) Save(ctx context.Context) (*ChatOption, error)
Save creates the ChatOption in the database.
func (*ChatOptionCreate) SaveX ¶
func (coc *ChatOptionCreate) SaveX(ctx context.Context) *ChatOption
SaveX calls Save and panics if Save returns an error.
func (*ChatOptionCreate) SetChatID ¶
func (coc *ChatOptionCreate) SetChatID(i int64) *ChatOptionCreate
SetChatID sets the "chat_id" field.
func (*ChatOptionCreate) SetCreateAt ¶
func (coc *ChatOptionCreate) SetCreateAt(t time.Time) *ChatOptionCreate
SetCreateAt sets the "create_at" field.
func (*ChatOptionCreate) SetID ¶
func (coc *ChatOptionCreate) SetID(i int64) *ChatOptionCreate
SetID sets the "id" field.
func (*ChatOptionCreate) SetKey ¶
func (coc *ChatOptionCreate) SetKey(s string) *ChatOptionCreate
SetKey sets the "key" field.
func (*ChatOptionCreate) SetNillableCreateAt ¶
func (coc *ChatOptionCreate) SetNillableCreateAt(t *time.Time) *ChatOptionCreate
SetNillableCreateAt sets the "create_at" field if the given value is not nil.
func (*ChatOptionCreate) SetNillableUpdateAt ¶
func (coc *ChatOptionCreate) SetNillableUpdateAt(t *time.Time) *ChatOptionCreate
SetNillableUpdateAt sets the "update_at" field if the given value is not nil.
func (*ChatOptionCreate) SetNillableValue ¶
func (coc *ChatOptionCreate) SetNillableValue(s *string) *ChatOptionCreate
SetNillableValue sets the "value" field if the given value is not nil.
func (*ChatOptionCreate) SetUpdateAt ¶
func (coc *ChatOptionCreate) SetUpdateAt(t time.Time) *ChatOptionCreate
SetUpdateAt sets the "update_at" field.
func (*ChatOptionCreate) SetValue ¶
func (coc *ChatOptionCreate) SetValue(s string) *ChatOptionCreate
SetValue sets the "value" field.
type ChatOptionCreateBulk ¶
type ChatOptionCreateBulk struct {
// contains filtered or unexported fields
}
ChatOptionCreateBulk is the builder for creating many ChatOption entities in bulk.
func (*ChatOptionCreateBulk) Exec ¶
func (cocb *ChatOptionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatOptionCreateBulk) ExecContext ¶
func (c *ChatOptionCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ChatOptionCreateBulk) ExecX ¶
func (cocb *ChatOptionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatOptionCreateBulk) OnConflict ¶
func (cocb *ChatOptionCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChatOptionUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.ChatOption.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.ChatOptionUpsert) { SetChatID(v+v). }). Exec(ctx)
func (*ChatOptionCreateBulk) OnConflictColumns ¶
func (cocb *ChatOptionCreateBulk) OnConflictColumns(columns ...string) *ChatOptionUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.ChatOption.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ChatOptionCreateBulk) QueryContext ¶
func (c *ChatOptionCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ChatOptionCreateBulk) Save ¶
func (cocb *ChatOptionCreateBulk) Save(ctx context.Context) ([]*ChatOption, error)
Save creates the ChatOption entities in the database.
func (*ChatOptionCreateBulk) SaveX ¶
func (cocb *ChatOptionCreateBulk) SaveX(ctx context.Context) []*ChatOption
SaveX is like Save, but panics if an error occurs.
type ChatOptionDelete ¶
type ChatOptionDelete struct {
// contains filtered or unexported fields
}
ChatOptionDelete is the builder for deleting a ChatOption entity.
func (*ChatOptionDelete) Exec ¶
func (cod *ChatOptionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ChatOptionDelete) ExecContext ¶
func (c *ChatOptionDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ChatOptionDelete) ExecX ¶
func (cod *ChatOptionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ChatOptionDelete) QueryContext ¶
func (c *ChatOptionDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ChatOptionDelete) Where ¶
func (cod *ChatOptionDelete) Where(ps ...predicate.ChatOption) *ChatOptionDelete
Where appends a list predicates to the ChatOptionDelete builder.
type ChatOptionDeleteOne ¶
type ChatOptionDeleteOne struct {
// contains filtered or unexported fields
}
ChatOptionDeleteOne is the builder for deleting a single ChatOption entity.
func (*ChatOptionDeleteOne) Exec ¶
func (codo *ChatOptionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ChatOptionDeleteOne) ExecX ¶
func (codo *ChatOptionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatOptionDeleteOne) Where ¶
func (codo *ChatOptionDeleteOne) Where(ps ...predicate.ChatOption) *ChatOptionDeleteOne
Where appends a list predicates to the ChatOptionDelete builder.
type ChatOptionGroupBy ¶
type ChatOptionGroupBy struct {
// contains filtered or unexported fields
}
ChatOptionGroupBy is the group-by builder for ChatOption entities.
func (*ChatOptionGroupBy) Aggregate ¶
func (cogb *ChatOptionGroupBy) Aggregate(fns ...AggregateFunc) *ChatOptionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ChatOptionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ChatOptionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ChatOptionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ChatOptionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ChatOptionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ChatOptionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ChatOptionGroupBy) Scan ¶
func (cogb *ChatOptionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ChatOptionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ChatOptionMutation ¶
type ChatOptionMutation struct {
// contains filtered or unexported fields
}
ChatOptionMutation represents an operation that mutates the ChatOption nodes in the graph.
func (*ChatOptionMutation) AddChatID ¶
func (m *ChatOptionMutation) AddChatID(i int64)
AddChatID adds i to the "chat_id" field.
func (*ChatOptionMutation) AddField ¶
func (m *ChatOptionMutation) 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 (*ChatOptionMutation) AddedChatID ¶
func (m *ChatOptionMutation) AddedChatID() (r int64, exists bool)
AddedChatID returns the value that was added to the "chat_id" field in this mutation.
func (*ChatOptionMutation) AddedEdges ¶
func (m *ChatOptionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ChatOptionMutation) AddedField ¶
func (m *ChatOptionMutation) 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 (*ChatOptionMutation) AddedFields ¶
func (m *ChatOptionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ChatOptionMutation) AddedIDs ¶
func (m *ChatOptionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ChatOptionMutation) ChatID ¶
func (m *ChatOptionMutation) ChatID() (r int64, exists bool)
ChatID returns the value of the "chat_id" field in the mutation.
func (*ChatOptionMutation) ClearEdge ¶
func (m *ChatOptionMutation) 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 (*ChatOptionMutation) ClearField ¶
func (m *ChatOptionMutation) 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 (*ChatOptionMutation) ClearedEdges ¶
func (m *ChatOptionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ChatOptionMutation) ClearedFields ¶
func (m *ChatOptionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ChatOptionMutation) Client ¶
func (m ChatOptionMutation) 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 (*ChatOptionMutation) CreateAt ¶
func (m *ChatOptionMutation) CreateAt() (r time.Time, exists bool)
CreateAt returns the value of the "create_at" field in the mutation.
func (*ChatOptionMutation) EdgeCleared ¶
func (m *ChatOptionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ChatOptionMutation) ExecContext ¶
func (c *ChatOptionMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ChatOptionMutation) Field ¶
func (m *ChatOptionMutation) 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 (*ChatOptionMutation) FieldCleared ¶
func (m *ChatOptionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ChatOptionMutation) Fields ¶
func (m *ChatOptionMutation) 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 (*ChatOptionMutation) ID ¶
func (m *ChatOptionMutation) 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 (*ChatOptionMutation) IDs ¶
func (m *ChatOptionMutation) 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 (*ChatOptionMutation) Key ¶
func (m *ChatOptionMutation) Key() (r string, exists bool)
Key returns the value of the "key" field in the mutation.
func (*ChatOptionMutation) OldChatID ¶
func (m *ChatOptionMutation) OldChatID(ctx context.Context) (v int64, err error)
OldChatID returns the old "chat_id" field's value of the ChatOption entity. If the ChatOption 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 (*ChatOptionMutation) OldCreateAt ¶
OldCreateAt returns the old "create_at" field's value of the ChatOption entity. If the ChatOption 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 (*ChatOptionMutation) 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 (*ChatOptionMutation) OldKey ¶
func (m *ChatOptionMutation) OldKey(ctx context.Context) (v string, err error)
OldKey returns the old "key" field's value of the ChatOption entity. If the ChatOption 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 (*ChatOptionMutation) OldUpdateAt ¶
OldUpdateAt returns the old "update_at" field's value of the ChatOption entity. If the ChatOption 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 (*ChatOptionMutation) OldValue ¶
func (m *ChatOptionMutation) OldValue(ctx context.Context) (v string, err error)
OldValue returns the old "value" field's value of the ChatOption entity. If the ChatOption 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 (*ChatOptionMutation) QueryContext ¶
func (c *ChatOptionMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ChatOptionMutation) RemovedEdges ¶
func (m *ChatOptionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ChatOptionMutation) RemovedIDs ¶
func (m *ChatOptionMutation) 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 (*ChatOptionMutation) ResetChatID ¶
func (m *ChatOptionMutation) ResetChatID()
ResetChatID resets all changes to the "chat_id" field.
func (*ChatOptionMutation) ResetCreateAt ¶
func (m *ChatOptionMutation) ResetCreateAt()
ResetCreateAt resets all changes to the "create_at" field.
func (*ChatOptionMutation) ResetEdge ¶
func (m *ChatOptionMutation) 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 (*ChatOptionMutation) ResetField ¶
func (m *ChatOptionMutation) 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 (*ChatOptionMutation) ResetKey ¶
func (m *ChatOptionMutation) ResetKey()
ResetKey resets all changes to the "key" field.
func (*ChatOptionMutation) ResetUpdateAt ¶
func (m *ChatOptionMutation) ResetUpdateAt()
ResetUpdateAt resets all changes to the "update_at" field.
func (*ChatOptionMutation) ResetValue ¶
func (m *ChatOptionMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*ChatOptionMutation) SetChatID ¶
func (m *ChatOptionMutation) SetChatID(i int64)
SetChatID sets the "chat_id" field.
func (*ChatOptionMutation) SetCreateAt ¶
func (m *ChatOptionMutation) SetCreateAt(t time.Time)
SetCreateAt sets the "create_at" field.
func (*ChatOptionMutation) SetField ¶
func (m *ChatOptionMutation) 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 (*ChatOptionMutation) SetID ¶
func (m *ChatOptionMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ChatOption entities.
func (*ChatOptionMutation) SetKey ¶
func (m *ChatOptionMutation) SetKey(s string)
SetKey sets the "key" field.
func (*ChatOptionMutation) SetOp ¶
func (m *ChatOptionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ChatOptionMutation) SetUpdateAt ¶
func (m *ChatOptionMutation) SetUpdateAt(t time.Time)
SetUpdateAt sets the "update_at" field.
func (*ChatOptionMutation) SetValue ¶
func (m *ChatOptionMutation) SetValue(s string)
SetValue sets the "value" field.
func (ChatOptionMutation) Tx ¶
func (m ChatOptionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ChatOptionMutation) Type ¶
func (m *ChatOptionMutation) Type() string
Type returns the node type of this mutation (ChatOption).
func (*ChatOptionMutation) UpdateAt ¶
func (m *ChatOptionMutation) UpdateAt() (r time.Time, exists bool)
UpdateAt returns the value of the "update_at" field in the mutation.
func (*ChatOptionMutation) Value ¶
func (m *ChatOptionMutation) Value() (r string, exists bool)
Value returns the value of the "value" field in the mutation.
func (*ChatOptionMutation) Where ¶
func (m *ChatOptionMutation) Where(ps ...predicate.ChatOption)
Where appends a list predicates to the ChatOptionMutation builder.
func (*ChatOptionMutation) WhereP ¶
func (m *ChatOptionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ChatOptionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ChatOptionQuery ¶
type ChatOptionQuery struct {
// contains filtered or unexported fields
}
ChatOptionQuery is the builder for querying ChatOption entities.
func (*ChatOptionQuery) Aggregate ¶
func (coq *ChatOptionQuery) Aggregate(fns ...AggregateFunc) *ChatOptionSelect
Aggregate returns a ChatOptionSelect configured with the given aggregations.
func (*ChatOptionQuery) All ¶
func (coq *ChatOptionQuery) All(ctx context.Context) ([]*ChatOption, error)
All executes the query and returns a list of ChatOptions.
func (*ChatOptionQuery) AllX ¶
func (coq *ChatOptionQuery) AllX(ctx context.Context) []*ChatOption
AllX is like All, but panics if an error occurs.
func (*ChatOptionQuery) Clone ¶
func (coq *ChatOptionQuery) Clone() *ChatOptionQuery
Clone returns a duplicate of the ChatOptionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ChatOptionQuery) Count ¶
func (coq *ChatOptionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ChatOptionQuery) CountX ¶
func (coq *ChatOptionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ChatOptionQuery) ExecContext ¶
func (c *ChatOptionQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ChatOptionQuery) Exist ¶
func (coq *ChatOptionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ChatOptionQuery) ExistX ¶
func (coq *ChatOptionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ChatOptionQuery) First ¶
func (coq *ChatOptionQuery) First(ctx context.Context) (*ChatOption, error)
First returns the first ChatOption entity from the query. Returns a *NotFoundError when no ChatOption was found.
func (*ChatOptionQuery) FirstID ¶
func (coq *ChatOptionQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first ChatOption ID from the query. Returns a *NotFoundError when no ChatOption ID was found.
func (*ChatOptionQuery) FirstIDX ¶
func (coq *ChatOptionQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*ChatOptionQuery) FirstX ¶
func (coq *ChatOptionQuery) FirstX(ctx context.Context) *ChatOption
FirstX is like First, but panics if an error occurs.
func (*ChatOptionQuery) ForShare ¶
func (coq *ChatOptionQuery) ForShare(opts ...sql.LockOption) *ChatOptionQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*ChatOptionQuery) ForUpdate ¶
func (coq *ChatOptionQuery) ForUpdate(opts ...sql.LockOption) *ChatOptionQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*ChatOptionQuery) GroupBy ¶
func (coq *ChatOptionQuery) GroupBy(field string, fields ...string) *ChatOptionGroupBy
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 { ChatID int64 `json:"chat_id,omitempty"` Count int `json:"count,omitempty"` } client.ChatOption.Query(). GroupBy(chatoption.FieldChatID). Aggregate(entity.Count()). Scan(ctx, &v)
func (*ChatOptionQuery) IDs ¶
func (coq *ChatOptionQuery) IDs(ctx context.Context) (ids []int64, err error)
IDs executes the query and returns a list of ChatOption IDs.
func (*ChatOptionQuery) IDsX ¶
func (coq *ChatOptionQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*ChatOptionQuery) Limit ¶
func (coq *ChatOptionQuery) Limit(limit int) *ChatOptionQuery
Limit the number of records to be returned by this query.
func (*ChatOptionQuery) Modify ¶
func (coq *ChatOptionQuery) Modify(modifiers ...func(s *sql.Selector)) *ChatOptionSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*ChatOptionQuery) Offset ¶
func (coq *ChatOptionQuery) Offset(offset int) *ChatOptionQuery
Offset to start from.
func (*ChatOptionQuery) Only ¶
func (coq *ChatOptionQuery) Only(ctx context.Context) (*ChatOption, error)
Only returns a single ChatOption entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ChatOption entity is found. Returns a *NotFoundError when no ChatOption entities are found.
func (*ChatOptionQuery) OnlyID ¶
func (coq *ChatOptionQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only ChatOption ID in the query. Returns a *NotSingularError when more than one ChatOption ID is found. Returns a *NotFoundError when no entities are found.
func (*ChatOptionQuery) OnlyIDX ¶
func (coq *ChatOptionQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ChatOptionQuery) OnlyX ¶
func (coq *ChatOptionQuery) OnlyX(ctx context.Context) *ChatOption
OnlyX is like Only, but panics if an error occurs.
func (*ChatOptionQuery) Order ¶
func (coq *ChatOptionQuery) Order(o ...OrderFunc) *ChatOptionQuery
Order specifies how the records should be ordered.
func (*ChatOptionQuery) QueryContext ¶
func (c *ChatOptionQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ChatOptionQuery) Select ¶
func (coq *ChatOptionQuery) Select(fields ...string) *ChatOptionSelect
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 { ChatID int64 `json:"chat_id,omitempty"` } client.ChatOption.Query(). Select(chatoption.FieldChatID). Scan(ctx, &v)
func (*ChatOptionQuery) Unique ¶
func (coq *ChatOptionQuery) Unique(unique bool) *ChatOptionQuery
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 (*ChatOptionQuery) Where ¶
func (coq *ChatOptionQuery) Where(ps ...predicate.ChatOption) *ChatOptionQuery
Where adds a new predicate for the ChatOptionQuery builder.
type ChatOptionSelect ¶
type ChatOptionSelect struct { *ChatOptionQuery // contains filtered or unexported fields }
ChatOptionSelect is the builder for selecting fields of ChatOption entities.
func (*ChatOptionSelect) Aggregate ¶
func (cos *ChatOptionSelect) Aggregate(fns ...AggregateFunc) *ChatOptionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ChatOptionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ChatOptionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (ChatOptionSelect) ExecContext ¶
func (c ChatOptionSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ChatOptionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ChatOptionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ChatOptionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ChatOptionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ChatOptionSelect) Modify ¶
func (cos *ChatOptionSelect) Modify(modifiers ...func(s *sql.Selector)) *ChatOptionSelect
Modify adds a query modifier for attaching custom logic to queries.
func (ChatOptionSelect) QueryContext ¶
func (c ChatOptionSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ChatOptionSelect) Scan ¶
func (cos *ChatOptionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ChatOptionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ChatOptionUpdate ¶
type ChatOptionUpdate struct {
// contains filtered or unexported fields
}
ChatOptionUpdate is the builder for updating ChatOption entities.
func (*ChatOptionUpdate) AddChatID ¶
func (cou *ChatOptionUpdate) AddChatID(i int64) *ChatOptionUpdate
AddChatID adds i to the "chat_id" field.
func (*ChatOptionUpdate) Exec ¶
func (cou *ChatOptionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatOptionUpdate) ExecContext ¶
func (c *ChatOptionUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ChatOptionUpdate) ExecX ¶
func (cou *ChatOptionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatOptionUpdate) Modify ¶
func (cou *ChatOptionUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ChatOptionUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ChatOptionUpdate) Mutation ¶
func (cou *ChatOptionUpdate) Mutation() *ChatOptionMutation
Mutation returns the ChatOptionMutation object of the builder.
func (*ChatOptionUpdate) QueryContext ¶
func (c *ChatOptionUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ChatOptionUpdate) Save ¶
func (cou *ChatOptionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ChatOptionUpdate) SaveX ¶
func (cou *ChatOptionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ChatOptionUpdate) SetChatID ¶
func (cou *ChatOptionUpdate) SetChatID(i int64) *ChatOptionUpdate
SetChatID sets the "chat_id" field.
func (*ChatOptionUpdate) SetKey ¶
func (cou *ChatOptionUpdate) SetKey(s string) *ChatOptionUpdate
SetKey sets the "key" field.
func (*ChatOptionUpdate) SetNillableValue ¶
func (cou *ChatOptionUpdate) SetNillableValue(s *string) *ChatOptionUpdate
SetNillableValue sets the "value" field if the given value is not nil.
func (*ChatOptionUpdate) SetUpdateAt ¶
func (cou *ChatOptionUpdate) SetUpdateAt(t time.Time) *ChatOptionUpdate
SetUpdateAt sets the "update_at" field.
func (*ChatOptionUpdate) SetValue ¶
func (cou *ChatOptionUpdate) SetValue(s string) *ChatOptionUpdate
SetValue sets the "value" field.
func (*ChatOptionUpdate) Where ¶
func (cou *ChatOptionUpdate) Where(ps ...predicate.ChatOption) *ChatOptionUpdate
Where appends a list predicates to the ChatOptionUpdate builder.
type ChatOptionUpdateOne ¶
type ChatOptionUpdateOne struct {
// contains filtered or unexported fields
}
ChatOptionUpdateOne is the builder for updating a single ChatOption entity.
func (*ChatOptionUpdateOne) AddChatID ¶
func (couo *ChatOptionUpdateOne) AddChatID(i int64) *ChatOptionUpdateOne
AddChatID adds i to the "chat_id" field.
func (*ChatOptionUpdateOne) Exec ¶
func (couo *ChatOptionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ChatOptionUpdateOne) ExecContext ¶
func (c *ChatOptionUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ChatOptionUpdateOne) ExecX ¶
func (couo *ChatOptionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatOptionUpdateOne) Modify ¶
func (couo *ChatOptionUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ChatOptionUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ChatOptionUpdateOne) Mutation ¶
func (couo *ChatOptionUpdateOne) Mutation() *ChatOptionMutation
Mutation returns the ChatOptionMutation object of the builder.
func (*ChatOptionUpdateOne) QueryContext ¶
func (c *ChatOptionUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ChatOptionUpdateOne) Save ¶
func (couo *ChatOptionUpdateOne) Save(ctx context.Context) (*ChatOption, error)
Save executes the query and returns the updated ChatOption entity.
func (*ChatOptionUpdateOne) SaveX ¶
func (couo *ChatOptionUpdateOne) SaveX(ctx context.Context) *ChatOption
SaveX is like Save, but panics if an error occurs.
func (*ChatOptionUpdateOne) Select ¶
func (couo *ChatOptionUpdateOne) Select(field string, fields ...string) *ChatOptionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ChatOptionUpdateOne) SetChatID ¶
func (couo *ChatOptionUpdateOne) SetChatID(i int64) *ChatOptionUpdateOne
SetChatID sets the "chat_id" field.
func (*ChatOptionUpdateOne) SetKey ¶
func (couo *ChatOptionUpdateOne) SetKey(s string) *ChatOptionUpdateOne
SetKey sets the "key" field.
func (*ChatOptionUpdateOne) SetNillableValue ¶
func (couo *ChatOptionUpdateOne) SetNillableValue(s *string) *ChatOptionUpdateOne
SetNillableValue sets the "value" field if the given value is not nil.
func (*ChatOptionUpdateOne) SetUpdateAt ¶
func (couo *ChatOptionUpdateOne) SetUpdateAt(t time.Time) *ChatOptionUpdateOne
SetUpdateAt sets the "update_at" field.
func (*ChatOptionUpdateOne) SetValue ¶
func (couo *ChatOptionUpdateOne) SetValue(s string) *ChatOptionUpdateOne
SetValue sets the "value" field.
func (*ChatOptionUpdateOne) Where ¶
func (couo *ChatOptionUpdateOne) Where(ps ...predicate.ChatOption) *ChatOptionUpdateOne
Where appends a list predicates to the ChatOptionUpdate builder.
type ChatOptionUpsert ¶
ChatOptionUpsert is the "OnConflict" setter.
func (*ChatOptionUpsert) AddChatID ¶
func (u *ChatOptionUpsert) AddChatID(v int64) *ChatOptionUpsert
AddChatID adds v to the "chat_id" field.
func (*ChatOptionUpsert) SetChatID ¶
func (u *ChatOptionUpsert) SetChatID(v int64) *ChatOptionUpsert
SetChatID sets the "chat_id" field.
func (*ChatOptionUpsert) SetKey ¶
func (u *ChatOptionUpsert) SetKey(v string) *ChatOptionUpsert
SetKey sets the "key" field.
func (*ChatOptionUpsert) SetUpdateAt ¶
func (u *ChatOptionUpsert) SetUpdateAt(v time.Time) *ChatOptionUpsert
SetUpdateAt sets the "update_at" field.
func (*ChatOptionUpsert) SetValue ¶
func (u *ChatOptionUpsert) SetValue(v string) *ChatOptionUpsert
SetValue sets the "value" field.
func (*ChatOptionUpsert) UpdateChatID ¶
func (u *ChatOptionUpsert) UpdateChatID() *ChatOptionUpsert
UpdateChatID sets the "chat_id" field to the value that was provided on create.
func (*ChatOptionUpsert) UpdateKey ¶
func (u *ChatOptionUpsert) UpdateKey() *ChatOptionUpsert
UpdateKey sets the "key" field to the value that was provided on create.
func (*ChatOptionUpsert) UpdateUpdateAt ¶
func (u *ChatOptionUpsert) UpdateUpdateAt() *ChatOptionUpsert
UpdateUpdateAt sets the "update_at" field to the value that was provided on create.
func (*ChatOptionUpsert) UpdateValue ¶
func (u *ChatOptionUpsert) UpdateValue() *ChatOptionUpsert
UpdateValue sets the "value" field to the value that was provided on create.
type ChatOptionUpsertBulk ¶
type ChatOptionUpsertBulk struct {
// contains filtered or unexported fields
}
ChatOptionUpsertBulk is the builder for "upsert"-ing a bulk of ChatOption nodes.
func (*ChatOptionUpsertBulk) AddChatID ¶
func (u *ChatOptionUpsertBulk) AddChatID(v int64) *ChatOptionUpsertBulk
AddChatID adds v to the "chat_id" field.
func (*ChatOptionUpsertBulk) DoNothing ¶
func (u *ChatOptionUpsertBulk) DoNothing() *ChatOptionUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ChatOptionUpsertBulk) Exec ¶
func (u *ChatOptionUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatOptionUpsertBulk) ExecX ¶
func (u *ChatOptionUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatOptionUpsertBulk) Ignore ¶
func (u *ChatOptionUpsertBulk) Ignore() *ChatOptionUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.ChatOption.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ChatOptionUpsertBulk) SetChatID ¶
func (u *ChatOptionUpsertBulk) SetChatID(v int64) *ChatOptionUpsertBulk
SetChatID sets the "chat_id" field.
func (*ChatOptionUpsertBulk) SetKey ¶
func (u *ChatOptionUpsertBulk) SetKey(v string) *ChatOptionUpsertBulk
SetKey sets the "key" field.
func (*ChatOptionUpsertBulk) SetUpdateAt ¶
func (u *ChatOptionUpsertBulk) SetUpdateAt(v time.Time) *ChatOptionUpsertBulk
SetUpdateAt sets the "update_at" field.
func (*ChatOptionUpsertBulk) SetValue ¶
func (u *ChatOptionUpsertBulk) SetValue(v string) *ChatOptionUpsertBulk
SetValue sets the "value" field.
func (*ChatOptionUpsertBulk) Update ¶
func (u *ChatOptionUpsertBulk) Update(set func(*ChatOptionUpsert)) *ChatOptionUpsertBulk
Update allows overriding fields `UPDATE` values. See the ChatOptionCreateBulk.OnConflict documentation for more info.
func (*ChatOptionUpsertBulk) UpdateChatID ¶
func (u *ChatOptionUpsertBulk) UpdateChatID() *ChatOptionUpsertBulk
UpdateChatID sets the "chat_id" field to the value that was provided on create.
func (*ChatOptionUpsertBulk) UpdateKey ¶
func (u *ChatOptionUpsertBulk) UpdateKey() *ChatOptionUpsertBulk
UpdateKey sets the "key" field to the value that was provided on create.
func (*ChatOptionUpsertBulk) UpdateNewValues ¶
func (u *ChatOptionUpsertBulk) UpdateNewValues() *ChatOptionUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.ChatOption.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(chatoption.FieldID) }), ). Exec(ctx)
func (*ChatOptionUpsertBulk) UpdateUpdateAt ¶
func (u *ChatOptionUpsertBulk) UpdateUpdateAt() *ChatOptionUpsertBulk
UpdateUpdateAt sets the "update_at" field to the value that was provided on create.
func (*ChatOptionUpsertBulk) UpdateValue ¶
func (u *ChatOptionUpsertBulk) UpdateValue() *ChatOptionUpsertBulk
UpdateValue sets the "value" field to the value that was provided on create.
type ChatOptionUpsertOne ¶
type ChatOptionUpsertOne struct {
// contains filtered or unexported fields
}
ChatOptionUpsertOne is the builder for "upsert"-ing
one ChatOption node.
func (*ChatOptionUpsertOne) AddChatID ¶
func (u *ChatOptionUpsertOne) AddChatID(v int64) *ChatOptionUpsertOne
AddChatID adds v to the "chat_id" field.
func (*ChatOptionUpsertOne) DoNothing ¶
func (u *ChatOptionUpsertOne) DoNothing() *ChatOptionUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ChatOptionUpsertOne) Exec ¶
func (u *ChatOptionUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatOptionUpsertOne) ExecX ¶
func (u *ChatOptionUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatOptionUpsertOne) ID ¶
func (u *ChatOptionUpsertOne) ID(ctx context.Context) (id int64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*ChatOptionUpsertOne) IDX ¶
func (u *ChatOptionUpsertOne) IDX(ctx context.Context) int64
IDX is like ID, but panics if an error occurs.
func (*ChatOptionUpsertOne) Ignore ¶
func (u *ChatOptionUpsertOne) Ignore() *ChatOptionUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.ChatOption.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ChatOptionUpsertOne) SetChatID ¶
func (u *ChatOptionUpsertOne) SetChatID(v int64) *ChatOptionUpsertOne
SetChatID sets the "chat_id" field.
func (*ChatOptionUpsertOne) SetKey ¶
func (u *ChatOptionUpsertOne) SetKey(v string) *ChatOptionUpsertOne
SetKey sets the "key" field.
func (*ChatOptionUpsertOne) SetUpdateAt ¶
func (u *ChatOptionUpsertOne) SetUpdateAt(v time.Time) *ChatOptionUpsertOne
SetUpdateAt sets the "update_at" field.
func (*ChatOptionUpsertOne) SetValue ¶
func (u *ChatOptionUpsertOne) SetValue(v string) *ChatOptionUpsertOne
SetValue sets the "value" field.
func (*ChatOptionUpsertOne) Update ¶
func (u *ChatOptionUpsertOne) Update(set func(*ChatOptionUpsert)) *ChatOptionUpsertOne
Update allows overriding fields `UPDATE` values. See the ChatOptionCreate.OnConflict documentation for more info.
func (*ChatOptionUpsertOne) UpdateChatID ¶
func (u *ChatOptionUpsertOne) UpdateChatID() *ChatOptionUpsertOne
UpdateChatID sets the "chat_id" field to the value that was provided on create.
func (*ChatOptionUpsertOne) UpdateKey ¶
func (u *ChatOptionUpsertOne) UpdateKey() *ChatOptionUpsertOne
UpdateKey sets the "key" field to the value that was provided on create.
func (*ChatOptionUpsertOne) UpdateNewValues ¶
func (u *ChatOptionUpsertOne) UpdateNewValues() *ChatOptionUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.ChatOption.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(chatoption.FieldID) }), ). Exec(ctx)
func (*ChatOptionUpsertOne) UpdateUpdateAt ¶
func (u *ChatOptionUpsertOne) UpdateUpdateAt() *ChatOptionUpsertOne
UpdateUpdateAt sets the "update_at" field to the value that was provided on create.
func (*ChatOptionUpsertOne) UpdateValue ¶
func (u *ChatOptionUpsertOne) UpdateValue() *ChatOptionUpsertOne
UpdateValue sets the "value" field to the value that was provided on create.
type ChatQuery ¶
type ChatQuery struct {
// contains filtered or unexported fields
}
ChatQuery is the builder for querying Chat entities.
func (*ChatQuery) Aggregate ¶
func (cq *ChatQuery) Aggregate(fns ...AggregateFunc) *ChatSelect
Aggregate returns a ChatSelect configured with the given aggregations.
func (*ChatQuery) Clone ¶
Clone returns a duplicate of the ChatQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ChatQuery) ExecContext ¶
func (c *ChatQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ChatQuery) First ¶
First returns the first Chat entity from the query. Returns a *NotFoundError when no Chat was found.
func (*ChatQuery) FirstID ¶
FirstID returns the first Chat ID from the query. Returns a *NotFoundError when no Chat ID was found.
func (*ChatQuery) ForShare ¶
func (cq *ChatQuery) ForShare(opts ...sql.LockOption) *ChatQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*ChatQuery) ForUpdate ¶
func (cq *ChatQuery) ForUpdate(opts ...sql.LockOption) *ChatQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*ChatQuery) GroupBy ¶
func (cq *ChatQuery) GroupBy(field string, fields ...string) *ChatGroupBy
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 { ChatID int64 `json:"chat_id,omitempty"` Count int `json:"count,omitempty"` } client.Chat.Query(). GroupBy(chat.FieldChatID). Aggregate(entity.Count()). Scan(ctx, &v)
func (*ChatQuery) Modify ¶
func (cq *ChatQuery) Modify(modifiers ...func(s *sql.Selector)) *ChatSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*ChatQuery) Only ¶
Only returns a single Chat entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Chat entity is found. Returns a *NotFoundError when no Chat entities are found.
func (*ChatQuery) OnlyID ¶
OnlyID is like Only, but returns the only Chat ID in the query. Returns a *NotSingularError when more than one Chat ID is found. Returns a *NotFoundError when no entities are found.
func (*ChatQuery) QueryContext ¶
func (c *ChatQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ChatQuery) Select ¶
func (cq *ChatQuery) Select(fields ...string) *ChatSelect
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 { ChatID int64 `json:"chat_id,omitempty"` } client.Chat.Query(). Select(chat.FieldChatID). Scan(ctx, &v)
type ChatSelect ¶
type ChatSelect struct { *ChatQuery // contains filtered or unexported fields }
ChatSelect is the builder for selecting fields of Chat entities.
func (*ChatSelect) Aggregate ¶
func (cs *ChatSelect) Aggregate(fns ...AggregateFunc) *ChatSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ChatSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ChatSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (ChatSelect) ExecContext ¶
func (c ChatSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ChatSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ChatSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ChatSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ChatSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ChatSelect) Modify ¶
func (cs *ChatSelect) Modify(modifiers ...func(s *sql.Selector)) *ChatSelect
Modify adds a query modifier for attaching custom logic to queries.
func (ChatSelect) QueryContext ¶
func (c ChatSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ChatSelect) Scan ¶
func (cs *ChatSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ChatSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ChatUpdate ¶
type ChatUpdate struct {
// contains filtered or unexported fields
}
ChatUpdate is the builder for updating Chat entities.
func (*ChatUpdate) AddChatID ¶
func (cu *ChatUpdate) AddChatID(i int64) *ChatUpdate
AddChatID adds i to the "chat_id" field.
func (*ChatUpdate) Exec ¶
func (cu *ChatUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatUpdate) ExecContext ¶
func (c *ChatUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ChatUpdate) ExecX ¶
func (cu *ChatUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatUpdate) Modify ¶
func (cu *ChatUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ChatUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ChatUpdate) Mutation ¶
func (cu *ChatUpdate) Mutation() *ChatMutation
Mutation returns the ChatMutation object of the builder.
func (*ChatUpdate) QueryContext ¶
func (c *ChatUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ChatUpdate) Save ¶
func (cu *ChatUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ChatUpdate) SaveX ¶
func (cu *ChatUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ChatUpdate) SetChatID ¶
func (cu *ChatUpdate) SetChatID(i int64) *ChatUpdate
SetChatID sets the "chat_id" field.
func (*ChatUpdate) SetDescription ¶
func (cu *ChatUpdate) SetDescription(s string) *ChatUpdate
SetDescription sets the "description" field.
func (*ChatUpdate) SetFirstName ¶
func (cu *ChatUpdate) SetFirstName(s string) *ChatUpdate
SetFirstName sets the "first_name" field.
func (*ChatUpdate) SetIsForum ¶
func (cu *ChatUpdate) SetIsForum(b bool) *ChatUpdate
SetIsForum sets the "is_forum" field.
func (*ChatUpdate) SetLastName ¶
func (cu *ChatUpdate) SetLastName(s string) *ChatUpdate
SetLastName sets the "last_name" field.
func (*ChatUpdate) SetNillableDescription ¶
func (cu *ChatUpdate) SetNillableDescription(s *string) *ChatUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ChatUpdate) SetNillableFirstName ¶
func (cu *ChatUpdate) SetNillableFirstName(s *string) *ChatUpdate
SetNillableFirstName sets the "first_name" field if the given value is not nil.
func (*ChatUpdate) SetNillableIsForum ¶
func (cu *ChatUpdate) SetNillableIsForum(b *bool) *ChatUpdate
SetNillableIsForum sets the "is_forum" field if the given value is not nil.
func (*ChatUpdate) SetNillableLastName ¶
func (cu *ChatUpdate) SetNillableLastName(s *string) *ChatUpdate
SetNillableLastName sets the "last_name" field if the given value is not nil.
func (*ChatUpdate) SetNillableTitle ¶
func (cu *ChatUpdate) SetNillableTitle(s *string) *ChatUpdate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*ChatUpdate) SetNillableType ¶
func (cu *ChatUpdate) SetNillableType(s *string) *ChatUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*ChatUpdate) SetNillableUserName ¶
func (cu *ChatUpdate) SetNillableUserName(s *string) *ChatUpdate
SetNillableUserName sets the "user_name" field if the given value is not nil.
func (*ChatUpdate) SetTitle ¶
func (cu *ChatUpdate) SetTitle(s string) *ChatUpdate
SetTitle sets the "title" field.
func (*ChatUpdate) SetType ¶
func (cu *ChatUpdate) SetType(s string) *ChatUpdate
SetType sets the "type" field.
func (*ChatUpdate) SetUpdateAt ¶
func (cu *ChatUpdate) SetUpdateAt(t time.Time) *ChatUpdate
SetUpdateAt sets the "update_at" field.
func (*ChatUpdate) SetUserName ¶
func (cu *ChatUpdate) SetUserName(s string) *ChatUpdate
SetUserName sets the "user_name" field.
func (*ChatUpdate) Where ¶
func (cu *ChatUpdate) Where(ps ...predicate.Chat) *ChatUpdate
Where appends a list predicates to the ChatUpdate builder.
type ChatUpdateOne ¶
type ChatUpdateOne struct {
// contains filtered or unexported fields
}
ChatUpdateOne is the builder for updating a single Chat entity.
func (*ChatUpdateOne) AddChatID ¶
func (cuo *ChatUpdateOne) AddChatID(i int64) *ChatUpdateOne
AddChatID adds i to the "chat_id" field.
func (*ChatUpdateOne) Exec ¶
func (cuo *ChatUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ChatUpdateOne) ExecContext ¶
func (c *ChatUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*ChatUpdateOne) ExecX ¶
func (cuo *ChatUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatUpdateOne) Modify ¶
func (cuo *ChatUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ChatUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ChatUpdateOne) Mutation ¶
func (cuo *ChatUpdateOne) Mutation() *ChatMutation
Mutation returns the ChatMutation object of the builder.
func (*ChatUpdateOne) QueryContext ¶
func (c *ChatUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*ChatUpdateOne) Save ¶
func (cuo *ChatUpdateOne) Save(ctx context.Context) (*Chat, error)
Save executes the query and returns the updated Chat entity.
func (*ChatUpdateOne) SaveX ¶
func (cuo *ChatUpdateOne) SaveX(ctx context.Context) *Chat
SaveX is like Save, but panics if an error occurs.
func (*ChatUpdateOne) Select ¶
func (cuo *ChatUpdateOne) Select(field string, fields ...string) *ChatUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ChatUpdateOne) SetChatID ¶
func (cuo *ChatUpdateOne) SetChatID(i int64) *ChatUpdateOne
SetChatID sets the "chat_id" field.
func (*ChatUpdateOne) SetDescription ¶
func (cuo *ChatUpdateOne) SetDescription(s string) *ChatUpdateOne
SetDescription sets the "description" field.
func (*ChatUpdateOne) SetFirstName ¶
func (cuo *ChatUpdateOne) SetFirstName(s string) *ChatUpdateOne
SetFirstName sets the "first_name" field.
func (*ChatUpdateOne) SetIsForum ¶
func (cuo *ChatUpdateOne) SetIsForum(b bool) *ChatUpdateOne
SetIsForum sets the "is_forum" field.
func (*ChatUpdateOne) SetLastName ¶
func (cuo *ChatUpdateOne) SetLastName(s string) *ChatUpdateOne
SetLastName sets the "last_name" field.
func (*ChatUpdateOne) SetNillableDescription ¶
func (cuo *ChatUpdateOne) SetNillableDescription(s *string) *ChatUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ChatUpdateOne) SetNillableFirstName ¶
func (cuo *ChatUpdateOne) SetNillableFirstName(s *string) *ChatUpdateOne
SetNillableFirstName sets the "first_name" field if the given value is not nil.
func (*ChatUpdateOne) SetNillableIsForum ¶
func (cuo *ChatUpdateOne) SetNillableIsForum(b *bool) *ChatUpdateOne
SetNillableIsForum sets the "is_forum" field if the given value is not nil.
func (*ChatUpdateOne) SetNillableLastName ¶
func (cuo *ChatUpdateOne) SetNillableLastName(s *string) *ChatUpdateOne
SetNillableLastName sets the "last_name" field if the given value is not nil.
func (*ChatUpdateOne) SetNillableTitle ¶
func (cuo *ChatUpdateOne) SetNillableTitle(s *string) *ChatUpdateOne
SetNillableTitle sets the "title" field if the given value is not nil.
func (*ChatUpdateOne) SetNillableType ¶
func (cuo *ChatUpdateOne) SetNillableType(s *string) *ChatUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*ChatUpdateOne) SetNillableUserName ¶
func (cuo *ChatUpdateOne) SetNillableUserName(s *string) *ChatUpdateOne
SetNillableUserName sets the "user_name" field if the given value is not nil.
func (*ChatUpdateOne) SetTitle ¶
func (cuo *ChatUpdateOne) SetTitle(s string) *ChatUpdateOne
SetTitle sets the "title" field.
func (*ChatUpdateOne) SetType ¶
func (cuo *ChatUpdateOne) SetType(s string) *ChatUpdateOne
SetType sets the "type" field.
func (*ChatUpdateOne) SetUpdateAt ¶
func (cuo *ChatUpdateOne) SetUpdateAt(t time.Time) *ChatUpdateOne
SetUpdateAt sets the "update_at" field.
func (*ChatUpdateOne) SetUserName ¶
func (cuo *ChatUpdateOne) SetUserName(s string) *ChatUpdateOne
SetUserName sets the "user_name" field.
func (*ChatUpdateOne) Where ¶
func (cuo *ChatUpdateOne) Where(ps ...predicate.Chat) *ChatUpdateOne
Where appends a list predicates to the ChatUpdate builder.
type ChatUpsert ¶
ChatUpsert is the "OnConflict" setter.
func (*ChatUpsert) AddChatID ¶
func (u *ChatUpsert) AddChatID(v int64) *ChatUpsert
AddChatID adds v to the "chat_id" field.
func (*ChatUpsert) SetChatID ¶
func (u *ChatUpsert) SetChatID(v int64) *ChatUpsert
SetChatID sets the "chat_id" field.
func (*ChatUpsert) SetDescription ¶
func (u *ChatUpsert) SetDescription(v string) *ChatUpsert
SetDescription sets the "description" field.
func (*ChatUpsert) SetFirstName ¶
func (u *ChatUpsert) SetFirstName(v string) *ChatUpsert
SetFirstName sets the "first_name" field.
func (*ChatUpsert) SetIsForum ¶
func (u *ChatUpsert) SetIsForum(v bool) *ChatUpsert
SetIsForum sets the "is_forum" field.
func (*ChatUpsert) SetLastName ¶
func (u *ChatUpsert) SetLastName(v string) *ChatUpsert
SetLastName sets the "last_name" field.
func (*ChatUpsert) SetTitle ¶
func (u *ChatUpsert) SetTitle(v string) *ChatUpsert
SetTitle sets the "title" field.
func (*ChatUpsert) SetType ¶
func (u *ChatUpsert) SetType(v string) *ChatUpsert
SetType sets the "type" field.
func (*ChatUpsert) SetUpdateAt ¶
func (u *ChatUpsert) SetUpdateAt(v time.Time) *ChatUpsert
SetUpdateAt sets the "update_at" field.
func (*ChatUpsert) SetUserName ¶
func (u *ChatUpsert) SetUserName(v string) *ChatUpsert
SetUserName sets the "user_name" field.
func (*ChatUpsert) UpdateChatID ¶
func (u *ChatUpsert) UpdateChatID() *ChatUpsert
UpdateChatID sets the "chat_id" field to the value that was provided on create.
func (*ChatUpsert) UpdateDescription ¶
func (u *ChatUpsert) UpdateDescription() *ChatUpsert
UpdateDescription sets the "description" field to the value that was provided on create.
func (*ChatUpsert) UpdateFirstName ¶
func (u *ChatUpsert) UpdateFirstName() *ChatUpsert
UpdateFirstName sets the "first_name" field to the value that was provided on create.
func (*ChatUpsert) UpdateIsForum ¶
func (u *ChatUpsert) UpdateIsForum() *ChatUpsert
UpdateIsForum sets the "is_forum" field to the value that was provided on create.
func (*ChatUpsert) UpdateLastName ¶
func (u *ChatUpsert) UpdateLastName() *ChatUpsert
UpdateLastName sets the "last_name" field to the value that was provided on create.
func (*ChatUpsert) UpdateTitle ¶
func (u *ChatUpsert) UpdateTitle() *ChatUpsert
UpdateTitle sets the "title" field to the value that was provided on create.
func (*ChatUpsert) UpdateType ¶
func (u *ChatUpsert) UpdateType() *ChatUpsert
UpdateType sets the "type" field to the value that was provided on create.
func (*ChatUpsert) UpdateUpdateAt ¶
func (u *ChatUpsert) UpdateUpdateAt() *ChatUpsert
UpdateUpdateAt sets the "update_at" field to the value that was provided on create.
func (*ChatUpsert) UpdateUserName ¶
func (u *ChatUpsert) UpdateUserName() *ChatUpsert
UpdateUserName sets the "user_name" field to the value that was provided on create.
type ChatUpsertBulk ¶
type ChatUpsertBulk struct {
// contains filtered or unexported fields
}
ChatUpsertBulk is the builder for "upsert"-ing a bulk of Chat nodes.
func (*ChatUpsertBulk) AddChatID ¶
func (u *ChatUpsertBulk) AddChatID(v int64) *ChatUpsertBulk
AddChatID adds v to the "chat_id" field.
func (*ChatUpsertBulk) DoNothing ¶
func (u *ChatUpsertBulk) DoNothing() *ChatUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ChatUpsertBulk) Exec ¶
func (u *ChatUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatUpsertBulk) ExecX ¶
func (u *ChatUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatUpsertBulk) Ignore ¶
func (u *ChatUpsertBulk) Ignore() *ChatUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Chat.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ChatUpsertBulk) SetChatID ¶
func (u *ChatUpsertBulk) SetChatID(v int64) *ChatUpsertBulk
SetChatID sets the "chat_id" field.
func (*ChatUpsertBulk) SetDescription ¶
func (u *ChatUpsertBulk) SetDescription(v string) *ChatUpsertBulk
SetDescription sets the "description" field.
func (*ChatUpsertBulk) SetFirstName ¶
func (u *ChatUpsertBulk) SetFirstName(v string) *ChatUpsertBulk
SetFirstName sets the "first_name" field.
func (*ChatUpsertBulk) SetIsForum ¶
func (u *ChatUpsertBulk) SetIsForum(v bool) *ChatUpsertBulk
SetIsForum sets the "is_forum" field.
func (*ChatUpsertBulk) SetLastName ¶
func (u *ChatUpsertBulk) SetLastName(v string) *ChatUpsertBulk
SetLastName sets the "last_name" field.
func (*ChatUpsertBulk) SetTitle ¶
func (u *ChatUpsertBulk) SetTitle(v string) *ChatUpsertBulk
SetTitle sets the "title" field.
func (*ChatUpsertBulk) SetType ¶
func (u *ChatUpsertBulk) SetType(v string) *ChatUpsertBulk
SetType sets the "type" field.
func (*ChatUpsertBulk) SetUpdateAt ¶
func (u *ChatUpsertBulk) SetUpdateAt(v time.Time) *ChatUpsertBulk
SetUpdateAt sets the "update_at" field.
func (*ChatUpsertBulk) SetUserName ¶
func (u *ChatUpsertBulk) SetUserName(v string) *ChatUpsertBulk
SetUserName sets the "user_name" field.
func (*ChatUpsertBulk) Update ¶
func (u *ChatUpsertBulk) Update(set func(*ChatUpsert)) *ChatUpsertBulk
Update allows overriding fields `UPDATE` values. See the ChatCreateBulk.OnConflict documentation for more info.
func (*ChatUpsertBulk) UpdateChatID ¶
func (u *ChatUpsertBulk) UpdateChatID() *ChatUpsertBulk
UpdateChatID sets the "chat_id" field to the value that was provided on create.
func (*ChatUpsertBulk) UpdateDescription ¶
func (u *ChatUpsertBulk) UpdateDescription() *ChatUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (*ChatUpsertBulk) UpdateFirstName ¶
func (u *ChatUpsertBulk) UpdateFirstName() *ChatUpsertBulk
UpdateFirstName sets the "first_name" field to the value that was provided on create.
func (*ChatUpsertBulk) UpdateIsForum ¶
func (u *ChatUpsertBulk) UpdateIsForum() *ChatUpsertBulk
UpdateIsForum sets the "is_forum" field to the value that was provided on create.
func (*ChatUpsertBulk) UpdateLastName ¶
func (u *ChatUpsertBulk) UpdateLastName() *ChatUpsertBulk
UpdateLastName sets the "last_name" field to the value that was provided on create.
func (*ChatUpsertBulk) UpdateNewValues ¶
func (u *ChatUpsertBulk) UpdateNewValues() *ChatUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Chat.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(chat.FieldID) }), ). Exec(ctx)
func (*ChatUpsertBulk) UpdateTitle ¶
func (u *ChatUpsertBulk) UpdateTitle() *ChatUpsertBulk
UpdateTitle sets the "title" field to the value that was provided on create.
func (*ChatUpsertBulk) UpdateType ¶
func (u *ChatUpsertBulk) UpdateType() *ChatUpsertBulk
UpdateType sets the "type" field to the value that was provided on create.
func (*ChatUpsertBulk) UpdateUpdateAt ¶
func (u *ChatUpsertBulk) UpdateUpdateAt() *ChatUpsertBulk
UpdateUpdateAt sets the "update_at" field to the value that was provided on create.
func (*ChatUpsertBulk) UpdateUserName ¶
func (u *ChatUpsertBulk) UpdateUserName() *ChatUpsertBulk
UpdateUserName sets the "user_name" field to the value that was provided on create.
type ChatUpsertOne ¶
type ChatUpsertOne struct {
// contains filtered or unexported fields
}
ChatUpsertOne is the builder for "upsert"-ing
one Chat node.
func (*ChatUpsertOne) AddChatID ¶
func (u *ChatUpsertOne) AddChatID(v int64) *ChatUpsertOne
AddChatID adds v to the "chat_id" field.
func (*ChatUpsertOne) DoNothing ¶
func (u *ChatUpsertOne) DoNothing() *ChatUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ChatUpsertOne) Exec ¶
func (u *ChatUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*ChatUpsertOne) ExecX ¶
func (u *ChatUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ChatUpsertOne) ID ¶
func (u *ChatUpsertOne) ID(ctx context.Context) (id int64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*ChatUpsertOne) IDX ¶
func (u *ChatUpsertOne) IDX(ctx context.Context) int64
IDX is like ID, but panics if an error occurs.
func (*ChatUpsertOne) Ignore ¶
func (u *ChatUpsertOne) Ignore() *ChatUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Chat.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ChatUpsertOne) SetChatID ¶
func (u *ChatUpsertOne) SetChatID(v int64) *ChatUpsertOne
SetChatID sets the "chat_id" field.
func (*ChatUpsertOne) SetDescription ¶
func (u *ChatUpsertOne) SetDescription(v string) *ChatUpsertOne
SetDescription sets the "description" field.
func (*ChatUpsertOne) SetFirstName ¶
func (u *ChatUpsertOne) SetFirstName(v string) *ChatUpsertOne
SetFirstName sets the "first_name" field.
func (*ChatUpsertOne) SetIsForum ¶
func (u *ChatUpsertOne) SetIsForum(v bool) *ChatUpsertOne
SetIsForum sets the "is_forum" field.
func (*ChatUpsertOne) SetLastName ¶
func (u *ChatUpsertOne) SetLastName(v string) *ChatUpsertOne
SetLastName sets the "last_name" field.
func (*ChatUpsertOne) SetTitle ¶
func (u *ChatUpsertOne) SetTitle(v string) *ChatUpsertOne
SetTitle sets the "title" field.
func (*ChatUpsertOne) SetType ¶
func (u *ChatUpsertOne) SetType(v string) *ChatUpsertOne
SetType sets the "type" field.
func (*ChatUpsertOne) SetUpdateAt ¶
func (u *ChatUpsertOne) SetUpdateAt(v time.Time) *ChatUpsertOne
SetUpdateAt sets the "update_at" field.
func (*ChatUpsertOne) SetUserName ¶
func (u *ChatUpsertOne) SetUserName(v string) *ChatUpsertOne
SetUserName sets the "user_name" field.
func (*ChatUpsertOne) Update ¶
func (u *ChatUpsertOne) Update(set func(*ChatUpsert)) *ChatUpsertOne
Update allows overriding fields `UPDATE` values. See the ChatCreate.OnConflict documentation for more info.
func (*ChatUpsertOne) UpdateChatID ¶
func (u *ChatUpsertOne) UpdateChatID() *ChatUpsertOne
UpdateChatID sets the "chat_id" field to the value that was provided on create.
func (*ChatUpsertOne) UpdateDescription ¶
func (u *ChatUpsertOne) UpdateDescription() *ChatUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (*ChatUpsertOne) UpdateFirstName ¶
func (u *ChatUpsertOne) UpdateFirstName() *ChatUpsertOne
UpdateFirstName sets the "first_name" field to the value that was provided on create.
func (*ChatUpsertOne) UpdateIsForum ¶
func (u *ChatUpsertOne) UpdateIsForum() *ChatUpsertOne
UpdateIsForum sets the "is_forum" field to the value that was provided on create.
func (*ChatUpsertOne) UpdateLastName ¶
func (u *ChatUpsertOne) UpdateLastName() *ChatUpsertOne
UpdateLastName sets the "last_name" field to the value that was provided on create.
func (*ChatUpsertOne) UpdateNewValues ¶
func (u *ChatUpsertOne) UpdateNewValues() *ChatUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Chat.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(chat.FieldID) }), ). Exec(ctx)
func (*ChatUpsertOne) UpdateTitle ¶
func (u *ChatUpsertOne) UpdateTitle() *ChatUpsertOne
UpdateTitle sets the "title" field to the value that was provided on create.
func (*ChatUpsertOne) UpdateType ¶
func (u *ChatUpsertOne) UpdateType() *ChatUpsertOne
UpdateType sets the "type" field to the value that was provided on create.
func (*ChatUpsertOne) UpdateUpdateAt ¶
func (u *ChatUpsertOne) UpdateUpdateAt() *ChatUpsertOne
UpdateUpdateAt sets the "update_at" field to the value that was provided on create.
func (*ChatUpsertOne) UpdateUserName ¶
func (u *ChatUpsertOne) UpdateUserName() *ChatUpsertOne
UpdateUserName sets the "user_name" field to the value that was provided on create.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Chat is the client for interacting with the Chat builders. Chat *ChatClient // ChatOption is the client for interacting with the ChatOption builders. ChatOption *ChatOptionClient // GameAccount is the client for interacting with the GameAccount builders. GameAccount *GameAccountClient // GameRole is the client for interacting with the GameRole builders. GameRole *GameRoleClient // GameRoleAttribute is the client for interacting with the GameRoleAttribute builders. GameRoleAttribute *GameRoleAttributeClient // User is the client for interacting with the User builders. User *UserClient // 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(). Chat. Query(). Count(ctx)
func (*Client) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
func (*Client) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
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 GameAccount ¶
type GameAccount struct { // ID of the ent. ID int64 `json:"id,omitempty"` // UserID holds the value of the "user_id" field. UserID int64 `json:"user_id,omitempty"` // AccountID holds the value of the "account_id" field. AccountID string `json:"account_id,omitempty"` // GameToken holds the value of the "game_token" field. GameToken string `json:"game_token,omitempty"` // CookieToken holds the value of the "cookie_token" field. CookieToken string `json:"cookie_token,omitempty"` // Stoken holds the value of the "stoken" field. Stoken string `json:"stoken,omitempty"` // Mid holds the value of the "mid" field. Mid string `json:"mid,omitempty"` // CreateAt holds the value of the "create_at" field. CreateAt time.Time `json:"create_at,omitempty"` // UpdateAt holds the value of the "update_at" field. UpdateAt time.Time `json:"update_at,omitempty"` // contains filtered or unexported fields }
GameAccount is the model entity for the GameAccount schema.
func (*GameAccount) ExecContext ¶
func (c *GameAccount) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameAccount) QueryContext ¶
func (c *GameAccount) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameAccount) String ¶
func (ga *GameAccount) String() string
String implements the fmt.Stringer.
func (*GameAccount) Unwrap ¶
func (ga *GameAccount) Unwrap() *GameAccount
Unwrap unwraps the GameAccount 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 (*GameAccount) Update ¶
func (ga *GameAccount) Update() *GameAccountUpdateOne
Update returns a builder for updating this GameAccount. Note that you need to call GameAccount.Unwrap() before calling this method if this GameAccount was returned from a transaction, and the transaction was committed or rolled back.
type GameAccountClient ¶
type GameAccountClient struct {
// contains filtered or unexported fields
}
GameAccountClient is a client for the GameAccount schema.
func NewGameAccountClient ¶
func NewGameAccountClient(c config) *GameAccountClient
NewGameAccountClient returns a client for the GameAccount from the given config.
func (*GameAccountClient) Create ¶
func (c *GameAccountClient) Create() *GameAccountCreate
Create returns a builder for creating a GameAccount entity.
func (*GameAccountClient) CreateBulk ¶
func (c *GameAccountClient) CreateBulk(builders ...*GameAccountCreate) *GameAccountCreateBulk
CreateBulk returns a builder for creating a bulk of GameAccount entities.
func (*GameAccountClient) Delete ¶
func (c *GameAccountClient) Delete() *GameAccountDelete
Delete returns a delete builder for GameAccount.
func (*GameAccountClient) DeleteOne ¶
func (c *GameAccountClient) DeleteOne(ga *GameAccount) *GameAccountDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GameAccountClient) DeleteOneID ¶
func (c *GameAccountClient) DeleteOneID(id int64) *GameAccountDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GameAccountClient) ExecContext ¶
func (c *GameAccountClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameAccountClient) Get ¶
func (c *GameAccountClient) Get(ctx context.Context, id int64) (*GameAccount, error)
Get returns a GameAccount entity by its id.
func (*GameAccountClient) GetX ¶
func (c *GameAccountClient) GetX(ctx context.Context, id int64) *GameAccount
GetX is like Get, but panics if an error occurs.
func (*GameAccountClient) Hooks ¶
func (c *GameAccountClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GameAccountClient) Intercept ¶
func (c *GameAccountClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `gameaccount.Intercept(f(g(h())))`.
func (*GameAccountClient) Interceptors ¶
func (c *GameAccountClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GameAccountClient) Query ¶
func (c *GameAccountClient) Query() *GameAccountQuery
Query returns a query builder for GameAccount.
func (*GameAccountClient) QueryContext ¶
func (c *GameAccountClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameAccountClient) Update ¶
func (c *GameAccountClient) Update() *GameAccountUpdate
Update returns an update builder for GameAccount.
func (*GameAccountClient) UpdateOne ¶
func (c *GameAccountClient) UpdateOne(ga *GameAccount) *GameAccountUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GameAccountClient) UpdateOneID ¶
func (c *GameAccountClient) UpdateOneID(id int64) *GameAccountUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GameAccountClient) Use ¶
func (c *GameAccountClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `gameaccount.Hooks(f(g(h())))`.
type GameAccountCreate ¶
type GameAccountCreate struct {
// contains filtered or unexported fields
}
GameAccountCreate is the builder for creating a GameAccount entity.
func (*GameAccountCreate) Exec ¶
func (gac *GameAccountCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GameAccountCreate) ExecContext ¶
func (c *GameAccountCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameAccountCreate) ExecX ¶
func (gac *GameAccountCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameAccountCreate) Mutation ¶
func (gac *GameAccountCreate) Mutation() *GameAccountMutation
Mutation returns the GameAccountMutation object of the builder.
func (*GameAccountCreate) OnConflict ¶
func (gac *GameAccountCreate) OnConflict(opts ...sql.ConflictOption) *GameAccountUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.GameAccount.Create(). SetUserID(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.GameAccountUpsert) { SetUserID(v+v). }). Exec(ctx)
func (*GameAccountCreate) OnConflictColumns ¶
func (gac *GameAccountCreate) OnConflictColumns(columns ...string) *GameAccountUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.GameAccount.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*GameAccountCreate) QueryContext ¶
func (c *GameAccountCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameAccountCreate) Save ¶
func (gac *GameAccountCreate) Save(ctx context.Context) (*GameAccount, error)
Save creates the GameAccount in the database.
func (*GameAccountCreate) SaveX ¶
func (gac *GameAccountCreate) SaveX(ctx context.Context) *GameAccount
SaveX calls Save and panics if Save returns an error.
func (*GameAccountCreate) SetAccountID ¶
func (gac *GameAccountCreate) SetAccountID(s string) *GameAccountCreate
SetAccountID sets the "account_id" field.
func (*GameAccountCreate) SetCookieToken ¶
func (gac *GameAccountCreate) SetCookieToken(s string) *GameAccountCreate
SetCookieToken sets the "cookie_token" field.
func (*GameAccountCreate) SetCreateAt ¶
func (gac *GameAccountCreate) SetCreateAt(t time.Time) *GameAccountCreate
SetCreateAt sets the "create_at" field.
func (*GameAccountCreate) SetGameToken ¶
func (gac *GameAccountCreate) SetGameToken(s string) *GameAccountCreate
SetGameToken sets the "game_token" field.
func (*GameAccountCreate) SetID ¶
func (gac *GameAccountCreate) SetID(i int64) *GameAccountCreate
SetID sets the "id" field.
func (*GameAccountCreate) SetMid ¶
func (gac *GameAccountCreate) SetMid(s string) *GameAccountCreate
SetMid sets the "mid" field.
func (*GameAccountCreate) SetNillableCookieToken ¶
func (gac *GameAccountCreate) SetNillableCookieToken(s *string) *GameAccountCreate
SetNillableCookieToken sets the "cookie_token" field if the given value is not nil.
func (*GameAccountCreate) SetNillableCreateAt ¶
func (gac *GameAccountCreate) SetNillableCreateAt(t *time.Time) *GameAccountCreate
SetNillableCreateAt sets the "create_at" field if the given value is not nil.
func (*GameAccountCreate) SetNillableGameToken ¶
func (gac *GameAccountCreate) SetNillableGameToken(s *string) *GameAccountCreate
SetNillableGameToken sets the "game_token" field if the given value is not nil.
func (*GameAccountCreate) SetNillableMid ¶
func (gac *GameAccountCreate) SetNillableMid(s *string) *GameAccountCreate
SetNillableMid sets the "mid" field if the given value is not nil.
func (*GameAccountCreate) SetNillableStoken ¶
func (gac *GameAccountCreate) SetNillableStoken(s *string) *GameAccountCreate
SetNillableStoken sets the "stoken" field if the given value is not nil.
func (*GameAccountCreate) SetNillableUpdateAt ¶
func (gac *GameAccountCreate) SetNillableUpdateAt(t *time.Time) *GameAccountCreate
SetNillableUpdateAt sets the "update_at" field if the given value is not nil.
func (*GameAccountCreate) SetStoken ¶
func (gac *GameAccountCreate) SetStoken(s string) *GameAccountCreate
SetStoken sets the "stoken" field.
func (*GameAccountCreate) SetUpdateAt ¶
func (gac *GameAccountCreate) SetUpdateAt(t time.Time) *GameAccountCreate
SetUpdateAt sets the "update_at" field.
func (*GameAccountCreate) SetUserID ¶
func (gac *GameAccountCreate) SetUserID(i int64) *GameAccountCreate
SetUserID sets the "user_id" field.
type GameAccountCreateBulk ¶
type GameAccountCreateBulk struct {
// contains filtered or unexported fields
}
GameAccountCreateBulk is the builder for creating many GameAccount entities in bulk.
func (*GameAccountCreateBulk) Exec ¶
func (gacb *GameAccountCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GameAccountCreateBulk) ExecContext ¶
func (c *GameAccountCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameAccountCreateBulk) ExecX ¶
func (gacb *GameAccountCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameAccountCreateBulk) OnConflict ¶
func (gacb *GameAccountCreateBulk) OnConflict(opts ...sql.ConflictOption) *GameAccountUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.GameAccount.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.GameAccountUpsert) { SetUserID(v+v). }). Exec(ctx)
func (*GameAccountCreateBulk) OnConflictColumns ¶
func (gacb *GameAccountCreateBulk) OnConflictColumns(columns ...string) *GameAccountUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.GameAccount.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*GameAccountCreateBulk) QueryContext ¶
func (c *GameAccountCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameAccountCreateBulk) Save ¶
func (gacb *GameAccountCreateBulk) Save(ctx context.Context) ([]*GameAccount, error)
Save creates the GameAccount entities in the database.
func (*GameAccountCreateBulk) SaveX ¶
func (gacb *GameAccountCreateBulk) SaveX(ctx context.Context) []*GameAccount
SaveX is like Save, but panics if an error occurs.
type GameAccountDelete ¶
type GameAccountDelete struct {
// contains filtered or unexported fields
}
GameAccountDelete is the builder for deleting a GameAccount entity.
func (*GameAccountDelete) Exec ¶
func (gad *GameAccountDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GameAccountDelete) ExecContext ¶
func (c *GameAccountDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameAccountDelete) ExecX ¶
func (gad *GameAccountDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GameAccountDelete) QueryContext ¶
func (c *GameAccountDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameAccountDelete) Where ¶
func (gad *GameAccountDelete) Where(ps ...predicate.GameAccount) *GameAccountDelete
Where appends a list predicates to the GameAccountDelete builder.
type GameAccountDeleteOne ¶
type GameAccountDeleteOne struct {
// contains filtered or unexported fields
}
GameAccountDeleteOne is the builder for deleting a single GameAccount entity.
func (*GameAccountDeleteOne) Exec ¶
func (gado *GameAccountDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GameAccountDeleteOne) ExecX ¶
func (gado *GameAccountDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameAccountDeleteOne) Where ¶
func (gado *GameAccountDeleteOne) Where(ps ...predicate.GameAccount) *GameAccountDeleteOne
Where appends a list predicates to the GameAccountDelete builder.
type GameAccountGroupBy ¶
type GameAccountGroupBy struct {
// contains filtered or unexported fields
}
GameAccountGroupBy is the group-by builder for GameAccount entities.
func (*GameAccountGroupBy) Aggregate ¶
func (gagb *GameAccountGroupBy) Aggregate(fns ...AggregateFunc) *GameAccountGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GameAccountGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GameAccountGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GameAccountGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GameAccountGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GameAccountGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GameAccountGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GameAccountGroupBy) Scan ¶
func (gagb *GameAccountGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GameAccountGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GameAccountMutation ¶
type GameAccountMutation struct {
// contains filtered or unexported fields
}
GameAccountMutation represents an operation that mutates the GameAccount nodes in the graph.
func (*GameAccountMutation) AccountID ¶
func (m *GameAccountMutation) AccountID() (r string, exists bool)
AccountID returns the value of the "account_id" field in the mutation.
func (*GameAccountMutation) AddField ¶
func (m *GameAccountMutation) 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 (*GameAccountMutation) AddUserID ¶
func (m *GameAccountMutation) AddUserID(i int64)
AddUserID adds i to the "user_id" field.
func (*GameAccountMutation) AddedEdges ¶
func (m *GameAccountMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GameAccountMutation) AddedField ¶
func (m *GameAccountMutation) 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 (*GameAccountMutation) AddedFields ¶
func (m *GameAccountMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GameAccountMutation) AddedIDs ¶
func (m *GameAccountMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GameAccountMutation) AddedUserID ¶
func (m *GameAccountMutation) AddedUserID() (r int64, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*GameAccountMutation) ClearEdge ¶
func (m *GameAccountMutation) 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 (*GameAccountMutation) ClearField ¶
func (m *GameAccountMutation) 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 (*GameAccountMutation) ClearedEdges ¶
func (m *GameAccountMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GameAccountMutation) ClearedFields ¶
func (m *GameAccountMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GameAccountMutation) Client ¶
func (m GameAccountMutation) 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 (*GameAccountMutation) CookieToken ¶
func (m *GameAccountMutation) CookieToken() (r string, exists bool)
CookieToken returns the value of the "cookie_token" field in the mutation.
func (*GameAccountMutation) CreateAt ¶
func (m *GameAccountMutation) CreateAt() (r time.Time, exists bool)
CreateAt returns the value of the "create_at" field in the mutation.
func (*GameAccountMutation) EdgeCleared ¶
func (m *GameAccountMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GameAccountMutation) ExecContext ¶
func (c *GameAccountMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameAccountMutation) Field ¶
func (m *GameAccountMutation) 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 (*GameAccountMutation) FieldCleared ¶
func (m *GameAccountMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GameAccountMutation) Fields ¶
func (m *GameAccountMutation) 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 (*GameAccountMutation) GameToken ¶
func (m *GameAccountMutation) GameToken() (r string, exists bool)
GameToken returns the value of the "game_token" field in the mutation.
func (*GameAccountMutation) ID ¶
func (m *GameAccountMutation) 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 (*GameAccountMutation) IDs ¶
func (m *GameAccountMutation) 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 (*GameAccountMutation) Mid ¶
func (m *GameAccountMutation) Mid() (r string, exists bool)
Mid returns the value of the "mid" field in the mutation.
func (*GameAccountMutation) OldAccountID ¶
func (m *GameAccountMutation) OldAccountID(ctx context.Context) (v string, err error)
OldAccountID returns the old "account_id" field's value of the GameAccount entity. If the GameAccount 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 (*GameAccountMutation) OldCookieToken ¶
func (m *GameAccountMutation) OldCookieToken(ctx context.Context) (v string, err error)
OldCookieToken returns the old "cookie_token" field's value of the GameAccount entity. If the GameAccount 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 (*GameAccountMutation) OldCreateAt ¶
OldCreateAt returns the old "create_at" field's value of the GameAccount entity. If the GameAccount 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 (*GameAccountMutation) 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 (*GameAccountMutation) OldGameToken ¶
func (m *GameAccountMutation) OldGameToken(ctx context.Context) (v string, err error)
OldGameToken returns the old "game_token" field's value of the GameAccount entity. If the GameAccount 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 (*GameAccountMutation) OldMid ¶
func (m *GameAccountMutation) OldMid(ctx context.Context) (v string, err error)
OldMid returns the old "mid" field's value of the GameAccount entity. If the GameAccount 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 (*GameAccountMutation) OldStoken ¶
func (m *GameAccountMutation) OldStoken(ctx context.Context) (v string, err error)
OldStoken returns the old "stoken" field's value of the GameAccount entity. If the GameAccount 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 (*GameAccountMutation) OldUpdateAt ¶
OldUpdateAt returns the old "update_at" field's value of the GameAccount entity. If the GameAccount 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 (*GameAccountMutation) OldUserID ¶
func (m *GameAccountMutation) OldUserID(ctx context.Context) (v int64, err error)
OldUserID returns the old "user_id" field's value of the GameAccount entity. If the GameAccount 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 (*GameAccountMutation) Op ¶
func (m *GameAccountMutation) Op() Op
Op returns the operation name.
func (*GameAccountMutation) QueryContext ¶
func (c *GameAccountMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameAccountMutation) RemovedEdges ¶
func (m *GameAccountMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GameAccountMutation) RemovedIDs ¶
func (m *GameAccountMutation) 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 (*GameAccountMutation) ResetAccountID ¶
func (m *GameAccountMutation) ResetAccountID()
ResetAccountID resets all changes to the "account_id" field.
func (*GameAccountMutation) ResetCookieToken ¶
func (m *GameAccountMutation) ResetCookieToken()
ResetCookieToken resets all changes to the "cookie_token" field.
func (*GameAccountMutation) ResetCreateAt ¶
func (m *GameAccountMutation) ResetCreateAt()
ResetCreateAt resets all changes to the "create_at" field.
func (*GameAccountMutation) ResetEdge ¶
func (m *GameAccountMutation) 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 (*GameAccountMutation) ResetField ¶
func (m *GameAccountMutation) 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 (*GameAccountMutation) ResetGameToken ¶
func (m *GameAccountMutation) ResetGameToken()
ResetGameToken resets all changes to the "game_token" field.
func (*GameAccountMutation) ResetMid ¶
func (m *GameAccountMutation) ResetMid()
ResetMid resets all changes to the "mid" field.
func (*GameAccountMutation) ResetStoken ¶
func (m *GameAccountMutation) ResetStoken()
ResetStoken resets all changes to the "stoken" field.
func (*GameAccountMutation) ResetUpdateAt ¶
func (m *GameAccountMutation) ResetUpdateAt()
ResetUpdateAt resets all changes to the "update_at" field.
func (*GameAccountMutation) ResetUserID ¶
func (m *GameAccountMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*GameAccountMutation) SetAccountID ¶
func (m *GameAccountMutation) SetAccountID(s string)
SetAccountID sets the "account_id" field.
func (*GameAccountMutation) SetCookieToken ¶
func (m *GameAccountMutation) SetCookieToken(s string)
SetCookieToken sets the "cookie_token" field.
func (*GameAccountMutation) SetCreateAt ¶
func (m *GameAccountMutation) SetCreateAt(t time.Time)
SetCreateAt sets the "create_at" field.
func (*GameAccountMutation) SetField ¶
func (m *GameAccountMutation) 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 (*GameAccountMutation) SetGameToken ¶
func (m *GameAccountMutation) SetGameToken(s string)
SetGameToken sets the "game_token" field.
func (*GameAccountMutation) SetID ¶
func (m *GameAccountMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of GameAccount entities.
func (*GameAccountMutation) SetMid ¶
func (m *GameAccountMutation) SetMid(s string)
SetMid sets the "mid" field.
func (*GameAccountMutation) SetOp ¶
func (m *GameAccountMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GameAccountMutation) SetStoken ¶
func (m *GameAccountMutation) SetStoken(s string)
SetStoken sets the "stoken" field.
func (*GameAccountMutation) SetUpdateAt ¶
func (m *GameAccountMutation) SetUpdateAt(t time.Time)
SetUpdateAt sets the "update_at" field.
func (*GameAccountMutation) SetUserID ¶
func (m *GameAccountMutation) SetUserID(i int64)
SetUserID sets the "user_id" field.
func (*GameAccountMutation) Stoken ¶
func (m *GameAccountMutation) Stoken() (r string, exists bool)
Stoken returns the value of the "stoken" field in the mutation.
func (GameAccountMutation) Tx ¶
func (m GameAccountMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GameAccountMutation) Type ¶
func (m *GameAccountMutation) Type() string
Type returns the node type of this mutation (GameAccount).
func (*GameAccountMutation) UpdateAt ¶
func (m *GameAccountMutation) UpdateAt() (r time.Time, exists bool)
UpdateAt returns the value of the "update_at" field in the mutation.
func (*GameAccountMutation) UserID ¶
func (m *GameAccountMutation) UserID() (r int64, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*GameAccountMutation) Where ¶
func (m *GameAccountMutation) Where(ps ...predicate.GameAccount)
Where appends a list predicates to the GameAccountMutation builder.
func (*GameAccountMutation) WhereP ¶
func (m *GameAccountMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GameAccountMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GameAccountQuery ¶
type GameAccountQuery struct {
// contains filtered or unexported fields
}
GameAccountQuery is the builder for querying GameAccount entities.
func (*GameAccountQuery) Aggregate ¶
func (gaq *GameAccountQuery) Aggregate(fns ...AggregateFunc) *GameAccountSelect
Aggregate returns a GameAccountSelect configured with the given aggregations.
func (*GameAccountQuery) All ¶
func (gaq *GameAccountQuery) All(ctx context.Context) ([]*GameAccount, error)
All executes the query and returns a list of GameAccounts.
func (*GameAccountQuery) AllX ¶
func (gaq *GameAccountQuery) AllX(ctx context.Context) []*GameAccount
AllX is like All, but panics if an error occurs.
func (*GameAccountQuery) Clone ¶
func (gaq *GameAccountQuery) Clone() *GameAccountQuery
Clone returns a duplicate of the GameAccountQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GameAccountQuery) Count ¶
func (gaq *GameAccountQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GameAccountQuery) CountX ¶
func (gaq *GameAccountQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GameAccountQuery) ExecContext ¶
func (c *GameAccountQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameAccountQuery) Exist ¶
func (gaq *GameAccountQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GameAccountQuery) ExistX ¶
func (gaq *GameAccountQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GameAccountQuery) First ¶
func (gaq *GameAccountQuery) First(ctx context.Context) (*GameAccount, error)
First returns the first GameAccount entity from the query. Returns a *NotFoundError when no GameAccount was found.
func (*GameAccountQuery) FirstID ¶
func (gaq *GameAccountQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first GameAccount ID from the query. Returns a *NotFoundError when no GameAccount ID was found.
func (*GameAccountQuery) FirstIDX ¶
func (gaq *GameAccountQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*GameAccountQuery) FirstX ¶
func (gaq *GameAccountQuery) FirstX(ctx context.Context) *GameAccount
FirstX is like First, but panics if an error occurs.
func (*GameAccountQuery) ForShare ¶
func (gaq *GameAccountQuery) ForShare(opts ...sql.LockOption) *GameAccountQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*GameAccountQuery) ForUpdate ¶
func (gaq *GameAccountQuery) ForUpdate(opts ...sql.LockOption) *GameAccountQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*GameAccountQuery) GroupBy ¶
func (gaq *GameAccountQuery) GroupBy(field string, fields ...string) *GameAccountGroupBy
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 { UserID int64 `json:"user_id,omitempty"` Count int `json:"count,omitempty"` } client.GameAccount.Query(). GroupBy(gameaccount.FieldUserID). Aggregate(entity.Count()). Scan(ctx, &v)
func (*GameAccountQuery) IDs ¶
func (gaq *GameAccountQuery) IDs(ctx context.Context) (ids []int64, err error)
IDs executes the query and returns a list of GameAccount IDs.
func (*GameAccountQuery) IDsX ¶
func (gaq *GameAccountQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*GameAccountQuery) Limit ¶
func (gaq *GameAccountQuery) Limit(limit int) *GameAccountQuery
Limit the number of records to be returned by this query.
func (*GameAccountQuery) Modify ¶
func (gaq *GameAccountQuery) Modify(modifiers ...func(s *sql.Selector)) *GameAccountSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*GameAccountQuery) Offset ¶
func (gaq *GameAccountQuery) Offset(offset int) *GameAccountQuery
Offset to start from.
func (*GameAccountQuery) Only ¶
func (gaq *GameAccountQuery) Only(ctx context.Context) (*GameAccount, error)
Only returns a single GameAccount entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GameAccount entity is found. Returns a *NotFoundError when no GameAccount entities are found.
func (*GameAccountQuery) OnlyID ¶
func (gaq *GameAccountQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only GameAccount ID in the query. Returns a *NotSingularError when more than one GameAccount ID is found. Returns a *NotFoundError when no entities are found.
func (*GameAccountQuery) OnlyIDX ¶
func (gaq *GameAccountQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GameAccountQuery) OnlyX ¶
func (gaq *GameAccountQuery) OnlyX(ctx context.Context) *GameAccount
OnlyX is like Only, but panics if an error occurs.
func (*GameAccountQuery) Order ¶
func (gaq *GameAccountQuery) Order(o ...OrderFunc) *GameAccountQuery
Order specifies how the records should be ordered.
func (*GameAccountQuery) QueryContext ¶
func (c *GameAccountQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameAccountQuery) Select ¶
func (gaq *GameAccountQuery) Select(fields ...string) *GameAccountSelect
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 { UserID int64 `json:"user_id,omitempty"` } client.GameAccount.Query(). Select(gameaccount.FieldUserID). Scan(ctx, &v)
func (*GameAccountQuery) Unique ¶
func (gaq *GameAccountQuery) Unique(unique bool) *GameAccountQuery
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 (*GameAccountQuery) Where ¶
func (gaq *GameAccountQuery) Where(ps ...predicate.GameAccount) *GameAccountQuery
Where adds a new predicate for the GameAccountQuery builder.
type GameAccountSelect ¶
type GameAccountSelect struct { *GameAccountQuery // contains filtered or unexported fields }
GameAccountSelect is the builder for selecting fields of GameAccount entities.
func (*GameAccountSelect) Aggregate ¶
func (gas *GameAccountSelect) Aggregate(fns ...AggregateFunc) *GameAccountSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GameAccountSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GameAccountSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (GameAccountSelect) ExecContext ¶
func (c GameAccountSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameAccountSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GameAccountSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GameAccountSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GameAccountSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GameAccountSelect) Modify ¶
func (gas *GameAccountSelect) Modify(modifiers ...func(s *sql.Selector)) *GameAccountSelect
Modify adds a query modifier for attaching custom logic to queries.
func (GameAccountSelect) QueryContext ¶
func (c GameAccountSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameAccountSelect) Scan ¶
func (gas *GameAccountSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GameAccountSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GameAccountUpdate ¶
type GameAccountUpdate struct {
// contains filtered or unexported fields
}
GameAccountUpdate is the builder for updating GameAccount entities.
func (*GameAccountUpdate) AddUserID ¶
func (gau *GameAccountUpdate) AddUserID(i int64) *GameAccountUpdate
AddUserID adds i to the "user_id" field.
func (*GameAccountUpdate) Exec ¶
func (gau *GameAccountUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GameAccountUpdate) ExecContext ¶
func (c *GameAccountUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameAccountUpdate) ExecX ¶
func (gau *GameAccountUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameAccountUpdate) Modify ¶
func (gau *GameAccountUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GameAccountUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*GameAccountUpdate) Mutation ¶
func (gau *GameAccountUpdate) Mutation() *GameAccountMutation
Mutation returns the GameAccountMutation object of the builder.
func (*GameAccountUpdate) QueryContext ¶
func (c *GameAccountUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameAccountUpdate) Save ¶
func (gau *GameAccountUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GameAccountUpdate) SaveX ¶
func (gau *GameAccountUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GameAccountUpdate) SetAccountID ¶
func (gau *GameAccountUpdate) SetAccountID(s string) *GameAccountUpdate
SetAccountID sets the "account_id" field.
func (*GameAccountUpdate) SetCookieToken ¶
func (gau *GameAccountUpdate) SetCookieToken(s string) *GameAccountUpdate
SetCookieToken sets the "cookie_token" field.
func (*GameAccountUpdate) SetGameToken ¶
func (gau *GameAccountUpdate) SetGameToken(s string) *GameAccountUpdate
SetGameToken sets the "game_token" field.
func (*GameAccountUpdate) SetMid ¶
func (gau *GameAccountUpdate) SetMid(s string) *GameAccountUpdate
SetMid sets the "mid" field.
func (*GameAccountUpdate) SetNillableCookieToken ¶
func (gau *GameAccountUpdate) SetNillableCookieToken(s *string) *GameAccountUpdate
SetNillableCookieToken sets the "cookie_token" field if the given value is not nil.
func (*GameAccountUpdate) SetNillableGameToken ¶
func (gau *GameAccountUpdate) SetNillableGameToken(s *string) *GameAccountUpdate
SetNillableGameToken sets the "game_token" field if the given value is not nil.
func (*GameAccountUpdate) SetNillableMid ¶
func (gau *GameAccountUpdate) SetNillableMid(s *string) *GameAccountUpdate
SetNillableMid sets the "mid" field if the given value is not nil.
func (*GameAccountUpdate) SetNillableStoken ¶
func (gau *GameAccountUpdate) SetNillableStoken(s *string) *GameAccountUpdate
SetNillableStoken sets the "stoken" field if the given value is not nil.
func (*GameAccountUpdate) SetStoken ¶
func (gau *GameAccountUpdate) SetStoken(s string) *GameAccountUpdate
SetStoken sets the "stoken" field.
func (*GameAccountUpdate) SetUpdateAt ¶
func (gau *GameAccountUpdate) SetUpdateAt(t time.Time) *GameAccountUpdate
SetUpdateAt sets the "update_at" field.
func (*GameAccountUpdate) SetUserID ¶
func (gau *GameAccountUpdate) SetUserID(i int64) *GameAccountUpdate
SetUserID sets the "user_id" field.
func (*GameAccountUpdate) Where ¶
func (gau *GameAccountUpdate) Where(ps ...predicate.GameAccount) *GameAccountUpdate
Where appends a list predicates to the GameAccountUpdate builder.
type GameAccountUpdateOne ¶
type GameAccountUpdateOne struct {
// contains filtered or unexported fields
}
GameAccountUpdateOne is the builder for updating a single GameAccount entity.
func (*GameAccountUpdateOne) AddUserID ¶
func (gauo *GameAccountUpdateOne) AddUserID(i int64) *GameAccountUpdateOne
AddUserID adds i to the "user_id" field.
func (*GameAccountUpdateOne) Exec ¶
func (gauo *GameAccountUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GameAccountUpdateOne) ExecContext ¶
func (c *GameAccountUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameAccountUpdateOne) ExecX ¶
func (gauo *GameAccountUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameAccountUpdateOne) Modify ¶
func (gauo *GameAccountUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GameAccountUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*GameAccountUpdateOne) Mutation ¶
func (gauo *GameAccountUpdateOne) Mutation() *GameAccountMutation
Mutation returns the GameAccountMutation object of the builder.
func (*GameAccountUpdateOne) QueryContext ¶
func (c *GameAccountUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameAccountUpdateOne) Save ¶
func (gauo *GameAccountUpdateOne) Save(ctx context.Context) (*GameAccount, error)
Save executes the query and returns the updated GameAccount entity.
func (*GameAccountUpdateOne) SaveX ¶
func (gauo *GameAccountUpdateOne) SaveX(ctx context.Context) *GameAccount
SaveX is like Save, but panics if an error occurs.
func (*GameAccountUpdateOne) Select ¶
func (gauo *GameAccountUpdateOne) Select(field string, fields ...string) *GameAccountUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GameAccountUpdateOne) SetAccountID ¶
func (gauo *GameAccountUpdateOne) SetAccountID(s string) *GameAccountUpdateOne
SetAccountID sets the "account_id" field.
func (*GameAccountUpdateOne) SetCookieToken ¶
func (gauo *GameAccountUpdateOne) SetCookieToken(s string) *GameAccountUpdateOne
SetCookieToken sets the "cookie_token" field.
func (*GameAccountUpdateOne) SetGameToken ¶
func (gauo *GameAccountUpdateOne) SetGameToken(s string) *GameAccountUpdateOne
SetGameToken sets the "game_token" field.
func (*GameAccountUpdateOne) SetMid ¶
func (gauo *GameAccountUpdateOne) SetMid(s string) *GameAccountUpdateOne
SetMid sets the "mid" field.
func (*GameAccountUpdateOne) SetNillableCookieToken ¶
func (gauo *GameAccountUpdateOne) SetNillableCookieToken(s *string) *GameAccountUpdateOne
SetNillableCookieToken sets the "cookie_token" field if the given value is not nil.
func (*GameAccountUpdateOne) SetNillableGameToken ¶
func (gauo *GameAccountUpdateOne) SetNillableGameToken(s *string) *GameAccountUpdateOne
SetNillableGameToken sets the "game_token" field if the given value is not nil.
func (*GameAccountUpdateOne) SetNillableMid ¶
func (gauo *GameAccountUpdateOne) SetNillableMid(s *string) *GameAccountUpdateOne
SetNillableMid sets the "mid" field if the given value is not nil.
func (*GameAccountUpdateOne) SetNillableStoken ¶
func (gauo *GameAccountUpdateOne) SetNillableStoken(s *string) *GameAccountUpdateOne
SetNillableStoken sets the "stoken" field if the given value is not nil.
func (*GameAccountUpdateOne) SetStoken ¶
func (gauo *GameAccountUpdateOne) SetStoken(s string) *GameAccountUpdateOne
SetStoken sets the "stoken" field.
func (*GameAccountUpdateOne) SetUpdateAt ¶
func (gauo *GameAccountUpdateOne) SetUpdateAt(t time.Time) *GameAccountUpdateOne
SetUpdateAt sets the "update_at" field.
func (*GameAccountUpdateOne) SetUserID ¶
func (gauo *GameAccountUpdateOne) SetUserID(i int64) *GameAccountUpdateOne
SetUserID sets the "user_id" field.
func (*GameAccountUpdateOne) Where ¶
func (gauo *GameAccountUpdateOne) Where(ps ...predicate.GameAccount) *GameAccountUpdateOne
Where appends a list predicates to the GameAccountUpdate builder.
type GameAccountUpsert ¶
GameAccountUpsert is the "OnConflict" setter.
func (*GameAccountUpsert) AddUserID ¶
func (u *GameAccountUpsert) AddUserID(v int64) *GameAccountUpsert
AddUserID adds v to the "user_id" field.
func (*GameAccountUpsert) SetAccountID ¶
func (u *GameAccountUpsert) SetAccountID(v string) *GameAccountUpsert
SetAccountID sets the "account_id" field.
func (*GameAccountUpsert) SetCookieToken ¶
func (u *GameAccountUpsert) SetCookieToken(v string) *GameAccountUpsert
SetCookieToken sets the "cookie_token" field.
func (*GameAccountUpsert) SetGameToken ¶
func (u *GameAccountUpsert) SetGameToken(v string) *GameAccountUpsert
SetGameToken sets the "game_token" field.
func (*GameAccountUpsert) SetMid ¶
func (u *GameAccountUpsert) SetMid(v string) *GameAccountUpsert
SetMid sets the "mid" field.
func (*GameAccountUpsert) SetStoken ¶
func (u *GameAccountUpsert) SetStoken(v string) *GameAccountUpsert
SetStoken sets the "stoken" field.
func (*GameAccountUpsert) SetUpdateAt ¶
func (u *GameAccountUpsert) SetUpdateAt(v time.Time) *GameAccountUpsert
SetUpdateAt sets the "update_at" field.
func (*GameAccountUpsert) SetUserID ¶
func (u *GameAccountUpsert) SetUserID(v int64) *GameAccountUpsert
SetUserID sets the "user_id" field.
func (*GameAccountUpsert) UpdateAccountID ¶
func (u *GameAccountUpsert) UpdateAccountID() *GameAccountUpsert
UpdateAccountID sets the "account_id" field to the value that was provided on create.
func (*GameAccountUpsert) UpdateCookieToken ¶
func (u *GameAccountUpsert) UpdateCookieToken() *GameAccountUpsert
UpdateCookieToken sets the "cookie_token" field to the value that was provided on create.
func (*GameAccountUpsert) UpdateGameToken ¶
func (u *GameAccountUpsert) UpdateGameToken() *GameAccountUpsert
UpdateGameToken sets the "game_token" field to the value that was provided on create.
func (*GameAccountUpsert) UpdateMid ¶
func (u *GameAccountUpsert) UpdateMid() *GameAccountUpsert
UpdateMid sets the "mid" field to the value that was provided on create.
func (*GameAccountUpsert) UpdateStoken ¶
func (u *GameAccountUpsert) UpdateStoken() *GameAccountUpsert
UpdateStoken sets the "stoken" field to the value that was provided on create.
func (*GameAccountUpsert) UpdateUpdateAt ¶
func (u *GameAccountUpsert) UpdateUpdateAt() *GameAccountUpsert
UpdateUpdateAt sets the "update_at" field to the value that was provided on create.
func (*GameAccountUpsert) UpdateUserID ¶
func (u *GameAccountUpsert) UpdateUserID() *GameAccountUpsert
UpdateUserID sets the "user_id" field to the value that was provided on create.
type GameAccountUpsertBulk ¶
type GameAccountUpsertBulk struct {
// contains filtered or unexported fields
}
GameAccountUpsertBulk is the builder for "upsert"-ing a bulk of GameAccount nodes.
func (*GameAccountUpsertBulk) AddUserID ¶
func (u *GameAccountUpsertBulk) AddUserID(v int64) *GameAccountUpsertBulk
AddUserID adds v to the "user_id" field.
func (*GameAccountUpsertBulk) DoNothing ¶
func (u *GameAccountUpsertBulk) DoNothing() *GameAccountUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GameAccountUpsertBulk) Exec ¶
func (u *GameAccountUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GameAccountUpsertBulk) ExecX ¶
func (u *GameAccountUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameAccountUpsertBulk) Ignore ¶
func (u *GameAccountUpsertBulk) Ignore() *GameAccountUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.GameAccount.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GameAccountUpsertBulk) SetAccountID ¶
func (u *GameAccountUpsertBulk) SetAccountID(v string) *GameAccountUpsertBulk
SetAccountID sets the "account_id" field.
func (*GameAccountUpsertBulk) SetCookieToken ¶
func (u *GameAccountUpsertBulk) SetCookieToken(v string) *GameAccountUpsertBulk
SetCookieToken sets the "cookie_token" field.
func (*GameAccountUpsertBulk) SetGameToken ¶
func (u *GameAccountUpsertBulk) SetGameToken(v string) *GameAccountUpsertBulk
SetGameToken sets the "game_token" field.
func (*GameAccountUpsertBulk) SetMid ¶
func (u *GameAccountUpsertBulk) SetMid(v string) *GameAccountUpsertBulk
SetMid sets the "mid" field.
func (*GameAccountUpsertBulk) SetStoken ¶
func (u *GameAccountUpsertBulk) SetStoken(v string) *GameAccountUpsertBulk
SetStoken sets the "stoken" field.
func (*GameAccountUpsertBulk) SetUpdateAt ¶
func (u *GameAccountUpsertBulk) SetUpdateAt(v time.Time) *GameAccountUpsertBulk
SetUpdateAt sets the "update_at" field.
func (*GameAccountUpsertBulk) SetUserID ¶
func (u *GameAccountUpsertBulk) SetUserID(v int64) *GameAccountUpsertBulk
SetUserID sets the "user_id" field.
func (*GameAccountUpsertBulk) Update ¶
func (u *GameAccountUpsertBulk) Update(set func(*GameAccountUpsert)) *GameAccountUpsertBulk
Update allows overriding fields `UPDATE` values. See the GameAccountCreateBulk.OnConflict documentation for more info.
func (*GameAccountUpsertBulk) UpdateAccountID ¶
func (u *GameAccountUpsertBulk) UpdateAccountID() *GameAccountUpsertBulk
UpdateAccountID sets the "account_id" field to the value that was provided on create.
func (*GameAccountUpsertBulk) UpdateCookieToken ¶
func (u *GameAccountUpsertBulk) UpdateCookieToken() *GameAccountUpsertBulk
UpdateCookieToken sets the "cookie_token" field to the value that was provided on create.
func (*GameAccountUpsertBulk) UpdateGameToken ¶
func (u *GameAccountUpsertBulk) UpdateGameToken() *GameAccountUpsertBulk
UpdateGameToken sets the "game_token" field to the value that was provided on create.
func (*GameAccountUpsertBulk) UpdateMid ¶
func (u *GameAccountUpsertBulk) UpdateMid() *GameAccountUpsertBulk
UpdateMid sets the "mid" field to the value that was provided on create.
func (*GameAccountUpsertBulk) UpdateNewValues ¶
func (u *GameAccountUpsertBulk) UpdateNewValues() *GameAccountUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.GameAccount.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(gameaccount.FieldID) }), ). Exec(ctx)
func (*GameAccountUpsertBulk) UpdateStoken ¶
func (u *GameAccountUpsertBulk) UpdateStoken() *GameAccountUpsertBulk
UpdateStoken sets the "stoken" field to the value that was provided on create.
func (*GameAccountUpsertBulk) UpdateUpdateAt ¶
func (u *GameAccountUpsertBulk) UpdateUpdateAt() *GameAccountUpsertBulk
UpdateUpdateAt sets the "update_at" field to the value that was provided on create.
func (*GameAccountUpsertBulk) UpdateUserID ¶
func (u *GameAccountUpsertBulk) UpdateUserID() *GameAccountUpsertBulk
UpdateUserID sets the "user_id" field to the value that was provided on create.
type GameAccountUpsertOne ¶
type GameAccountUpsertOne struct {
// contains filtered or unexported fields
}
GameAccountUpsertOne is the builder for "upsert"-ing
one GameAccount node.
func (*GameAccountUpsertOne) AddUserID ¶
func (u *GameAccountUpsertOne) AddUserID(v int64) *GameAccountUpsertOne
AddUserID adds v to the "user_id" field.
func (*GameAccountUpsertOne) DoNothing ¶
func (u *GameAccountUpsertOne) DoNothing() *GameAccountUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GameAccountUpsertOne) Exec ¶
func (u *GameAccountUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*GameAccountUpsertOne) ExecX ¶
func (u *GameAccountUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameAccountUpsertOne) ID ¶
func (u *GameAccountUpsertOne) ID(ctx context.Context) (id int64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*GameAccountUpsertOne) IDX ¶
func (u *GameAccountUpsertOne) IDX(ctx context.Context) int64
IDX is like ID, but panics if an error occurs.
func (*GameAccountUpsertOne) Ignore ¶
func (u *GameAccountUpsertOne) Ignore() *GameAccountUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.GameAccount.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GameAccountUpsertOne) SetAccountID ¶
func (u *GameAccountUpsertOne) SetAccountID(v string) *GameAccountUpsertOne
SetAccountID sets the "account_id" field.
func (*GameAccountUpsertOne) SetCookieToken ¶
func (u *GameAccountUpsertOne) SetCookieToken(v string) *GameAccountUpsertOne
SetCookieToken sets the "cookie_token" field.
func (*GameAccountUpsertOne) SetGameToken ¶
func (u *GameAccountUpsertOne) SetGameToken(v string) *GameAccountUpsertOne
SetGameToken sets the "game_token" field.
func (*GameAccountUpsertOne) SetMid ¶
func (u *GameAccountUpsertOne) SetMid(v string) *GameAccountUpsertOne
SetMid sets the "mid" field.
func (*GameAccountUpsertOne) SetStoken ¶
func (u *GameAccountUpsertOne) SetStoken(v string) *GameAccountUpsertOne
SetStoken sets the "stoken" field.
func (*GameAccountUpsertOne) SetUpdateAt ¶
func (u *GameAccountUpsertOne) SetUpdateAt(v time.Time) *GameAccountUpsertOne
SetUpdateAt sets the "update_at" field.
func (*GameAccountUpsertOne) SetUserID ¶
func (u *GameAccountUpsertOne) SetUserID(v int64) *GameAccountUpsertOne
SetUserID sets the "user_id" field.
func (*GameAccountUpsertOne) Update ¶
func (u *GameAccountUpsertOne) Update(set func(*GameAccountUpsert)) *GameAccountUpsertOne
Update allows overriding fields `UPDATE` values. See the GameAccountCreate.OnConflict documentation for more info.
func (*GameAccountUpsertOne) UpdateAccountID ¶
func (u *GameAccountUpsertOne) UpdateAccountID() *GameAccountUpsertOne
UpdateAccountID sets the "account_id" field to the value that was provided on create.
func (*GameAccountUpsertOne) UpdateCookieToken ¶
func (u *GameAccountUpsertOne) UpdateCookieToken() *GameAccountUpsertOne
UpdateCookieToken sets the "cookie_token" field to the value that was provided on create.
func (*GameAccountUpsertOne) UpdateGameToken ¶
func (u *GameAccountUpsertOne) UpdateGameToken() *GameAccountUpsertOne
UpdateGameToken sets the "game_token" field to the value that was provided on create.
func (*GameAccountUpsertOne) UpdateMid ¶
func (u *GameAccountUpsertOne) UpdateMid() *GameAccountUpsertOne
UpdateMid sets the "mid" field to the value that was provided on create.
func (*GameAccountUpsertOne) UpdateNewValues ¶
func (u *GameAccountUpsertOne) UpdateNewValues() *GameAccountUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.GameAccount.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(gameaccount.FieldID) }), ). Exec(ctx)
func (*GameAccountUpsertOne) UpdateStoken ¶
func (u *GameAccountUpsertOne) UpdateStoken() *GameAccountUpsertOne
UpdateStoken sets the "stoken" field to the value that was provided on create.
func (*GameAccountUpsertOne) UpdateUpdateAt ¶
func (u *GameAccountUpsertOne) UpdateUpdateAt() *GameAccountUpsertOne
UpdateUpdateAt sets the "update_at" field to the value that was provided on create.
func (*GameAccountUpsertOne) UpdateUserID ¶
func (u *GameAccountUpsertOne) UpdateUserID() *GameAccountUpsertOne
UpdateUserID sets the "user_id" field to the value that was provided on create.
type GameAccounts ¶
type GameAccounts []*GameAccount
GameAccounts is a parsable slice of GameAccount.
type GameRole ¶
type GameRole struct { // ID of the ent. ID int64 `json:"id,omitempty"` // UserID holds the value of the "user_id" field. UserID int64 `json:"user_id,omitempty"` // AccountID holds the value of the "account_id" field. AccountID string `json:"account_id,omitempty"` // RoleID holds the value of the "role_id" field. RoleID string `json:"role_id,omitempty"` // Level holds the value of the "level" field. Level int `json:"level,omitempty"` // Region holds the value of the "region" field. Region string `json:"region,omitempty"` // RegionName holds the value of the "region_name" field. RegionName string `json:"region_name,omitempty"` // NickName holds the value of the "nick_name" field. NickName string `json:"nick_name,omitempty"` // CreateAt holds the value of the "create_at" field. CreateAt time.Time `json:"create_at,omitempty"` // UpdateAt holds the value of the "update_at" field. UpdateAt time.Time `json:"update_at,omitempty"` // contains filtered or unexported fields }
GameRole is the model entity for the GameRole schema.
func (*GameRole) ExecContext ¶
func (c *GameRole) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameRole) QueryContext ¶
func (c *GameRole) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameRole) Unwrap ¶
Unwrap unwraps the GameRole 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 (*GameRole) Update ¶
func (gr *GameRole) Update() *GameRoleUpdateOne
Update returns a builder for updating this GameRole. Note that you need to call GameRole.Unwrap() before calling this method if this GameRole was returned from a transaction, and the transaction was committed or rolled back.
type GameRoleAttribute ¶
type GameRoleAttribute struct { // ID of the ent. ID int64 `json:"id,omitempty"` // UserID holds the value of the "user_id" field. UserID int64 `json:"user_id,omitempty"` // AccountID holds the value of the "account_id" field. AccountID string `json:"account_id,omitempty"` // RoleID holds the value of the "role_id" field. RoleID string `json:"role_id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Type holds the value of the "type" field. Type int `json:"type,omitempty"` // Value holds the value of the "value" field. Value string `json:"value,omitempty"` // CreateAt holds the value of the "create_at" field. CreateAt time.Time `json:"create_at,omitempty"` // UpdateAt holds the value of the "update_at" field. UpdateAt time.Time `json:"update_at,omitempty"` // contains filtered or unexported fields }
GameRoleAttribute is the model entity for the GameRoleAttribute schema.
func (*GameRoleAttribute) ExecContext ¶
func (c *GameRoleAttribute) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameRoleAttribute) QueryContext ¶
func (c *GameRoleAttribute) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameRoleAttribute) String ¶
func (gra *GameRoleAttribute) String() string
String implements the fmt.Stringer.
func (*GameRoleAttribute) Unwrap ¶
func (gra *GameRoleAttribute) Unwrap() *GameRoleAttribute
Unwrap unwraps the GameRoleAttribute 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 (*GameRoleAttribute) Update ¶
func (gra *GameRoleAttribute) Update() *GameRoleAttributeUpdateOne
Update returns a builder for updating this GameRoleAttribute. Note that you need to call GameRoleAttribute.Unwrap() before calling this method if this GameRoleAttribute was returned from a transaction, and the transaction was committed or rolled back.
type GameRoleAttributeClient ¶
type GameRoleAttributeClient struct {
// contains filtered or unexported fields
}
GameRoleAttributeClient is a client for the GameRoleAttribute schema.
func NewGameRoleAttributeClient ¶
func NewGameRoleAttributeClient(c config) *GameRoleAttributeClient
NewGameRoleAttributeClient returns a client for the GameRoleAttribute from the given config.
func (*GameRoleAttributeClient) Create ¶
func (c *GameRoleAttributeClient) Create() *GameRoleAttributeCreate
Create returns a builder for creating a GameRoleAttribute entity.
func (*GameRoleAttributeClient) CreateBulk ¶
func (c *GameRoleAttributeClient) CreateBulk(builders ...*GameRoleAttributeCreate) *GameRoleAttributeCreateBulk
CreateBulk returns a builder for creating a bulk of GameRoleAttribute entities.
func (*GameRoleAttributeClient) Delete ¶
func (c *GameRoleAttributeClient) Delete() *GameRoleAttributeDelete
Delete returns a delete builder for GameRoleAttribute.
func (*GameRoleAttributeClient) DeleteOne ¶
func (c *GameRoleAttributeClient) DeleteOne(gra *GameRoleAttribute) *GameRoleAttributeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GameRoleAttributeClient) DeleteOneID ¶
func (c *GameRoleAttributeClient) DeleteOneID(id int64) *GameRoleAttributeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GameRoleAttributeClient) ExecContext ¶
func (c *GameRoleAttributeClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameRoleAttributeClient) Get ¶
func (c *GameRoleAttributeClient) Get(ctx context.Context, id int64) (*GameRoleAttribute, error)
Get returns a GameRoleAttribute entity by its id.
func (*GameRoleAttributeClient) GetX ¶
func (c *GameRoleAttributeClient) GetX(ctx context.Context, id int64) *GameRoleAttribute
GetX is like Get, but panics if an error occurs.
func (*GameRoleAttributeClient) Hooks ¶
func (c *GameRoleAttributeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GameRoleAttributeClient) Intercept ¶
func (c *GameRoleAttributeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `gameroleattribute.Intercept(f(g(h())))`.
func (*GameRoleAttributeClient) Interceptors ¶
func (c *GameRoleAttributeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GameRoleAttributeClient) Query ¶
func (c *GameRoleAttributeClient) Query() *GameRoleAttributeQuery
Query returns a query builder for GameRoleAttribute.
func (*GameRoleAttributeClient) QueryContext ¶
func (c *GameRoleAttributeClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameRoleAttributeClient) Update ¶
func (c *GameRoleAttributeClient) Update() *GameRoleAttributeUpdate
Update returns an update builder for GameRoleAttribute.
func (*GameRoleAttributeClient) UpdateOne ¶
func (c *GameRoleAttributeClient) UpdateOne(gra *GameRoleAttribute) *GameRoleAttributeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GameRoleAttributeClient) UpdateOneID ¶
func (c *GameRoleAttributeClient) UpdateOneID(id int64) *GameRoleAttributeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GameRoleAttributeClient) Use ¶
func (c *GameRoleAttributeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `gameroleattribute.Hooks(f(g(h())))`.
type GameRoleAttributeCreate ¶
type GameRoleAttributeCreate struct {
// contains filtered or unexported fields
}
GameRoleAttributeCreate is the builder for creating a GameRoleAttribute entity.
func (*GameRoleAttributeCreate) Exec ¶
func (grac *GameRoleAttributeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GameRoleAttributeCreate) ExecContext ¶
func (c *GameRoleAttributeCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameRoleAttributeCreate) ExecX ¶
func (grac *GameRoleAttributeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameRoleAttributeCreate) Mutation ¶
func (grac *GameRoleAttributeCreate) Mutation() *GameRoleAttributeMutation
Mutation returns the GameRoleAttributeMutation object of the builder.
func (*GameRoleAttributeCreate) OnConflict ¶
func (grac *GameRoleAttributeCreate) OnConflict(opts ...sql.ConflictOption) *GameRoleAttributeUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.GameRoleAttribute.Create(). SetUserID(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.GameRoleAttributeUpsert) { SetUserID(v+v). }). Exec(ctx)
func (*GameRoleAttributeCreate) OnConflictColumns ¶
func (grac *GameRoleAttributeCreate) OnConflictColumns(columns ...string) *GameRoleAttributeUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.GameRoleAttribute.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*GameRoleAttributeCreate) QueryContext ¶
func (c *GameRoleAttributeCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameRoleAttributeCreate) Save ¶
func (grac *GameRoleAttributeCreate) Save(ctx context.Context) (*GameRoleAttribute, error)
Save creates the GameRoleAttribute in the database.
func (*GameRoleAttributeCreate) SaveX ¶
func (grac *GameRoleAttributeCreate) SaveX(ctx context.Context) *GameRoleAttribute
SaveX calls Save and panics if Save returns an error.
func (*GameRoleAttributeCreate) SetAccountID ¶
func (grac *GameRoleAttributeCreate) SetAccountID(s string) *GameRoleAttributeCreate
SetAccountID sets the "account_id" field.
func (*GameRoleAttributeCreate) SetCreateAt ¶
func (grac *GameRoleAttributeCreate) SetCreateAt(t time.Time) *GameRoleAttributeCreate
SetCreateAt sets the "create_at" field.
func (*GameRoleAttributeCreate) SetID ¶
func (grac *GameRoleAttributeCreate) SetID(i int64) *GameRoleAttributeCreate
SetID sets the "id" field.
func (*GameRoleAttributeCreate) SetName ¶
func (grac *GameRoleAttributeCreate) SetName(s string) *GameRoleAttributeCreate
SetName sets the "name" field.
func (*GameRoleAttributeCreate) SetNillableCreateAt ¶
func (grac *GameRoleAttributeCreate) SetNillableCreateAt(t *time.Time) *GameRoleAttributeCreate
SetNillableCreateAt sets the "create_at" field if the given value is not nil.
func (*GameRoleAttributeCreate) SetNillableType ¶
func (grac *GameRoleAttributeCreate) SetNillableType(i *int) *GameRoleAttributeCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*GameRoleAttributeCreate) SetNillableUpdateAt ¶
func (grac *GameRoleAttributeCreate) SetNillableUpdateAt(t *time.Time) *GameRoleAttributeCreate
SetNillableUpdateAt sets the "update_at" field if the given value is not nil.
func (*GameRoleAttributeCreate) SetNillableValue ¶
func (grac *GameRoleAttributeCreate) SetNillableValue(s *string) *GameRoleAttributeCreate
SetNillableValue sets the "value" field if the given value is not nil.
func (*GameRoleAttributeCreate) SetRoleID ¶
func (grac *GameRoleAttributeCreate) SetRoleID(s string) *GameRoleAttributeCreate
SetRoleID sets the "role_id" field.
func (*GameRoleAttributeCreate) SetType ¶
func (grac *GameRoleAttributeCreate) SetType(i int) *GameRoleAttributeCreate
SetType sets the "type" field.
func (*GameRoleAttributeCreate) SetUpdateAt ¶
func (grac *GameRoleAttributeCreate) SetUpdateAt(t time.Time) *GameRoleAttributeCreate
SetUpdateAt sets the "update_at" field.
func (*GameRoleAttributeCreate) SetUserID ¶
func (grac *GameRoleAttributeCreate) SetUserID(i int64) *GameRoleAttributeCreate
SetUserID sets the "user_id" field.
func (*GameRoleAttributeCreate) SetValue ¶
func (grac *GameRoleAttributeCreate) SetValue(s string) *GameRoleAttributeCreate
SetValue sets the "value" field.
type GameRoleAttributeCreateBulk ¶
type GameRoleAttributeCreateBulk struct {
// contains filtered or unexported fields
}
GameRoleAttributeCreateBulk is the builder for creating many GameRoleAttribute entities in bulk.
func (*GameRoleAttributeCreateBulk) Exec ¶
func (gracb *GameRoleAttributeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GameRoleAttributeCreateBulk) ExecContext ¶
func (c *GameRoleAttributeCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameRoleAttributeCreateBulk) ExecX ¶
func (gracb *GameRoleAttributeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameRoleAttributeCreateBulk) OnConflict ¶
func (gracb *GameRoleAttributeCreateBulk) OnConflict(opts ...sql.ConflictOption) *GameRoleAttributeUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.GameRoleAttribute.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.GameRoleAttributeUpsert) { SetUserID(v+v). }). Exec(ctx)
func (*GameRoleAttributeCreateBulk) OnConflictColumns ¶
func (gracb *GameRoleAttributeCreateBulk) OnConflictColumns(columns ...string) *GameRoleAttributeUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.GameRoleAttribute.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*GameRoleAttributeCreateBulk) QueryContext ¶
func (c *GameRoleAttributeCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameRoleAttributeCreateBulk) Save ¶
func (gracb *GameRoleAttributeCreateBulk) Save(ctx context.Context) ([]*GameRoleAttribute, error)
Save creates the GameRoleAttribute entities in the database.
func (*GameRoleAttributeCreateBulk) SaveX ¶
func (gracb *GameRoleAttributeCreateBulk) SaveX(ctx context.Context) []*GameRoleAttribute
SaveX is like Save, but panics if an error occurs.
type GameRoleAttributeDelete ¶
type GameRoleAttributeDelete struct {
// contains filtered or unexported fields
}
GameRoleAttributeDelete is the builder for deleting a GameRoleAttribute entity.
func (*GameRoleAttributeDelete) Exec ¶
func (grad *GameRoleAttributeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GameRoleAttributeDelete) ExecContext ¶
func (c *GameRoleAttributeDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameRoleAttributeDelete) ExecX ¶
func (grad *GameRoleAttributeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GameRoleAttributeDelete) QueryContext ¶
func (c *GameRoleAttributeDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameRoleAttributeDelete) Where ¶
func (grad *GameRoleAttributeDelete) Where(ps ...predicate.GameRoleAttribute) *GameRoleAttributeDelete
Where appends a list predicates to the GameRoleAttributeDelete builder.
type GameRoleAttributeDeleteOne ¶
type GameRoleAttributeDeleteOne struct {
// contains filtered or unexported fields
}
GameRoleAttributeDeleteOne is the builder for deleting a single GameRoleAttribute entity.
func (*GameRoleAttributeDeleteOne) Exec ¶
func (grado *GameRoleAttributeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GameRoleAttributeDeleteOne) ExecX ¶
func (grado *GameRoleAttributeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameRoleAttributeDeleteOne) Where ¶
func (grado *GameRoleAttributeDeleteOne) Where(ps ...predicate.GameRoleAttribute) *GameRoleAttributeDeleteOne
Where appends a list predicates to the GameRoleAttributeDelete builder.
type GameRoleAttributeGroupBy ¶
type GameRoleAttributeGroupBy struct {
// contains filtered or unexported fields
}
GameRoleAttributeGroupBy is the group-by builder for GameRoleAttribute entities.
func (*GameRoleAttributeGroupBy) Aggregate ¶
func (gragb *GameRoleAttributeGroupBy) Aggregate(fns ...AggregateFunc) *GameRoleAttributeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GameRoleAttributeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GameRoleAttributeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GameRoleAttributeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GameRoleAttributeGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*GameRoleAttributeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GameRoleAttributeGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*GameRoleAttributeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GameRoleAttributeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GameRoleAttributeGroupBy) Scan ¶
func (gragb *GameRoleAttributeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GameRoleAttributeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GameRoleAttributeMutation ¶
type GameRoleAttributeMutation struct {
// contains filtered or unexported fields
}
GameRoleAttributeMutation represents an operation that mutates the GameRoleAttribute nodes in the graph.
func (*GameRoleAttributeMutation) AccountID ¶
func (m *GameRoleAttributeMutation) AccountID() (r string, exists bool)
AccountID returns the value of the "account_id" field in the mutation.
func (*GameRoleAttributeMutation) AddField ¶
func (m *GameRoleAttributeMutation) 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 (*GameRoleAttributeMutation) AddType ¶
func (m *GameRoleAttributeMutation) AddType(i int)
AddType adds i to the "type" field.
func (*GameRoleAttributeMutation) AddUserID ¶
func (m *GameRoleAttributeMutation) AddUserID(i int64)
AddUserID adds i to the "user_id" field.
func (*GameRoleAttributeMutation) AddedEdges ¶
func (m *GameRoleAttributeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GameRoleAttributeMutation) AddedField ¶
func (m *GameRoleAttributeMutation) 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 (*GameRoleAttributeMutation) AddedFields ¶
func (m *GameRoleAttributeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GameRoleAttributeMutation) AddedIDs ¶
func (m *GameRoleAttributeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GameRoleAttributeMutation) AddedType ¶
func (m *GameRoleAttributeMutation) AddedType() (r int, exists bool)
AddedType returns the value that was added to the "type" field in this mutation.
func (*GameRoleAttributeMutation) AddedUserID ¶
func (m *GameRoleAttributeMutation) AddedUserID() (r int64, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*GameRoleAttributeMutation) ClearEdge ¶
func (m *GameRoleAttributeMutation) 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 (*GameRoleAttributeMutation) ClearField ¶
func (m *GameRoleAttributeMutation) 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 (*GameRoleAttributeMutation) ClearedEdges ¶
func (m *GameRoleAttributeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GameRoleAttributeMutation) ClearedFields ¶
func (m *GameRoleAttributeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GameRoleAttributeMutation) Client ¶
func (m GameRoleAttributeMutation) 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 (*GameRoleAttributeMutation) CreateAt ¶
func (m *GameRoleAttributeMutation) CreateAt() (r time.Time, exists bool)
CreateAt returns the value of the "create_at" field in the mutation.
func (*GameRoleAttributeMutation) EdgeCleared ¶
func (m *GameRoleAttributeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GameRoleAttributeMutation) ExecContext ¶
func (c *GameRoleAttributeMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameRoleAttributeMutation) Field ¶
func (m *GameRoleAttributeMutation) 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 (*GameRoleAttributeMutation) FieldCleared ¶
func (m *GameRoleAttributeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GameRoleAttributeMutation) Fields ¶
func (m *GameRoleAttributeMutation) 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 (*GameRoleAttributeMutation) GetType ¶
func (m *GameRoleAttributeMutation) GetType() (r int, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*GameRoleAttributeMutation) ID ¶
func (m *GameRoleAttributeMutation) 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 (*GameRoleAttributeMutation) IDs ¶
func (m *GameRoleAttributeMutation) 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 (*GameRoleAttributeMutation) Name ¶
func (m *GameRoleAttributeMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*GameRoleAttributeMutation) OldAccountID ¶
func (m *GameRoleAttributeMutation) OldAccountID(ctx context.Context) (v string, err error)
OldAccountID returns the old "account_id" field's value of the GameRoleAttribute entity. If the GameRoleAttribute 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 (*GameRoleAttributeMutation) OldCreateAt ¶
OldCreateAt returns the old "create_at" field's value of the GameRoleAttribute entity. If the GameRoleAttribute 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 (*GameRoleAttributeMutation) 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 (*GameRoleAttributeMutation) OldName ¶
func (m *GameRoleAttributeMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the GameRoleAttribute entity. If the GameRoleAttribute 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 (*GameRoleAttributeMutation) OldRoleID ¶
func (m *GameRoleAttributeMutation) OldRoleID(ctx context.Context) (v string, err error)
OldRoleID returns the old "role_id" field's value of the GameRoleAttribute entity. If the GameRoleAttribute 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 (*GameRoleAttributeMutation) OldType ¶
func (m *GameRoleAttributeMutation) OldType(ctx context.Context) (v int, err error)
OldType returns the old "type" field's value of the GameRoleAttribute entity. If the GameRoleAttribute 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 (*GameRoleAttributeMutation) OldUpdateAt ¶
OldUpdateAt returns the old "update_at" field's value of the GameRoleAttribute entity. If the GameRoleAttribute 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 (*GameRoleAttributeMutation) OldUserID ¶
func (m *GameRoleAttributeMutation) OldUserID(ctx context.Context) (v int64, err error)
OldUserID returns the old "user_id" field's value of the GameRoleAttribute entity. If the GameRoleAttribute 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 (*GameRoleAttributeMutation) OldValue ¶
func (m *GameRoleAttributeMutation) OldValue(ctx context.Context) (v string, err error)
OldValue returns the old "value" field's value of the GameRoleAttribute entity. If the GameRoleAttribute 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 (*GameRoleAttributeMutation) Op ¶
func (m *GameRoleAttributeMutation) Op() Op
Op returns the operation name.
func (*GameRoleAttributeMutation) QueryContext ¶
func (c *GameRoleAttributeMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameRoleAttributeMutation) RemovedEdges ¶
func (m *GameRoleAttributeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GameRoleAttributeMutation) RemovedIDs ¶
func (m *GameRoleAttributeMutation) 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 (*GameRoleAttributeMutation) ResetAccountID ¶
func (m *GameRoleAttributeMutation) ResetAccountID()
ResetAccountID resets all changes to the "account_id" field.
func (*GameRoleAttributeMutation) ResetCreateAt ¶
func (m *GameRoleAttributeMutation) ResetCreateAt()
ResetCreateAt resets all changes to the "create_at" field.
func (*GameRoleAttributeMutation) ResetEdge ¶
func (m *GameRoleAttributeMutation) 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 (*GameRoleAttributeMutation) ResetField ¶
func (m *GameRoleAttributeMutation) 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 (*GameRoleAttributeMutation) ResetName ¶
func (m *GameRoleAttributeMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*GameRoleAttributeMutation) ResetRoleID ¶
func (m *GameRoleAttributeMutation) ResetRoleID()
ResetRoleID resets all changes to the "role_id" field.
func (*GameRoleAttributeMutation) ResetType ¶
func (m *GameRoleAttributeMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*GameRoleAttributeMutation) ResetUpdateAt ¶
func (m *GameRoleAttributeMutation) ResetUpdateAt()
ResetUpdateAt resets all changes to the "update_at" field.
func (*GameRoleAttributeMutation) ResetUserID ¶
func (m *GameRoleAttributeMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*GameRoleAttributeMutation) ResetValue ¶
func (m *GameRoleAttributeMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*GameRoleAttributeMutation) RoleID ¶
func (m *GameRoleAttributeMutation) RoleID() (r string, exists bool)
RoleID returns the value of the "role_id" field in the mutation.
func (*GameRoleAttributeMutation) SetAccountID ¶
func (m *GameRoleAttributeMutation) SetAccountID(s string)
SetAccountID sets the "account_id" field.
func (*GameRoleAttributeMutation) SetCreateAt ¶
func (m *GameRoleAttributeMutation) SetCreateAt(t time.Time)
SetCreateAt sets the "create_at" field.
func (*GameRoleAttributeMutation) SetField ¶
func (m *GameRoleAttributeMutation) 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 (*GameRoleAttributeMutation) SetID ¶
func (m *GameRoleAttributeMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of GameRoleAttribute entities.
func (*GameRoleAttributeMutation) SetName ¶
func (m *GameRoleAttributeMutation) SetName(s string)
SetName sets the "name" field.
func (*GameRoleAttributeMutation) SetOp ¶
func (m *GameRoleAttributeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GameRoleAttributeMutation) SetRoleID ¶
func (m *GameRoleAttributeMutation) SetRoleID(s string)
SetRoleID sets the "role_id" field.
func (*GameRoleAttributeMutation) SetType ¶
func (m *GameRoleAttributeMutation) SetType(i int)
SetType sets the "type" field.
func (*GameRoleAttributeMutation) SetUpdateAt ¶
func (m *GameRoleAttributeMutation) SetUpdateAt(t time.Time)
SetUpdateAt sets the "update_at" field.
func (*GameRoleAttributeMutation) SetUserID ¶
func (m *GameRoleAttributeMutation) SetUserID(i int64)
SetUserID sets the "user_id" field.
func (*GameRoleAttributeMutation) SetValue ¶
func (m *GameRoleAttributeMutation) SetValue(s string)
SetValue sets the "value" field.
func (GameRoleAttributeMutation) Tx ¶
func (m GameRoleAttributeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GameRoleAttributeMutation) Type ¶
func (m *GameRoleAttributeMutation) Type() string
Type returns the node type of this mutation (GameRoleAttribute).
func (*GameRoleAttributeMutation) UpdateAt ¶
func (m *GameRoleAttributeMutation) UpdateAt() (r time.Time, exists bool)
UpdateAt returns the value of the "update_at" field in the mutation.
func (*GameRoleAttributeMutation) UserID ¶
func (m *GameRoleAttributeMutation) UserID() (r int64, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*GameRoleAttributeMutation) Value ¶
func (m *GameRoleAttributeMutation) Value() (r string, exists bool)
Value returns the value of the "value" field in the mutation.
func (*GameRoleAttributeMutation) Where ¶
func (m *GameRoleAttributeMutation) Where(ps ...predicate.GameRoleAttribute)
Where appends a list predicates to the GameRoleAttributeMutation builder.
func (*GameRoleAttributeMutation) WhereP ¶
func (m *GameRoleAttributeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GameRoleAttributeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GameRoleAttributeQuery ¶
type GameRoleAttributeQuery struct {
// contains filtered or unexported fields
}
GameRoleAttributeQuery is the builder for querying GameRoleAttribute entities.
func (*GameRoleAttributeQuery) Aggregate ¶
func (graq *GameRoleAttributeQuery) Aggregate(fns ...AggregateFunc) *GameRoleAttributeSelect
Aggregate returns a GameRoleAttributeSelect configured with the given aggregations.
func (*GameRoleAttributeQuery) All ¶
func (graq *GameRoleAttributeQuery) All(ctx context.Context) ([]*GameRoleAttribute, error)
All executes the query and returns a list of GameRoleAttributes.
func (*GameRoleAttributeQuery) AllX ¶
func (graq *GameRoleAttributeQuery) AllX(ctx context.Context) []*GameRoleAttribute
AllX is like All, but panics if an error occurs.
func (*GameRoleAttributeQuery) Clone ¶
func (graq *GameRoleAttributeQuery) Clone() *GameRoleAttributeQuery
Clone returns a duplicate of the GameRoleAttributeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GameRoleAttributeQuery) Count ¶
func (graq *GameRoleAttributeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GameRoleAttributeQuery) CountX ¶
func (graq *GameRoleAttributeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GameRoleAttributeQuery) ExecContext ¶
func (c *GameRoleAttributeQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameRoleAttributeQuery) Exist ¶
func (graq *GameRoleAttributeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GameRoleAttributeQuery) ExistX ¶
func (graq *GameRoleAttributeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GameRoleAttributeQuery) First ¶
func (graq *GameRoleAttributeQuery) First(ctx context.Context) (*GameRoleAttribute, error)
First returns the first GameRoleAttribute entity from the query. Returns a *NotFoundError when no GameRoleAttribute was found.
func (*GameRoleAttributeQuery) FirstID ¶
func (graq *GameRoleAttributeQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first GameRoleAttribute ID from the query. Returns a *NotFoundError when no GameRoleAttribute ID was found.
func (*GameRoleAttributeQuery) FirstIDX ¶
func (graq *GameRoleAttributeQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*GameRoleAttributeQuery) FirstX ¶
func (graq *GameRoleAttributeQuery) FirstX(ctx context.Context) *GameRoleAttribute
FirstX is like First, but panics if an error occurs.
func (*GameRoleAttributeQuery) ForShare ¶
func (graq *GameRoleAttributeQuery) ForShare(opts ...sql.LockOption) *GameRoleAttributeQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*GameRoleAttributeQuery) ForUpdate ¶
func (graq *GameRoleAttributeQuery) ForUpdate(opts ...sql.LockOption) *GameRoleAttributeQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*GameRoleAttributeQuery) GroupBy ¶
func (graq *GameRoleAttributeQuery) GroupBy(field string, fields ...string) *GameRoleAttributeGroupBy
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 { UserID int64 `json:"user_id,omitempty"` Count int `json:"count,omitempty"` } client.GameRoleAttribute.Query(). GroupBy(gameroleattribute.FieldUserID). Aggregate(entity.Count()). Scan(ctx, &v)
func (*GameRoleAttributeQuery) IDs ¶
func (graq *GameRoleAttributeQuery) IDs(ctx context.Context) (ids []int64, err error)
IDs executes the query and returns a list of GameRoleAttribute IDs.
func (*GameRoleAttributeQuery) IDsX ¶
func (graq *GameRoleAttributeQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*GameRoleAttributeQuery) Limit ¶
func (graq *GameRoleAttributeQuery) Limit(limit int) *GameRoleAttributeQuery
Limit the number of records to be returned by this query.
func (*GameRoleAttributeQuery) Modify ¶
func (graq *GameRoleAttributeQuery) Modify(modifiers ...func(s *sql.Selector)) *GameRoleAttributeSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*GameRoleAttributeQuery) Offset ¶
func (graq *GameRoleAttributeQuery) Offset(offset int) *GameRoleAttributeQuery
Offset to start from.
func (*GameRoleAttributeQuery) Only ¶
func (graq *GameRoleAttributeQuery) Only(ctx context.Context) (*GameRoleAttribute, error)
Only returns a single GameRoleAttribute entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GameRoleAttribute entity is found. Returns a *NotFoundError when no GameRoleAttribute entities are found.
func (*GameRoleAttributeQuery) OnlyID ¶
func (graq *GameRoleAttributeQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only GameRoleAttribute ID in the query. Returns a *NotSingularError when more than one GameRoleAttribute ID is found. Returns a *NotFoundError when no entities are found.
func (*GameRoleAttributeQuery) OnlyIDX ¶
func (graq *GameRoleAttributeQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GameRoleAttributeQuery) OnlyX ¶
func (graq *GameRoleAttributeQuery) OnlyX(ctx context.Context) *GameRoleAttribute
OnlyX is like Only, but panics if an error occurs.
func (*GameRoleAttributeQuery) Order ¶
func (graq *GameRoleAttributeQuery) Order(o ...OrderFunc) *GameRoleAttributeQuery
Order specifies how the records should be ordered.
func (*GameRoleAttributeQuery) QueryContext ¶
func (c *GameRoleAttributeQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameRoleAttributeQuery) Select ¶
func (graq *GameRoleAttributeQuery) Select(fields ...string) *GameRoleAttributeSelect
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 { UserID int64 `json:"user_id,omitempty"` } client.GameRoleAttribute.Query(). Select(gameroleattribute.FieldUserID). Scan(ctx, &v)
func (*GameRoleAttributeQuery) Unique ¶
func (graq *GameRoleAttributeQuery) Unique(unique bool) *GameRoleAttributeQuery
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 (*GameRoleAttributeQuery) Where ¶
func (graq *GameRoleAttributeQuery) Where(ps ...predicate.GameRoleAttribute) *GameRoleAttributeQuery
Where adds a new predicate for the GameRoleAttributeQuery builder.
type GameRoleAttributeSelect ¶
type GameRoleAttributeSelect struct { *GameRoleAttributeQuery // contains filtered or unexported fields }
GameRoleAttributeSelect is the builder for selecting fields of GameRoleAttribute entities.
func (*GameRoleAttributeSelect) Aggregate ¶
func (gras *GameRoleAttributeSelect) Aggregate(fns ...AggregateFunc) *GameRoleAttributeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GameRoleAttributeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GameRoleAttributeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (GameRoleAttributeSelect) ExecContext ¶
func (c GameRoleAttributeSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameRoleAttributeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GameRoleAttributeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GameRoleAttributeSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*GameRoleAttributeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GameRoleAttributeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GameRoleAttributeSelect) Modify ¶
func (gras *GameRoleAttributeSelect) Modify(modifiers ...func(s *sql.Selector)) *GameRoleAttributeSelect
Modify adds a query modifier for attaching custom logic to queries.
func (GameRoleAttributeSelect) QueryContext ¶
func (c GameRoleAttributeSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameRoleAttributeSelect) Scan ¶
func (gras *GameRoleAttributeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GameRoleAttributeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GameRoleAttributeUpdate ¶
type GameRoleAttributeUpdate struct {
// contains filtered or unexported fields
}
GameRoleAttributeUpdate is the builder for updating GameRoleAttribute entities.
func (*GameRoleAttributeUpdate) AddType ¶
func (grau *GameRoleAttributeUpdate) AddType(i int) *GameRoleAttributeUpdate
AddType adds i to the "type" field.
func (*GameRoleAttributeUpdate) AddUserID ¶
func (grau *GameRoleAttributeUpdate) AddUserID(i int64) *GameRoleAttributeUpdate
AddUserID adds i to the "user_id" field.
func (*GameRoleAttributeUpdate) Exec ¶
func (grau *GameRoleAttributeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GameRoleAttributeUpdate) ExecContext ¶
func (c *GameRoleAttributeUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameRoleAttributeUpdate) ExecX ¶
func (grau *GameRoleAttributeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameRoleAttributeUpdate) Modify ¶
func (grau *GameRoleAttributeUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GameRoleAttributeUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*GameRoleAttributeUpdate) Mutation ¶
func (grau *GameRoleAttributeUpdate) Mutation() *GameRoleAttributeMutation
Mutation returns the GameRoleAttributeMutation object of the builder.
func (*GameRoleAttributeUpdate) QueryContext ¶
func (c *GameRoleAttributeUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameRoleAttributeUpdate) Save ¶
func (grau *GameRoleAttributeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GameRoleAttributeUpdate) SaveX ¶
func (grau *GameRoleAttributeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GameRoleAttributeUpdate) SetAccountID ¶
func (grau *GameRoleAttributeUpdate) SetAccountID(s string) *GameRoleAttributeUpdate
SetAccountID sets the "account_id" field.
func (*GameRoleAttributeUpdate) SetName ¶
func (grau *GameRoleAttributeUpdate) SetName(s string) *GameRoleAttributeUpdate
SetName sets the "name" field.
func (*GameRoleAttributeUpdate) SetNillableType ¶
func (grau *GameRoleAttributeUpdate) SetNillableType(i *int) *GameRoleAttributeUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*GameRoleAttributeUpdate) SetNillableValue ¶
func (grau *GameRoleAttributeUpdate) SetNillableValue(s *string) *GameRoleAttributeUpdate
SetNillableValue sets the "value" field if the given value is not nil.
func (*GameRoleAttributeUpdate) SetRoleID ¶
func (grau *GameRoleAttributeUpdate) SetRoleID(s string) *GameRoleAttributeUpdate
SetRoleID sets the "role_id" field.
func (*GameRoleAttributeUpdate) SetType ¶
func (grau *GameRoleAttributeUpdate) SetType(i int) *GameRoleAttributeUpdate
SetType sets the "type" field.
func (*GameRoleAttributeUpdate) SetUpdateAt ¶
func (grau *GameRoleAttributeUpdate) SetUpdateAt(t time.Time) *GameRoleAttributeUpdate
SetUpdateAt sets the "update_at" field.
func (*GameRoleAttributeUpdate) SetUserID ¶
func (grau *GameRoleAttributeUpdate) SetUserID(i int64) *GameRoleAttributeUpdate
SetUserID sets the "user_id" field.
func (*GameRoleAttributeUpdate) SetValue ¶
func (grau *GameRoleAttributeUpdate) SetValue(s string) *GameRoleAttributeUpdate
SetValue sets the "value" field.
func (*GameRoleAttributeUpdate) Where ¶
func (grau *GameRoleAttributeUpdate) Where(ps ...predicate.GameRoleAttribute) *GameRoleAttributeUpdate
Where appends a list predicates to the GameRoleAttributeUpdate builder.
type GameRoleAttributeUpdateOne ¶
type GameRoleAttributeUpdateOne struct {
// contains filtered or unexported fields
}
GameRoleAttributeUpdateOne is the builder for updating a single GameRoleAttribute entity.
func (*GameRoleAttributeUpdateOne) AddType ¶
func (grauo *GameRoleAttributeUpdateOne) AddType(i int) *GameRoleAttributeUpdateOne
AddType adds i to the "type" field.
func (*GameRoleAttributeUpdateOne) AddUserID ¶
func (grauo *GameRoleAttributeUpdateOne) AddUserID(i int64) *GameRoleAttributeUpdateOne
AddUserID adds i to the "user_id" field.
func (*GameRoleAttributeUpdateOne) Exec ¶
func (grauo *GameRoleAttributeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GameRoleAttributeUpdateOne) ExecContext ¶
func (c *GameRoleAttributeUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameRoleAttributeUpdateOne) ExecX ¶
func (grauo *GameRoleAttributeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameRoleAttributeUpdateOne) Modify ¶
func (grauo *GameRoleAttributeUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GameRoleAttributeUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*GameRoleAttributeUpdateOne) Mutation ¶
func (grauo *GameRoleAttributeUpdateOne) Mutation() *GameRoleAttributeMutation
Mutation returns the GameRoleAttributeMutation object of the builder.
func (*GameRoleAttributeUpdateOne) QueryContext ¶
func (c *GameRoleAttributeUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameRoleAttributeUpdateOne) Save ¶
func (grauo *GameRoleAttributeUpdateOne) Save(ctx context.Context) (*GameRoleAttribute, error)
Save executes the query and returns the updated GameRoleAttribute entity.
func (*GameRoleAttributeUpdateOne) SaveX ¶
func (grauo *GameRoleAttributeUpdateOne) SaveX(ctx context.Context) *GameRoleAttribute
SaveX is like Save, but panics if an error occurs.
func (*GameRoleAttributeUpdateOne) Select ¶
func (grauo *GameRoleAttributeUpdateOne) Select(field string, fields ...string) *GameRoleAttributeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GameRoleAttributeUpdateOne) SetAccountID ¶
func (grauo *GameRoleAttributeUpdateOne) SetAccountID(s string) *GameRoleAttributeUpdateOne
SetAccountID sets the "account_id" field.
func (*GameRoleAttributeUpdateOne) SetName ¶
func (grauo *GameRoleAttributeUpdateOne) SetName(s string) *GameRoleAttributeUpdateOne
SetName sets the "name" field.
func (*GameRoleAttributeUpdateOne) SetNillableType ¶
func (grauo *GameRoleAttributeUpdateOne) SetNillableType(i *int) *GameRoleAttributeUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*GameRoleAttributeUpdateOne) SetNillableValue ¶
func (grauo *GameRoleAttributeUpdateOne) SetNillableValue(s *string) *GameRoleAttributeUpdateOne
SetNillableValue sets the "value" field if the given value is not nil.
func (*GameRoleAttributeUpdateOne) SetRoleID ¶
func (grauo *GameRoleAttributeUpdateOne) SetRoleID(s string) *GameRoleAttributeUpdateOne
SetRoleID sets the "role_id" field.
func (*GameRoleAttributeUpdateOne) SetType ¶
func (grauo *GameRoleAttributeUpdateOne) SetType(i int) *GameRoleAttributeUpdateOne
SetType sets the "type" field.
func (*GameRoleAttributeUpdateOne) SetUpdateAt ¶
func (grauo *GameRoleAttributeUpdateOne) SetUpdateAt(t time.Time) *GameRoleAttributeUpdateOne
SetUpdateAt sets the "update_at" field.
func (*GameRoleAttributeUpdateOne) SetUserID ¶
func (grauo *GameRoleAttributeUpdateOne) SetUserID(i int64) *GameRoleAttributeUpdateOne
SetUserID sets the "user_id" field.
func (*GameRoleAttributeUpdateOne) SetValue ¶
func (grauo *GameRoleAttributeUpdateOne) SetValue(s string) *GameRoleAttributeUpdateOne
SetValue sets the "value" field.
func (*GameRoleAttributeUpdateOne) Where ¶
func (grauo *GameRoleAttributeUpdateOne) Where(ps ...predicate.GameRoleAttribute) *GameRoleAttributeUpdateOne
Where appends a list predicates to the GameRoleAttributeUpdate builder.
type GameRoleAttributeUpsert ¶
GameRoleAttributeUpsert is the "OnConflict" setter.
func (*GameRoleAttributeUpsert) AddType ¶
func (u *GameRoleAttributeUpsert) AddType(v int) *GameRoleAttributeUpsert
AddType adds v to the "type" field.
func (*GameRoleAttributeUpsert) AddUserID ¶
func (u *GameRoleAttributeUpsert) AddUserID(v int64) *GameRoleAttributeUpsert
AddUserID adds v to the "user_id" field.
func (*GameRoleAttributeUpsert) SetAccountID ¶
func (u *GameRoleAttributeUpsert) SetAccountID(v string) *GameRoleAttributeUpsert
SetAccountID sets the "account_id" field.
func (*GameRoleAttributeUpsert) SetName ¶
func (u *GameRoleAttributeUpsert) SetName(v string) *GameRoleAttributeUpsert
SetName sets the "name" field.
func (*GameRoleAttributeUpsert) SetRoleID ¶
func (u *GameRoleAttributeUpsert) SetRoleID(v string) *GameRoleAttributeUpsert
SetRoleID sets the "role_id" field.
func (*GameRoleAttributeUpsert) SetType ¶
func (u *GameRoleAttributeUpsert) SetType(v int) *GameRoleAttributeUpsert
SetType sets the "type" field.
func (*GameRoleAttributeUpsert) SetUpdateAt ¶
func (u *GameRoleAttributeUpsert) SetUpdateAt(v time.Time) *GameRoleAttributeUpsert
SetUpdateAt sets the "update_at" field.
func (*GameRoleAttributeUpsert) SetUserID ¶
func (u *GameRoleAttributeUpsert) SetUserID(v int64) *GameRoleAttributeUpsert
SetUserID sets the "user_id" field.
func (*GameRoleAttributeUpsert) SetValue ¶
func (u *GameRoleAttributeUpsert) SetValue(v string) *GameRoleAttributeUpsert
SetValue sets the "value" field.
func (*GameRoleAttributeUpsert) UpdateAccountID ¶
func (u *GameRoleAttributeUpsert) UpdateAccountID() *GameRoleAttributeUpsert
UpdateAccountID sets the "account_id" field to the value that was provided on create.
func (*GameRoleAttributeUpsert) UpdateName ¶
func (u *GameRoleAttributeUpsert) UpdateName() *GameRoleAttributeUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*GameRoleAttributeUpsert) UpdateRoleID ¶
func (u *GameRoleAttributeUpsert) UpdateRoleID() *GameRoleAttributeUpsert
UpdateRoleID sets the "role_id" field to the value that was provided on create.
func (*GameRoleAttributeUpsert) UpdateType ¶
func (u *GameRoleAttributeUpsert) UpdateType() *GameRoleAttributeUpsert
UpdateType sets the "type" field to the value that was provided on create.
func (*GameRoleAttributeUpsert) UpdateUpdateAt ¶
func (u *GameRoleAttributeUpsert) UpdateUpdateAt() *GameRoleAttributeUpsert
UpdateUpdateAt sets the "update_at" field to the value that was provided on create.
func (*GameRoleAttributeUpsert) UpdateUserID ¶
func (u *GameRoleAttributeUpsert) UpdateUserID() *GameRoleAttributeUpsert
UpdateUserID sets the "user_id" field to the value that was provided on create.
func (*GameRoleAttributeUpsert) UpdateValue ¶
func (u *GameRoleAttributeUpsert) UpdateValue() *GameRoleAttributeUpsert
UpdateValue sets the "value" field to the value that was provided on create.
type GameRoleAttributeUpsertBulk ¶
type GameRoleAttributeUpsertBulk struct {
// contains filtered or unexported fields
}
GameRoleAttributeUpsertBulk is the builder for "upsert"-ing a bulk of GameRoleAttribute nodes.
func (*GameRoleAttributeUpsertBulk) AddType ¶
func (u *GameRoleAttributeUpsertBulk) AddType(v int) *GameRoleAttributeUpsertBulk
AddType adds v to the "type" field.
func (*GameRoleAttributeUpsertBulk) AddUserID ¶
func (u *GameRoleAttributeUpsertBulk) AddUserID(v int64) *GameRoleAttributeUpsertBulk
AddUserID adds v to the "user_id" field.
func (*GameRoleAttributeUpsertBulk) DoNothing ¶
func (u *GameRoleAttributeUpsertBulk) DoNothing() *GameRoleAttributeUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GameRoleAttributeUpsertBulk) Exec ¶
func (u *GameRoleAttributeUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GameRoleAttributeUpsertBulk) ExecX ¶
func (u *GameRoleAttributeUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameRoleAttributeUpsertBulk) Ignore ¶
func (u *GameRoleAttributeUpsertBulk) Ignore() *GameRoleAttributeUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.GameRoleAttribute.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GameRoleAttributeUpsertBulk) SetAccountID ¶
func (u *GameRoleAttributeUpsertBulk) SetAccountID(v string) *GameRoleAttributeUpsertBulk
SetAccountID sets the "account_id" field.
func (*GameRoleAttributeUpsertBulk) SetName ¶
func (u *GameRoleAttributeUpsertBulk) SetName(v string) *GameRoleAttributeUpsertBulk
SetName sets the "name" field.
func (*GameRoleAttributeUpsertBulk) SetRoleID ¶
func (u *GameRoleAttributeUpsertBulk) SetRoleID(v string) *GameRoleAttributeUpsertBulk
SetRoleID sets the "role_id" field.
func (*GameRoleAttributeUpsertBulk) SetType ¶
func (u *GameRoleAttributeUpsertBulk) SetType(v int) *GameRoleAttributeUpsertBulk
SetType sets the "type" field.
func (*GameRoleAttributeUpsertBulk) SetUpdateAt ¶
func (u *GameRoleAttributeUpsertBulk) SetUpdateAt(v time.Time) *GameRoleAttributeUpsertBulk
SetUpdateAt sets the "update_at" field.
func (*GameRoleAttributeUpsertBulk) SetUserID ¶
func (u *GameRoleAttributeUpsertBulk) SetUserID(v int64) *GameRoleAttributeUpsertBulk
SetUserID sets the "user_id" field.
func (*GameRoleAttributeUpsertBulk) SetValue ¶
func (u *GameRoleAttributeUpsertBulk) SetValue(v string) *GameRoleAttributeUpsertBulk
SetValue sets the "value" field.
func (*GameRoleAttributeUpsertBulk) Update ¶
func (u *GameRoleAttributeUpsertBulk) Update(set func(*GameRoleAttributeUpsert)) *GameRoleAttributeUpsertBulk
Update allows overriding fields `UPDATE` values. See the GameRoleAttributeCreateBulk.OnConflict documentation for more info.
func (*GameRoleAttributeUpsertBulk) UpdateAccountID ¶
func (u *GameRoleAttributeUpsertBulk) UpdateAccountID() *GameRoleAttributeUpsertBulk
UpdateAccountID sets the "account_id" field to the value that was provided on create.
func (*GameRoleAttributeUpsertBulk) UpdateName ¶
func (u *GameRoleAttributeUpsertBulk) UpdateName() *GameRoleAttributeUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*GameRoleAttributeUpsertBulk) UpdateNewValues ¶
func (u *GameRoleAttributeUpsertBulk) UpdateNewValues() *GameRoleAttributeUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.GameRoleAttribute.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(gameroleattribute.FieldID) }), ). Exec(ctx)
func (*GameRoleAttributeUpsertBulk) UpdateRoleID ¶
func (u *GameRoleAttributeUpsertBulk) UpdateRoleID() *GameRoleAttributeUpsertBulk
UpdateRoleID sets the "role_id" field to the value that was provided on create.
func (*GameRoleAttributeUpsertBulk) UpdateType ¶
func (u *GameRoleAttributeUpsertBulk) UpdateType() *GameRoleAttributeUpsertBulk
UpdateType sets the "type" field to the value that was provided on create.
func (*GameRoleAttributeUpsertBulk) UpdateUpdateAt ¶
func (u *GameRoleAttributeUpsertBulk) UpdateUpdateAt() *GameRoleAttributeUpsertBulk
UpdateUpdateAt sets the "update_at" field to the value that was provided on create.
func (*GameRoleAttributeUpsertBulk) UpdateUserID ¶
func (u *GameRoleAttributeUpsertBulk) UpdateUserID() *GameRoleAttributeUpsertBulk
UpdateUserID sets the "user_id" field to the value that was provided on create.
func (*GameRoleAttributeUpsertBulk) UpdateValue ¶
func (u *GameRoleAttributeUpsertBulk) UpdateValue() *GameRoleAttributeUpsertBulk
UpdateValue sets the "value" field to the value that was provided on create.
type GameRoleAttributeUpsertOne ¶
type GameRoleAttributeUpsertOne struct {
// contains filtered or unexported fields
}
GameRoleAttributeUpsertOne is the builder for "upsert"-ing
one GameRoleAttribute node.
func (*GameRoleAttributeUpsertOne) AddType ¶
func (u *GameRoleAttributeUpsertOne) AddType(v int) *GameRoleAttributeUpsertOne
AddType adds v to the "type" field.
func (*GameRoleAttributeUpsertOne) AddUserID ¶
func (u *GameRoleAttributeUpsertOne) AddUserID(v int64) *GameRoleAttributeUpsertOne
AddUserID adds v to the "user_id" field.
func (*GameRoleAttributeUpsertOne) DoNothing ¶
func (u *GameRoleAttributeUpsertOne) DoNothing() *GameRoleAttributeUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GameRoleAttributeUpsertOne) Exec ¶
func (u *GameRoleAttributeUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*GameRoleAttributeUpsertOne) ExecX ¶
func (u *GameRoleAttributeUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameRoleAttributeUpsertOne) ID ¶
func (u *GameRoleAttributeUpsertOne) ID(ctx context.Context) (id int64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*GameRoleAttributeUpsertOne) IDX ¶
func (u *GameRoleAttributeUpsertOne) IDX(ctx context.Context) int64
IDX is like ID, but panics if an error occurs.
func (*GameRoleAttributeUpsertOne) Ignore ¶
func (u *GameRoleAttributeUpsertOne) Ignore() *GameRoleAttributeUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.GameRoleAttribute.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GameRoleAttributeUpsertOne) SetAccountID ¶
func (u *GameRoleAttributeUpsertOne) SetAccountID(v string) *GameRoleAttributeUpsertOne
SetAccountID sets the "account_id" field.
func (*GameRoleAttributeUpsertOne) SetName ¶
func (u *GameRoleAttributeUpsertOne) SetName(v string) *GameRoleAttributeUpsertOne
SetName sets the "name" field.
func (*GameRoleAttributeUpsertOne) SetRoleID ¶
func (u *GameRoleAttributeUpsertOne) SetRoleID(v string) *GameRoleAttributeUpsertOne
SetRoleID sets the "role_id" field.
func (*GameRoleAttributeUpsertOne) SetType ¶
func (u *GameRoleAttributeUpsertOne) SetType(v int) *GameRoleAttributeUpsertOne
SetType sets the "type" field.
func (*GameRoleAttributeUpsertOne) SetUpdateAt ¶
func (u *GameRoleAttributeUpsertOne) SetUpdateAt(v time.Time) *GameRoleAttributeUpsertOne
SetUpdateAt sets the "update_at" field.
func (*GameRoleAttributeUpsertOne) SetUserID ¶
func (u *GameRoleAttributeUpsertOne) SetUserID(v int64) *GameRoleAttributeUpsertOne
SetUserID sets the "user_id" field.
func (*GameRoleAttributeUpsertOne) SetValue ¶
func (u *GameRoleAttributeUpsertOne) SetValue(v string) *GameRoleAttributeUpsertOne
SetValue sets the "value" field.
func (*GameRoleAttributeUpsertOne) Update ¶
func (u *GameRoleAttributeUpsertOne) Update(set func(*GameRoleAttributeUpsert)) *GameRoleAttributeUpsertOne
Update allows overriding fields `UPDATE` values. See the GameRoleAttributeCreate.OnConflict documentation for more info.
func (*GameRoleAttributeUpsertOne) UpdateAccountID ¶
func (u *GameRoleAttributeUpsertOne) UpdateAccountID() *GameRoleAttributeUpsertOne
UpdateAccountID sets the "account_id" field to the value that was provided on create.
func (*GameRoleAttributeUpsertOne) UpdateName ¶
func (u *GameRoleAttributeUpsertOne) UpdateName() *GameRoleAttributeUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*GameRoleAttributeUpsertOne) UpdateNewValues ¶
func (u *GameRoleAttributeUpsertOne) UpdateNewValues() *GameRoleAttributeUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.GameRoleAttribute.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(gameroleattribute.FieldID) }), ). Exec(ctx)
func (*GameRoleAttributeUpsertOne) UpdateRoleID ¶
func (u *GameRoleAttributeUpsertOne) UpdateRoleID() *GameRoleAttributeUpsertOne
UpdateRoleID sets the "role_id" field to the value that was provided on create.
func (*GameRoleAttributeUpsertOne) UpdateType ¶
func (u *GameRoleAttributeUpsertOne) UpdateType() *GameRoleAttributeUpsertOne
UpdateType sets the "type" field to the value that was provided on create.
func (*GameRoleAttributeUpsertOne) UpdateUpdateAt ¶
func (u *GameRoleAttributeUpsertOne) UpdateUpdateAt() *GameRoleAttributeUpsertOne
UpdateUpdateAt sets the "update_at" field to the value that was provided on create.
func (*GameRoleAttributeUpsertOne) UpdateUserID ¶
func (u *GameRoleAttributeUpsertOne) UpdateUserID() *GameRoleAttributeUpsertOne
UpdateUserID sets the "user_id" field to the value that was provided on create.
func (*GameRoleAttributeUpsertOne) UpdateValue ¶
func (u *GameRoleAttributeUpsertOne) UpdateValue() *GameRoleAttributeUpsertOne
UpdateValue sets the "value" field to the value that was provided on create.
type GameRoleAttributes ¶
type GameRoleAttributes []*GameRoleAttribute
GameRoleAttributes is a parsable slice of GameRoleAttribute.
type GameRoleClient ¶
type GameRoleClient struct {
// contains filtered or unexported fields
}
GameRoleClient is a client for the GameRole schema.
func NewGameRoleClient ¶
func NewGameRoleClient(c config) *GameRoleClient
NewGameRoleClient returns a client for the GameRole from the given config.
func (*GameRoleClient) Create ¶
func (c *GameRoleClient) Create() *GameRoleCreate
Create returns a builder for creating a GameRole entity.
func (*GameRoleClient) CreateBulk ¶
func (c *GameRoleClient) CreateBulk(builders ...*GameRoleCreate) *GameRoleCreateBulk
CreateBulk returns a builder for creating a bulk of GameRole entities.
func (*GameRoleClient) Delete ¶
func (c *GameRoleClient) Delete() *GameRoleDelete
Delete returns a delete builder for GameRole.
func (*GameRoleClient) DeleteOne ¶
func (c *GameRoleClient) DeleteOne(gr *GameRole) *GameRoleDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GameRoleClient) DeleteOneID ¶
func (c *GameRoleClient) DeleteOneID(id int64) *GameRoleDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GameRoleClient) ExecContext ¶
func (c *GameRoleClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameRoleClient) GetX ¶
func (c *GameRoleClient) GetX(ctx context.Context, id int64) *GameRole
GetX is like Get, but panics if an error occurs.
func (*GameRoleClient) Hooks ¶
func (c *GameRoleClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GameRoleClient) Intercept ¶
func (c *GameRoleClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `gamerole.Intercept(f(g(h())))`.
func (*GameRoleClient) Interceptors ¶
func (c *GameRoleClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GameRoleClient) Query ¶
func (c *GameRoleClient) Query() *GameRoleQuery
Query returns a query builder for GameRole.
func (*GameRoleClient) QueryContext ¶
func (c *GameRoleClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameRoleClient) Update ¶
func (c *GameRoleClient) Update() *GameRoleUpdate
Update returns an update builder for GameRole.
func (*GameRoleClient) UpdateOne ¶
func (c *GameRoleClient) UpdateOne(gr *GameRole) *GameRoleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GameRoleClient) UpdateOneID ¶
func (c *GameRoleClient) UpdateOneID(id int64) *GameRoleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GameRoleClient) Use ¶
func (c *GameRoleClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `gamerole.Hooks(f(g(h())))`.
type GameRoleCreate ¶
type GameRoleCreate struct {
// contains filtered or unexported fields
}
GameRoleCreate is the builder for creating a GameRole entity.
func (*GameRoleCreate) Exec ¶
func (grc *GameRoleCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GameRoleCreate) ExecContext ¶
func (c *GameRoleCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameRoleCreate) ExecX ¶
func (grc *GameRoleCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameRoleCreate) Mutation ¶
func (grc *GameRoleCreate) Mutation() *GameRoleMutation
Mutation returns the GameRoleMutation object of the builder.
func (*GameRoleCreate) OnConflict ¶
func (grc *GameRoleCreate) OnConflict(opts ...sql.ConflictOption) *GameRoleUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.GameRole.Create(). SetUserID(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.GameRoleUpsert) { SetUserID(v+v). }). Exec(ctx)
func (*GameRoleCreate) OnConflictColumns ¶
func (grc *GameRoleCreate) OnConflictColumns(columns ...string) *GameRoleUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.GameRole.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*GameRoleCreate) QueryContext ¶
func (c *GameRoleCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameRoleCreate) Save ¶
func (grc *GameRoleCreate) Save(ctx context.Context) (*GameRole, error)
Save creates the GameRole in the database.
func (*GameRoleCreate) SaveX ¶
func (grc *GameRoleCreate) SaveX(ctx context.Context) *GameRole
SaveX calls Save and panics if Save returns an error.
func (*GameRoleCreate) SetAccountID ¶
func (grc *GameRoleCreate) SetAccountID(s string) *GameRoleCreate
SetAccountID sets the "account_id" field.
func (*GameRoleCreate) SetCreateAt ¶
func (grc *GameRoleCreate) SetCreateAt(t time.Time) *GameRoleCreate
SetCreateAt sets the "create_at" field.
func (*GameRoleCreate) SetID ¶
func (grc *GameRoleCreate) SetID(i int64) *GameRoleCreate
SetID sets the "id" field.
func (*GameRoleCreate) SetLevel ¶
func (grc *GameRoleCreate) SetLevel(i int) *GameRoleCreate
SetLevel sets the "level" field.
func (*GameRoleCreate) SetNickName ¶
func (grc *GameRoleCreate) SetNickName(s string) *GameRoleCreate
SetNickName sets the "nick_name" field.
func (*GameRoleCreate) SetNillableCreateAt ¶
func (grc *GameRoleCreate) SetNillableCreateAt(t *time.Time) *GameRoleCreate
SetNillableCreateAt sets the "create_at" field if the given value is not nil.
func (*GameRoleCreate) SetNillableLevel ¶
func (grc *GameRoleCreate) SetNillableLevel(i *int) *GameRoleCreate
SetNillableLevel sets the "level" field if the given value is not nil.
func (*GameRoleCreate) SetNillableNickName ¶
func (grc *GameRoleCreate) SetNillableNickName(s *string) *GameRoleCreate
SetNillableNickName sets the "nick_name" field if the given value is not nil.
func (*GameRoleCreate) SetNillableRegion ¶
func (grc *GameRoleCreate) SetNillableRegion(s *string) *GameRoleCreate
SetNillableRegion sets the "region" field if the given value is not nil.
func (*GameRoleCreate) SetNillableRegionName ¶
func (grc *GameRoleCreate) SetNillableRegionName(s *string) *GameRoleCreate
SetNillableRegionName sets the "region_name" field if the given value is not nil.
func (*GameRoleCreate) SetNillableUpdateAt ¶
func (grc *GameRoleCreate) SetNillableUpdateAt(t *time.Time) *GameRoleCreate
SetNillableUpdateAt sets the "update_at" field if the given value is not nil.
func (*GameRoleCreate) SetRegion ¶
func (grc *GameRoleCreate) SetRegion(s string) *GameRoleCreate
SetRegion sets the "region" field.
func (*GameRoleCreate) SetRegionName ¶
func (grc *GameRoleCreate) SetRegionName(s string) *GameRoleCreate
SetRegionName sets the "region_name" field.
func (*GameRoleCreate) SetRoleID ¶
func (grc *GameRoleCreate) SetRoleID(s string) *GameRoleCreate
SetRoleID sets the "role_id" field.
func (*GameRoleCreate) SetUpdateAt ¶
func (grc *GameRoleCreate) SetUpdateAt(t time.Time) *GameRoleCreate
SetUpdateAt sets the "update_at" field.
func (*GameRoleCreate) SetUserID ¶
func (grc *GameRoleCreate) SetUserID(i int64) *GameRoleCreate
SetUserID sets the "user_id" field.
type GameRoleCreateBulk ¶
type GameRoleCreateBulk struct {
// contains filtered or unexported fields
}
GameRoleCreateBulk is the builder for creating many GameRole entities in bulk.
func (*GameRoleCreateBulk) Exec ¶
func (grcb *GameRoleCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GameRoleCreateBulk) ExecContext ¶
func (c *GameRoleCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameRoleCreateBulk) ExecX ¶
func (grcb *GameRoleCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameRoleCreateBulk) OnConflict ¶
func (grcb *GameRoleCreateBulk) OnConflict(opts ...sql.ConflictOption) *GameRoleUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.GameRole.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.GameRoleUpsert) { SetUserID(v+v). }). Exec(ctx)
func (*GameRoleCreateBulk) OnConflictColumns ¶
func (grcb *GameRoleCreateBulk) OnConflictColumns(columns ...string) *GameRoleUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.GameRole.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*GameRoleCreateBulk) QueryContext ¶
func (c *GameRoleCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type GameRoleDelete ¶
type GameRoleDelete struct {
// contains filtered or unexported fields
}
GameRoleDelete is the builder for deleting a GameRole entity.
func (*GameRoleDelete) Exec ¶
func (grd *GameRoleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GameRoleDelete) ExecContext ¶
func (c *GameRoleDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameRoleDelete) ExecX ¶
func (grd *GameRoleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GameRoleDelete) QueryContext ¶
func (c *GameRoleDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameRoleDelete) Where ¶
func (grd *GameRoleDelete) Where(ps ...predicate.GameRole) *GameRoleDelete
Where appends a list predicates to the GameRoleDelete builder.
type GameRoleDeleteOne ¶
type GameRoleDeleteOne struct {
// contains filtered or unexported fields
}
GameRoleDeleteOne is the builder for deleting a single GameRole entity.
func (*GameRoleDeleteOne) Exec ¶
func (grdo *GameRoleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GameRoleDeleteOne) ExecX ¶
func (grdo *GameRoleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameRoleDeleteOne) Where ¶
func (grdo *GameRoleDeleteOne) Where(ps ...predicate.GameRole) *GameRoleDeleteOne
Where appends a list predicates to the GameRoleDelete builder.
type GameRoleGroupBy ¶
type GameRoleGroupBy struct {
// contains filtered or unexported fields
}
GameRoleGroupBy is the group-by builder for GameRole entities.
func (*GameRoleGroupBy) Aggregate ¶
func (grgb *GameRoleGroupBy) Aggregate(fns ...AggregateFunc) *GameRoleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GameRoleGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GameRoleGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GameRoleGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GameRoleGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GameRoleGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GameRoleGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GameRoleGroupBy) Scan ¶
func (grgb *GameRoleGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GameRoleGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GameRoleMutation ¶
type GameRoleMutation struct {
// contains filtered or unexported fields
}
GameRoleMutation represents an operation that mutates the GameRole nodes in the graph.
func (*GameRoleMutation) AccountID ¶
func (m *GameRoleMutation) AccountID() (r string, exists bool)
AccountID returns the value of the "account_id" field in the mutation.
func (*GameRoleMutation) AddField ¶
func (m *GameRoleMutation) 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 (*GameRoleMutation) AddLevel ¶
func (m *GameRoleMutation) AddLevel(i int)
AddLevel adds i to the "level" field.
func (*GameRoleMutation) AddUserID ¶
func (m *GameRoleMutation) AddUserID(i int64)
AddUserID adds i to the "user_id" field.
func (*GameRoleMutation) AddedEdges ¶
func (m *GameRoleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GameRoleMutation) AddedField ¶
func (m *GameRoleMutation) 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 (*GameRoleMutation) AddedFields ¶
func (m *GameRoleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GameRoleMutation) AddedIDs ¶
func (m *GameRoleMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GameRoleMutation) AddedLevel ¶
func (m *GameRoleMutation) AddedLevel() (r int, exists bool)
AddedLevel returns the value that was added to the "level" field in this mutation.
func (*GameRoleMutation) AddedUserID ¶
func (m *GameRoleMutation) AddedUserID() (r int64, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*GameRoleMutation) ClearEdge ¶
func (m *GameRoleMutation) 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 (*GameRoleMutation) ClearField ¶
func (m *GameRoleMutation) 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 (*GameRoleMutation) ClearedEdges ¶
func (m *GameRoleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GameRoleMutation) ClearedFields ¶
func (m *GameRoleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GameRoleMutation) Client ¶
func (m GameRoleMutation) 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 (*GameRoleMutation) CreateAt ¶
func (m *GameRoleMutation) CreateAt() (r time.Time, exists bool)
CreateAt returns the value of the "create_at" field in the mutation.
func (*GameRoleMutation) EdgeCleared ¶
func (m *GameRoleMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GameRoleMutation) ExecContext ¶
func (c *GameRoleMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameRoleMutation) Field ¶
func (m *GameRoleMutation) 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 (*GameRoleMutation) FieldCleared ¶
func (m *GameRoleMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GameRoleMutation) Fields ¶
func (m *GameRoleMutation) 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 (*GameRoleMutation) ID ¶
func (m *GameRoleMutation) 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 (*GameRoleMutation) IDs ¶
func (m *GameRoleMutation) 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 (*GameRoleMutation) Level ¶
func (m *GameRoleMutation) Level() (r int, exists bool)
Level returns the value of the "level" field in the mutation.
func (*GameRoleMutation) NickName ¶
func (m *GameRoleMutation) NickName() (r string, exists bool)
NickName returns the value of the "nick_name" field in the mutation.
func (*GameRoleMutation) OldAccountID ¶
func (m *GameRoleMutation) OldAccountID(ctx context.Context) (v string, err error)
OldAccountID returns the old "account_id" field's value of the GameRole entity. If the GameRole 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 (*GameRoleMutation) OldCreateAt ¶
OldCreateAt returns the old "create_at" field's value of the GameRole entity. If the GameRole 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 (*GameRoleMutation) 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 (*GameRoleMutation) OldLevel ¶
func (m *GameRoleMutation) OldLevel(ctx context.Context) (v int, err error)
OldLevel returns the old "level" field's value of the GameRole entity. If the GameRole 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 (*GameRoleMutation) OldNickName ¶
func (m *GameRoleMutation) OldNickName(ctx context.Context) (v string, err error)
OldNickName returns the old "nick_name" field's value of the GameRole entity. If the GameRole 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 (*GameRoleMutation) OldRegion ¶
func (m *GameRoleMutation) OldRegion(ctx context.Context) (v string, err error)
OldRegion returns the old "region" field's value of the GameRole entity. If the GameRole 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 (*GameRoleMutation) OldRegionName ¶
func (m *GameRoleMutation) OldRegionName(ctx context.Context) (v string, err error)
OldRegionName returns the old "region_name" field's value of the GameRole entity. If the GameRole 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 (*GameRoleMutation) OldRoleID ¶
func (m *GameRoleMutation) OldRoleID(ctx context.Context) (v string, err error)
OldRoleID returns the old "role_id" field's value of the GameRole entity. If the GameRole 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 (*GameRoleMutation) OldUpdateAt ¶
OldUpdateAt returns the old "update_at" field's value of the GameRole entity. If the GameRole 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 (*GameRoleMutation) OldUserID ¶
func (m *GameRoleMutation) OldUserID(ctx context.Context) (v int64, err error)
OldUserID returns the old "user_id" field's value of the GameRole entity. If the GameRole 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 (*GameRoleMutation) QueryContext ¶
func (c *GameRoleMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameRoleMutation) Region ¶
func (m *GameRoleMutation) Region() (r string, exists bool)
Region returns the value of the "region" field in the mutation.
func (*GameRoleMutation) RegionName ¶
func (m *GameRoleMutation) RegionName() (r string, exists bool)
RegionName returns the value of the "region_name" field in the mutation.
func (*GameRoleMutation) RemovedEdges ¶
func (m *GameRoleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GameRoleMutation) RemovedIDs ¶
func (m *GameRoleMutation) 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 (*GameRoleMutation) ResetAccountID ¶
func (m *GameRoleMutation) ResetAccountID()
ResetAccountID resets all changes to the "account_id" field.
func (*GameRoleMutation) ResetCreateAt ¶
func (m *GameRoleMutation) ResetCreateAt()
ResetCreateAt resets all changes to the "create_at" field.
func (*GameRoleMutation) ResetEdge ¶
func (m *GameRoleMutation) 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 (*GameRoleMutation) ResetField ¶
func (m *GameRoleMutation) 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 (*GameRoleMutation) ResetLevel ¶
func (m *GameRoleMutation) ResetLevel()
ResetLevel resets all changes to the "level" field.
func (*GameRoleMutation) ResetNickName ¶
func (m *GameRoleMutation) ResetNickName()
ResetNickName resets all changes to the "nick_name" field.
func (*GameRoleMutation) ResetRegion ¶
func (m *GameRoleMutation) ResetRegion()
ResetRegion resets all changes to the "region" field.
func (*GameRoleMutation) ResetRegionName ¶
func (m *GameRoleMutation) ResetRegionName()
ResetRegionName resets all changes to the "region_name" field.
func (*GameRoleMutation) ResetRoleID ¶
func (m *GameRoleMutation) ResetRoleID()
ResetRoleID resets all changes to the "role_id" field.
func (*GameRoleMutation) ResetUpdateAt ¶
func (m *GameRoleMutation) ResetUpdateAt()
ResetUpdateAt resets all changes to the "update_at" field.
func (*GameRoleMutation) ResetUserID ¶
func (m *GameRoleMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*GameRoleMutation) RoleID ¶
func (m *GameRoleMutation) RoleID() (r string, exists bool)
RoleID returns the value of the "role_id" field in the mutation.
func (*GameRoleMutation) SetAccountID ¶
func (m *GameRoleMutation) SetAccountID(s string)
SetAccountID sets the "account_id" field.
func (*GameRoleMutation) SetCreateAt ¶
func (m *GameRoleMutation) SetCreateAt(t time.Time)
SetCreateAt sets the "create_at" field.
func (*GameRoleMutation) SetField ¶
func (m *GameRoleMutation) 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 (*GameRoleMutation) SetID ¶
func (m *GameRoleMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of GameRole entities.
func (*GameRoleMutation) SetLevel ¶
func (m *GameRoleMutation) SetLevel(i int)
SetLevel sets the "level" field.
func (*GameRoleMutation) SetNickName ¶
func (m *GameRoleMutation) SetNickName(s string)
SetNickName sets the "nick_name" field.
func (*GameRoleMutation) SetOp ¶
func (m *GameRoleMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GameRoleMutation) SetRegion ¶
func (m *GameRoleMutation) SetRegion(s string)
SetRegion sets the "region" field.
func (*GameRoleMutation) SetRegionName ¶
func (m *GameRoleMutation) SetRegionName(s string)
SetRegionName sets the "region_name" field.
func (*GameRoleMutation) SetRoleID ¶
func (m *GameRoleMutation) SetRoleID(s string)
SetRoleID sets the "role_id" field.
func (*GameRoleMutation) SetUpdateAt ¶
func (m *GameRoleMutation) SetUpdateAt(t time.Time)
SetUpdateAt sets the "update_at" field.
func (*GameRoleMutation) SetUserID ¶
func (m *GameRoleMutation) SetUserID(i int64)
SetUserID sets the "user_id" field.
func (GameRoleMutation) Tx ¶
func (m GameRoleMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GameRoleMutation) Type ¶
func (m *GameRoleMutation) Type() string
Type returns the node type of this mutation (GameRole).
func (*GameRoleMutation) UpdateAt ¶
func (m *GameRoleMutation) UpdateAt() (r time.Time, exists bool)
UpdateAt returns the value of the "update_at" field in the mutation.
func (*GameRoleMutation) UserID ¶
func (m *GameRoleMutation) UserID() (r int64, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*GameRoleMutation) Where ¶
func (m *GameRoleMutation) Where(ps ...predicate.GameRole)
Where appends a list predicates to the GameRoleMutation builder.
func (*GameRoleMutation) WhereP ¶
func (m *GameRoleMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GameRoleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GameRoleQuery ¶
type GameRoleQuery struct {
// contains filtered or unexported fields
}
GameRoleQuery is the builder for querying GameRole entities.
func (*GameRoleQuery) Aggregate ¶
func (grq *GameRoleQuery) Aggregate(fns ...AggregateFunc) *GameRoleSelect
Aggregate returns a GameRoleSelect configured with the given aggregations.
func (*GameRoleQuery) All ¶
func (grq *GameRoleQuery) All(ctx context.Context) ([]*GameRole, error)
All executes the query and returns a list of GameRoles.
func (*GameRoleQuery) AllX ¶
func (grq *GameRoleQuery) AllX(ctx context.Context) []*GameRole
AllX is like All, but panics if an error occurs.
func (*GameRoleQuery) Clone ¶
func (grq *GameRoleQuery) Clone() *GameRoleQuery
Clone returns a duplicate of the GameRoleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GameRoleQuery) Count ¶
func (grq *GameRoleQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GameRoleQuery) CountX ¶
func (grq *GameRoleQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GameRoleQuery) ExecContext ¶
func (c *GameRoleQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameRoleQuery) Exist ¶
func (grq *GameRoleQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GameRoleQuery) ExistX ¶
func (grq *GameRoleQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GameRoleQuery) First ¶
func (grq *GameRoleQuery) First(ctx context.Context) (*GameRole, error)
First returns the first GameRole entity from the query. Returns a *NotFoundError when no GameRole was found.
func (*GameRoleQuery) FirstID ¶
func (grq *GameRoleQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first GameRole ID from the query. Returns a *NotFoundError when no GameRole ID was found.
func (*GameRoleQuery) FirstIDX ¶
func (grq *GameRoleQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*GameRoleQuery) FirstX ¶
func (grq *GameRoleQuery) FirstX(ctx context.Context) *GameRole
FirstX is like First, but panics if an error occurs.
func (*GameRoleQuery) ForShare ¶
func (grq *GameRoleQuery) ForShare(opts ...sql.LockOption) *GameRoleQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*GameRoleQuery) ForUpdate ¶
func (grq *GameRoleQuery) ForUpdate(opts ...sql.LockOption) *GameRoleQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*GameRoleQuery) GroupBy ¶
func (grq *GameRoleQuery) GroupBy(field string, fields ...string) *GameRoleGroupBy
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 { UserID int64 `json:"user_id,omitempty"` Count int `json:"count,omitempty"` } client.GameRole.Query(). GroupBy(gamerole.FieldUserID). Aggregate(entity.Count()). Scan(ctx, &v)
func (*GameRoleQuery) IDs ¶
func (grq *GameRoleQuery) IDs(ctx context.Context) (ids []int64, err error)
IDs executes the query and returns a list of GameRole IDs.
func (*GameRoleQuery) IDsX ¶
func (grq *GameRoleQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*GameRoleQuery) Limit ¶
func (grq *GameRoleQuery) Limit(limit int) *GameRoleQuery
Limit the number of records to be returned by this query.
func (*GameRoleQuery) Modify ¶
func (grq *GameRoleQuery) Modify(modifiers ...func(s *sql.Selector)) *GameRoleSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*GameRoleQuery) Offset ¶
func (grq *GameRoleQuery) Offset(offset int) *GameRoleQuery
Offset to start from.
func (*GameRoleQuery) Only ¶
func (grq *GameRoleQuery) Only(ctx context.Context) (*GameRole, error)
Only returns a single GameRole entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GameRole entity is found. Returns a *NotFoundError when no GameRole entities are found.
func (*GameRoleQuery) OnlyID ¶
func (grq *GameRoleQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only GameRole ID in the query. Returns a *NotSingularError when more than one GameRole ID is found. Returns a *NotFoundError when no entities are found.
func (*GameRoleQuery) OnlyIDX ¶
func (grq *GameRoleQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GameRoleQuery) OnlyX ¶
func (grq *GameRoleQuery) OnlyX(ctx context.Context) *GameRole
OnlyX is like Only, but panics if an error occurs.
func (*GameRoleQuery) Order ¶
func (grq *GameRoleQuery) Order(o ...OrderFunc) *GameRoleQuery
Order specifies how the records should be ordered.
func (*GameRoleQuery) QueryContext ¶
func (c *GameRoleQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameRoleQuery) Select ¶
func (grq *GameRoleQuery) Select(fields ...string) *GameRoleSelect
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 { UserID int64 `json:"user_id,omitempty"` } client.GameRole.Query(). Select(gamerole.FieldUserID). Scan(ctx, &v)
func (*GameRoleQuery) Unique ¶
func (grq *GameRoleQuery) Unique(unique bool) *GameRoleQuery
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 (*GameRoleQuery) Where ¶
func (grq *GameRoleQuery) Where(ps ...predicate.GameRole) *GameRoleQuery
Where adds a new predicate for the GameRoleQuery builder.
type GameRoleSelect ¶
type GameRoleSelect struct { *GameRoleQuery // contains filtered or unexported fields }
GameRoleSelect is the builder for selecting fields of GameRole entities.
func (*GameRoleSelect) Aggregate ¶
func (grs *GameRoleSelect) Aggregate(fns ...AggregateFunc) *GameRoleSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GameRoleSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GameRoleSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (GameRoleSelect) ExecContext ¶
func (c GameRoleSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameRoleSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GameRoleSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GameRoleSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GameRoleSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GameRoleSelect) Modify ¶
func (grs *GameRoleSelect) Modify(modifiers ...func(s *sql.Selector)) *GameRoleSelect
Modify adds a query modifier for attaching custom logic to queries.
func (GameRoleSelect) QueryContext ¶
func (c GameRoleSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameRoleSelect) Scan ¶
func (grs *GameRoleSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GameRoleSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GameRoleUpdate ¶
type GameRoleUpdate struct {
// contains filtered or unexported fields
}
GameRoleUpdate is the builder for updating GameRole entities.
func (*GameRoleUpdate) AddLevel ¶
func (gru *GameRoleUpdate) AddLevel(i int) *GameRoleUpdate
AddLevel adds i to the "level" field.
func (*GameRoleUpdate) AddUserID ¶
func (gru *GameRoleUpdate) AddUserID(i int64) *GameRoleUpdate
AddUserID adds i to the "user_id" field.
func (*GameRoleUpdate) Exec ¶
func (gru *GameRoleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GameRoleUpdate) ExecContext ¶
func (c *GameRoleUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameRoleUpdate) ExecX ¶
func (gru *GameRoleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameRoleUpdate) Modify ¶
func (gru *GameRoleUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GameRoleUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*GameRoleUpdate) Mutation ¶
func (gru *GameRoleUpdate) Mutation() *GameRoleMutation
Mutation returns the GameRoleMutation object of the builder.
func (*GameRoleUpdate) QueryContext ¶
func (c *GameRoleUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameRoleUpdate) Save ¶
func (gru *GameRoleUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GameRoleUpdate) SaveX ¶
func (gru *GameRoleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GameRoleUpdate) SetAccountID ¶
func (gru *GameRoleUpdate) SetAccountID(s string) *GameRoleUpdate
SetAccountID sets the "account_id" field.
func (*GameRoleUpdate) SetLevel ¶
func (gru *GameRoleUpdate) SetLevel(i int) *GameRoleUpdate
SetLevel sets the "level" field.
func (*GameRoleUpdate) SetNickName ¶
func (gru *GameRoleUpdate) SetNickName(s string) *GameRoleUpdate
SetNickName sets the "nick_name" field.
func (*GameRoleUpdate) SetNillableLevel ¶
func (gru *GameRoleUpdate) SetNillableLevel(i *int) *GameRoleUpdate
SetNillableLevel sets the "level" field if the given value is not nil.
func (*GameRoleUpdate) SetNillableNickName ¶
func (gru *GameRoleUpdate) SetNillableNickName(s *string) *GameRoleUpdate
SetNillableNickName sets the "nick_name" field if the given value is not nil.
func (*GameRoleUpdate) SetNillableRegion ¶
func (gru *GameRoleUpdate) SetNillableRegion(s *string) *GameRoleUpdate
SetNillableRegion sets the "region" field if the given value is not nil.
func (*GameRoleUpdate) SetNillableRegionName ¶
func (gru *GameRoleUpdate) SetNillableRegionName(s *string) *GameRoleUpdate
SetNillableRegionName sets the "region_name" field if the given value is not nil.
func (*GameRoleUpdate) SetRegion ¶
func (gru *GameRoleUpdate) SetRegion(s string) *GameRoleUpdate
SetRegion sets the "region" field.
func (*GameRoleUpdate) SetRegionName ¶
func (gru *GameRoleUpdate) SetRegionName(s string) *GameRoleUpdate
SetRegionName sets the "region_name" field.
func (*GameRoleUpdate) SetRoleID ¶
func (gru *GameRoleUpdate) SetRoleID(s string) *GameRoleUpdate
SetRoleID sets the "role_id" field.
func (*GameRoleUpdate) SetUpdateAt ¶
func (gru *GameRoleUpdate) SetUpdateAt(t time.Time) *GameRoleUpdate
SetUpdateAt sets the "update_at" field.
func (*GameRoleUpdate) SetUserID ¶
func (gru *GameRoleUpdate) SetUserID(i int64) *GameRoleUpdate
SetUserID sets the "user_id" field.
func (*GameRoleUpdate) Where ¶
func (gru *GameRoleUpdate) Where(ps ...predicate.GameRole) *GameRoleUpdate
Where appends a list predicates to the GameRoleUpdate builder.
type GameRoleUpdateOne ¶
type GameRoleUpdateOne struct {
// contains filtered or unexported fields
}
GameRoleUpdateOne is the builder for updating a single GameRole entity.
func (*GameRoleUpdateOne) AddLevel ¶
func (gruo *GameRoleUpdateOne) AddLevel(i int) *GameRoleUpdateOne
AddLevel adds i to the "level" field.
func (*GameRoleUpdateOne) AddUserID ¶
func (gruo *GameRoleUpdateOne) AddUserID(i int64) *GameRoleUpdateOne
AddUserID adds i to the "user_id" field.
func (*GameRoleUpdateOne) Exec ¶
func (gruo *GameRoleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GameRoleUpdateOne) ExecContext ¶
func (c *GameRoleUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*GameRoleUpdateOne) ExecX ¶
func (gruo *GameRoleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameRoleUpdateOne) Modify ¶
func (gruo *GameRoleUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GameRoleUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*GameRoleUpdateOne) Mutation ¶
func (gruo *GameRoleUpdateOne) Mutation() *GameRoleMutation
Mutation returns the GameRoleMutation object of the builder.
func (*GameRoleUpdateOne) QueryContext ¶
func (c *GameRoleUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*GameRoleUpdateOne) Save ¶
func (gruo *GameRoleUpdateOne) Save(ctx context.Context) (*GameRole, error)
Save executes the query and returns the updated GameRole entity.
func (*GameRoleUpdateOne) SaveX ¶
func (gruo *GameRoleUpdateOne) SaveX(ctx context.Context) *GameRole
SaveX is like Save, but panics if an error occurs.
func (*GameRoleUpdateOne) Select ¶
func (gruo *GameRoleUpdateOne) Select(field string, fields ...string) *GameRoleUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GameRoleUpdateOne) SetAccountID ¶
func (gruo *GameRoleUpdateOne) SetAccountID(s string) *GameRoleUpdateOne
SetAccountID sets the "account_id" field.
func (*GameRoleUpdateOne) SetLevel ¶
func (gruo *GameRoleUpdateOne) SetLevel(i int) *GameRoleUpdateOne
SetLevel sets the "level" field.
func (*GameRoleUpdateOne) SetNickName ¶
func (gruo *GameRoleUpdateOne) SetNickName(s string) *GameRoleUpdateOne
SetNickName sets the "nick_name" field.
func (*GameRoleUpdateOne) SetNillableLevel ¶
func (gruo *GameRoleUpdateOne) SetNillableLevel(i *int) *GameRoleUpdateOne
SetNillableLevel sets the "level" field if the given value is not nil.
func (*GameRoleUpdateOne) SetNillableNickName ¶
func (gruo *GameRoleUpdateOne) SetNillableNickName(s *string) *GameRoleUpdateOne
SetNillableNickName sets the "nick_name" field if the given value is not nil.
func (*GameRoleUpdateOne) SetNillableRegion ¶
func (gruo *GameRoleUpdateOne) SetNillableRegion(s *string) *GameRoleUpdateOne
SetNillableRegion sets the "region" field if the given value is not nil.
func (*GameRoleUpdateOne) SetNillableRegionName ¶
func (gruo *GameRoleUpdateOne) SetNillableRegionName(s *string) *GameRoleUpdateOne
SetNillableRegionName sets the "region_name" field if the given value is not nil.
func (*GameRoleUpdateOne) SetRegion ¶
func (gruo *GameRoleUpdateOne) SetRegion(s string) *GameRoleUpdateOne
SetRegion sets the "region" field.
func (*GameRoleUpdateOne) SetRegionName ¶
func (gruo *GameRoleUpdateOne) SetRegionName(s string) *GameRoleUpdateOne
SetRegionName sets the "region_name" field.
func (*GameRoleUpdateOne) SetRoleID ¶
func (gruo *GameRoleUpdateOne) SetRoleID(s string) *GameRoleUpdateOne
SetRoleID sets the "role_id" field.
func (*GameRoleUpdateOne) SetUpdateAt ¶
func (gruo *GameRoleUpdateOne) SetUpdateAt(t time.Time) *GameRoleUpdateOne
SetUpdateAt sets the "update_at" field.
func (*GameRoleUpdateOne) SetUserID ¶
func (gruo *GameRoleUpdateOne) SetUserID(i int64) *GameRoleUpdateOne
SetUserID sets the "user_id" field.
func (*GameRoleUpdateOne) Where ¶
func (gruo *GameRoleUpdateOne) Where(ps ...predicate.GameRole) *GameRoleUpdateOne
Where appends a list predicates to the GameRoleUpdate builder.
type GameRoleUpsert ¶
GameRoleUpsert is the "OnConflict" setter.
func (*GameRoleUpsert) AddLevel ¶
func (u *GameRoleUpsert) AddLevel(v int) *GameRoleUpsert
AddLevel adds v to the "level" field.
func (*GameRoleUpsert) AddUserID ¶
func (u *GameRoleUpsert) AddUserID(v int64) *GameRoleUpsert
AddUserID adds v to the "user_id" field.
func (*GameRoleUpsert) SetAccountID ¶
func (u *GameRoleUpsert) SetAccountID(v string) *GameRoleUpsert
SetAccountID sets the "account_id" field.
func (*GameRoleUpsert) SetLevel ¶
func (u *GameRoleUpsert) SetLevel(v int) *GameRoleUpsert
SetLevel sets the "level" field.
func (*GameRoleUpsert) SetNickName ¶
func (u *GameRoleUpsert) SetNickName(v string) *GameRoleUpsert
SetNickName sets the "nick_name" field.
func (*GameRoleUpsert) SetRegion ¶
func (u *GameRoleUpsert) SetRegion(v string) *GameRoleUpsert
SetRegion sets the "region" field.
func (*GameRoleUpsert) SetRegionName ¶
func (u *GameRoleUpsert) SetRegionName(v string) *GameRoleUpsert
SetRegionName sets the "region_name" field.
func (*GameRoleUpsert) SetRoleID ¶
func (u *GameRoleUpsert) SetRoleID(v string) *GameRoleUpsert
SetRoleID sets the "role_id" field.
func (*GameRoleUpsert) SetUpdateAt ¶
func (u *GameRoleUpsert) SetUpdateAt(v time.Time) *GameRoleUpsert
SetUpdateAt sets the "update_at" field.
func (*GameRoleUpsert) SetUserID ¶
func (u *GameRoleUpsert) SetUserID(v int64) *GameRoleUpsert
SetUserID sets the "user_id" field.
func (*GameRoleUpsert) UpdateAccountID ¶
func (u *GameRoleUpsert) UpdateAccountID() *GameRoleUpsert
UpdateAccountID sets the "account_id" field to the value that was provided on create.
func (*GameRoleUpsert) UpdateLevel ¶
func (u *GameRoleUpsert) UpdateLevel() *GameRoleUpsert
UpdateLevel sets the "level" field to the value that was provided on create.
func (*GameRoleUpsert) UpdateNickName ¶
func (u *GameRoleUpsert) UpdateNickName() *GameRoleUpsert
UpdateNickName sets the "nick_name" field to the value that was provided on create.
func (*GameRoleUpsert) UpdateRegion ¶
func (u *GameRoleUpsert) UpdateRegion() *GameRoleUpsert
UpdateRegion sets the "region" field to the value that was provided on create.
func (*GameRoleUpsert) UpdateRegionName ¶
func (u *GameRoleUpsert) UpdateRegionName() *GameRoleUpsert
UpdateRegionName sets the "region_name" field to the value that was provided on create.
func (*GameRoleUpsert) UpdateRoleID ¶
func (u *GameRoleUpsert) UpdateRoleID() *GameRoleUpsert
UpdateRoleID sets the "role_id" field to the value that was provided on create.
func (*GameRoleUpsert) UpdateUpdateAt ¶
func (u *GameRoleUpsert) UpdateUpdateAt() *GameRoleUpsert
UpdateUpdateAt sets the "update_at" field to the value that was provided on create.
func (*GameRoleUpsert) UpdateUserID ¶
func (u *GameRoleUpsert) UpdateUserID() *GameRoleUpsert
UpdateUserID sets the "user_id" field to the value that was provided on create.
type GameRoleUpsertBulk ¶
type GameRoleUpsertBulk struct {
// contains filtered or unexported fields
}
GameRoleUpsertBulk is the builder for "upsert"-ing a bulk of GameRole nodes.
func (*GameRoleUpsertBulk) AddLevel ¶
func (u *GameRoleUpsertBulk) AddLevel(v int) *GameRoleUpsertBulk
AddLevel adds v to the "level" field.
func (*GameRoleUpsertBulk) AddUserID ¶
func (u *GameRoleUpsertBulk) AddUserID(v int64) *GameRoleUpsertBulk
AddUserID adds v to the "user_id" field.
func (*GameRoleUpsertBulk) DoNothing ¶
func (u *GameRoleUpsertBulk) DoNothing() *GameRoleUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GameRoleUpsertBulk) Exec ¶
func (u *GameRoleUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GameRoleUpsertBulk) ExecX ¶
func (u *GameRoleUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameRoleUpsertBulk) Ignore ¶
func (u *GameRoleUpsertBulk) Ignore() *GameRoleUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.GameRole.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GameRoleUpsertBulk) SetAccountID ¶
func (u *GameRoleUpsertBulk) SetAccountID(v string) *GameRoleUpsertBulk
SetAccountID sets the "account_id" field.
func (*GameRoleUpsertBulk) SetLevel ¶
func (u *GameRoleUpsertBulk) SetLevel(v int) *GameRoleUpsertBulk
SetLevel sets the "level" field.
func (*GameRoleUpsertBulk) SetNickName ¶
func (u *GameRoleUpsertBulk) SetNickName(v string) *GameRoleUpsertBulk
SetNickName sets the "nick_name" field.
func (*GameRoleUpsertBulk) SetRegion ¶
func (u *GameRoleUpsertBulk) SetRegion(v string) *GameRoleUpsertBulk
SetRegion sets the "region" field.
func (*GameRoleUpsertBulk) SetRegionName ¶
func (u *GameRoleUpsertBulk) SetRegionName(v string) *GameRoleUpsertBulk
SetRegionName sets the "region_name" field.
func (*GameRoleUpsertBulk) SetRoleID ¶
func (u *GameRoleUpsertBulk) SetRoleID(v string) *GameRoleUpsertBulk
SetRoleID sets the "role_id" field.
func (*GameRoleUpsertBulk) SetUpdateAt ¶
func (u *GameRoleUpsertBulk) SetUpdateAt(v time.Time) *GameRoleUpsertBulk
SetUpdateAt sets the "update_at" field.
func (*GameRoleUpsertBulk) SetUserID ¶
func (u *GameRoleUpsertBulk) SetUserID(v int64) *GameRoleUpsertBulk
SetUserID sets the "user_id" field.
func (*GameRoleUpsertBulk) Update ¶
func (u *GameRoleUpsertBulk) Update(set func(*GameRoleUpsert)) *GameRoleUpsertBulk
Update allows overriding fields `UPDATE` values. See the GameRoleCreateBulk.OnConflict documentation for more info.
func (*GameRoleUpsertBulk) UpdateAccountID ¶
func (u *GameRoleUpsertBulk) UpdateAccountID() *GameRoleUpsertBulk
UpdateAccountID sets the "account_id" field to the value that was provided on create.
func (*GameRoleUpsertBulk) UpdateLevel ¶
func (u *GameRoleUpsertBulk) UpdateLevel() *GameRoleUpsertBulk
UpdateLevel sets the "level" field to the value that was provided on create.
func (*GameRoleUpsertBulk) UpdateNewValues ¶
func (u *GameRoleUpsertBulk) UpdateNewValues() *GameRoleUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.GameRole.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(gamerole.FieldID) }), ). Exec(ctx)
func (*GameRoleUpsertBulk) UpdateNickName ¶
func (u *GameRoleUpsertBulk) UpdateNickName() *GameRoleUpsertBulk
UpdateNickName sets the "nick_name" field to the value that was provided on create.
func (*GameRoleUpsertBulk) UpdateRegion ¶
func (u *GameRoleUpsertBulk) UpdateRegion() *GameRoleUpsertBulk
UpdateRegion sets the "region" field to the value that was provided on create.
func (*GameRoleUpsertBulk) UpdateRegionName ¶
func (u *GameRoleUpsertBulk) UpdateRegionName() *GameRoleUpsertBulk
UpdateRegionName sets the "region_name" field to the value that was provided on create.
func (*GameRoleUpsertBulk) UpdateRoleID ¶
func (u *GameRoleUpsertBulk) UpdateRoleID() *GameRoleUpsertBulk
UpdateRoleID sets the "role_id" field to the value that was provided on create.
func (*GameRoleUpsertBulk) UpdateUpdateAt ¶
func (u *GameRoleUpsertBulk) UpdateUpdateAt() *GameRoleUpsertBulk
UpdateUpdateAt sets the "update_at" field to the value that was provided on create.
func (*GameRoleUpsertBulk) UpdateUserID ¶
func (u *GameRoleUpsertBulk) UpdateUserID() *GameRoleUpsertBulk
UpdateUserID sets the "user_id" field to the value that was provided on create.
type GameRoleUpsertOne ¶
type GameRoleUpsertOne struct {
// contains filtered or unexported fields
}
GameRoleUpsertOne is the builder for "upsert"-ing
one GameRole node.
func (*GameRoleUpsertOne) AddLevel ¶
func (u *GameRoleUpsertOne) AddLevel(v int) *GameRoleUpsertOne
AddLevel adds v to the "level" field.
func (*GameRoleUpsertOne) AddUserID ¶
func (u *GameRoleUpsertOne) AddUserID(v int64) *GameRoleUpsertOne
AddUserID adds v to the "user_id" field.
func (*GameRoleUpsertOne) DoNothing ¶
func (u *GameRoleUpsertOne) DoNothing() *GameRoleUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GameRoleUpsertOne) Exec ¶
func (u *GameRoleUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*GameRoleUpsertOne) ExecX ¶
func (u *GameRoleUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GameRoleUpsertOne) ID ¶
func (u *GameRoleUpsertOne) ID(ctx context.Context) (id int64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*GameRoleUpsertOne) IDX ¶
func (u *GameRoleUpsertOne) IDX(ctx context.Context) int64
IDX is like ID, but panics if an error occurs.
func (*GameRoleUpsertOne) Ignore ¶
func (u *GameRoleUpsertOne) Ignore() *GameRoleUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.GameRole.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GameRoleUpsertOne) SetAccountID ¶
func (u *GameRoleUpsertOne) SetAccountID(v string) *GameRoleUpsertOne
SetAccountID sets the "account_id" field.
func (*GameRoleUpsertOne) SetLevel ¶
func (u *GameRoleUpsertOne) SetLevel(v int) *GameRoleUpsertOne
SetLevel sets the "level" field.
func (*GameRoleUpsertOne) SetNickName ¶
func (u *GameRoleUpsertOne) SetNickName(v string) *GameRoleUpsertOne
SetNickName sets the "nick_name" field.
func (*GameRoleUpsertOne) SetRegion ¶
func (u *GameRoleUpsertOne) SetRegion(v string) *GameRoleUpsertOne
SetRegion sets the "region" field.
func (*GameRoleUpsertOne) SetRegionName ¶
func (u *GameRoleUpsertOne) SetRegionName(v string) *GameRoleUpsertOne
SetRegionName sets the "region_name" field.
func (*GameRoleUpsertOne) SetRoleID ¶
func (u *GameRoleUpsertOne) SetRoleID(v string) *GameRoleUpsertOne
SetRoleID sets the "role_id" field.
func (*GameRoleUpsertOne) SetUpdateAt ¶
func (u *GameRoleUpsertOne) SetUpdateAt(v time.Time) *GameRoleUpsertOne
SetUpdateAt sets the "update_at" field.
func (*GameRoleUpsertOne) SetUserID ¶
func (u *GameRoleUpsertOne) SetUserID(v int64) *GameRoleUpsertOne
SetUserID sets the "user_id" field.
func (*GameRoleUpsertOne) Update ¶
func (u *GameRoleUpsertOne) Update(set func(*GameRoleUpsert)) *GameRoleUpsertOne
Update allows overriding fields `UPDATE` values. See the GameRoleCreate.OnConflict documentation for more info.
func (*GameRoleUpsertOne) UpdateAccountID ¶
func (u *GameRoleUpsertOne) UpdateAccountID() *GameRoleUpsertOne
UpdateAccountID sets the "account_id" field to the value that was provided on create.
func (*GameRoleUpsertOne) UpdateLevel ¶
func (u *GameRoleUpsertOne) UpdateLevel() *GameRoleUpsertOne
UpdateLevel sets the "level" field to the value that was provided on create.
func (*GameRoleUpsertOne) UpdateNewValues ¶
func (u *GameRoleUpsertOne) UpdateNewValues() *GameRoleUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.GameRole.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(gamerole.FieldID) }), ). Exec(ctx)
func (*GameRoleUpsertOne) UpdateNickName ¶
func (u *GameRoleUpsertOne) UpdateNickName() *GameRoleUpsertOne
UpdateNickName sets the "nick_name" field to the value that was provided on create.
func (*GameRoleUpsertOne) UpdateRegion ¶
func (u *GameRoleUpsertOne) UpdateRegion() *GameRoleUpsertOne
UpdateRegion sets the "region" field to the value that was provided on create.
func (*GameRoleUpsertOne) UpdateRegionName ¶
func (u *GameRoleUpsertOne) UpdateRegionName() *GameRoleUpsertOne
UpdateRegionName sets the "region_name" field to the value that was provided on create.
func (*GameRoleUpsertOne) UpdateRoleID ¶
func (u *GameRoleUpsertOne) UpdateRoleID() *GameRoleUpsertOne
UpdateRoleID sets the "role_id" field to the value that was provided on create.
func (*GameRoleUpsertOne) UpdateUpdateAt ¶
func (u *GameRoleUpsertOne) UpdateUpdateAt() *GameRoleUpsertOne
UpdateUpdateAt sets the "update_at" field to the value that was provided on create.
func (*GameRoleUpsertOne) UpdateUserID ¶
func (u *GameRoleUpsertOne) UpdateUserID() *GameRoleUpsertOne
UpdateUserID sets the "user_id" field to the value that was provided on create.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Chat is the client for interacting with the Chat builders. Chat *ChatClient // ChatOption is the client for interacting with the ChatOption builders. ChatOption *ChatOptionClient // GameAccount is the client for interacting with the GameAccount builders. GameAccount *GameAccountClient // GameRole is the client for interacting with the GameRole builders. GameRole *GameRoleClient // GameRoleAttribute is the client for interacting with the GameRoleAttribute builders. GameRoleAttribute *GameRoleAttributeClient // User is the client for interacting with the User builders. User *UserClient // 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) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
func (*Tx) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type User ¶
type User struct { // ID of the ent. ID int64 `json:"id,omitempty"` // UserID holds the value of the "user_id" field. UserID int64 `json:"user_id,omitempty"` // IsBot holds the value of the "is_bot" field. IsBot bool `json:"is_bot,omitempty"` // UserName holds the value of the "user_name" field. UserName string `json:"user_name,omitempty"` // FirstName holds the value of the "first_name" field. FirstName string `json:"first_name,omitempty"` // LastName holds the value of the "last_name" field. LastName string `json:"last_name,omitempty"` // CreateAt holds the value of the "create_at" field. CreateAt time.Time `json:"create_at,omitempty"` // UpdateAt holds the value of the "update_at" field. UpdateAt time.Time `json:"update_at,omitempty"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*User) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*User) Unwrap ¶
Unwrap unwraps the User 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 (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id int64) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) ExecContext ¶
func (c *UserClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id int64) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryContext ¶
func (c *UserClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id int64) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecContext ¶
func (c *UserCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) OnConflict ¶
func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.Create(). SetUserID(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetUserID(v+v). }). Exec(ctx)
func (*UserCreate) OnConflictColumns ¶
func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserCreate) QueryContext ¶
func (c *UserCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetCreateAt ¶
func (uc *UserCreate) SetCreateAt(t time.Time) *UserCreate
SetCreateAt sets the "create_at" field.
func (*UserCreate) SetFirstName ¶
func (uc *UserCreate) SetFirstName(s string) *UserCreate
SetFirstName sets the "first_name" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(i int64) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetIsBot ¶
func (uc *UserCreate) SetIsBot(b bool) *UserCreate
SetIsBot sets the "is_bot" field.
func (*UserCreate) SetLastName ¶
func (uc *UserCreate) SetLastName(s string) *UserCreate
SetLastName sets the "last_name" field.
func (*UserCreate) SetNillableCreateAt ¶
func (uc *UserCreate) SetNillableCreateAt(t *time.Time) *UserCreate
SetNillableCreateAt sets the "create_at" field if the given value is not nil.
func (*UserCreate) SetNillableFirstName ¶
func (uc *UserCreate) SetNillableFirstName(s *string) *UserCreate
SetNillableFirstName sets the "first_name" field if the given value is not nil.
func (*UserCreate) SetNillableIsBot ¶
func (uc *UserCreate) SetNillableIsBot(b *bool) *UserCreate
SetNillableIsBot sets the "is_bot" field if the given value is not nil.
func (*UserCreate) SetNillableLastName ¶
func (uc *UserCreate) SetNillableLastName(s *string) *UserCreate
SetNillableLastName sets the "last_name" field if the given value is not nil.
func (*UserCreate) SetNillableUpdateAt ¶
func (uc *UserCreate) SetNillableUpdateAt(t *time.Time) *UserCreate
SetNillableUpdateAt sets the "update_at" field if the given value is not nil.
func (*UserCreate) SetNillableUserName ¶
func (uc *UserCreate) SetNillableUserName(s *string) *UserCreate
SetNillableUserName sets the "user_name" field if the given value is not nil.
func (*UserCreate) SetUpdateAt ¶
func (uc *UserCreate) SetUpdateAt(t time.Time) *UserCreate
SetUpdateAt sets the "update_at" field.
func (*UserCreate) SetUserID ¶
func (uc *UserCreate) SetUserID(i int64) *UserCreate
SetUserID sets the "user_id" field.
func (*UserCreate) SetUserName ¶
func (uc *UserCreate) SetUserName(s string) *UserCreate
SetUserName sets the "user_name" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecContext ¶
func (c *UserCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreateBulk) OnConflict ¶
func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetUserID(v+v). }). Exec(ctx)
func (*UserCreateBulk) OnConflictColumns ¶
func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserCreateBulk) QueryContext ¶
func (c *UserCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecContext ¶
func (c *UserDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) QueryContext ¶
func (c *UserDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddField ¶
func (m *UserMutation) 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 (*UserMutation) AddUserID ¶
func (m *UserMutation) AddUserID(i int64)
AddUserID adds i to the "user_id" field.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) 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 (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) AddedUserID ¶
func (m *UserMutation) AddedUserID() (r int64, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) 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 (*UserMutation) ClearField ¶
func (m *UserMutation) 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 (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) 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 (*UserMutation) CreateAt ¶
func (m *UserMutation) CreateAt() (r time.Time, exists bool)
CreateAt returns the value of the "create_at" field in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) ExecContext ¶
func (c *UserMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserMutation) Field ¶
func (m *UserMutation) 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 (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) 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 (*UserMutation) FirstName ¶
func (m *UserMutation) FirstName() (r string, exists bool)
FirstName returns the value of the "first_name" field in the mutation.
func (*UserMutation) ID ¶
func (m *UserMutation) 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 (*UserMutation) IDs ¶
func (m *UserMutation) 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 (*UserMutation) IsBot ¶
func (m *UserMutation) IsBot() (r bool, exists bool)
IsBot returns the value of the "is_bot" field in the mutation.
func (*UserMutation) LastName ¶
func (m *UserMutation) LastName() (r string, exists bool)
LastName returns the value of the "last_name" field in the mutation.
func (*UserMutation) OldCreateAt ¶
OldCreateAt returns the old "create_at" field's value of the User entity. If the User 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 (*UserMutation) 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 (*UserMutation) OldFirstName ¶
func (m *UserMutation) OldFirstName(ctx context.Context) (v string, err error)
OldFirstName returns the old "first_name" field's value of the User entity. If the User 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 (*UserMutation) OldIsBot ¶
func (m *UserMutation) OldIsBot(ctx context.Context) (v bool, err error)
OldIsBot returns the old "is_bot" field's value of the User entity. If the User 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 (*UserMutation) OldLastName ¶
func (m *UserMutation) OldLastName(ctx context.Context) (v string, err error)
OldLastName returns the old "last_name" field's value of the User entity. If the User 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 (*UserMutation) OldUpdateAt ¶
OldUpdateAt returns the old "update_at" field's value of the User entity. If the User 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 (*UserMutation) OldUserID ¶
func (m *UserMutation) OldUserID(ctx context.Context) (v int64, err error)
OldUserID returns the old "user_id" field's value of the User entity. If the User 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 (*UserMutation) OldUserName ¶
func (m *UserMutation) OldUserName(ctx context.Context) (v string, err error)
OldUserName returns the old "user_name" field's value of the User entity. If the User 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 (*UserMutation) QueryContext ¶
func (c *UserMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) 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 (*UserMutation) ResetCreateAt ¶
func (m *UserMutation) ResetCreateAt()
ResetCreateAt resets all changes to the "create_at" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) 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 (*UserMutation) ResetField ¶
func (m *UserMutation) 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 (*UserMutation) ResetFirstName ¶
func (m *UserMutation) ResetFirstName()
ResetFirstName resets all changes to the "first_name" field.
func (*UserMutation) ResetIsBot ¶
func (m *UserMutation) ResetIsBot()
ResetIsBot resets all changes to the "is_bot" field.
func (*UserMutation) ResetLastName ¶
func (m *UserMutation) ResetLastName()
ResetLastName resets all changes to the "last_name" field.
func (*UserMutation) ResetUpdateAt ¶
func (m *UserMutation) ResetUpdateAt()
ResetUpdateAt resets all changes to the "update_at" field.
func (*UserMutation) ResetUserID ¶
func (m *UserMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*UserMutation) ResetUserName ¶
func (m *UserMutation) ResetUserName()
ResetUserName resets all changes to the "user_name" field.
func (*UserMutation) SetCreateAt ¶
func (m *UserMutation) SetCreateAt(t time.Time)
SetCreateAt sets the "create_at" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) 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 (*UserMutation) SetFirstName ¶
func (m *UserMutation) SetFirstName(s string)
SetFirstName sets the "first_name" field.
func (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetIsBot ¶
func (m *UserMutation) SetIsBot(b bool)
SetIsBot sets the "is_bot" field.
func (*UserMutation) SetLastName ¶
func (m *UserMutation) SetLastName(s string)
SetLastName sets the "last_name" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetUpdateAt ¶
func (m *UserMutation) SetUpdateAt(t time.Time)
SetUpdateAt sets the "update_at" field.
func (*UserMutation) SetUserID ¶
func (m *UserMutation) SetUserID(i int64)
SetUserID sets the "user_id" field.
func (*UserMutation) SetUserName ¶
func (m *UserMutation) SetUserName(s string)
SetUserName sets the "user_name" field.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UpdateAt ¶
func (m *UserMutation) UpdateAt() (r time.Time, exists bool)
UpdateAt returns the value of the "update_at" field in the mutation.
func (*UserMutation) UserID ¶
func (m *UserMutation) UserID() (r int64, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*UserMutation) UserName ¶
func (m *UserMutation) UserName() (r string, exists bool)
UserName returns the value of the "user_name" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) ExecContext ¶
func (c *UserQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) ForShare ¶
func (uq *UserQuery) ForShare(opts ...sql.LockOption) *UserQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*UserQuery) ForUpdate ¶
func (uq *UserQuery) ForUpdate(opts ...sql.LockOption) *UserQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
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 { UserID int64 `json:"user_id,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldUserID). Aggregate(entity.Count()). Scan(ctx, &v)
func (*UserQuery) Modify ¶
func (uq *UserQuery) Modify(modifiers ...func(s *sql.Selector)) *UserSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) QueryContext ¶
func (c *UserQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
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 { UserID int64 `json:"user_id,omitempty"` } client.User.Query(). Select(user.FieldUserID). Scan(ctx, &v)
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (UserSelect) ExecContext ¶
func (c UserSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Modify ¶
func (us *UserSelect) Modify(modifiers ...func(s *sql.Selector)) *UserSelect
Modify adds a query modifier for attaching custom logic to queries.
func (UserSelect) QueryContext ¶
func (c UserSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddUserID ¶
func (uu *UserUpdate) AddUserID(i int64) *UserUpdate
AddUserID adds i to the "user_id" field.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecContext ¶
func (c *UserUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Modify ¶
func (uu *UserUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) QueryContext ¶
func (c *UserUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetFirstName ¶
func (uu *UserUpdate) SetFirstName(s string) *UserUpdate
SetFirstName sets the "first_name" field.
func (*UserUpdate) SetIsBot ¶
func (uu *UserUpdate) SetIsBot(b bool) *UserUpdate
SetIsBot sets the "is_bot" field.
func (*UserUpdate) SetLastName ¶
func (uu *UserUpdate) SetLastName(s string) *UserUpdate
SetLastName sets the "last_name" field.
func (*UserUpdate) SetNillableFirstName ¶
func (uu *UserUpdate) SetNillableFirstName(s *string) *UserUpdate
SetNillableFirstName sets the "first_name" field if the given value is not nil.
func (*UserUpdate) SetNillableIsBot ¶
func (uu *UserUpdate) SetNillableIsBot(b *bool) *UserUpdate
SetNillableIsBot sets the "is_bot" field if the given value is not nil.
func (*UserUpdate) SetNillableLastName ¶
func (uu *UserUpdate) SetNillableLastName(s *string) *UserUpdate
SetNillableLastName sets the "last_name" field if the given value is not nil.
func (*UserUpdate) SetNillableUserName ¶
func (uu *UserUpdate) SetNillableUserName(s *string) *UserUpdate
SetNillableUserName sets the "user_name" field if the given value is not nil.
func (*UserUpdate) SetUpdateAt ¶
func (uu *UserUpdate) SetUpdateAt(t time.Time) *UserUpdate
SetUpdateAt sets the "update_at" field.
func (*UserUpdate) SetUserID ¶
func (uu *UserUpdate) SetUserID(i int64) *UserUpdate
SetUserID sets the "user_id" field.
func (*UserUpdate) SetUserName ¶
func (uu *UserUpdate) SetUserName(s string) *UserUpdate
SetUserName sets the "user_name" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddUserID ¶
func (uuo *UserUpdateOne) AddUserID(i int64) *UserUpdateOne
AddUserID adds i to the "user_id" field.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecContext ¶
func (c *UserUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Modify ¶
func (uuo *UserUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) QueryContext ¶
func (c *UserUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetFirstName ¶
func (uuo *UserUpdateOne) SetFirstName(s string) *UserUpdateOne
SetFirstName sets the "first_name" field.
func (*UserUpdateOne) SetIsBot ¶
func (uuo *UserUpdateOne) SetIsBot(b bool) *UserUpdateOne
SetIsBot sets the "is_bot" field.
func (*UserUpdateOne) SetLastName ¶
func (uuo *UserUpdateOne) SetLastName(s string) *UserUpdateOne
SetLastName sets the "last_name" field.
func (*UserUpdateOne) SetNillableFirstName ¶
func (uuo *UserUpdateOne) SetNillableFirstName(s *string) *UserUpdateOne
SetNillableFirstName sets the "first_name" field if the given value is not nil.
func (*UserUpdateOne) SetNillableIsBot ¶
func (uuo *UserUpdateOne) SetNillableIsBot(b *bool) *UserUpdateOne
SetNillableIsBot sets the "is_bot" field if the given value is not nil.
func (*UserUpdateOne) SetNillableLastName ¶
func (uuo *UserUpdateOne) SetNillableLastName(s *string) *UserUpdateOne
SetNillableLastName sets the "last_name" field if the given value is not nil.
func (*UserUpdateOne) SetNillableUserName ¶
func (uuo *UserUpdateOne) SetNillableUserName(s *string) *UserUpdateOne
SetNillableUserName sets the "user_name" field if the given value is not nil.
func (*UserUpdateOne) SetUpdateAt ¶
func (uuo *UserUpdateOne) SetUpdateAt(t time.Time) *UserUpdateOne
SetUpdateAt sets the "update_at" field.
func (*UserUpdateOne) SetUserID ¶
func (uuo *UserUpdateOne) SetUserID(i int64) *UserUpdateOne
SetUserID sets the "user_id" field.
func (*UserUpdateOne) SetUserName ¶
func (uuo *UserUpdateOne) SetUserName(s string) *UserUpdateOne
SetUserName sets the "user_name" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type UserUpsert ¶
UserUpsert is the "OnConflict" setter.
func (*UserUpsert) AddUserID ¶
func (u *UserUpsert) AddUserID(v int64) *UserUpsert
AddUserID adds v to the "user_id" field.
func (*UserUpsert) SetFirstName ¶
func (u *UserUpsert) SetFirstName(v string) *UserUpsert
SetFirstName sets the "first_name" field.
func (*UserUpsert) SetIsBot ¶
func (u *UserUpsert) SetIsBot(v bool) *UserUpsert
SetIsBot sets the "is_bot" field.
func (*UserUpsert) SetLastName ¶
func (u *UserUpsert) SetLastName(v string) *UserUpsert
SetLastName sets the "last_name" field.
func (*UserUpsert) SetUpdateAt ¶
func (u *UserUpsert) SetUpdateAt(v time.Time) *UserUpsert
SetUpdateAt sets the "update_at" field.
func (*UserUpsert) SetUserID ¶
func (u *UserUpsert) SetUserID(v int64) *UserUpsert
SetUserID sets the "user_id" field.
func (*UserUpsert) SetUserName ¶
func (u *UserUpsert) SetUserName(v string) *UserUpsert
SetUserName sets the "user_name" field.
func (*UserUpsert) UpdateFirstName ¶
func (u *UserUpsert) UpdateFirstName() *UserUpsert
UpdateFirstName sets the "first_name" field to the value that was provided on create.
func (*UserUpsert) UpdateIsBot ¶
func (u *UserUpsert) UpdateIsBot() *UserUpsert
UpdateIsBot sets the "is_bot" field to the value that was provided on create.
func (*UserUpsert) UpdateLastName ¶
func (u *UserUpsert) UpdateLastName() *UserUpsert
UpdateLastName sets the "last_name" field to the value that was provided on create.
func (*UserUpsert) UpdateUpdateAt ¶
func (u *UserUpsert) UpdateUpdateAt() *UserUpsert
UpdateUpdateAt sets the "update_at" field to the value that was provided on create.
func (*UserUpsert) UpdateUserID ¶
func (u *UserUpsert) UpdateUserID() *UserUpsert
UpdateUserID sets the "user_id" field to the value that was provided on create.
func (*UserUpsert) UpdateUserName ¶
func (u *UserUpsert) UpdateUserName() *UserUpsert
UpdateUserName sets the "user_name" field to the value that was provided on create.
type UserUpsertBulk ¶
type UserUpsertBulk struct {
// contains filtered or unexported fields
}
UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.
func (*UserUpsertBulk) AddUserID ¶
func (u *UserUpsertBulk) AddUserID(v int64) *UserUpsertBulk
AddUserID adds v to the "user_id" field.
func (*UserUpsertBulk) DoNothing ¶
func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertBulk) Exec ¶
func (u *UserUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertBulk) ExecX ¶
func (u *UserUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertBulk) Ignore ¶
func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertBulk) SetFirstName ¶
func (u *UserUpsertBulk) SetFirstName(v string) *UserUpsertBulk
SetFirstName sets the "first_name" field.
func (*UserUpsertBulk) SetIsBot ¶
func (u *UserUpsertBulk) SetIsBot(v bool) *UserUpsertBulk
SetIsBot sets the "is_bot" field.
func (*UserUpsertBulk) SetLastName ¶
func (u *UserUpsertBulk) SetLastName(v string) *UserUpsertBulk
SetLastName sets the "last_name" field.
func (*UserUpsertBulk) SetUpdateAt ¶
func (u *UserUpsertBulk) SetUpdateAt(v time.Time) *UserUpsertBulk
SetUpdateAt sets the "update_at" field.
func (*UserUpsertBulk) SetUserID ¶
func (u *UserUpsertBulk) SetUserID(v int64) *UserUpsertBulk
SetUserID sets the "user_id" field.
func (*UserUpsertBulk) SetUserName ¶
func (u *UserUpsertBulk) SetUserName(v string) *UserUpsertBulk
SetUserName sets the "user_name" field.
func (*UserUpsertBulk) Update ¶
func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.
func (*UserUpsertBulk) UpdateFirstName ¶
func (u *UserUpsertBulk) UpdateFirstName() *UserUpsertBulk
UpdateFirstName sets the "first_name" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateIsBot ¶
func (u *UserUpsertBulk) UpdateIsBot() *UserUpsertBulk
UpdateIsBot sets the "is_bot" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateLastName ¶
func (u *UserUpsertBulk) UpdateLastName() *UserUpsertBulk
UpdateLastName sets the "last_name" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateNewValues ¶
func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(user.FieldID) }), ). Exec(ctx)
func (*UserUpsertBulk) UpdateUpdateAt ¶
func (u *UserUpsertBulk) UpdateUpdateAt() *UserUpsertBulk
UpdateUpdateAt sets the "update_at" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateUserID ¶
func (u *UserUpsertBulk) UpdateUserID() *UserUpsertBulk
UpdateUserID sets the "user_id" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateUserName ¶
func (u *UserUpsertBulk) UpdateUserName() *UserUpsertBulk
UpdateUserName sets the "user_name" field to the value that was provided on create.
type UserUpsertOne ¶
type UserUpsertOne struct {
// contains filtered or unexported fields
}
UserUpsertOne is the builder for "upsert"-ing
one User node.
func (*UserUpsertOne) AddUserID ¶
func (u *UserUpsertOne) AddUserID(v int64) *UserUpsertOne
AddUserID adds v to the "user_id" field.
func (*UserUpsertOne) DoNothing ¶
func (u *UserUpsertOne) DoNothing() *UserUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertOne) Exec ¶
func (u *UserUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertOne) ExecX ¶
func (u *UserUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertOne) ID ¶
func (u *UserUpsertOne) ID(ctx context.Context) (id int64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*UserUpsertOne) IDX ¶
func (u *UserUpsertOne) IDX(ctx context.Context) int64
IDX is like ID, but panics if an error occurs.
func (*UserUpsertOne) Ignore ¶
func (u *UserUpsertOne) Ignore() *UserUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertOne) SetFirstName ¶
func (u *UserUpsertOne) SetFirstName(v string) *UserUpsertOne
SetFirstName sets the "first_name" field.
func (*UserUpsertOne) SetIsBot ¶
func (u *UserUpsertOne) SetIsBot(v bool) *UserUpsertOne
SetIsBot sets the "is_bot" field.
func (*UserUpsertOne) SetLastName ¶
func (u *UserUpsertOne) SetLastName(v string) *UserUpsertOne
SetLastName sets the "last_name" field.
func (*UserUpsertOne) SetUpdateAt ¶
func (u *UserUpsertOne) SetUpdateAt(v time.Time) *UserUpsertOne
SetUpdateAt sets the "update_at" field.
func (*UserUpsertOne) SetUserID ¶
func (u *UserUpsertOne) SetUserID(v int64) *UserUpsertOne
SetUserID sets the "user_id" field.
func (*UserUpsertOne) SetUserName ¶
func (u *UserUpsertOne) SetUserName(v string) *UserUpsertOne
SetUserName sets the "user_name" field.
func (*UserUpsertOne) Update ¶
func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.
func (*UserUpsertOne) UpdateFirstName ¶
func (u *UserUpsertOne) UpdateFirstName() *UserUpsertOne
UpdateFirstName sets the "first_name" field to the value that was provided on create.
func (*UserUpsertOne) UpdateIsBot ¶
func (u *UserUpsertOne) UpdateIsBot() *UserUpsertOne
UpdateIsBot sets the "is_bot" field to the value that was provided on create.
func (*UserUpsertOne) UpdateLastName ¶
func (u *UserUpsertOne) UpdateLastName() *UserUpsertOne
UpdateLastName sets the "last_name" field to the value that was provided on create.
func (*UserUpsertOne) UpdateNewValues ¶
func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(user.FieldID) }), ). Exec(ctx)
func (*UserUpsertOne) UpdateUpdateAt ¶
func (u *UserUpsertOne) UpdateUpdateAt() *UserUpsertOne
UpdateUpdateAt sets the "update_at" field to the value that was provided on create.
func (*UserUpsertOne) UpdateUserID ¶
func (u *UserUpsertOne) UpdateUserID() *UserUpsertOne
UpdateUserID sets the "user_id" field to the value that was provided on create.
func (*UserUpsertOne) UpdateUserName ¶
func (u *UserUpsertOne) UpdateUserName() *UserUpsertOne
UpdateUserName sets the "user_name" field to the value that was provided on create.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- chat.go
- chat_create.go
- chat_delete.go
- chat_query.go
- chat_update.go
- chatoption.go
- chatoption_create.go
- chatoption_delete.go
- chatoption_query.go
- chatoption_update.go
- client.go
- config.go
- context.go
- ent.go
- gameaccount.go
- gameaccount_create.go
- gameaccount_delete.go
- gameaccount_query.go
- gameaccount_update.go
- gamerole.go
- gamerole_create.go
- gamerole_delete.go
- gamerole_query.go
- gamerole_update.go
- gameroleattribute.go
- gameroleattribute_create.go
- gameroleattribute_delete.go
- gameroleattribute_query.go
- gameroleattribute_update.go
- mutation.go
- runtime.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go