Documentation ¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type 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 uint) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id uint) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id uint) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uint) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetAddress(s string) *UserCreate
- func (uc *UserCreate) SetAesType(i int8) *UserCreate
- func (uc *UserCreate) SetBalance(d decimal.Decimal) *UserCreate
- func (uc *UserCreate) SetBalanceUpdateTime(i int) *UserCreate
- func (uc *UserCreate) SetCanClaimAirdrop(i int8) *UserCreate
- func (uc *UserCreate) SetCreateDate(t time.Time) *UserCreate
- func (uc *UserCreate) SetCreateTime(i int) *UserCreate
- func (uc *UserCreate) SetID(u uint) *UserCreate
- func (uc *UserCreate) SetIsTransfer(i int8) *UserCreate
- func (uc *UserCreate) SetNetwork(s string) *UserCreate
- func (uc *UserCreate) SetNextAirdropClaimTime(i int) *UserCreate
- func (uc *UserCreate) SetNillableAddress(s *string) *UserCreate
- func (uc *UserCreate) SetNillableAesType(i *int8) *UserCreate
- func (uc *UserCreate) SetNillableBalance(d *decimal.Decimal) *UserCreate
- func (uc *UserCreate) SetNillableBalanceUpdateTime(i *int) *UserCreate
- func (uc *UserCreate) SetNillableCanClaimAirdrop(i *int8) *UserCreate
- func (uc *UserCreate) SetNillableCreateDate(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableCreateTime(i *int) *UserCreate
- func (uc *UserCreate) SetNillableIsTransfer(i *int8) *UserCreate
- func (uc *UserCreate) SetNillableNetwork(s *string) *UserCreate
- func (uc *UserCreate) SetNillableNextAirdropClaimTime(i *int) *UserCreate
- func (uc *UserCreate) SetNillablePrivateKey(s *string) *UserCreate
- func (uc *UserCreate) SetNillableTotalTokenValue(d *decimal.Decimal) *UserCreate
- func (uc *UserCreate) SetNillableTrxAddrType(uat *user.TrxAddrType) *UserCreate
- func (uc *UserCreate) SetNillableTrxMode(um *user.TrxMode) *UserCreate
- func (uc *UserCreate) SetNillableTrxPrivAddr(s *string) *UserCreate
- func (uc *UserCreate) SetNillableTrxPrivPkey(s *string) *UserCreate
- func (uc *UserCreate) SetNillableWords(s *string) *UserCreate
- func (uc *UserCreate) SetPrivateKey(s string) *UserCreate
- func (uc *UserCreate) SetTokenInfo(m map[string]interface{}) *UserCreate
- func (uc *UserCreate) SetTotalTokenValue(d decimal.Decimal) *UserCreate
- func (uc *UserCreate) SetTrxAddrType(uat user.TrxAddrType) *UserCreate
- func (uc *UserCreate) SetTrxMode(um user.TrxMode) *UserCreate
- func (uc *UserCreate) SetTrxPrivAddr(s string) *UserCreate
- func (uc *UserCreate) SetTrxPrivPkey(s string) *UserCreate
- func (uc *UserCreate) SetWords(s string) *UserCreate
- type UserCreateBulk
- type 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) AddAesType(i int8)
- func (m *UserMutation) AddBalanceUpdateTime(i int)
- func (m *UserMutation) AddCanClaimAirdrop(i int8)
- func (m *UserMutation) AddCreateTime(i int)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddIsTransfer(i int8)
- func (m *UserMutation) AddNextAirdropClaimTime(i int)
- func (m *UserMutation) AddedAesType() (r int8, exists bool)
- func (m *UserMutation) AddedBalanceUpdateTime() (r int, exists bool)
- func (m *UserMutation) AddedCanClaimAirdrop() (r int8, exists bool)
- func (m *UserMutation) AddedCreateTime() (r int, exists bool)
- 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) AddedIsTransfer() (r int8, exists bool)
- func (m *UserMutation) AddedNextAirdropClaimTime() (r int, exists bool)
- func (m *UserMutation) Address() (r string, exists bool)
- func (m *UserMutation) AddressCleared() bool
- func (m *UserMutation) AesType() (r int8, exists bool)
- func (m *UserMutation) AesTypeCleared() bool
- func (m *UserMutation) Balance() (r decimal.Decimal, exists bool)
- func (m *UserMutation) BalanceUpdateTime() (r int, exists bool)
- func (m *UserMutation) BalanceUpdateTimeCleared() bool
- func (m *UserMutation) CanClaimAirdrop() (r int8, exists bool)
- func (m *UserMutation) CanClaimAirdropCleared() bool
- func (m *UserMutation) ClearAddress()
- func (m *UserMutation) ClearAesType()
- func (m *UserMutation) ClearBalanceUpdateTime()
- func (m *UserMutation) ClearCanClaimAirdrop()
- func (m *UserMutation) ClearCreateDate()
- func (m *UserMutation) ClearCreateTime()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearIsTransfer()
- func (m *UserMutation) ClearNetwork()
- func (m *UserMutation) ClearNextAirdropClaimTime()
- func (m *UserMutation) ClearPrivateKey()
- func (m *UserMutation) ClearTokenInfo()
- func (m *UserMutation) ClearTrxAddrType()
- func (m *UserMutation) ClearTrxMode()
- func (m *UserMutation) ClearTrxPrivAddr()
- func (m *UserMutation) ClearTrxPrivPkey()
- func (m *UserMutation) ClearWords()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreateDate() (r time.Time, exists bool)
- func (m *UserMutation) CreateDateCleared() bool
- func (m *UserMutation) CreateTime() (r int, exists bool)
- func (m *UserMutation) CreateTimeCleared() bool
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) ID() (id uint, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]uint, error)
- func (m *UserMutation) IsTransfer() (r int8, exists bool)
- func (m *UserMutation) IsTransferCleared() bool
- func (m *UserMutation) Network() (r string, exists bool)
- func (m *UserMutation) NetworkCleared() bool
- func (m *UserMutation) NextAirdropClaimTime() (r int, exists bool)
- func (m *UserMutation) NextAirdropClaimTimeCleared() bool
- func (m *UserMutation) OldAddress(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldAesType(ctx context.Context) (v int8, err error)
- func (m *UserMutation) OldBalance(ctx context.Context) (v decimal.Decimal, err error)
- func (m *UserMutation) OldBalanceUpdateTime(ctx context.Context) (v int, err error)
- func (m *UserMutation) OldCanClaimAirdrop(ctx context.Context) (v int8, err error)
- func (m *UserMutation) OldCreateDate(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldCreateTime(ctx context.Context) (v int, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldIsTransfer(ctx context.Context) (v int8, err error)
- func (m *UserMutation) OldNetwork(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldNextAirdropClaimTime(ctx context.Context) (v int, err error)
- func (m *UserMutation) OldPrivateKey(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldTokenInfo(ctx context.Context) (v map[string]interface{}, err error)
- func (m *UserMutation) OldTotalTokenValue(ctx context.Context) (v decimal.Decimal, err error)
- func (m *UserMutation) OldTrxAddrType(ctx context.Context) (v user.TrxAddrType, err error)
- func (m *UserMutation) OldTrxMode(ctx context.Context) (v user.TrxMode, err error)
- func (m *UserMutation) OldTrxPrivAddr(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldTrxPrivPkey(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldWords(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) PrivateKey() (r string, exists bool)
- func (m *UserMutation) PrivateKeyCleared() bool
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetAddress()
- func (m *UserMutation) ResetAesType()
- func (m *UserMutation) ResetBalance()
- func (m *UserMutation) ResetBalanceUpdateTime()
- func (m *UserMutation) ResetCanClaimAirdrop()
- func (m *UserMutation) ResetCreateDate()
- func (m *UserMutation) ResetCreateTime()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetIsTransfer()
- func (m *UserMutation) ResetNetwork()
- func (m *UserMutation) ResetNextAirdropClaimTime()
- func (m *UserMutation) ResetPrivateKey()
- func (m *UserMutation) ResetTokenInfo()
- func (m *UserMutation) ResetTotalTokenValue()
- func (m *UserMutation) ResetTrxAddrType()
- func (m *UserMutation) ResetTrxMode()
- func (m *UserMutation) ResetTrxPrivAddr()
- func (m *UserMutation) ResetTrxPrivPkey()
- func (m *UserMutation) ResetWords()
- func (m *UserMutation) SetAddress(s string)
- func (m *UserMutation) SetAesType(i int8)
- func (m *UserMutation) SetBalance(d decimal.Decimal)
- func (m *UserMutation) SetBalanceUpdateTime(i int)
- func (m *UserMutation) SetCanClaimAirdrop(i int8)
- func (m *UserMutation) SetCreateDate(t time.Time)
- func (m *UserMutation) SetCreateTime(i int)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetID(id uint)
- func (m *UserMutation) SetIsTransfer(i int8)
- func (m *UserMutation) SetNetwork(s string)
- func (m *UserMutation) SetNextAirdropClaimTime(i int)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPrivateKey(s string)
- func (m *UserMutation) SetTokenInfo(value map[string]interface{})
- func (m *UserMutation) SetTotalTokenValue(d decimal.Decimal)
- func (m *UserMutation) SetTrxAddrType(uat user.TrxAddrType)
- func (m *UserMutation) SetTrxMode(um user.TrxMode)
- func (m *UserMutation) SetTrxPrivAddr(s string)
- func (m *UserMutation) SetTrxPrivPkey(s string)
- func (m *UserMutation) SetWords(s string)
- func (m *UserMutation) TokenInfo() (r map[string]interface{}, exists bool)
- func (m *UserMutation) TokenInfoCleared() bool
- func (m *UserMutation) TotalTokenValue() (r decimal.Decimal, exists bool)
- func (m *UserMutation) TrxAddrType() (r user.TrxAddrType, exists bool)
- func (m *UserMutation) TrxAddrTypeCleared() bool
- func (m *UserMutation) TrxMode() (r user.TrxMode, exists bool)
- func (m *UserMutation) TrxModeCleared() bool
- func (m *UserMutation) TrxPrivAddr() (r string, exists bool)
- func (m *UserMutation) TrxPrivAddrCleared() bool
- func (m *UserMutation) TrxPrivPkey() (r string, exists bool)
- func (m *UserMutation) TrxPrivPkeyCleared() bool
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- func (m *UserMutation) Words() (r string, exists bool)
- func (m *UserMutation) WordsCleared() bool
- 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 (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 uint, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) uint
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []uint, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []uint
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id uint, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) uint
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- 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 (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) 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) AddAesType(i int8) *UserUpdate
- func (uu *UserUpdate) AddBalanceUpdateTime(i int) *UserUpdate
- func (uu *UserUpdate) AddCanClaimAirdrop(i int8) *UserUpdate
- func (uu *UserUpdate) AddCreateTime(i int) *UserUpdate
- func (uu *UserUpdate) AddIsTransfer(i int8) *UserUpdate
- func (uu *UserUpdate) AddNextAirdropClaimTime(i int) *UserUpdate
- func (uu *UserUpdate) ClearAddress() *UserUpdate
- func (uu *UserUpdate) ClearAesType() *UserUpdate
- func (uu *UserUpdate) ClearBalanceUpdateTime() *UserUpdate
- func (uu *UserUpdate) ClearCanClaimAirdrop() *UserUpdate
- func (uu *UserUpdate) ClearCreateDate() *UserUpdate
- func (uu *UserUpdate) ClearCreateTime() *UserUpdate
- func (uu *UserUpdate) ClearIsTransfer() *UserUpdate
- func (uu *UserUpdate) ClearNetwork() *UserUpdate
- func (uu *UserUpdate) ClearNextAirdropClaimTime() *UserUpdate
- func (uu *UserUpdate) ClearPrivateKey() *UserUpdate
- func (uu *UserUpdate) ClearTokenInfo() *UserUpdate
- func (uu *UserUpdate) ClearTrxAddrType() *UserUpdate
- func (uu *UserUpdate) ClearTrxMode() *UserUpdate
- func (uu *UserUpdate) ClearTrxPrivAddr() *UserUpdate
- func (uu *UserUpdate) ClearTrxPrivPkey() *UserUpdate
- func (uu *UserUpdate) ClearWords() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetAddress(s string) *UserUpdate
- func (uu *UserUpdate) SetAesType(i int8) *UserUpdate
- func (uu *UserUpdate) SetBalance(d decimal.Decimal) *UserUpdate
- func (uu *UserUpdate) SetBalanceUpdateTime(i int) *UserUpdate
- func (uu *UserUpdate) SetCanClaimAirdrop(i int8) *UserUpdate
- func (uu *UserUpdate) SetCreateDate(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetCreateTime(i int) *UserUpdate
- func (uu *UserUpdate) SetIsTransfer(i int8) *UserUpdate
- func (uu *UserUpdate) SetNetwork(s string) *UserUpdate
- func (uu *UserUpdate) SetNextAirdropClaimTime(i int) *UserUpdate
- func (uu *UserUpdate) SetNillableAddress(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableAesType(i *int8) *UserUpdate
- func (uu *UserUpdate) SetNillableBalance(d *decimal.Decimal) *UserUpdate
- func (uu *UserUpdate) SetNillableBalanceUpdateTime(i *int) *UserUpdate
- func (uu *UserUpdate) SetNillableCanClaimAirdrop(i *int8) *UserUpdate
- func (uu *UserUpdate) SetNillableCreateDate(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableCreateTime(i *int) *UserUpdate
- func (uu *UserUpdate) SetNillableIsTransfer(i *int8) *UserUpdate
- func (uu *UserUpdate) SetNillableNetwork(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableNextAirdropClaimTime(i *int) *UserUpdate
- func (uu *UserUpdate) SetNillablePrivateKey(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableTotalTokenValue(d *decimal.Decimal) *UserUpdate
- func (uu *UserUpdate) SetNillableTrxAddrType(uat *user.TrxAddrType) *UserUpdate
- func (uu *UserUpdate) SetNillableTrxMode(um *user.TrxMode) *UserUpdate
- func (uu *UserUpdate) SetNillableTrxPrivAddr(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableTrxPrivPkey(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableWords(s *string) *UserUpdate
- func (uu *UserUpdate) SetPrivateKey(s string) *UserUpdate
- func (uu *UserUpdate) SetTokenInfo(m map[string]interface{}) *UserUpdate
- func (uu *UserUpdate) SetTotalTokenValue(d decimal.Decimal) *UserUpdate
- func (uu *UserUpdate) SetTrxAddrType(uat user.TrxAddrType) *UserUpdate
- func (uu *UserUpdate) SetTrxMode(um user.TrxMode) *UserUpdate
- func (uu *UserUpdate) SetTrxPrivAddr(s string) *UserUpdate
- func (uu *UserUpdate) SetTrxPrivPkey(s string) *UserUpdate
- func (uu *UserUpdate) SetWords(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddAesType(i int8) *UserUpdateOne
- func (uuo *UserUpdateOne) AddBalanceUpdateTime(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddCanClaimAirdrop(i int8) *UserUpdateOne
- func (uuo *UserUpdateOne) AddCreateTime(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddIsTransfer(i int8) *UserUpdateOne
- func (uuo *UserUpdateOne) AddNextAirdropClaimTime(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearAddress() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearAesType() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearBalanceUpdateTime() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearCanClaimAirdrop() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearCreateDate() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearCreateTime() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearIsTransfer() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearNetwork() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearNextAirdropClaimTime() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPrivateKey() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearTokenInfo() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearTrxAddrType() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearTrxMode() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearTrxPrivAddr() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearTrxPrivPkey() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearWords() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- 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) SetAddress(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetAesType(i int8) *UserUpdateOne
- func (uuo *UserUpdateOne) SetBalance(d decimal.Decimal) *UserUpdateOne
- func (uuo *UserUpdateOne) SetBalanceUpdateTime(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCanClaimAirdrop(i int8) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCreateDate(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCreateTime(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIsTransfer(i int8) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNetwork(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNextAirdropClaimTime(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAddress(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAesType(i *int8) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableBalance(d *decimal.Decimal) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableBalanceUpdateTime(i *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCanClaimAirdrop(i *int8) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCreateDate(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCreateTime(i *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableIsTransfer(i *int8) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableNetwork(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableNextAirdropClaimTime(i *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePrivateKey(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableTotalTokenValue(d *decimal.Decimal) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableTrxAddrType(uat *user.TrxAddrType) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableTrxMode(um *user.TrxMode) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableTrxPrivAddr(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableTrxPrivPkey(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableWords(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPrivateKey(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetTokenInfo(m map[string]interface{}) *UserUpdateOne
- func (uuo *UserUpdateOne) SetTotalTokenValue(d decimal.Decimal) *UserUpdateOne
- func (uuo *UserUpdateOne) SetTrxAddrType(uat user.TrxAddrType) *UserUpdateOne
- func (uuo *UserUpdateOne) SetTrxMode(um user.TrxMode) *UserUpdateOne
- func (uuo *UserUpdateOne) SetTrxPrivAddr(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetTrxPrivPkey(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetWords(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- 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. TypeUser = "User" )
Variables ¶
var ErrTxStarted = errors.New("gen: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(gen.As(gen.Sum(field1), "sum_field1"), (gen.As(gen.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // 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(). User. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // 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) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct { // ID of the ent. // User ID ID uint `json:"id,omitempty"` // Mnemonic words Words string `json:"words,omitempty"` // Network type Network string `json:"network,omitempty"` // User address Address string `json:"address,omitempty"` // User private key PrivateKey string `json:"private_key,omitempty"` // 主币余额 Balance decimal.Decimal `json:"balance,omitempty"` // 主币余额更新时间 BalanceUpdateTime int `json:"balance_update_time,omitempty"` // 代币信息:名称/余额/更新时间 TokenInfo map[string]interface{} `json:"token_info,omitempty"` // Creation time CreateTime int `json:"create_time,omitempty"` // Creation date CreateDate time.Time `json:"create_date,omitempty"` // 是否发起过转账 IsTransfer int8 `json:"is_transfer,omitempty"` // 代币总价值 TotalTokenValue decimal.Decimal `json:"total_token_value,omitempty"` // 波场模式:归集/锁定 TrxMode user.TrxMode `json:"trx_mode,omitempty"` // 波场地址类型:单签/多签 TrxAddrType user.TrxAddrType `json:"trx_addr_type,omitempty"` // Private address for transactions TrxPrivAddr string `json:"trx_priv_addr,omitempty"` // Private key for transactions TrxPrivPkey string `json:"trx_priv_pkey,omitempty"` // AES encryption type AesType int8 `json:"aes_type,omitempty"` // 是否可以领取空投:0 未知 1是/2否 CanClaimAirdrop int8 `json:"can_claim_airdrop,omitempty"` // 下次可以领取空投时间 NextAirdropClaimTime int `json:"next_airdrop_claim_time,omitempty"` // contains filtered or unexported fields }
User is the model entity for the User schema.
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 uint) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id uint) *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) MapCreateBulk ¶
func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
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 uint) *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) 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) 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) SetAddress ¶
func (uc *UserCreate) SetAddress(s string) *UserCreate
SetAddress sets the "address" field.
func (*UserCreate) SetAesType ¶
func (uc *UserCreate) SetAesType(i int8) *UserCreate
SetAesType sets the "aes_type" field.
func (*UserCreate) SetBalance ¶
func (uc *UserCreate) SetBalance(d decimal.Decimal) *UserCreate
SetBalance sets the "balance" field.
func (*UserCreate) SetBalanceUpdateTime ¶
func (uc *UserCreate) SetBalanceUpdateTime(i int) *UserCreate
SetBalanceUpdateTime sets the "balance_update_time" field.
func (*UserCreate) SetCanClaimAirdrop ¶ added in v0.14.3
func (uc *UserCreate) SetCanClaimAirdrop(i int8) *UserCreate
SetCanClaimAirdrop sets the "can_claim_airdrop" field.
func (*UserCreate) SetCreateDate ¶
func (uc *UserCreate) SetCreateDate(t time.Time) *UserCreate
SetCreateDate sets the "create_date" field.
func (*UserCreate) SetCreateTime ¶
func (uc *UserCreate) SetCreateTime(i int) *UserCreate
SetCreateTime sets the "create_time" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uint) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetIsTransfer ¶
func (uc *UserCreate) SetIsTransfer(i int8) *UserCreate
SetIsTransfer sets the "is_transfer" field.
func (*UserCreate) SetNetwork ¶
func (uc *UserCreate) SetNetwork(s string) *UserCreate
SetNetwork sets the "network" field.
func (*UserCreate) SetNextAirdropClaimTime ¶ added in v0.14.3
func (uc *UserCreate) SetNextAirdropClaimTime(i int) *UserCreate
SetNextAirdropClaimTime sets the "next_airdrop_claim_time" field.
func (*UserCreate) SetNillableAddress ¶
func (uc *UserCreate) SetNillableAddress(s *string) *UserCreate
SetNillableAddress sets the "address" field if the given value is not nil.
func (*UserCreate) SetNillableAesType ¶
func (uc *UserCreate) SetNillableAesType(i *int8) *UserCreate
SetNillableAesType sets the "aes_type" field if the given value is not nil.
func (*UserCreate) SetNillableBalance ¶
func (uc *UserCreate) SetNillableBalance(d *decimal.Decimal) *UserCreate
SetNillableBalance sets the "balance" field if the given value is not nil.
func (*UserCreate) SetNillableBalanceUpdateTime ¶
func (uc *UserCreate) SetNillableBalanceUpdateTime(i *int) *UserCreate
SetNillableBalanceUpdateTime sets the "balance_update_time" field if the given value is not nil.
func (*UserCreate) SetNillableCanClaimAirdrop ¶ added in v0.14.3
func (uc *UserCreate) SetNillableCanClaimAirdrop(i *int8) *UserCreate
SetNillableCanClaimAirdrop sets the "can_claim_airdrop" field if the given value is not nil.
func (*UserCreate) SetNillableCreateDate ¶
func (uc *UserCreate) SetNillableCreateDate(t *time.Time) *UserCreate
SetNillableCreateDate sets the "create_date" field if the given value is not nil.
func (*UserCreate) SetNillableCreateTime ¶
func (uc *UserCreate) SetNillableCreateTime(i *int) *UserCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*UserCreate) SetNillableIsTransfer ¶
func (uc *UserCreate) SetNillableIsTransfer(i *int8) *UserCreate
SetNillableIsTransfer sets the "is_transfer" field if the given value is not nil.
func (*UserCreate) SetNillableNetwork ¶
func (uc *UserCreate) SetNillableNetwork(s *string) *UserCreate
SetNillableNetwork sets the "network" field if the given value is not nil.
func (*UserCreate) SetNillableNextAirdropClaimTime ¶ added in v0.14.3
func (uc *UserCreate) SetNillableNextAirdropClaimTime(i *int) *UserCreate
SetNillableNextAirdropClaimTime sets the "next_airdrop_claim_time" field if the given value is not nil.
func (*UserCreate) SetNillablePrivateKey ¶
func (uc *UserCreate) SetNillablePrivateKey(s *string) *UserCreate
SetNillablePrivateKey sets the "private_key" field if the given value is not nil.
func (*UserCreate) SetNillableTotalTokenValue ¶
func (uc *UserCreate) SetNillableTotalTokenValue(d *decimal.Decimal) *UserCreate
SetNillableTotalTokenValue sets the "total_token_value" field if the given value is not nil.
func (*UserCreate) SetNillableTrxAddrType ¶
func (uc *UserCreate) SetNillableTrxAddrType(uat *user.TrxAddrType) *UserCreate
SetNillableTrxAddrType sets the "trx_addr_type" field if the given value is not nil.
func (*UserCreate) SetNillableTrxMode ¶
func (uc *UserCreate) SetNillableTrxMode(um *user.TrxMode) *UserCreate
SetNillableTrxMode sets the "trx_mode" field if the given value is not nil.
func (*UserCreate) SetNillableTrxPrivAddr ¶
func (uc *UserCreate) SetNillableTrxPrivAddr(s *string) *UserCreate
SetNillableTrxPrivAddr sets the "trx_priv_addr" field if the given value is not nil.
func (*UserCreate) SetNillableTrxPrivPkey ¶
func (uc *UserCreate) SetNillableTrxPrivPkey(s *string) *UserCreate
SetNillableTrxPrivPkey sets the "trx_priv_pkey" field if the given value is not nil.
func (*UserCreate) SetNillableWords ¶
func (uc *UserCreate) SetNillableWords(s *string) *UserCreate
SetNillableWords sets the "words" field if the given value is not nil.
func (*UserCreate) SetPrivateKey ¶
func (uc *UserCreate) SetPrivateKey(s string) *UserCreate
SetPrivateKey sets the "private_key" field.
func (*UserCreate) SetTokenInfo ¶
func (uc *UserCreate) SetTokenInfo(m map[string]interface{}) *UserCreate
SetTokenInfo sets the "token_info" field.
func (*UserCreate) SetTotalTokenValue ¶
func (uc *UserCreate) SetTotalTokenValue(d decimal.Decimal) *UserCreate
SetTotalTokenValue sets the "total_token_value" field.
func (*UserCreate) SetTrxAddrType ¶
func (uc *UserCreate) SetTrxAddrType(uat user.TrxAddrType) *UserCreate
SetTrxAddrType sets the "trx_addr_type" field.
func (*UserCreate) SetTrxMode ¶
func (uc *UserCreate) SetTrxMode(um user.TrxMode) *UserCreate
SetTrxMode sets the "trx_mode" field.
func (*UserCreate) SetTrxPrivAddr ¶
func (uc *UserCreate) SetTrxPrivAddr(s string) *UserCreate
SetTrxPrivAddr sets the "trx_priv_addr" field.
func (*UserCreate) SetTrxPrivPkey ¶
func (uc *UserCreate) SetTrxPrivPkey(s string) *UserCreate
SetTrxPrivPkey sets the "trx_priv_pkey" field.
func (*UserCreate) SetWords ¶
func (uc *UserCreate) SetWords(s string) *UserCreate
SetWords sets the "words" 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) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
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) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
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) AddAesType ¶
func (m *UserMutation) AddAesType(i int8)
AddAesType adds i to the "aes_type" field.
func (*UserMutation) AddBalanceUpdateTime ¶
func (m *UserMutation) AddBalanceUpdateTime(i int)
AddBalanceUpdateTime adds i to the "balance_update_time" field.
func (*UserMutation) AddCanClaimAirdrop ¶ added in v0.14.3
func (m *UserMutation) AddCanClaimAirdrop(i int8)
AddCanClaimAirdrop adds i to the "can_claim_airdrop" field.
func (*UserMutation) AddCreateTime ¶
func (m *UserMutation) AddCreateTime(i int)
AddCreateTime adds i to the "create_time" field.
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) AddIsTransfer ¶
func (m *UserMutation) AddIsTransfer(i int8)
AddIsTransfer adds i to the "is_transfer" field.
func (*UserMutation) AddNextAirdropClaimTime ¶ added in v0.14.3
func (m *UserMutation) AddNextAirdropClaimTime(i int)
AddNextAirdropClaimTime adds i to the "next_airdrop_claim_time" field.
func (*UserMutation) AddedAesType ¶
func (m *UserMutation) AddedAesType() (r int8, exists bool)
AddedAesType returns the value that was added to the "aes_type" field in this mutation.
func (*UserMutation) AddedBalanceUpdateTime ¶
func (m *UserMutation) AddedBalanceUpdateTime() (r int, exists bool)
AddedBalanceUpdateTime returns the value that was added to the "balance_update_time" field in this mutation.
func (*UserMutation) AddedCanClaimAirdrop ¶ added in v0.14.3
func (m *UserMutation) AddedCanClaimAirdrop() (r int8, exists bool)
AddedCanClaimAirdrop returns the value that was added to the "can_claim_airdrop" field in this mutation.
func (*UserMutation) AddedCreateTime ¶
func (m *UserMutation) AddedCreateTime() (r int, exists bool)
AddedCreateTime returns the value that was added to the "create_time" field in this mutation.
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) AddedIsTransfer ¶
func (m *UserMutation) AddedIsTransfer() (r int8, exists bool)
AddedIsTransfer returns the value that was added to the "is_transfer" field in this mutation.
func (*UserMutation) AddedNextAirdropClaimTime ¶ added in v0.14.3
func (m *UserMutation) AddedNextAirdropClaimTime() (r int, exists bool)
AddedNextAirdropClaimTime returns the value that was added to the "next_airdrop_claim_time" field in this mutation.
func (*UserMutation) Address ¶
func (m *UserMutation) Address() (r string, exists bool)
Address returns the value of the "address" field in the mutation.
func (*UserMutation) AddressCleared ¶
func (m *UserMutation) AddressCleared() bool
AddressCleared returns if the "address" field was cleared in this mutation.
func (*UserMutation) AesType ¶
func (m *UserMutation) AesType() (r int8, exists bool)
AesType returns the value of the "aes_type" field in the mutation.
func (*UserMutation) AesTypeCleared ¶
func (m *UserMutation) AesTypeCleared() bool
AesTypeCleared returns if the "aes_type" field was cleared in this mutation.
func (*UserMutation) Balance ¶
func (m *UserMutation) Balance() (r decimal.Decimal, exists bool)
Balance returns the value of the "balance" field in the mutation.
func (*UserMutation) BalanceUpdateTime ¶
func (m *UserMutation) BalanceUpdateTime() (r int, exists bool)
BalanceUpdateTime returns the value of the "balance_update_time" field in the mutation.
func (*UserMutation) BalanceUpdateTimeCleared ¶
func (m *UserMutation) BalanceUpdateTimeCleared() bool
BalanceUpdateTimeCleared returns if the "balance_update_time" field was cleared in this mutation.
func (*UserMutation) CanClaimAirdrop ¶ added in v0.14.3
func (m *UserMutation) CanClaimAirdrop() (r int8, exists bool)
CanClaimAirdrop returns the value of the "can_claim_airdrop" field in the mutation.
func (*UserMutation) CanClaimAirdropCleared ¶ added in v0.14.3
func (m *UserMutation) CanClaimAirdropCleared() bool
CanClaimAirdropCleared returns if the "can_claim_airdrop" field was cleared in this mutation.
func (*UserMutation) ClearAddress ¶
func (m *UserMutation) ClearAddress()
ClearAddress clears the value of the "address" field.
func (*UserMutation) ClearAesType ¶
func (m *UserMutation) ClearAesType()
ClearAesType clears the value of the "aes_type" field.
func (*UserMutation) ClearBalanceUpdateTime ¶
func (m *UserMutation) ClearBalanceUpdateTime()
ClearBalanceUpdateTime clears the value of the "balance_update_time" field.
func (*UserMutation) ClearCanClaimAirdrop ¶ added in v0.14.3
func (m *UserMutation) ClearCanClaimAirdrop()
ClearCanClaimAirdrop clears the value of the "can_claim_airdrop" field.
func (*UserMutation) ClearCreateDate ¶
func (m *UserMutation) ClearCreateDate()
ClearCreateDate clears the value of the "create_date" field.
func (*UserMutation) ClearCreateTime ¶
func (m *UserMutation) ClearCreateTime()
ClearCreateTime clears the value of the "create_time" field.
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) ClearIsTransfer ¶
func (m *UserMutation) ClearIsTransfer()
ClearIsTransfer clears the value of the "is_transfer" field.
func (*UserMutation) ClearNetwork ¶
func (m *UserMutation) ClearNetwork()
ClearNetwork clears the value of the "network" field.
func (*UserMutation) ClearNextAirdropClaimTime ¶ added in v0.14.3
func (m *UserMutation) ClearNextAirdropClaimTime()
ClearNextAirdropClaimTime clears the value of the "next_airdrop_claim_time" field.
func (*UserMutation) ClearPrivateKey ¶
func (m *UserMutation) ClearPrivateKey()
ClearPrivateKey clears the value of the "private_key" field.
func (*UserMutation) ClearTokenInfo ¶
func (m *UserMutation) ClearTokenInfo()
ClearTokenInfo clears the value of the "token_info" field.
func (*UserMutation) ClearTrxAddrType ¶
func (m *UserMutation) ClearTrxAddrType()
ClearTrxAddrType clears the value of the "trx_addr_type" field.
func (*UserMutation) ClearTrxMode ¶
func (m *UserMutation) ClearTrxMode()
ClearTrxMode clears the value of the "trx_mode" field.
func (*UserMutation) ClearTrxPrivAddr ¶
func (m *UserMutation) ClearTrxPrivAddr()
ClearTrxPrivAddr clears the value of the "trx_priv_addr" field.
func (*UserMutation) ClearTrxPrivPkey ¶
func (m *UserMutation) ClearTrxPrivPkey()
ClearTrxPrivPkey clears the value of the "trx_priv_pkey" field.
func (*UserMutation) ClearWords ¶
func (m *UserMutation) ClearWords()
ClearWords clears the value of the "words" field.
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) CreateDate ¶
func (m *UserMutation) CreateDate() (r time.Time, exists bool)
CreateDate returns the value of the "create_date" field in the mutation.
func (*UserMutation) CreateDateCleared ¶
func (m *UserMutation) CreateDateCleared() bool
CreateDateCleared returns if the "create_date" field was cleared in this mutation.
func (*UserMutation) CreateTime ¶
func (m *UserMutation) CreateTime() (r int, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*UserMutation) CreateTimeCleared ¶
func (m *UserMutation) CreateTimeCleared() bool
CreateTimeCleared returns if the "create_time" field was cleared in this 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) 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) ID ¶
func (m *UserMutation) ID() (id uint, 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) ([]uint, 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) IsTransfer ¶
func (m *UserMutation) IsTransfer() (r int8, exists bool)
IsTransfer returns the value of the "is_transfer" field in the mutation.
func (*UserMutation) IsTransferCleared ¶
func (m *UserMutation) IsTransferCleared() bool
IsTransferCleared returns if the "is_transfer" field was cleared in this mutation.
func (*UserMutation) Network ¶
func (m *UserMutation) Network() (r string, exists bool)
Network returns the value of the "network" field in the mutation.
func (*UserMutation) NetworkCleared ¶
func (m *UserMutation) NetworkCleared() bool
NetworkCleared returns if the "network" field was cleared in this mutation.
func (*UserMutation) NextAirdropClaimTime ¶ added in v0.14.3
func (m *UserMutation) NextAirdropClaimTime() (r int, exists bool)
NextAirdropClaimTime returns the value of the "next_airdrop_claim_time" field in the mutation.
func (*UserMutation) NextAirdropClaimTimeCleared ¶ added in v0.14.3
func (m *UserMutation) NextAirdropClaimTimeCleared() bool
NextAirdropClaimTimeCleared returns if the "next_airdrop_claim_time" field was cleared in this mutation.
func (*UserMutation) OldAddress ¶
func (m *UserMutation) OldAddress(ctx context.Context) (v string, err error)
OldAddress returns the old "address" 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) OldAesType ¶
func (m *UserMutation) OldAesType(ctx context.Context) (v int8, err error)
OldAesType returns the old "aes_type" 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) OldBalance ¶
OldBalance returns the old "balance" 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) OldBalanceUpdateTime ¶
func (m *UserMutation) OldBalanceUpdateTime(ctx context.Context) (v int, err error)
OldBalanceUpdateTime returns the old "balance_update_time" 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) OldCanClaimAirdrop ¶ added in v0.14.3
func (m *UserMutation) OldCanClaimAirdrop(ctx context.Context) (v int8, err error)
OldCanClaimAirdrop returns the old "can_claim_airdrop" 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) OldCreateDate ¶
OldCreateDate returns the old "create_date" 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) OldCreateTime ¶
func (m *UserMutation) OldCreateTime(ctx context.Context) (v int, err error)
OldCreateTime returns the old "create_time" 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) OldIsTransfer ¶
func (m *UserMutation) OldIsTransfer(ctx context.Context) (v int8, err error)
OldIsTransfer returns the old "is_transfer" 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) OldNetwork ¶
func (m *UserMutation) OldNetwork(ctx context.Context) (v string, err error)
OldNetwork returns the old "network" 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) OldNextAirdropClaimTime ¶ added in v0.14.3
func (m *UserMutation) OldNextAirdropClaimTime(ctx context.Context) (v int, err error)
OldNextAirdropClaimTime returns the old "next_airdrop_claim_time" 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) OldPrivateKey ¶
func (m *UserMutation) OldPrivateKey(ctx context.Context) (v string, err error)
OldPrivateKey returns the old "private_key" 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) OldTokenInfo ¶
func (m *UserMutation) OldTokenInfo(ctx context.Context) (v map[string]interface{}, err error)
OldTokenInfo returns the old "token_info" 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) OldTotalTokenValue ¶
OldTotalTokenValue returns the old "total_token_value" 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) OldTrxAddrType ¶
func (m *UserMutation) OldTrxAddrType(ctx context.Context) (v user.TrxAddrType, err error)
OldTrxAddrType returns the old "trx_addr_type" 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) OldTrxMode ¶
OldTrxMode returns the old "trx_mode" 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) OldTrxPrivAddr ¶
func (m *UserMutation) OldTrxPrivAddr(ctx context.Context) (v string, err error)
OldTrxPrivAddr returns the old "trx_priv_addr" 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) OldTrxPrivPkey ¶
func (m *UserMutation) OldTrxPrivPkey(ctx context.Context) (v string, err error)
OldTrxPrivPkey returns the old "trx_priv_pkey" 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) OldWords ¶
func (m *UserMutation) OldWords(ctx context.Context) (v string, err error)
OldWords returns the old "words" 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) PrivateKey ¶
func (m *UserMutation) PrivateKey() (r string, exists bool)
PrivateKey returns the value of the "private_key" field in the mutation.
func (*UserMutation) PrivateKeyCleared ¶
func (m *UserMutation) PrivateKeyCleared() bool
PrivateKeyCleared returns if the "private_key" field was cleared in this mutation.
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) ResetAddress ¶
func (m *UserMutation) ResetAddress()
ResetAddress resets all changes to the "address" field.
func (*UserMutation) ResetAesType ¶
func (m *UserMutation) ResetAesType()
ResetAesType resets all changes to the "aes_type" field.
func (*UserMutation) ResetBalance ¶
func (m *UserMutation) ResetBalance()
ResetBalance resets all changes to the "balance" field.
func (*UserMutation) ResetBalanceUpdateTime ¶
func (m *UserMutation) ResetBalanceUpdateTime()
ResetBalanceUpdateTime resets all changes to the "balance_update_time" field.
func (*UserMutation) ResetCanClaimAirdrop ¶ added in v0.14.3
func (m *UserMutation) ResetCanClaimAirdrop()
ResetCanClaimAirdrop resets all changes to the "can_claim_airdrop" field.
func (*UserMutation) ResetCreateDate ¶
func (m *UserMutation) ResetCreateDate()
ResetCreateDate resets all changes to the "create_date" field.
func (*UserMutation) ResetCreateTime ¶
func (m *UserMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" 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) ResetIsTransfer ¶
func (m *UserMutation) ResetIsTransfer()
ResetIsTransfer resets all changes to the "is_transfer" field.
func (*UserMutation) ResetNetwork ¶
func (m *UserMutation) ResetNetwork()
ResetNetwork resets all changes to the "network" field.
func (*UserMutation) ResetNextAirdropClaimTime ¶ added in v0.14.3
func (m *UserMutation) ResetNextAirdropClaimTime()
ResetNextAirdropClaimTime resets all changes to the "next_airdrop_claim_time" field.
func (*UserMutation) ResetPrivateKey ¶
func (m *UserMutation) ResetPrivateKey()
ResetPrivateKey resets all changes to the "private_key" field.
func (*UserMutation) ResetTokenInfo ¶
func (m *UserMutation) ResetTokenInfo()
ResetTokenInfo resets all changes to the "token_info" field.
func (*UserMutation) ResetTotalTokenValue ¶
func (m *UserMutation) ResetTotalTokenValue()
ResetTotalTokenValue resets all changes to the "total_token_value" field.
func (*UserMutation) ResetTrxAddrType ¶
func (m *UserMutation) ResetTrxAddrType()
ResetTrxAddrType resets all changes to the "trx_addr_type" field.
func (*UserMutation) ResetTrxMode ¶
func (m *UserMutation) ResetTrxMode()
ResetTrxMode resets all changes to the "trx_mode" field.
func (*UserMutation) ResetTrxPrivAddr ¶
func (m *UserMutation) ResetTrxPrivAddr()
ResetTrxPrivAddr resets all changes to the "trx_priv_addr" field.
func (*UserMutation) ResetTrxPrivPkey ¶
func (m *UserMutation) ResetTrxPrivPkey()
ResetTrxPrivPkey resets all changes to the "trx_priv_pkey" field.
func (*UserMutation) ResetWords ¶
func (m *UserMutation) ResetWords()
ResetWords resets all changes to the "words" field.
func (*UserMutation) SetAddress ¶
func (m *UserMutation) SetAddress(s string)
SetAddress sets the "address" field.
func (*UserMutation) SetAesType ¶
func (m *UserMutation) SetAesType(i int8)
SetAesType sets the "aes_type" field.
func (*UserMutation) SetBalance ¶
func (m *UserMutation) SetBalance(d decimal.Decimal)
SetBalance sets the "balance" field.
func (*UserMutation) SetBalanceUpdateTime ¶
func (m *UserMutation) SetBalanceUpdateTime(i int)
SetBalanceUpdateTime sets the "balance_update_time" field.
func (*UserMutation) SetCanClaimAirdrop ¶ added in v0.14.3
func (m *UserMutation) SetCanClaimAirdrop(i int8)
SetCanClaimAirdrop sets the "can_claim_airdrop" field.
func (*UserMutation) SetCreateDate ¶
func (m *UserMutation) SetCreateDate(t time.Time)
SetCreateDate sets the "create_date" field.
func (*UserMutation) SetCreateTime ¶
func (m *UserMutation) SetCreateTime(i int)
SetCreateTime sets the "create_time" 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) SetID ¶
func (m *UserMutation) SetID(id uint)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetIsTransfer ¶
func (m *UserMutation) SetIsTransfer(i int8)
SetIsTransfer sets the "is_transfer" field.
func (*UserMutation) SetNetwork ¶
func (m *UserMutation) SetNetwork(s string)
SetNetwork sets the "network" field.
func (*UserMutation) SetNextAirdropClaimTime ¶ added in v0.14.3
func (m *UserMutation) SetNextAirdropClaimTime(i int)
SetNextAirdropClaimTime sets the "next_airdrop_claim_time" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetPrivateKey ¶
func (m *UserMutation) SetPrivateKey(s string)
SetPrivateKey sets the "private_key" field.
func (*UserMutation) SetTokenInfo ¶
func (m *UserMutation) SetTokenInfo(value map[string]interface{})
SetTokenInfo sets the "token_info" field.
func (*UserMutation) SetTotalTokenValue ¶
func (m *UserMutation) SetTotalTokenValue(d decimal.Decimal)
SetTotalTokenValue sets the "total_token_value" field.
func (*UserMutation) SetTrxAddrType ¶
func (m *UserMutation) SetTrxAddrType(uat user.TrxAddrType)
SetTrxAddrType sets the "trx_addr_type" field.
func (*UserMutation) SetTrxMode ¶
func (m *UserMutation) SetTrxMode(um user.TrxMode)
SetTrxMode sets the "trx_mode" field.
func (*UserMutation) SetTrxPrivAddr ¶
func (m *UserMutation) SetTrxPrivAddr(s string)
SetTrxPrivAddr sets the "trx_priv_addr" field.
func (*UserMutation) SetTrxPrivPkey ¶
func (m *UserMutation) SetTrxPrivPkey(s string)
SetTrxPrivPkey sets the "trx_priv_pkey" field.
func (*UserMutation) SetWords ¶
func (m *UserMutation) SetWords(s string)
SetWords sets the "words" field.
func (*UserMutation) TokenInfo ¶
func (m *UserMutation) TokenInfo() (r map[string]interface{}, exists bool)
TokenInfo returns the value of the "token_info" field in the mutation.
func (*UserMutation) TokenInfoCleared ¶
func (m *UserMutation) TokenInfoCleared() bool
TokenInfoCleared returns if the "token_info" field was cleared in this mutation.
func (*UserMutation) TotalTokenValue ¶
func (m *UserMutation) TotalTokenValue() (r decimal.Decimal, exists bool)
TotalTokenValue returns the value of the "total_token_value" field in the mutation.
func (*UserMutation) TrxAddrType ¶
func (m *UserMutation) TrxAddrType() (r user.TrxAddrType, exists bool)
TrxAddrType returns the value of the "trx_addr_type" field in the mutation.
func (*UserMutation) TrxAddrTypeCleared ¶
func (m *UserMutation) TrxAddrTypeCleared() bool
TrxAddrTypeCleared returns if the "trx_addr_type" field was cleared in this mutation.
func (*UserMutation) TrxMode ¶
func (m *UserMutation) TrxMode() (r user.TrxMode, exists bool)
TrxMode returns the value of the "trx_mode" field in the mutation.
func (*UserMutation) TrxModeCleared ¶
func (m *UserMutation) TrxModeCleared() bool
TrxModeCleared returns if the "trx_mode" field was cleared in this mutation.
func (*UserMutation) TrxPrivAddr ¶
func (m *UserMutation) TrxPrivAddr() (r string, exists bool)
TrxPrivAddr returns the value of the "trx_priv_addr" field in the mutation.
func (*UserMutation) TrxPrivAddrCleared ¶
func (m *UserMutation) TrxPrivAddrCleared() bool
TrxPrivAddrCleared returns if the "trx_priv_addr" field was cleared in this mutation.
func (*UserMutation) TrxPrivPkey ¶
func (m *UserMutation) TrxPrivPkey() (r string, exists bool)
TrxPrivPkey returns the value of the "trx_priv_pkey" field in the mutation.
func (*UserMutation) TrxPrivPkeyCleared ¶
func (m *UserMutation) TrxPrivPkeyCleared() bool
TrxPrivPkeyCleared returns if the "trx_priv_pkey" field was cleared in this mutation.
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) 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.
func (*UserMutation) Words ¶
func (m *UserMutation) Words() (r string, exists bool)
Words returns the value of the "words" field in the mutation.
func (*UserMutation) WordsCleared ¶
func (m *UserMutation) WordsCleared() bool
WordsCleared returns if the "words" field was cleared in this mutation.
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) 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) 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 { Words string `json:"words,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldWords). Aggregate(gen.Count()). Scan(ctx, &v)
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) Order ¶
func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
Order specifies how the records should be ordered.
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 { Words string `json:"words,omitempty"` } client.User.Query(). Select(user.FieldWords). 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) 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) 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) AddAesType ¶
func (uu *UserUpdate) AddAesType(i int8) *UserUpdate
AddAesType adds i to the "aes_type" field.
func (*UserUpdate) AddBalanceUpdateTime ¶
func (uu *UserUpdate) AddBalanceUpdateTime(i int) *UserUpdate
AddBalanceUpdateTime adds i to the "balance_update_time" field.
func (*UserUpdate) AddCanClaimAirdrop ¶ added in v0.14.3
func (uu *UserUpdate) AddCanClaimAirdrop(i int8) *UserUpdate
AddCanClaimAirdrop adds i to the "can_claim_airdrop" field.
func (*UserUpdate) AddCreateTime ¶
func (uu *UserUpdate) AddCreateTime(i int) *UserUpdate
AddCreateTime adds i to the "create_time" field.
func (*UserUpdate) AddIsTransfer ¶
func (uu *UserUpdate) AddIsTransfer(i int8) *UserUpdate
AddIsTransfer adds i to the "is_transfer" field.
func (*UserUpdate) AddNextAirdropClaimTime ¶ added in v0.14.3
func (uu *UserUpdate) AddNextAirdropClaimTime(i int) *UserUpdate
AddNextAirdropClaimTime adds i to the "next_airdrop_claim_time" field.
func (*UserUpdate) ClearAddress ¶
func (uu *UserUpdate) ClearAddress() *UserUpdate
ClearAddress clears the value of the "address" field.
func (*UserUpdate) ClearAesType ¶
func (uu *UserUpdate) ClearAesType() *UserUpdate
ClearAesType clears the value of the "aes_type" field.
func (*UserUpdate) ClearBalanceUpdateTime ¶
func (uu *UserUpdate) ClearBalanceUpdateTime() *UserUpdate
ClearBalanceUpdateTime clears the value of the "balance_update_time" field.
func (*UserUpdate) ClearCanClaimAirdrop ¶ added in v0.14.3
func (uu *UserUpdate) ClearCanClaimAirdrop() *UserUpdate
ClearCanClaimAirdrop clears the value of the "can_claim_airdrop" field.
func (*UserUpdate) ClearCreateDate ¶
func (uu *UserUpdate) ClearCreateDate() *UserUpdate
ClearCreateDate clears the value of the "create_date" field.
func (*UserUpdate) ClearCreateTime ¶
func (uu *UserUpdate) ClearCreateTime() *UserUpdate
ClearCreateTime clears the value of the "create_time" field.
func (*UserUpdate) ClearIsTransfer ¶
func (uu *UserUpdate) ClearIsTransfer() *UserUpdate
ClearIsTransfer clears the value of the "is_transfer" field.
func (*UserUpdate) ClearNetwork ¶
func (uu *UserUpdate) ClearNetwork() *UserUpdate
ClearNetwork clears the value of the "network" field.
func (*UserUpdate) ClearNextAirdropClaimTime ¶ added in v0.14.3
func (uu *UserUpdate) ClearNextAirdropClaimTime() *UserUpdate
ClearNextAirdropClaimTime clears the value of the "next_airdrop_claim_time" field.
func (*UserUpdate) ClearPrivateKey ¶
func (uu *UserUpdate) ClearPrivateKey() *UserUpdate
ClearPrivateKey clears the value of the "private_key" field.
func (*UserUpdate) ClearTokenInfo ¶
func (uu *UserUpdate) ClearTokenInfo() *UserUpdate
ClearTokenInfo clears the value of the "token_info" field.
func (*UserUpdate) ClearTrxAddrType ¶
func (uu *UserUpdate) ClearTrxAddrType() *UserUpdate
ClearTrxAddrType clears the value of the "trx_addr_type" field.
func (*UserUpdate) ClearTrxMode ¶
func (uu *UserUpdate) ClearTrxMode() *UserUpdate
ClearTrxMode clears the value of the "trx_mode" field.
func (*UserUpdate) ClearTrxPrivAddr ¶
func (uu *UserUpdate) ClearTrxPrivAddr() *UserUpdate
ClearTrxPrivAddr clears the value of the "trx_priv_addr" field.
func (*UserUpdate) ClearTrxPrivPkey ¶
func (uu *UserUpdate) ClearTrxPrivPkey() *UserUpdate
ClearTrxPrivPkey clears the value of the "trx_priv_pkey" field.
func (*UserUpdate) ClearWords ¶
func (uu *UserUpdate) ClearWords() *UserUpdate
ClearWords clears the value of the "words" field.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
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) SetAddress ¶
func (uu *UserUpdate) SetAddress(s string) *UserUpdate
SetAddress sets the "address" field.
func (*UserUpdate) SetAesType ¶
func (uu *UserUpdate) SetAesType(i int8) *UserUpdate
SetAesType sets the "aes_type" field.
func (*UserUpdate) SetBalance ¶
func (uu *UserUpdate) SetBalance(d decimal.Decimal) *UserUpdate
SetBalance sets the "balance" field.
func (*UserUpdate) SetBalanceUpdateTime ¶
func (uu *UserUpdate) SetBalanceUpdateTime(i int) *UserUpdate
SetBalanceUpdateTime sets the "balance_update_time" field.
func (*UserUpdate) SetCanClaimAirdrop ¶ added in v0.14.3
func (uu *UserUpdate) SetCanClaimAirdrop(i int8) *UserUpdate
SetCanClaimAirdrop sets the "can_claim_airdrop" field.
func (*UserUpdate) SetCreateDate ¶
func (uu *UserUpdate) SetCreateDate(t time.Time) *UserUpdate
SetCreateDate sets the "create_date" field.
func (*UserUpdate) SetCreateTime ¶
func (uu *UserUpdate) SetCreateTime(i int) *UserUpdate
SetCreateTime sets the "create_time" field.
func (*UserUpdate) SetIsTransfer ¶
func (uu *UserUpdate) SetIsTransfer(i int8) *UserUpdate
SetIsTransfer sets the "is_transfer" field.
func (*UserUpdate) SetNetwork ¶
func (uu *UserUpdate) SetNetwork(s string) *UserUpdate
SetNetwork sets the "network" field.
func (*UserUpdate) SetNextAirdropClaimTime ¶ added in v0.14.3
func (uu *UserUpdate) SetNextAirdropClaimTime(i int) *UserUpdate
SetNextAirdropClaimTime sets the "next_airdrop_claim_time" field.
func (*UserUpdate) SetNillableAddress ¶
func (uu *UserUpdate) SetNillableAddress(s *string) *UserUpdate
SetNillableAddress sets the "address" field if the given value is not nil.
func (*UserUpdate) SetNillableAesType ¶
func (uu *UserUpdate) SetNillableAesType(i *int8) *UserUpdate
SetNillableAesType sets the "aes_type" field if the given value is not nil.
func (*UserUpdate) SetNillableBalance ¶
func (uu *UserUpdate) SetNillableBalance(d *decimal.Decimal) *UserUpdate
SetNillableBalance sets the "balance" field if the given value is not nil.
func (*UserUpdate) SetNillableBalanceUpdateTime ¶
func (uu *UserUpdate) SetNillableBalanceUpdateTime(i *int) *UserUpdate
SetNillableBalanceUpdateTime sets the "balance_update_time" field if the given value is not nil.
func (*UserUpdate) SetNillableCanClaimAirdrop ¶ added in v0.14.3
func (uu *UserUpdate) SetNillableCanClaimAirdrop(i *int8) *UserUpdate
SetNillableCanClaimAirdrop sets the "can_claim_airdrop" field if the given value is not nil.
func (*UserUpdate) SetNillableCreateDate ¶
func (uu *UserUpdate) SetNillableCreateDate(t *time.Time) *UserUpdate
SetNillableCreateDate sets the "create_date" field if the given value is not nil.
func (*UserUpdate) SetNillableCreateTime ¶
func (uu *UserUpdate) SetNillableCreateTime(i *int) *UserUpdate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*UserUpdate) SetNillableIsTransfer ¶
func (uu *UserUpdate) SetNillableIsTransfer(i *int8) *UserUpdate
SetNillableIsTransfer sets the "is_transfer" field if the given value is not nil.
func (*UserUpdate) SetNillableNetwork ¶
func (uu *UserUpdate) SetNillableNetwork(s *string) *UserUpdate
SetNillableNetwork sets the "network" field if the given value is not nil.
func (*UserUpdate) SetNillableNextAirdropClaimTime ¶ added in v0.14.3
func (uu *UserUpdate) SetNillableNextAirdropClaimTime(i *int) *UserUpdate
SetNillableNextAirdropClaimTime sets the "next_airdrop_claim_time" field if the given value is not nil.
func (*UserUpdate) SetNillablePrivateKey ¶
func (uu *UserUpdate) SetNillablePrivateKey(s *string) *UserUpdate
SetNillablePrivateKey sets the "private_key" field if the given value is not nil.
func (*UserUpdate) SetNillableTotalTokenValue ¶
func (uu *UserUpdate) SetNillableTotalTokenValue(d *decimal.Decimal) *UserUpdate
SetNillableTotalTokenValue sets the "total_token_value" field if the given value is not nil.
func (*UserUpdate) SetNillableTrxAddrType ¶
func (uu *UserUpdate) SetNillableTrxAddrType(uat *user.TrxAddrType) *UserUpdate
SetNillableTrxAddrType sets the "trx_addr_type" field if the given value is not nil.
func (*UserUpdate) SetNillableTrxMode ¶
func (uu *UserUpdate) SetNillableTrxMode(um *user.TrxMode) *UserUpdate
SetNillableTrxMode sets the "trx_mode" field if the given value is not nil.
func (*UserUpdate) SetNillableTrxPrivAddr ¶
func (uu *UserUpdate) SetNillableTrxPrivAddr(s *string) *UserUpdate
SetNillableTrxPrivAddr sets the "trx_priv_addr" field if the given value is not nil.
func (*UserUpdate) SetNillableTrxPrivPkey ¶
func (uu *UserUpdate) SetNillableTrxPrivPkey(s *string) *UserUpdate
SetNillableTrxPrivPkey sets the "trx_priv_pkey" field if the given value is not nil.
func (*UserUpdate) SetNillableWords ¶
func (uu *UserUpdate) SetNillableWords(s *string) *UserUpdate
SetNillableWords sets the "words" field if the given value is not nil.
func (*UserUpdate) SetPrivateKey ¶
func (uu *UserUpdate) SetPrivateKey(s string) *UserUpdate
SetPrivateKey sets the "private_key" field.
func (*UserUpdate) SetTokenInfo ¶
func (uu *UserUpdate) SetTokenInfo(m map[string]interface{}) *UserUpdate
SetTokenInfo sets the "token_info" field.
func (*UserUpdate) SetTotalTokenValue ¶
func (uu *UserUpdate) SetTotalTokenValue(d decimal.Decimal) *UserUpdate
SetTotalTokenValue sets the "total_token_value" field.
func (*UserUpdate) SetTrxAddrType ¶
func (uu *UserUpdate) SetTrxAddrType(uat user.TrxAddrType) *UserUpdate
SetTrxAddrType sets the "trx_addr_type" field.
func (*UserUpdate) SetTrxMode ¶
func (uu *UserUpdate) SetTrxMode(um user.TrxMode) *UserUpdate
SetTrxMode sets the "trx_mode" field.
func (*UserUpdate) SetTrxPrivAddr ¶
func (uu *UserUpdate) SetTrxPrivAddr(s string) *UserUpdate
SetTrxPrivAddr sets the "trx_priv_addr" field.
func (*UserUpdate) SetTrxPrivPkey ¶
func (uu *UserUpdate) SetTrxPrivPkey(s string) *UserUpdate
SetTrxPrivPkey sets the "trx_priv_pkey" field.
func (*UserUpdate) SetWords ¶
func (uu *UserUpdate) SetWords(s string) *UserUpdate
SetWords sets the "words" 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) AddAesType ¶
func (uuo *UserUpdateOne) AddAesType(i int8) *UserUpdateOne
AddAesType adds i to the "aes_type" field.
func (*UserUpdateOne) AddBalanceUpdateTime ¶
func (uuo *UserUpdateOne) AddBalanceUpdateTime(i int) *UserUpdateOne
AddBalanceUpdateTime adds i to the "balance_update_time" field.
func (*UserUpdateOne) AddCanClaimAirdrop ¶ added in v0.14.3
func (uuo *UserUpdateOne) AddCanClaimAirdrop(i int8) *UserUpdateOne
AddCanClaimAirdrop adds i to the "can_claim_airdrop" field.
func (*UserUpdateOne) AddCreateTime ¶
func (uuo *UserUpdateOne) AddCreateTime(i int) *UserUpdateOne
AddCreateTime adds i to the "create_time" field.
func (*UserUpdateOne) AddIsTransfer ¶
func (uuo *UserUpdateOne) AddIsTransfer(i int8) *UserUpdateOne
AddIsTransfer adds i to the "is_transfer" field.
func (*UserUpdateOne) AddNextAirdropClaimTime ¶ added in v0.14.3
func (uuo *UserUpdateOne) AddNextAirdropClaimTime(i int) *UserUpdateOne
AddNextAirdropClaimTime adds i to the "next_airdrop_claim_time" field.
func (*UserUpdateOne) ClearAddress ¶
func (uuo *UserUpdateOne) ClearAddress() *UserUpdateOne
ClearAddress clears the value of the "address" field.
func (*UserUpdateOne) ClearAesType ¶
func (uuo *UserUpdateOne) ClearAesType() *UserUpdateOne
ClearAesType clears the value of the "aes_type" field.
func (*UserUpdateOne) ClearBalanceUpdateTime ¶
func (uuo *UserUpdateOne) ClearBalanceUpdateTime() *UserUpdateOne
ClearBalanceUpdateTime clears the value of the "balance_update_time" field.
func (*UserUpdateOne) ClearCanClaimAirdrop ¶ added in v0.14.3
func (uuo *UserUpdateOne) ClearCanClaimAirdrop() *UserUpdateOne
ClearCanClaimAirdrop clears the value of the "can_claim_airdrop" field.
func (*UserUpdateOne) ClearCreateDate ¶
func (uuo *UserUpdateOne) ClearCreateDate() *UserUpdateOne
ClearCreateDate clears the value of the "create_date" field.
func (*UserUpdateOne) ClearCreateTime ¶
func (uuo *UserUpdateOne) ClearCreateTime() *UserUpdateOne
ClearCreateTime clears the value of the "create_time" field.
func (*UserUpdateOne) ClearIsTransfer ¶
func (uuo *UserUpdateOne) ClearIsTransfer() *UserUpdateOne
ClearIsTransfer clears the value of the "is_transfer" field.
func (*UserUpdateOne) ClearNetwork ¶
func (uuo *UserUpdateOne) ClearNetwork() *UserUpdateOne
ClearNetwork clears the value of the "network" field.
func (*UserUpdateOne) ClearNextAirdropClaimTime ¶ added in v0.14.3
func (uuo *UserUpdateOne) ClearNextAirdropClaimTime() *UserUpdateOne
ClearNextAirdropClaimTime clears the value of the "next_airdrop_claim_time" field.
func (*UserUpdateOne) ClearPrivateKey ¶
func (uuo *UserUpdateOne) ClearPrivateKey() *UserUpdateOne
ClearPrivateKey clears the value of the "private_key" field.
func (*UserUpdateOne) ClearTokenInfo ¶
func (uuo *UserUpdateOne) ClearTokenInfo() *UserUpdateOne
ClearTokenInfo clears the value of the "token_info" field.
func (*UserUpdateOne) ClearTrxAddrType ¶
func (uuo *UserUpdateOne) ClearTrxAddrType() *UserUpdateOne
ClearTrxAddrType clears the value of the "trx_addr_type" field.
func (*UserUpdateOne) ClearTrxMode ¶
func (uuo *UserUpdateOne) ClearTrxMode() *UserUpdateOne
ClearTrxMode clears the value of the "trx_mode" field.
func (*UserUpdateOne) ClearTrxPrivAddr ¶
func (uuo *UserUpdateOne) ClearTrxPrivAddr() *UserUpdateOne
ClearTrxPrivAddr clears the value of the "trx_priv_addr" field.
func (*UserUpdateOne) ClearTrxPrivPkey ¶
func (uuo *UserUpdateOne) ClearTrxPrivPkey() *UserUpdateOne
ClearTrxPrivPkey clears the value of the "trx_priv_pkey" field.
func (*UserUpdateOne) ClearWords ¶
func (uuo *UserUpdateOne) ClearWords() *UserUpdateOne
ClearWords clears the value of the "words" field.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
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) SetAddress ¶
func (uuo *UserUpdateOne) SetAddress(s string) *UserUpdateOne
SetAddress sets the "address" field.
func (*UserUpdateOne) SetAesType ¶
func (uuo *UserUpdateOne) SetAesType(i int8) *UserUpdateOne
SetAesType sets the "aes_type" field.
func (*UserUpdateOne) SetBalance ¶
func (uuo *UserUpdateOne) SetBalance(d decimal.Decimal) *UserUpdateOne
SetBalance sets the "balance" field.
func (*UserUpdateOne) SetBalanceUpdateTime ¶
func (uuo *UserUpdateOne) SetBalanceUpdateTime(i int) *UserUpdateOne
SetBalanceUpdateTime sets the "balance_update_time" field.
func (*UserUpdateOne) SetCanClaimAirdrop ¶ added in v0.14.3
func (uuo *UserUpdateOne) SetCanClaimAirdrop(i int8) *UserUpdateOne
SetCanClaimAirdrop sets the "can_claim_airdrop" field.
func (*UserUpdateOne) SetCreateDate ¶
func (uuo *UserUpdateOne) SetCreateDate(t time.Time) *UserUpdateOne
SetCreateDate sets the "create_date" field.
func (*UserUpdateOne) SetCreateTime ¶
func (uuo *UserUpdateOne) SetCreateTime(i int) *UserUpdateOne
SetCreateTime sets the "create_time" field.
func (*UserUpdateOne) SetIsTransfer ¶
func (uuo *UserUpdateOne) SetIsTransfer(i int8) *UserUpdateOne
SetIsTransfer sets the "is_transfer" field.
func (*UserUpdateOne) SetNetwork ¶
func (uuo *UserUpdateOne) SetNetwork(s string) *UserUpdateOne
SetNetwork sets the "network" field.
func (*UserUpdateOne) SetNextAirdropClaimTime ¶ added in v0.14.3
func (uuo *UserUpdateOne) SetNextAirdropClaimTime(i int) *UserUpdateOne
SetNextAirdropClaimTime sets the "next_airdrop_claim_time" field.
func (*UserUpdateOne) SetNillableAddress ¶
func (uuo *UserUpdateOne) SetNillableAddress(s *string) *UserUpdateOne
SetNillableAddress sets the "address" field if the given value is not nil.
func (*UserUpdateOne) SetNillableAesType ¶
func (uuo *UserUpdateOne) SetNillableAesType(i *int8) *UserUpdateOne
SetNillableAesType sets the "aes_type" field if the given value is not nil.
func (*UserUpdateOne) SetNillableBalance ¶
func (uuo *UserUpdateOne) SetNillableBalance(d *decimal.Decimal) *UserUpdateOne
SetNillableBalance sets the "balance" field if the given value is not nil.
func (*UserUpdateOne) SetNillableBalanceUpdateTime ¶
func (uuo *UserUpdateOne) SetNillableBalanceUpdateTime(i *int) *UserUpdateOne
SetNillableBalanceUpdateTime sets the "balance_update_time" field if the given value is not nil.
func (*UserUpdateOne) SetNillableCanClaimAirdrop ¶ added in v0.14.3
func (uuo *UserUpdateOne) SetNillableCanClaimAirdrop(i *int8) *UserUpdateOne
SetNillableCanClaimAirdrop sets the "can_claim_airdrop" field if the given value is not nil.
func (*UserUpdateOne) SetNillableCreateDate ¶
func (uuo *UserUpdateOne) SetNillableCreateDate(t *time.Time) *UserUpdateOne
SetNillableCreateDate sets the "create_date" field if the given value is not nil.
func (*UserUpdateOne) SetNillableCreateTime ¶
func (uuo *UserUpdateOne) SetNillableCreateTime(i *int) *UserUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*UserUpdateOne) SetNillableIsTransfer ¶
func (uuo *UserUpdateOne) SetNillableIsTransfer(i *int8) *UserUpdateOne
SetNillableIsTransfer sets the "is_transfer" field if the given value is not nil.
func (*UserUpdateOne) SetNillableNetwork ¶
func (uuo *UserUpdateOne) SetNillableNetwork(s *string) *UserUpdateOne
SetNillableNetwork sets the "network" field if the given value is not nil.
func (*UserUpdateOne) SetNillableNextAirdropClaimTime ¶ added in v0.14.3
func (uuo *UserUpdateOne) SetNillableNextAirdropClaimTime(i *int) *UserUpdateOne
SetNillableNextAirdropClaimTime sets the "next_airdrop_claim_time" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePrivateKey ¶
func (uuo *UserUpdateOne) SetNillablePrivateKey(s *string) *UserUpdateOne
SetNillablePrivateKey sets the "private_key" field if the given value is not nil.
func (*UserUpdateOne) SetNillableTotalTokenValue ¶
func (uuo *UserUpdateOne) SetNillableTotalTokenValue(d *decimal.Decimal) *UserUpdateOne
SetNillableTotalTokenValue sets the "total_token_value" field if the given value is not nil.
func (*UserUpdateOne) SetNillableTrxAddrType ¶
func (uuo *UserUpdateOne) SetNillableTrxAddrType(uat *user.TrxAddrType) *UserUpdateOne
SetNillableTrxAddrType sets the "trx_addr_type" field if the given value is not nil.
func (*UserUpdateOne) SetNillableTrxMode ¶
func (uuo *UserUpdateOne) SetNillableTrxMode(um *user.TrxMode) *UserUpdateOne
SetNillableTrxMode sets the "trx_mode" field if the given value is not nil.
func (*UserUpdateOne) SetNillableTrxPrivAddr ¶
func (uuo *UserUpdateOne) SetNillableTrxPrivAddr(s *string) *UserUpdateOne
SetNillableTrxPrivAddr sets the "trx_priv_addr" field if the given value is not nil.
func (*UserUpdateOne) SetNillableTrxPrivPkey ¶
func (uuo *UserUpdateOne) SetNillableTrxPrivPkey(s *string) *UserUpdateOne
SetNillableTrxPrivPkey sets the "trx_priv_pkey" field if the given value is not nil.
func (*UserUpdateOne) SetNillableWords ¶
func (uuo *UserUpdateOne) SetNillableWords(s *string) *UserUpdateOne
SetNillableWords sets the "words" field if the given value is not nil.
func (*UserUpdateOne) SetPrivateKey ¶
func (uuo *UserUpdateOne) SetPrivateKey(s string) *UserUpdateOne
SetPrivateKey sets the "private_key" field.
func (*UserUpdateOne) SetTokenInfo ¶
func (uuo *UserUpdateOne) SetTokenInfo(m map[string]interface{}) *UserUpdateOne
SetTokenInfo sets the "token_info" field.
func (*UserUpdateOne) SetTotalTokenValue ¶
func (uuo *UserUpdateOne) SetTotalTokenValue(d decimal.Decimal) *UserUpdateOne
SetTotalTokenValue sets the "total_token_value" field.
func (*UserUpdateOne) SetTrxAddrType ¶
func (uuo *UserUpdateOne) SetTrxAddrType(uat user.TrxAddrType) *UserUpdateOne
SetTrxAddrType sets the "trx_addr_type" field.
func (*UserUpdateOne) SetTrxMode ¶
func (uuo *UserUpdateOne) SetTrxMode(um user.TrxMode) *UserUpdateOne
SetTrxMode sets the "trx_mode" field.
func (*UserUpdateOne) SetTrxPrivAddr ¶
func (uuo *UserUpdateOne) SetTrxPrivAddr(s string) *UserUpdateOne
SetTrxPrivAddr sets the "trx_priv_addr" field.
func (*UserUpdateOne) SetTrxPrivPkey ¶
func (uuo *UserUpdateOne) SetTrxPrivPkey(s string) *UserUpdateOne
SetTrxPrivPkey sets the "trx_priv_pkey" field.
func (*UserUpdateOne) SetWords ¶
func (uuo *UserUpdateOne) SetWords(s string) *UserUpdateOne
SetWords sets the "words" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.