Documentation
¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Tx
- type UserPlatformTokens
- type UserPlatformTokensClient
- func (c *UserPlatformTokensClient) Create() *UserPlatformTokensCreate
- func (c *UserPlatformTokensClient) CreateBulk(builders ...*UserPlatformTokensCreate) *UserPlatformTokensCreateBulk
- func (c *UserPlatformTokensClient) Delete() *UserPlatformTokensDelete
- func (c *UserPlatformTokensClient) DeleteOne(upt *UserPlatformTokens) *UserPlatformTokensDeleteOne
- func (c *UserPlatformTokensClient) DeleteOneID(id int) *UserPlatformTokensDeleteOne
- func (c *UserPlatformTokensClient) Get(ctx context.Context, id int) (*UserPlatformTokens, error)
- func (c *UserPlatformTokensClient) GetX(ctx context.Context, id int) *UserPlatformTokens
- func (c *UserPlatformTokensClient) Hooks() []Hook
- func (c *UserPlatformTokensClient) Query() *UserPlatformTokensQuery
- func (c *UserPlatformTokensClient) Update() *UserPlatformTokensUpdate
- func (c *UserPlatformTokensClient) UpdateOne(upt *UserPlatformTokens) *UserPlatformTokensUpdateOne
- func (c *UserPlatformTokensClient) UpdateOneID(id int) *UserPlatformTokensUpdateOne
- func (c *UserPlatformTokensClient) Use(hooks ...Hook)
- type UserPlatformTokensCreate
- func (uptc *UserPlatformTokensCreate) Mutation() *UserPlatformTokensMutation
- func (uptc *UserPlatformTokensCreate) Save(ctx context.Context) (*UserPlatformTokens, error)
- func (uptc *UserPlatformTokensCreate) SaveX(ctx context.Context) *UserPlatformTokens
- func (uptc *UserPlatformTokensCreate) SetAppID(s string) *UserPlatformTokensCreate
- func (uptc *UserPlatformTokensCreate) SetCreatedAt(t time.Time) *UserPlatformTokensCreate
- func (uptc *UserPlatformTokensCreate) SetDeviceID(s string) *UserPlatformTokensCreate
- func (uptc *UserPlatformTokensCreate) SetToken(s string) *UserPlatformTokensCreate
- func (uptc *UserPlatformTokensCreate) SetType(u uint8) *UserPlatformTokensCreate
- func (uptc *UserPlatformTokensCreate) SetUpdatedAt(t time.Time) *UserPlatformTokensCreate
- func (uptc *UserPlatformTokensCreate) SetUserID(s string) *UserPlatformTokensCreate
- type UserPlatformTokensCreateBulk
- type UserPlatformTokensDelete
- type UserPlatformTokensDeleteOne
- type UserPlatformTokensGroupBy
- func (uptgb *UserPlatformTokensGroupBy) Aggregate(fns ...AggregateFunc) *UserPlatformTokensGroupBy
- func (uptgb *UserPlatformTokensGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (uptgb *UserPlatformTokensGroupBy) BoolX(ctx context.Context) bool
- func (uptgb *UserPlatformTokensGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (uptgb *UserPlatformTokensGroupBy) BoolsX(ctx context.Context) []bool
- func (uptgb *UserPlatformTokensGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (uptgb *UserPlatformTokensGroupBy) Float64X(ctx context.Context) float64
- func (uptgb *UserPlatformTokensGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (uptgb *UserPlatformTokensGroupBy) Float64sX(ctx context.Context) []float64
- func (uptgb *UserPlatformTokensGroupBy) Int(ctx context.Context) (_ int, err error)
- func (uptgb *UserPlatformTokensGroupBy) IntX(ctx context.Context) int
- func (uptgb *UserPlatformTokensGroupBy) Ints(ctx context.Context) ([]int, error)
- func (uptgb *UserPlatformTokensGroupBy) IntsX(ctx context.Context) []int
- func (uptgb *UserPlatformTokensGroupBy) Scan(ctx context.Context, v interface{}) error
- func (uptgb *UserPlatformTokensGroupBy) ScanX(ctx context.Context, v interface{})
- func (uptgb *UserPlatformTokensGroupBy) String(ctx context.Context) (_ string, err error)
- func (uptgb *UserPlatformTokensGroupBy) StringX(ctx context.Context) string
- func (uptgb *UserPlatformTokensGroupBy) Strings(ctx context.Context) ([]string, error)
- func (uptgb *UserPlatformTokensGroupBy) StringsX(ctx context.Context) []string
- type UserPlatformTokensMutation
- func (m *UserPlatformTokensMutation) AddField(name string, value ent.Value) error
- func (m *UserPlatformTokensMutation) AddType(u uint8)
- func (m *UserPlatformTokensMutation) AddedEdges() []string
- func (m *UserPlatformTokensMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserPlatformTokensMutation) AddedFields() []string
- func (m *UserPlatformTokensMutation) AddedIDs(name string) []ent.Value
- func (m *UserPlatformTokensMutation) AddedType() (r uint8, exists bool)
- func (m *UserPlatformTokensMutation) AppID() (r string, exists bool)
- func (m *UserPlatformTokensMutation) ClearEdge(name string) error
- func (m *UserPlatformTokensMutation) ClearField(name string) error
- func (m *UserPlatformTokensMutation) ClearedEdges() []string
- func (m *UserPlatformTokensMutation) ClearedFields() []string
- func (m UserPlatformTokensMutation) Client() *Client
- func (m *UserPlatformTokensMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserPlatformTokensMutation) DeviceID() (r string, exists bool)
- func (m *UserPlatformTokensMutation) EdgeCleared(name string) bool
- func (m *UserPlatformTokensMutation) Field(name string) (ent.Value, bool)
- func (m *UserPlatformTokensMutation) FieldCleared(name string) bool
- func (m *UserPlatformTokensMutation) Fields() []string
- func (m *UserPlatformTokensMutation) GetType() (r uint8, exists bool)
- func (m *UserPlatformTokensMutation) ID() (id int, exists bool)
- func (m *UserPlatformTokensMutation) OldAppID(ctx context.Context) (v string, err error)
- func (m *UserPlatformTokensMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserPlatformTokensMutation) OldDeviceID(ctx context.Context) (v string, err error)
- func (m *UserPlatformTokensMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserPlatformTokensMutation) OldToken(ctx context.Context) (v string, err error)
- func (m *UserPlatformTokensMutation) OldType(ctx context.Context) (v uint8, err error)
- func (m *UserPlatformTokensMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserPlatformTokensMutation) OldUserID(ctx context.Context) (v string, err error)
- func (m *UserPlatformTokensMutation) Op() Op
- func (m *UserPlatformTokensMutation) RemovedEdges() []string
- func (m *UserPlatformTokensMutation) RemovedIDs(name string) []ent.Value
- func (m *UserPlatformTokensMutation) ResetAppID()
- func (m *UserPlatformTokensMutation) ResetCreatedAt()
- func (m *UserPlatformTokensMutation) ResetDeviceID()
- func (m *UserPlatformTokensMutation) ResetEdge(name string) error
- func (m *UserPlatformTokensMutation) ResetField(name string) error
- func (m *UserPlatformTokensMutation) ResetToken()
- func (m *UserPlatformTokensMutation) ResetType()
- func (m *UserPlatformTokensMutation) ResetUpdatedAt()
- func (m *UserPlatformTokensMutation) ResetUserID()
- func (m *UserPlatformTokensMutation) SetAppID(s string)
- func (m *UserPlatformTokensMutation) SetCreatedAt(t time.Time)
- func (m *UserPlatformTokensMutation) SetDeviceID(s string)
- func (m *UserPlatformTokensMutation) SetField(name string, value ent.Value) error
- func (m *UserPlatformTokensMutation) SetToken(s string)
- func (m *UserPlatformTokensMutation) SetType(u uint8)
- func (m *UserPlatformTokensMutation) SetUpdatedAt(t time.Time)
- func (m *UserPlatformTokensMutation) SetUserID(s string)
- func (m *UserPlatformTokensMutation) Token() (r string, exists bool)
- func (m UserPlatformTokensMutation) Tx() (*Tx, error)
- func (m *UserPlatformTokensMutation) Type() string
- func (m *UserPlatformTokensMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserPlatformTokensMutation) UserID() (r string, exists bool)
- type UserPlatformTokensQuery
- func (uptq *UserPlatformTokensQuery) All(ctx context.Context) ([]*UserPlatformTokens, error)
- func (uptq *UserPlatformTokensQuery) AllX(ctx context.Context) []*UserPlatformTokens
- func (uptq *UserPlatformTokensQuery) Clone() *UserPlatformTokensQuery
- func (uptq *UserPlatformTokensQuery) Count(ctx context.Context) (int, error)
- func (uptq *UserPlatformTokensQuery) CountX(ctx context.Context) int
- func (uptq *UserPlatformTokensQuery) Exist(ctx context.Context) (bool, error)
- func (uptq *UserPlatformTokensQuery) ExistX(ctx context.Context) bool
- func (uptq *UserPlatformTokensQuery) First(ctx context.Context) (*UserPlatformTokens, error)
- func (uptq *UserPlatformTokensQuery) FirstID(ctx context.Context) (id int, err error)
- func (uptq *UserPlatformTokensQuery) FirstIDX(ctx context.Context) int
- func (uptq *UserPlatformTokensQuery) FirstX(ctx context.Context) *UserPlatformTokens
- func (uptq *UserPlatformTokensQuery) GroupBy(field string, fields ...string) *UserPlatformTokensGroupBy
- func (uptq *UserPlatformTokensQuery) IDs(ctx context.Context) ([]int, error)
- func (uptq *UserPlatformTokensQuery) IDsX(ctx context.Context) []int
- func (uptq *UserPlatformTokensQuery) Limit(limit int) *UserPlatformTokensQuery
- func (uptq *UserPlatformTokensQuery) Offset(offset int) *UserPlatformTokensQuery
- func (uptq *UserPlatformTokensQuery) Only(ctx context.Context) (*UserPlatformTokens, error)
- func (uptq *UserPlatformTokensQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uptq *UserPlatformTokensQuery) OnlyIDX(ctx context.Context) int
- func (uptq *UserPlatformTokensQuery) OnlyX(ctx context.Context) *UserPlatformTokens
- func (uptq *UserPlatformTokensQuery) Order(o ...OrderFunc) *UserPlatformTokensQuery
- func (uptq *UserPlatformTokensQuery) Select(field string, fields ...string) *UserPlatformTokensSelect
- func (uptq *UserPlatformTokensQuery) Unique(unique bool) *UserPlatformTokensQuery
- func (uptq *UserPlatformTokensQuery) Where(ps ...predicate.UserPlatformTokens) *UserPlatformTokensQuery
- type UserPlatformTokensSelect
- func (upts *UserPlatformTokensSelect) Bool(ctx context.Context) (_ bool, err error)
- func (upts *UserPlatformTokensSelect) BoolX(ctx context.Context) bool
- func (upts *UserPlatformTokensSelect) Bools(ctx context.Context) ([]bool, error)
- func (upts *UserPlatformTokensSelect) BoolsX(ctx context.Context) []bool
- func (upts *UserPlatformTokensSelect) Float64(ctx context.Context) (_ float64, err error)
- func (upts *UserPlatformTokensSelect) Float64X(ctx context.Context) float64
- func (upts *UserPlatformTokensSelect) Float64s(ctx context.Context) ([]float64, error)
- func (upts *UserPlatformTokensSelect) Float64sX(ctx context.Context) []float64
- func (upts *UserPlatformTokensSelect) Int(ctx context.Context) (_ int, err error)
- func (upts *UserPlatformTokensSelect) IntX(ctx context.Context) int
- func (upts *UserPlatformTokensSelect) Ints(ctx context.Context) ([]int, error)
- func (upts *UserPlatformTokensSelect) IntsX(ctx context.Context) []int
- func (upts *UserPlatformTokensSelect) Scan(ctx context.Context, v interface{}) error
- func (upts *UserPlatformTokensSelect) ScanX(ctx context.Context, v interface{})
- func (upts *UserPlatformTokensSelect) String(ctx context.Context) (_ string, err error)
- func (upts *UserPlatformTokensSelect) StringX(ctx context.Context) string
- func (upts *UserPlatformTokensSelect) Strings(ctx context.Context) ([]string, error)
- func (upts *UserPlatformTokensSelect) StringsX(ctx context.Context) []string
- type UserPlatformTokensSlice
- type UserPlatformTokensUpdate
- func (uptu *UserPlatformTokensUpdate) AddType(u uint8) *UserPlatformTokensUpdate
- func (uptu *UserPlatformTokensUpdate) Exec(ctx context.Context) error
- func (uptu *UserPlatformTokensUpdate) ExecX(ctx context.Context)
- func (uptu *UserPlatformTokensUpdate) Mutation() *UserPlatformTokensMutation
- func (uptu *UserPlatformTokensUpdate) Save(ctx context.Context) (int, error)
- func (uptu *UserPlatformTokensUpdate) SaveX(ctx context.Context) int
- func (uptu *UserPlatformTokensUpdate) SetAppID(s string) *UserPlatformTokensUpdate
- func (uptu *UserPlatformTokensUpdate) SetCreatedAt(t time.Time) *UserPlatformTokensUpdate
- func (uptu *UserPlatformTokensUpdate) SetDeviceID(s string) *UserPlatformTokensUpdate
- func (uptu *UserPlatformTokensUpdate) SetToken(s string) *UserPlatformTokensUpdate
- func (uptu *UserPlatformTokensUpdate) SetType(u uint8) *UserPlatformTokensUpdate
- func (uptu *UserPlatformTokensUpdate) SetUpdatedAt(t time.Time) *UserPlatformTokensUpdate
- func (uptu *UserPlatformTokensUpdate) SetUserID(s string) *UserPlatformTokensUpdate
- func (uptu *UserPlatformTokensUpdate) Where(ps ...predicate.UserPlatformTokens) *UserPlatformTokensUpdate
- type UserPlatformTokensUpdateOne
- func (uptuo *UserPlatformTokensUpdateOne) AddType(u uint8) *UserPlatformTokensUpdateOne
- func (uptuo *UserPlatformTokensUpdateOne) Exec(ctx context.Context) error
- func (uptuo *UserPlatformTokensUpdateOne) ExecX(ctx context.Context)
- func (uptuo *UserPlatformTokensUpdateOne) Mutation() *UserPlatformTokensMutation
- func (uptuo *UserPlatformTokensUpdateOne) Save(ctx context.Context) (*UserPlatformTokens, error)
- func (uptuo *UserPlatformTokensUpdateOne) SaveX(ctx context.Context) *UserPlatformTokens
- func (uptuo *UserPlatformTokensUpdateOne) Select(field string, fields ...string) *UserPlatformTokensUpdateOne
- func (uptuo *UserPlatformTokensUpdateOne) SetAppID(s string) *UserPlatformTokensUpdateOne
- func (uptuo *UserPlatformTokensUpdateOne) SetCreatedAt(t time.Time) *UserPlatformTokensUpdateOne
- func (uptuo *UserPlatformTokensUpdateOne) SetDeviceID(s string) *UserPlatformTokensUpdateOne
- func (uptuo *UserPlatformTokensUpdateOne) SetToken(s string) *UserPlatformTokensUpdateOne
- func (uptuo *UserPlatformTokensUpdateOne) SetType(u uint8) *UserPlatformTokensUpdateOne
- func (uptuo *UserPlatformTokensUpdateOne) SetUpdatedAt(t time.Time) *UserPlatformTokensUpdateOne
- func (uptuo *UserPlatformTokensUpdateOne) SetUserID(s string) *UserPlatformTokensUpdateOne
- type UserPushToken
- type UserPushTokenClient
- func (c *UserPushTokenClient) Create() *UserPushTokenCreate
- func (c *UserPushTokenClient) CreateBulk(builders ...*UserPushTokenCreate) *UserPushTokenCreateBulk
- func (c *UserPushTokenClient) Delete() *UserPushTokenDelete
- func (c *UserPushTokenClient) DeleteOne(upt *UserPushToken) *UserPushTokenDeleteOne
- func (c *UserPushTokenClient) DeleteOneID(id int) *UserPushTokenDeleteOne
- func (c *UserPushTokenClient) Get(ctx context.Context, id int) (*UserPushToken, error)
- func (c *UserPushTokenClient) GetX(ctx context.Context, id int) *UserPushToken
- func (c *UserPushTokenClient) Hooks() []Hook
- func (c *UserPushTokenClient) Query() *UserPushTokenQuery
- func (c *UserPushTokenClient) Update() *UserPushTokenUpdate
- func (c *UserPushTokenClient) UpdateOne(upt *UserPushToken) *UserPushTokenUpdateOne
- func (c *UserPushTokenClient) UpdateOneID(id int) *UserPushTokenUpdateOne
- func (c *UserPushTokenClient) Use(hooks ...Hook)
- type UserPushTokenCreate
- func (uptc *UserPushTokenCreate) Mutation() *UserPushTokenMutation
- func (uptc *UserPushTokenCreate) Save(ctx context.Context) (*UserPushToken, error)
- func (uptc *UserPushTokenCreate) SaveX(ctx context.Context) *UserPushToken
- func (uptc *UserPushTokenCreate) SetAppID(s string) *UserPushTokenCreate
- func (uptc *UserPushTokenCreate) SetCreatedAt(t time.Time) *UserPushTokenCreate
- func (uptc *UserPushTokenCreate) SetNillableCreatedAt(t *time.Time) *UserPushTokenCreate
- func (uptc *UserPushTokenCreate) SetNillableUpdatedAt(t *time.Time) *UserPushTokenCreate
- func (uptc *UserPushTokenCreate) SetToken(s string) *UserPushTokenCreate
- func (uptc *UserPushTokenCreate) SetUpdatedAt(t time.Time) *UserPushTokenCreate
- func (uptc *UserPushTokenCreate) SetUserID(s string) *UserPushTokenCreate
- type UserPushTokenCreateBulk
- type UserPushTokenDelete
- type UserPushTokenDeleteOne
- type UserPushTokenGroupBy
- func (uptgb *UserPushTokenGroupBy) Aggregate(fns ...AggregateFunc) *UserPushTokenGroupBy
- func (uptgb *UserPushTokenGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (uptgb *UserPushTokenGroupBy) BoolX(ctx context.Context) bool
- func (uptgb *UserPushTokenGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (uptgb *UserPushTokenGroupBy) BoolsX(ctx context.Context) []bool
- func (uptgb *UserPushTokenGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (uptgb *UserPushTokenGroupBy) Float64X(ctx context.Context) float64
- func (uptgb *UserPushTokenGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (uptgb *UserPushTokenGroupBy) Float64sX(ctx context.Context) []float64
- func (uptgb *UserPushTokenGroupBy) Int(ctx context.Context) (_ int, err error)
- func (uptgb *UserPushTokenGroupBy) IntX(ctx context.Context) int
- func (uptgb *UserPushTokenGroupBy) Ints(ctx context.Context) ([]int, error)
- func (uptgb *UserPushTokenGroupBy) IntsX(ctx context.Context) []int
- func (uptgb *UserPushTokenGroupBy) Scan(ctx context.Context, v interface{}) error
- func (uptgb *UserPushTokenGroupBy) ScanX(ctx context.Context, v interface{})
- func (uptgb *UserPushTokenGroupBy) String(ctx context.Context) (_ string, err error)
- func (uptgb *UserPushTokenGroupBy) StringX(ctx context.Context) string
- func (uptgb *UserPushTokenGroupBy) Strings(ctx context.Context) ([]string, error)
- func (uptgb *UserPushTokenGroupBy) StringsX(ctx context.Context) []string
- type UserPushTokenMutation
- func (m *UserPushTokenMutation) AddField(name string, value ent.Value) error
- func (m *UserPushTokenMutation) AddedEdges() []string
- func (m *UserPushTokenMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserPushTokenMutation) AddedFields() []string
- func (m *UserPushTokenMutation) AddedIDs(name string) []ent.Value
- func (m *UserPushTokenMutation) AppID() (r string, exists bool)
- func (m *UserPushTokenMutation) ClearEdge(name string) error
- func (m *UserPushTokenMutation) ClearField(name string) error
- func (m *UserPushTokenMutation) ClearedEdges() []string
- func (m *UserPushTokenMutation) ClearedFields() []string
- func (m UserPushTokenMutation) Client() *Client
- func (m *UserPushTokenMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserPushTokenMutation) EdgeCleared(name string) bool
- func (m *UserPushTokenMutation) Field(name string) (ent.Value, bool)
- func (m *UserPushTokenMutation) FieldCleared(name string) bool
- func (m *UserPushTokenMutation) Fields() []string
- func (m *UserPushTokenMutation) ID() (id int, exists bool)
- func (m *UserPushTokenMutation) OldAppID(ctx context.Context) (v string, err error)
- func (m *UserPushTokenMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserPushTokenMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserPushTokenMutation) OldToken(ctx context.Context) (v string, err error)
- func (m *UserPushTokenMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserPushTokenMutation) OldUserID(ctx context.Context) (v string, err error)
- func (m *UserPushTokenMutation) Op() Op
- func (m *UserPushTokenMutation) RemovedEdges() []string
- func (m *UserPushTokenMutation) RemovedIDs(name string) []ent.Value
- func (m *UserPushTokenMutation) ResetAppID()
- func (m *UserPushTokenMutation) ResetCreatedAt()
- func (m *UserPushTokenMutation) ResetEdge(name string) error
- func (m *UserPushTokenMutation) ResetField(name string) error
- func (m *UserPushTokenMutation) ResetToken()
- func (m *UserPushTokenMutation) ResetUpdatedAt()
- func (m *UserPushTokenMutation) ResetUserID()
- func (m *UserPushTokenMutation) SetAppID(s string)
- func (m *UserPushTokenMutation) SetCreatedAt(t time.Time)
- func (m *UserPushTokenMutation) SetField(name string, value ent.Value) error
- func (m *UserPushTokenMutation) SetToken(s string)
- func (m *UserPushTokenMutation) SetUpdatedAt(t time.Time)
- func (m *UserPushTokenMutation) SetUserID(s string)
- func (m *UserPushTokenMutation) Token() (r string, exists bool)
- func (m UserPushTokenMutation) Tx() (*Tx, error)
- func (m *UserPushTokenMutation) Type() string
- func (m *UserPushTokenMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserPushTokenMutation) UserID() (r string, exists bool)
- type UserPushTokenQuery
- func (uptq *UserPushTokenQuery) All(ctx context.Context) ([]*UserPushToken, error)
- func (uptq *UserPushTokenQuery) AllX(ctx context.Context) []*UserPushToken
- func (uptq *UserPushTokenQuery) Clone() *UserPushTokenQuery
- func (uptq *UserPushTokenQuery) Count(ctx context.Context) (int, error)
- func (uptq *UserPushTokenQuery) CountX(ctx context.Context) int
- func (uptq *UserPushTokenQuery) Exist(ctx context.Context) (bool, error)
- func (uptq *UserPushTokenQuery) ExistX(ctx context.Context) bool
- func (uptq *UserPushTokenQuery) First(ctx context.Context) (*UserPushToken, error)
- func (uptq *UserPushTokenQuery) FirstID(ctx context.Context) (id int, err error)
- func (uptq *UserPushTokenQuery) FirstIDX(ctx context.Context) int
- func (uptq *UserPushTokenQuery) FirstX(ctx context.Context) *UserPushToken
- func (uptq *UserPushTokenQuery) GroupBy(field string, fields ...string) *UserPushTokenGroupBy
- func (uptq *UserPushTokenQuery) IDs(ctx context.Context) ([]int, error)
- func (uptq *UserPushTokenQuery) IDsX(ctx context.Context) []int
- func (uptq *UserPushTokenQuery) Limit(limit int) *UserPushTokenQuery
- func (uptq *UserPushTokenQuery) Offset(offset int) *UserPushTokenQuery
- func (uptq *UserPushTokenQuery) Only(ctx context.Context) (*UserPushToken, error)
- func (uptq *UserPushTokenQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uptq *UserPushTokenQuery) OnlyIDX(ctx context.Context) int
- func (uptq *UserPushTokenQuery) OnlyX(ctx context.Context) *UserPushToken
- func (uptq *UserPushTokenQuery) Order(o ...OrderFunc) *UserPushTokenQuery
- func (uptq *UserPushTokenQuery) Select(field string, fields ...string) *UserPushTokenSelect
- func (uptq *UserPushTokenQuery) Unique(unique bool) *UserPushTokenQuery
- func (uptq *UserPushTokenQuery) Where(ps ...predicate.UserPushToken) *UserPushTokenQuery
- type UserPushTokenSelect
- func (upts *UserPushTokenSelect) Bool(ctx context.Context) (_ bool, err error)
- func (upts *UserPushTokenSelect) BoolX(ctx context.Context) bool
- func (upts *UserPushTokenSelect) Bools(ctx context.Context) ([]bool, error)
- func (upts *UserPushTokenSelect) BoolsX(ctx context.Context) []bool
- func (upts *UserPushTokenSelect) Float64(ctx context.Context) (_ float64, err error)
- func (upts *UserPushTokenSelect) Float64X(ctx context.Context) float64
- func (upts *UserPushTokenSelect) Float64s(ctx context.Context) ([]float64, error)
- func (upts *UserPushTokenSelect) Float64sX(ctx context.Context) []float64
- func (upts *UserPushTokenSelect) Int(ctx context.Context) (_ int, err error)
- func (upts *UserPushTokenSelect) IntX(ctx context.Context) int
- func (upts *UserPushTokenSelect) Ints(ctx context.Context) ([]int, error)
- func (upts *UserPushTokenSelect) IntsX(ctx context.Context) []int
- func (upts *UserPushTokenSelect) Scan(ctx context.Context, v interface{}) error
- func (upts *UserPushTokenSelect) ScanX(ctx context.Context, v interface{})
- func (upts *UserPushTokenSelect) String(ctx context.Context) (_ string, err error)
- func (upts *UserPushTokenSelect) StringX(ctx context.Context) string
- func (upts *UserPushTokenSelect) Strings(ctx context.Context) ([]string, error)
- func (upts *UserPushTokenSelect) StringsX(ctx context.Context) []string
- type UserPushTokenUpdate
- func (uptu *UserPushTokenUpdate) Exec(ctx context.Context) error
- func (uptu *UserPushTokenUpdate) ExecX(ctx context.Context)
- func (uptu *UserPushTokenUpdate) Mutation() *UserPushTokenMutation
- func (uptu *UserPushTokenUpdate) Save(ctx context.Context) (int, error)
- func (uptu *UserPushTokenUpdate) SaveX(ctx context.Context) int
- func (uptu *UserPushTokenUpdate) SetAppID(s string) *UserPushTokenUpdate
- func (uptu *UserPushTokenUpdate) SetCreatedAt(t time.Time) *UserPushTokenUpdate
- func (uptu *UserPushTokenUpdate) SetNillableCreatedAt(t *time.Time) *UserPushTokenUpdate
- func (uptu *UserPushTokenUpdate) SetToken(s string) *UserPushTokenUpdate
- func (uptu *UserPushTokenUpdate) SetUpdatedAt(t time.Time) *UserPushTokenUpdate
- func (uptu *UserPushTokenUpdate) SetUserID(s string) *UserPushTokenUpdate
- func (uptu *UserPushTokenUpdate) Where(ps ...predicate.UserPushToken) *UserPushTokenUpdate
- type UserPushTokenUpdateOne
- func (uptuo *UserPushTokenUpdateOne) Exec(ctx context.Context) error
- func (uptuo *UserPushTokenUpdateOne) ExecX(ctx context.Context)
- func (uptuo *UserPushTokenUpdateOne) Mutation() *UserPushTokenMutation
- func (uptuo *UserPushTokenUpdateOne) Save(ctx context.Context) (*UserPushToken, error)
- func (uptuo *UserPushTokenUpdateOne) SaveX(ctx context.Context) *UserPushToken
- func (uptuo *UserPushTokenUpdateOne) Select(field string, fields ...string) *UserPushTokenUpdateOne
- func (uptuo *UserPushTokenUpdateOne) SetAppID(s string) *UserPushTokenUpdateOne
- func (uptuo *UserPushTokenUpdateOne) SetCreatedAt(t time.Time) *UserPushTokenUpdateOne
- func (uptuo *UserPushTokenUpdateOne) SetNillableCreatedAt(t *time.Time) *UserPushTokenUpdateOne
- func (uptuo *UserPushTokenUpdateOne) SetToken(s string) *UserPushTokenUpdateOne
- func (uptuo *UserPushTokenUpdateOne) SetUpdatedAt(t time.Time) *UserPushTokenUpdateOne
- func (uptuo *UserPushTokenUpdateOne) SetUserID(s string) *UserPushTokenUpdateOne
- type UserPushTokens
- 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. TypeUserPlatformTokens = "UserPlatformTokens" TypeUserPushToken = "UserPushToken" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validaton error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// UserPlatformTokens is the client for interacting with the UserPlatformTokens builders.
UserPlatformTokens *UserPlatformTokensClient
// UserPushToken is the client for interacting with the UserPushToken builders.
UserPushToken *UserPushTokenClient
// 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(). UserPlatformTokens. Query(). Count(ctx)
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer {
return ent.CommitFunc(func(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 MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker {
return ent.RollbackFunc(func(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 Rollbacker method.
type Tx ¶
type Tx struct {
// UserPlatformTokens is the client for interacting with the UserPlatformTokens builders.
UserPlatformTokens *UserPlatformTokensClient
// UserPushToken is the client for interacting with the UserPushToken builders.
UserPushToken *UserPushTokenClient
// 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 UserPlatformTokens ¶
type UserPlatformTokens struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Type holds the value of the "type" field.
Type uint8 `json:"type,omitempty"`
// UserID holds the value of the "user_id" field.
UserID string `json:"user_id,omitempty"`
// DeviceID holds the value of the "device_id" field.
DeviceID string `json:"device_id,omitempty"`
// Token holds the value of the "token" field.
Token string `json:"token,omitempty"`
// AppID holds the value of the "app_id" field.
AppID string `json:"app_id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// contains filtered or unexported fields
}
UserPlatformTokens is the model entity for the UserPlatformTokens schema.
func (*UserPlatformTokens) String ¶
func (upt *UserPlatformTokens) String() string
String implements the fmt.Stringer.
func (*UserPlatformTokens) Unwrap ¶
func (upt *UserPlatformTokens) Unwrap() *UserPlatformTokens
Unwrap unwraps the UserPlatformTokens 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 (*UserPlatformTokens) Update ¶
func (upt *UserPlatformTokens) Update() *UserPlatformTokensUpdateOne
Update returns a builder for updating this UserPlatformTokens. Note that you need to call UserPlatformTokens.Unwrap() before calling this method if this UserPlatformTokens was returned from a transaction, and the transaction was committed or rolled back.
type UserPlatformTokensClient ¶
type UserPlatformTokensClient struct {
// contains filtered or unexported fields
}
UserPlatformTokensClient is a client for the UserPlatformTokens schema.
func NewUserPlatformTokensClient ¶
func NewUserPlatformTokensClient(c config) *UserPlatformTokensClient
NewUserPlatformTokensClient returns a client for the UserPlatformTokens from the given config.
func (*UserPlatformTokensClient) Create ¶
func (c *UserPlatformTokensClient) Create() *UserPlatformTokensCreate
Create returns a create builder for UserPlatformTokens.
func (*UserPlatformTokensClient) CreateBulk ¶
func (c *UserPlatformTokensClient) CreateBulk(builders ...*UserPlatformTokensCreate) *UserPlatformTokensCreateBulk
CreateBulk returns a builder for creating a bulk of UserPlatformTokens entities.
func (*UserPlatformTokensClient) Delete ¶
func (c *UserPlatformTokensClient) Delete() *UserPlatformTokensDelete
Delete returns a delete builder for UserPlatformTokens.
func (*UserPlatformTokensClient) DeleteOne ¶
func (c *UserPlatformTokensClient) DeleteOne(upt *UserPlatformTokens) *UserPlatformTokensDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserPlatformTokensClient) DeleteOneID ¶
func (c *UserPlatformTokensClient) DeleteOneID(id int) *UserPlatformTokensDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserPlatformTokensClient) Get ¶
func (c *UserPlatformTokensClient) Get(ctx context.Context, id int) (*UserPlatformTokens, error)
Get returns a UserPlatformTokens entity by its id.
func (*UserPlatformTokensClient) GetX ¶
func (c *UserPlatformTokensClient) GetX(ctx context.Context, id int) *UserPlatformTokens
GetX is like Get, but panics if an error occurs.
func (*UserPlatformTokensClient) Hooks ¶
func (c *UserPlatformTokensClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserPlatformTokensClient) Query ¶
func (c *UserPlatformTokensClient) Query() *UserPlatformTokensQuery
Query returns a query builder for UserPlatformTokens.
func (*UserPlatformTokensClient) Update ¶
func (c *UserPlatformTokensClient) Update() *UserPlatformTokensUpdate
Update returns an update builder for UserPlatformTokens.
func (*UserPlatformTokensClient) UpdateOne ¶
func (c *UserPlatformTokensClient) UpdateOne(upt *UserPlatformTokens) *UserPlatformTokensUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserPlatformTokensClient) UpdateOneID ¶
func (c *UserPlatformTokensClient) UpdateOneID(id int) *UserPlatformTokensUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserPlatformTokensClient) Use ¶
func (c *UserPlatformTokensClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `userplatformtokens.Hooks(f(g(h())))`.
type UserPlatformTokensCreate ¶
type UserPlatformTokensCreate struct {
// contains filtered or unexported fields
}
UserPlatformTokensCreate is the builder for creating a UserPlatformTokens entity.
func (*UserPlatformTokensCreate) Mutation ¶
func (uptc *UserPlatformTokensCreate) Mutation() *UserPlatformTokensMutation
Mutation returns the UserPlatformTokensMutation object of the builder.
func (*UserPlatformTokensCreate) Save ¶
func (uptc *UserPlatformTokensCreate) Save(ctx context.Context) (*UserPlatformTokens, error)
Save creates the UserPlatformTokens in the database.
func (*UserPlatformTokensCreate) SaveX ¶
func (uptc *UserPlatformTokensCreate) SaveX(ctx context.Context) *UserPlatformTokens
SaveX calls Save and panics if Save returns an error.
func (*UserPlatformTokensCreate) SetAppID ¶
func (uptc *UserPlatformTokensCreate) SetAppID(s string) *UserPlatformTokensCreate
SetAppID sets the "app_id" field.
func (*UserPlatformTokensCreate) SetCreatedAt ¶
func (uptc *UserPlatformTokensCreate) SetCreatedAt(t time.Time) *UserPlatformTokensCreate
SetCreatedAt sets the "created_at" field.
func (*UserPlatformTokensCreate) SetDeviceID ¶
func (uptc *UserPlatformTokensCreate) SetDeviceID(s string) *UserPlatformTokensCreate
SetDeviceID sets the "device_id" field.
func (*UserPlatformTokensCreate) SetToken ¶
func (uptc *UserPlatformTokensCreate) SetToken(s string) *UserPlatformTokensCreate
SetToken sets the "token" field.
func (*UserPlatformTokensCreate) SetType ¶
func (uptc *UserPlatformTokensCreate) SetType(u uint8) *UserPlatformTokensCreate
SetType sets the "type" field.
func (*UserPlatformTokensCreate) SetUpdatedAt ¶
func (uptc *UserPlatformTokensCreate) SetUpdatedAt(t time.Time) *UserPlatformTokensCreate
SetUpdatedAt sets the "updated_at" field.
func (*UserPlatformTokensCreate) SetUserID ¶
func (uptc *UserPlatformTokensCreate) SetUserID(s string) *UserPlatformTokensCreate
SetUserID sets the "user_id" field.
type UserPlatformTokensCreateBulk ¶
type UserPlatformTokensCreateBulk struct {
// contains filtered or unexported fields
}
UserPlatformTokensCreateBulk is the builder for creating many UserPlatformTokens entities in bulk.
func (*UserPlatformTokensCreateBulk) Save ¶
func (uptcb *UserPlatformTokensCreateBulk) Save(ctx context.Context) ([]*UserPlatformTokens, error)
Save creates the UserPlatformTokens entities in the database.
func (*UserPlatformTokensCreateBulk) SaveX ¶
func (uptcb *UserPlatformTokensCreateBulk) SaveX(ctx context.Context) []*UserPlatformTokens
SaveX is like Save, but panics if an error occurs.
type UserPlatformTokensDelete ¶
type UserPlatformTokensDelete struct {
// contains filtered or unexported fields
}
UserPlatformTokensDelete is the builder for deleting a UserPlatformTokens entity.
func (*UserPlatformTokensDelete) Exec ¶
func (uptd *UserPlatformTokensDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserPlatformTokensDelete) ExecX ¶
func (uptd *UserPlatformTokensDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserPlatformTokensDelete) Where ¶
func (uptd *UserPlatformTokensDelete) Where(ps ...predicate.UserPlatformTokens) *UserPlatformTokensDelete
Where adds a new predicate to the UserPlatformTokensDelete builder.
type UserPlatformTokensDeleteOne ¶
type UserPlatformTokensDeleteOne struct {
// contains filtered or unexported fields
}
UserPlatformTokensDeleteOne is the builder for deleting a single UserPlatformTokens entity.
func (*UserPlatformTokensDeleteOne) Exec ¶
func (uptdo *UserPlatformTokensDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserPlatformTokensDeleteOne) ExecX ¶
func (uptdo *UserPlatformTokensDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserPlatformTokensGroupBy ¶
type UserPlatformTokensGroupBy struct {
// contains filtered or unexported fields
}
UserPlatformTokensGroupBy is the group-by builder for UserPlatformTokens entities.
func (*UserPlatformTokensGroupBy) Aggregate ¶
func (uptgb *UserPlatformTokensGroupBy) Aggregate(fns ...AggregateFunc) *UserPlatformTokensGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserPlatformTokensGroupBy) Bool ¶
func (uptgb *UserPlatformTokensGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserPlatformTokensGroupBy) BoolX ¶
func (uptgb *UserPlatformTokensGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserPlatformTokensGroupBy) Bools ¶
func (uptgb *UserPlatformTokensGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*UserPlatformTokensGroupBy) BoolsX ¶
func (uptgb *UserPlatformTokensGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserPlatformTokensGroupBy) Float64 ¶
func (uptgb *UserPlatformTokensGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserPlatformTokensGroupBy) Float64X ¶
func (uptgb *UserPlatformTokensGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserPlatformTokensGroupBy) Float64s ¶
func (uptgb *UserPlatformTokensGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*UserPlatformTokensGroupBy) Float64sX ¶
func (uptgb *UserPlatformTokensGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserPlatformTokensGroupBy) Int ¶
func (uptgb *UserPlatformTokensGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserPlatformTokensGroupBy) IntX ¶
func (uptgb *UserPlatformTokensGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserPlatformTokensGroupBy) Ints ¶
func (uptgb *UserPlatformTokensGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*UserPlatformTokensGroupBy) IntsX ¶
func (uptgb *UserPlatformTokensGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserPlatformTokensGroupBy) Scan ¶
func (uptgb *UserPlatformTokensGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UserPlatformTokensGroupBy) ScanX ¶
func (uptgb *UserPlatformTokensGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserPlatformTokensGroupBy) String ¶
func (uptgb *UserPlatformTokensGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserPlatformTokensGroupBy) StringX ¶
func (uptgb *UserPlatformTokensGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserPlatformTokensMutation ¶
type UserPlatformTokensMutation struct {
// contains filtered or unexported fields
}
UserPlatformTokensMutation represents an operation that mutates the UserPlatformTokens nodes in the graph.
func (*UserPlatformTokensMutation) AddField ¶
func (m *UserPlatformTokensMutation) 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 (*UserPlatformTokensMutation) AddType ¶
func (m *UserPlatformTokensMutation) AddType(u uint8)
AddType adds u to the "type" field.
func (*UserPlatformTokensMutation) AddedEdges ¶
func (m *UserPlatformTokensMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserPlatformTokensMutation) AddedField ¶
func (m *UserPlatformTokensMutation) 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 (*UserPlatformTokensMutation) AddedFields ¶
func (m *UserPlatformTokensMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserPlatformTokensMutation) AddedIDs ¶
func (m *UserPlatformTokensMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserPlatformTokensMutation) AddedType ¶
func (m *UserPlatformTokensMutation) AddedType() (r uint8, exists bool)
AddedType returns the value that was added to the "type" field in this mutation.
func (*UserPlatformTokensMutation) AppID ¶
func (m *UserPlatformTokensMutation) AppID() (r string, exists bool)
AppID returns the value of the "app_id" field in the mutation.
func (*UserPlatformTokensMutation) ClearEdge ¶
func (m *UserPlatformTokensMutation) 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 (*UserPlatformTokensMutation) ClearField ¶
func (m *UserPlatformTokensMutation) 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 (*UserPlatformTokensMutation) ClearedEdges ¶
func (m *UserPlatformTokensMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserPlatformTokensMutation) ClearedFields ¶
func (m *UserPlatformTokensMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserPlatformTokensMutation) Client ¶
func (m UserPlatformTokensMutation) 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 (*UserPlatformTokensMutation) CreatedAt ¶
func (m *UserPlatformTokensMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserPlatformTokensMutation) DeviceID ¶
func (m *UserPlatformTokensMutation) DeviceID() (r string, exists bool)
DeviceID returns the value of the "device_id" field in the mutation.
func (*UserPlatformTokensMutation) EdgeCleared ¶
func (m *UserPlatformTokensMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserPlatformTokensMutation) Field ¶
func (m *UserPlatformTokensMutation) 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 (*UserPlatformTokensMutation) FieldCleared ¶
func (m *UserPlatformTokensMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserPlatformTokensMutation) Fields ¶
func (m *UserPlatformTokensMutation) 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 (*UserPlatformTokensMutation) GetType ¶
func (m *UserPlatformTokensMutation) GetType() (r uint8, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*UserPlatformTokensMutation) ID ¶
func (m *UserPlatformTokensMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*UserPlatformTokensMutation) OldAppID ¶
func (m *UserPlatformTokensMutation) OldAppID(ctx context.Context) (v string, err error)
OldAppID returns the old "app_id" field's value of the UserPlatformTokens entity. If the UserPlatformTokens 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 (*UserPlatformTokensMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the UserPlatformTokens entity. If the UserPlatformTokens 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 (*UserPlatformTokensMutation) OldDeviceID ¶
func (m *UserPlatformTokensMutation) OldDeviceID(ctx context.Context) (v string, err error)
OldDeviceID returns the old "device_id" field's value of the UserPlatformTokens entity. If the UserPlatformTokens 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 (*UserPlatformTokensMutation) 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 (*UserPlatformTokensMutation) OldToken ¶
func (m *UserPlatformTokensMutation) OldToken(ctx context.Context) (v string, err error)
OldToken returns the old "token" field's value of the UserPlatformTokens entity. If the UserPlatformTokens 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 (*UserPlatformTokensMutation) OldType ¶
func (m *UserPlatformTokensMutation) OldType(ctx context.Context) (v uint8, err error)
OldType returns the old "type" field's value of the UserPlatformTokens entity. If the UserPlatformTokens 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 (*UserPlatformTokensMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the UserPlatformTokens entity. If the UserPlatformTokens 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 (*UserPlatformTokensMutation) OldUserID ¶
func (m *UserPlatformTokensMutation) OldUserID(ctx context.Context) (v string, err error)
OldUserID returns the old "user_id" field's value of the UserPlatformTokens entity. If the UserPlatformTokens 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 (*UserPlatformTokensMutation) Op ¶
func (m *UserPlatformTokensMutation) Op() Op
Op returns the operation name.
func (*UserPlatformTokensMutation) RemovedEdges ¶
func (m *UserPlatformTokensMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserPlatformTokensMutation) RemovedIDs ¶
func (m *UserPlatformTokensMutation) 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 (*UserPlatformTokensMutation) ResetAppID ¶
func (m *UserPlatformTokensMutation) ResetAppID()
ResetAppID resets all changes to the "app_id" field.
func (*UserPlatformTokensMutation) ResetCreatedAt ¶
func (m *UserPlatformTokensMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserPlatformTokensMutation) ResetDeviceID ¶
func (m *UserPlatformTokensMutation) ResetDeviceID()
ResetDeviceID resets all changes to the "device_id" field.
func (*UserPlatformTokensMutation) ResetEdge ¶
func (m *UserPlatformTokensMutation) 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 (*UserPlatformTokensMutation) ResetField ¶
func (m *UserPlatformTokensMutation) 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 (*UserPlatformTokensMutation) ResetToken ¶
func (m *UserPlatformTokensMutation) ResetToken()
ResetToken resets all changes to the "token" field.
func (*UserPlatformTokensMutation) ResetType ¶
func (m *UserPlatformTokensMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*UserPlatformTokensMutation) ResetUpdatedAt ¶
func (m *UserPlatformTokensMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserPlatformTokensMutation) ResetUserID ¶
func (m *UserPlatformTokensMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*UserPlatformTokensMutation) SetAppID ¶
func (m *UserPlatformTokensMutation) SetAppID(s string)
SetAppID sets the "app_id" field.
func (*UserPlatformTokensMutation) SetCreatedAt ¶
func (m *UserPlatformTokensMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserPlatformTokensMutation) SetDeviceID ¶
func (m *UserPlatformTokensMutation) SetDeviceID(s string)
SetDeviceID sets the "device_id" field.
func (*UserPlatformTokensMutation) SetField ¶
func (m *UserPlatformTokensMutation) 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 (*UserPlatformTokensMutation) SetToken ¶
func (m *UserPlatformTokensMutation) SetToken(s string)
SetToken sets the "token" field.
func (*UserPlatformTokensMutation) SetType ¶
func (m *UserPlatformTokensMutation) SetType(u uint8)
SetType sets the "type" field.
func (*UserPlatformTokensMutation) SetUpdatedAt ¶
func (m *UserPlatformTokensMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*UserPlatformTokensMutation) SetUserID ¶
func (m *UserPlatformTokensMutation) SetUserID(s string)
SetUserID sets the "user_id" field.
func (*UserPlatformTokensMutation) Token ¶
func (m *UserPlatformTokensMutation) Token() (r string, exists bool)
Token returns the value of the "token" field in the mutation.
func (UserPlatformTokensMutation) Tx ¶
func (m UserPlatformTokensMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserPlatformTokensMutation) Type ¶
func (m *UserPlatformTokensMutation) Type() string
Type returns the node type of this mutation (UserPlatformTokens).
func (*UserPlatformTokensMutation) UpdatedAt ¶
func (m *UserPlatformTokensMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UserPlatformTokensMutation) UserID ¶
func (m *UserPlatformTokensMutation) UserID() (r string, exists bool)
UserID returns the value of the "user_id" field in the mutation.
type UserPlatformTokensQuery ¶
type UserPlatformTokensQuery struct {
// contains filtered or unexported fields
}
UserPlatformTokensQuery is the builder for querying UserPlatformTokens entities.
func (*UserPlatformTokensQuery) All ¶
func (uptq *UserPlatformTokensQuery) All(ctx context.Context) ([]*UserPlatformTokens, error)
All executes the query and returns a list of UserPlatformTokensSlice.
func (*UserPlatformTokensQuery) AllX ¶
func (uptq *UserPlatformTokensQuery) AllX(ctx context.Context) []*UserPlatformTokens
AllX is like All, but panics if an error occurs.
func (*UserPlatformTokensQuery) Clone ¶
func (uptq *UserPlatformTokensQuery) Clone() *UserPlatformTokensQuery
Clone returns a duplicate of the UserPlatformTokensQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserPlatformTokensQuery) Count ¶
func (uptq *UserPlatformTokensQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserPlatformTokensQuery) CountX ¶
func (uptq *UserPlatformTokensQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserPlatformTokensQuery) Exist ¶
func (uptq *UserPlatformTokensQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserPlatformTokensQuery) ExistX ¶
func (uptq *UserPlatformTokensQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserPlatformTokensQuery) First ¶
func (uptq *UserPlatformTokensQuery) First(ctx context.Context) (*UserPlatformTokens, error)
First returns the first UserPlatformTokens entity from the query. Returns a *NotFoundError when no UserPlatformTokens was found.
func (*UserPlatformTokensQuery) FirstID ¶
func (uptq *UserPlatformTokensQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserPlatformTokens ID from the query. Returns a *NotFoundError when no UserPlatformTokens ID was found.
func (*UserPlatformTokensQuery) FirstIDX ¶
func (uptq *UserPlatformTokensQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserPlatformTokensQuery) FirstX ¶
func (uptq *UserPlatformTokensQuery) FirstX(ctx context.Context) *UserPlatformTokens
FirstX is like First, but panics if an error occurs.
func (*UserPlatformTokensQuery) GroupBy ¶
func (uptq *UserPlatformTokensQuery) GroupBy(field string, fields ...string) *UserPlatformTokensGroupBy
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 {
Type uint8 `json:"type,omitempty"`
Count int `json:"count,omitempty"`
}
client.UserPlatformTokens.Query().
GroupBy(userplatformtokens.FieldType).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*UserPlatformTokensQuery) IDs ¶
func (uptq *UserPlatformTokensQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of UserPlatformTokens IDs.
func (*UserPlatformTokensQuery) IDsX ¶
func (uptq *UserPlatformTokensQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserPlatformTokensQuery) Limit ¶
func (uptq *UserPlatformTokensQuery) Limit(limit int) *UserPlatformTokensQuery
Limit adds a limit step to the query.
func (*UserPlatformTokensQuery) Offset ¶
func (uptq *UserPlatformTokensQuery) Offset(offset int) *UserPlatformTokensQuery
Offset adds an offset step to the query.
func (*UserPlatformTokensQuery) Only ¶
func (uptq *UserPlatformTokensQuery) Only(ctx context.Context) (*UserPlatformTokens, error)
Only returns a single UserPlatformTokens entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one UserPlatformTokens entity is not found. Returns a *NotFoundError when no UserPlatformTokens entities are found.
func (*UserPlatformTokensQuery) OnlyID ¶
func (uptq *UserPlatformTokensQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UserPlatformTokens ID in the query. Returns a *NotSingularError when exactly one UserPlatformTokens ID is not found. Returns a *NotFoundError when no entities are found.
func (*UserPlatformTokensQuery) OnlyIDX ¶
func (uptq *UserPlatformTokensQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserPlatformTokensQuery) OnlyX ¶
func (uptq *UserPlatformTokensQuery) OnlyX(ctx context.Context) *UserPlatformTokens
OnlyX is like Only, but panics if an error occurs.
func (*UserPlatformTokensQuery) Order ¶
func (uptq *UserPlatformTokensQuery) Order(o ...OrderFunc) *UserPlatformTokensQuery
Order adds an order step to the query.
func (*UserPlatformTokensQuery) Select ¶
func (uptq *UserPlatformTokensQuery) Select(field string, fields ...string) *UserPlatformTokensSelect
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 {
Type uint8 `json:"type,omitempty"`
}
client.UserPlatformTokens.Query().
Select(userplatformtokens.FieldType).
Scan(ctx, &v)
func (*UserPlatformTokensQuery) Unique ¶
func (uptq *UserPlatformTokensQuery) Unique(unique bool) *UserPlatformTokensQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserPlatformTokensQuery) Where ¶
func (uptq *UserPlatformTokensQuery) Where(ps ...predicate.UserPlatformTokens) *UserPlatformTokensQuery
Where adds a new predicate for the UserPlatformTokensQuery builder.
type UserPlatformTokensSelect ¶
type UserPlatformTokensSelect struct {
*UserPlatformTokensQuery
// contains filtered or unexported fields
}
UserPlatformTokensSelect is the builder for selecting fields of UserPlatformTokens entities.
func (*UserPlatformTokensSelect) Bool ¶
func (upts *UserPlatformTokensSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserPlatformTokensSelect) BoolX ¶
func (upts *UserPlatformTokensSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserPlatformTokensSelect) Bools ¶
func (upts *UserPlatformTokensSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserPlatformTokensSelect) BoolsX ¶
func (upts *UserPlatformTokensSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserPlatformTokensSelect) Float64 ¶
func (upts *UserPlatformTokensSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserPlatformTokensSelect) Float64X ¶
func (upts *UserPlatformTokensSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserPlatformTokensSelect) Float64s ¶
func (upts *UserPlatformTokensSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserPlatformTokensSelect) Float64sX ¶
func (upts *UserPlatformTokensSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserPlatformTokensSelect) Int ¶
func (upts *UserPlatformTokensSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserPlatformTokensSelect) IntX ¶
func (upts *UserPlatformTokensSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserPlatformTokensSelect) Ints ¶
func (upts *UserPlatformTokensSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserPlatformTokensSelect) IntsX ¶
func (upts *UserPlatformTokensSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserPlatformTokensSelect) Scan ¶
func (upts *UserPlatformTokensSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UserPlatformTokensSelect) ScanX ¶
func (upts *UserPlatformTokensSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserPlatformTokensSelect) String ¶
func (upts *UserPlatformTokensSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UserPlatformTokensSelect) StringX ¶
func (upts *UserPlatformTokensSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserPlatformTokensSlice ¶
type UserPlatformTokensSlice []*UserPlatformTokens
UserPlatformTokensSlice is a parsable slice of UserPlatformTokens.
type UserPlatformTokensUpdate ¶
type UserPlatformTokensUpdate struct {
// contains filtered or unexported fields
}
UserPlatformTokensUpdate is the builder for updating UserPlatformTokens entities.
func (*UserPlatformTokensUpdate) AddType ¶
func (uptu *UserPlatformTokensUpdate) AddType(u uint8) *UserPlatformTokensUpdate
AddType adds u to the "type" field.
func (*UserPlatformTokensUpdate) Exec ¶
func (uptu *UserPlatformTokensUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserPlatformTokensUpdate) ExecX ¶
func (uptu *UserPlatformTokensUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserPlatformTokensUpdate) Mutation ¶
func (uptu *UserPlatformTokensUpdate) Mutation() *UserPlatformTokensMutation
Mutation returns the UserPlatformTokensMutation object of the builder.
func (*UserPlatformTokensUpdate) Save ¶
func (uptu *UserPlatformTokensUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserPlatformTokensUpdate) SaveX ¶
func (uptu *UserPlatformTokensUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserPlatformTokensUpdate) SetAppID ¶
func (uptu *UserPlatformTokensUpdate) SetAppID(s string) *UserPlatformTokensUpdate
SetAppID sets the "app_id" field.
func (*UserPlatformTokensUpdate) SetCreatedAt ¶
func (uptu *UserPlatformTokensUpdate) SetCreatedAt(t time.Time) *UserPlatformTokensUpdate
SetCreatedAt sets the "created_at" field.
func (*UserPlatformTokensUpdate) SetDeviceID ¶
func (uptu *UserPlatformTokensUpdate) SetDeviceID(s string) *UserPlatformTokensUpdate
SetDeviceID sets the "device_id" field.
func (*UserPlatformTokensUpdate) SetToken ¶
func (uptu *UserPlatformTokensUpdate) SetToken(s string) *UserPlatformTokensUpdate
SetToken sets the "token" field.
func (*UserPlatformTokensUpdate) SetType ¶
func (uptu *UserPlatformTokensUpdate) SetType(u uint8) *UserPlatformTokensUpdate
SetType sets the "type" field.
func (*UserPlatformTokensUpdate) SetUpdatedAt ¶
func (uptu *UserPlatformTokensUpdate) SetUpdatedAt(t time.Time) *UserPlatformTokensUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserPlatformTokensUpdate) SetUserID ¶
func (uptu *UserPlatformTokensUpdate) SetUserID(s string) *UserPlatformTokensUpdate
SetUserID sets the "user_id" field.
func (*UserPlatformTokensUpdate) Where ¶
func (uptu *UserPlatformTokensUpdate) Where(ps ...predicate.UserPlatformTokens) *UserPlatformTokensUpdate
Where adds a new predicate for the UserPlatformTokensUpdate builder.
type UserPlatformTokensUpdateOne ¶
type UserPlatformTokensUpdateOne struct {
// contains filtered or unexported fields
}
UserPlatformTokensUpdateOne is the builder for updating a single UserPlatformTokens entity.
func (*UserPlatformTokensUpdateOne) AddType ¶
func (uptuo *UserPlatformTokensUpdateOne) AddType(u uint8) *UserPlatformTokensUpdateOne
AddType adds u to the "type" field.
func (*UserPlatformTokensUpdateOne) Exec ¶
func (uptuo *UserPlatformTokensUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserPlatformTokensUpdateOne) ExecX ¶
func (uptuo *UserPlatformTokensUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserPlatformTokensUpdateOne) Mutation ¶
func (uptuo *UserPlatformTokensUpdateOne) Mutation() *UserPlatformTokensMutation
Mutation returns the UserPlatformTokensMutation object of the builder.
func (*UserPlatformTokensUpdateOne) Save ¶
func (uptuo *UserPlatformTokensUpdateOne) Save(ctx context.Context) (*UserPlatformTokens, error)
Save executes the query and returns the updated UserPlatformTokens entity.
func (*UserPlatformTokensUpdateOne) SaveX ¶
func (uptuo *UserPlatformTokensUpdateOne) SaveX(ctx context.Context) *UserPlatformTokens
SaveX is like Save, but panics if an error occurs.
func (*UserPlatformTokensUpdateOne) Select ¶
func (uptuo *UserPlatformTokensUpdateOne) Select(field string, fields ...string) *UserPlatformTokensUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserPlatformTokensUpdateOne) SetAppID ¶
func (uptuo *UserPlatformTokensUpdateOne) SetAppID(s string) *UserPlatformTokensUpdateOne
SetAppID sets the "app_id" field.
func (*UserPlatformTokensUpdateOne) SetCreatedAt ¶
func (uptuo *UserPlatformTokensUpdateOne) SetCreatedAt(t time.Time) *UserPlatformTokensUpdateOne
SetCreatedAt sets the "created_at" field.
func (*UserPlatformTokensUpdateOne) SetDeviceID ¶
func (uptuo *UserPlatformTokensUpdateOne) SetDeviceID(s string) *UserPlatformTokensUpdateOne
SetDeviceID sets the "device_id" field.
func (*UserPlatformTokensUpdateOne) SetToken ¶
func (uptuo *UserPlatformTokensUpdateOne) SetToken(s string) *UserPlatformTokensUpdateOne
SetToken sets the "token" field.
func (*UserPlatformTokensUpdateOne) SetType ¶
func (uptuo *UserPlatformTokensUpdateOne) SetType(u uint8) *UserPlatformTokensUpdateOne
SetType sets the "type" field.
func (*UserPlatformTokensUpdateOne) SetUpdatedAt ¶
func (uptuo *UserPlatformTokensUpdateOne) SetUpdatedAt(t time.Time) *UserPlatformTokensUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserPlatformTokensUpdateOne) SetUserID ¶
func (uptuo *UserPlatformTokensUpdateOne) SetUserID(s string) *UserPlatformTokensUpdateOne
SetUserID sets the "user_id" field.
type UserPushToken ¶
type UserPushToken struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// UserID holds the value of the "user_id" field.
UserID string `json:"user_id,omitempty"`
// Token holds the value of the "token" field.
Token string `json:"token,omitempty"`
// AppID holds the value of the "app_id" field.
AppID string `json:"app_id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// contains filtered or unexported fields
}
UserPushToken is the model entity for the UserPushToken schema.
func (*UserPushToken) String ¶
func (upt *UserPushToken) String() string
String implements the fmt.Stringer.
func (*UserPushToken) Unwrap ¶
func (upt *UserPushToken) Unwrap() *UserPushToken
Unwrap unwraps the UserPushToken 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 (*UserPushToken) Update ¶
func (upt *UserPushToken) Update() *UserPushTokenUpdateOne
Update returns a builder for updating this UserPushToken. Note that you need to call UserPushToken.Unwrap() before calling this method if this UserPushToken was returned from a transaction, and the transaction was committed or rolled back.
type UserPushTokenClient ¶
type UserPushTokenClient struct {
// contains filtered or unexported fields
}
UserPushTokenClient is a client for the UserPushToken schema.
func NewUserPushTokenClient ¶
func NewUserPushTokenClient(c config) *UserPushTokenClient
NewUserPushTokenClient returns a client for the UserPushToken from the given config.
func (*UserPushTokenClient) Create ¶
func (c *UserPushTokenClient) Create() *UserPushTokenCreate
Create returns a create builder for UserPushToken.
func (*UserPushTokenClient) CreateBulk ¶
func (c *UserPushTokenClient) CreateBulk(builders ...*UserPushTokenCreate) *UserPushTokenCreateBulk
CreateBulk returns a builder for creating a bulk of UserPushToken entities.
func (*UserPushTokenClient) Delete ¶
func (c *UserPushTokenClient) Delete() *UserPushTokenDelete
Delete returns a delete builder for UserPushToken.
func (*UserPushTokenClient) DeleteOne ¶
func (c *UserPushTokenClient) DeleteOne(upt *UserPushToken) *UserPushTokenDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserPushTokenClient) DeleteOneID ¶
func (c *UserPushTokenClient) DeleteOneID(id int) *UserPushTokenDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserPushTokenClient) Get ¶
func (c *UserPushTokenClient) Get(ctx context.Context, id int) (*UserPushToken, error)
Get returns a UserPushToken entity by its id.
func (*UserPushTokenClient) GetX ¶
func (c *UserPushTokenClient) GetX(ctx context.Context, id int) *UserPushToken
GetX is like Get, but panics if an error occurs.
func (*UserPushTokenClient) Hooks ¶
func (c *UserPushTokenClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserPushTokenClient) Query ¶
func (c *UserPushTokenClient) Query() *UserPushTokenQuery
Query returns a query builder for UserPushToken.
func (*UserPushTokenClient) Update ¶
func (c *UserPushTokenClient) Update() *UserPushTokenUpdate
Update returns an update builder for UserPushToken.
func (*UserPushTokenClient) UpdateOne ¶
func (c *UserPushTokenClient) UpdateOne(upt *UserPushToken) *UserPushTokenUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserPushTokenClient) UpdateOneID ¶
func (c *UserPushTokenClient) UpdateOneID(id int) *UserPushTokenUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserPushTokenClient) Use ¶
func (c *UserPushTokenClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `userpushtoken.Hooks(f(g(h())))`.
type UserPushTokenCreate ¶
type UserPushTokenCreate struct {
// contains filtered or unexported fields
}
UserPushTokenCreate is the builder for creating a UserPushToken entity.
func (*UserPushTokenCreate) Mutation ¶
func (uptc *UserPushTokenCreate) Mutation() *UserPushTokenMutation
Mutation returns the UserPushTokenMutation object of the builder.
func (*UserPushTokenCreate) Save ¶
func (uptc *UserPushTokenCreate) Save(ctx context.Context) (*UserPushToken, error)
Save creates the UserPushToken in the database.
func (*UserPushTokenCreate) SaveX ¶
func (uptc *UserPushTokenCreate) SaveX(ctx context.Context) *UserPushToken
SaveX calls Save and panics if Save returns an error.
func (*UserPushTokenCreate) SetAppID ¶
func (uptc *UserPushTokenCreate) SetAppID(s string) *UserPushTokenCreate
SetAppID sets the "app_id" field.
func (*UserPushTokenCreate) SetCreatedAt ¶
func (uptc *UserPushTokenCreate) SetCreatedAt(t time.Time) *UserPushTokenCreate
SetCreatedAt sets the "created_at" field.
func (*UserPushTokenCreate) SetNillableCreatedAt ¶
func (uptc *UserPushTokenCreate) SetNillableCreatedAt(t *time.Time) *UserPushTokenCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserPushTokenCreate) SetNillableUpdatedAt ¶
func (uptc *UserPushTokenCreate) SetNillableUpdatedAt(t *time.Time) *UserPushTokenCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UserPushTokenCreate) SetToken ¶
func (uptc *UserPushTokenCreate) SetToken(s string) *UserPushTokenCreate
SetToken sets the "token" field.
func (*UserPushTokenCreate) SetUpdatedAt ¶
func (uptc *UserPushTokenCreate) SetUpdatedAt(t time.Time) *UserPushTokenCreate
SetUpdatedAt sets the "updated_at" field.
func (*UserPushTokenCreate) SetUserID ¶
func (uptc *UserPushTokenCreate) SetUserID(s string) *UserPushTokenCreate
SetUserID sets the "user_id" field.
type UserPushTokenCreateBulk ¶
type UserPushTokenCreateBulk struct {
// contains filtered or unexported fields
}
UserPushTokenCreateBulk is the builder for creating many UserPushToken entities in bulk.
func (*UserPushTokenCreateBulk) Save ¶
func (uptcb *UserPushTokenCreateBulk) Save(ctx context.Context) ([]*UserPushToken, error)
Save creates the UserPushToken entities in the database.
func (*UserPushTokenCreateBulk) SaveX ¶
func (uptcb *UserPushTokenCreateBulk) SaveX(ctx context.Context) []*UserPushToken
SaveX is like Save, but panics if an error occurs.
type UserPushTokenDelete ¶
type UserPushTokenDelete struct {
// contains filtered or unexported fields
}
UserPushTokenDelete is the builder for deleting a UserPushToken entity.
func (*UserPushTokenDelete) Exec ¶
func (uptd *UserPushTokenDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserPushTokenDelete) ExecX ¶
func (uptd *UserPushTokenDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserPushTokenDelete) Where ¶
func (uptd *UserPushTokenDelete) Where(ps ...predicate.UserPushToken) *UserPushTokenDelete
Where adds a new predicate to the UserPushTokenDelete builder.
type UserPushTokenDeleteOne ¶
type UserPushTokenDeleteOne struct {
// contains filtered or unexported fields
}
UserPushTokenDeleteOne is the builder for deleting a single UserPushToken entity.
func (*UserPushTokenDeleteOne) Exec ¶
func (uptdo *UserPushTokenDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserPushTokenDeleteOne) ExecX ¶
func (uptdo *UserPushTokenDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserPushTokenGroupBy ¶
type UserPushTokenGroupBy struct {
// contains filtered or unexported fields
}
UserPushTokenGroupBy is the group-by builder for UserPushToken entities.
func (*UserPushTokenGroupBy) Aggregate ¶
func (uptgb *UserPushTokenGroupBy) Aggregate(fns ...AggregateFunc) *UserPushTokenGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserPushTokenGroupBy) Bool ¶
func (uptgb *UserPushTokenGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserPushTokenGroupBy) BoolX ¶
func (uptgb *UserPushTokenGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserPushTokenGroupBy) Bools ¶
func (uptgb *UserPushTokenGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*UserPushTokenGroupBy) BoolsX ¶
func (uptgb *UserPushTokenGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserPushTokenGroupBy) Float64 ¶
func (uptgb *UserPushTokenGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserPushTokenGroupBy) Float64X ¶
func (uptgb *UserPushTokenGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserPushTokenGroupBy) Float64s ¶
func (uptgb *UserPushTokenGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*UserPushTokenGroupBy) Float64sX ¶
func (uptgb *UserPushTokenGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserPushTokenGroupBy) Int ¶
func (uptgb *UserPushTokenGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserPushTokenGroupBy) IntX ¶
func (uptgb *UserPushTokenGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserPushTokenGroupBy) Ints ¶
func (uptgb *UserPushTokenGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*UserPushTokenGroupBy) IntsX ¶
func (uptgb *UserPushTokenGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserPushTokenGroupBy) Scan ¶
func (uptgb *UserPushTokenGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UserPushTokenGroupBy) ScanX ¶
func (uptgb *UserPushTokenGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserPushTokenGroupBy) String ¶
func (uptgb *UserPushTokenGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserPushTokenGroupBy) StringX ¶
func (uptgb *UserPushTokenGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserPushTokenMutation ¶
type UserPushTokenMutation struct {
// contains filtered or unexported fields
}
UserPushTokenMutation represents an operation that mutates the UserPushToken nodes in the graph.
func (*UserPushTokenMutation) AddField ¶
func (m *UserPushTokenMutation) 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 (*UserPushTokenMutation) AddedEdges ¶
func (m *UserPushTokenMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserPushTokenMutation) AddedField ¶
func (m *UserPushTokenMutation) 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 (*UserPushTokenMutation) AddedFields ¶
func (m *UserPushTokenMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserPushTokenMutation) AddedIDs ¶
func (m *UserPushTokenMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserPushTokenMutation) AppID ¶
func (m *UserPushTokenMutation) AppID() (r string, exists bool)
AppID returns the value of the "app_id" field in the mutation.
func (*UserPushTokenMutation) ClearEdge ¶
func (m *UserPushTokenMutation) 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 (*UserPushTokenMutation) ClearField ¶
func (m *UserPushTokenMutation) 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 (*UserPushTokenMutation) ClearedEdges ¶
func (m *UserPushTokenMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserPushTokenMutation) ClearedFields ¶
func (m *UserPushTokenMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserPushTokenMutation) Client ¶
func (m UserPushTokenMutation) 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 (*UserPushTokenMutation) CreatedAt ¶
func (m *UserPushTokenMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserPushTokenMutation) EdgeCleared ¶
func (m *UserPushTokenMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserPushTokenMutation) Field ¶
func (m *UserPushTokenMutation) 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 (*UserPushTokenMutation) FieldCleared ¶
func (m *UserPushTokenMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserPushTokenMutation) Fields ¶
func (m *UserPushTokenMutation) 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 (*UserPushTokenMutation) ID ¶
func (m *UserPushTokenMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*UserPushTokenMutation) OldAppID ¶
func (m *UserPushTokenMutation) OldAppID(ctx context.Context) (v string, err error)
OldAppID returns the old "app_id" field's value of the UserPushToken entity. If the UserPushToken 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 (*UserPushTokenMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the UserPushToken entity. If the UserPushToken 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 (*UserPushTokenMutation) 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 (*UserPushTokenMutation) OldToken ¶
func (m *UserPushTokenMutation) OldToken(ctx context.Context) (v string, err error)
OldToken returns the old "token" field's value of the UserPushToken entity. If the UserPushToken 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 (*UserPushTokenMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the UserPushToken entity. If the UserPushToken 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 (*UserPushTokenMutation) OldUserID ¶
func (m *UserPushTokenMutation) OldUserID(ctx context.Context) (v string, err error)
OldUserID returns the old "user_id" field's value of the UserPushToken entity. If the UserPushToken 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 (*UserPushTokenMutation) Op ¶
func (m *UserPushTokenMutation) Op() Op
Op returns the operation name.
func (*UserPushTokenMutation) RemovedEdges ¶
func (m *UserPushTokenMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserPushTokenMutation) RemovedIDs ¶
func (m *UserPushTokenMutation) 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 (*UserPushTokenMutation) ResetAppID ¶
func (m *UserPushTokenMutation) ResetAppID()
ResetAppID resets all changes to the "app_id" field.
func (*UserPushTokenMutation) ResetCreatedAt ¶
func (m *UserPushTokenMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserPushTokenMutation) ResetEdge ¶
func (m *UserPushTokenMutation) 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 (*UserPushTokenMutation) ResetField ¶
func (m *UserPushTokenMutation) 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 (*UserPushTokenMutation) ResetToken ¶
func (m *UserPushTokenMutation) ResetToken()
ResetToken resets all changes to the "token" field.
func (*UserPushTokenMutation) ResetUpdatedAt ¶
func (m *UserPushTokenMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserPushTokenMutation) ResetUserID ¶
func (m *UserPushTokenMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*UserPushTokenMutation) SetAppID ¶
func (m *UserPushTokenMutation) SetAppID(s string)
SetAppID sets the "app_id" field.
func (*UserPushTokenMutation) SetCreatedAt ¶
func (m *UserPushTokenMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserPushTokenMutation) SetField ¶
func (m *UserPushTokenMutation) 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 (*UserPushTokenMutation) SetToken ¶
func (m *UserPushTokenMutation) SetToken(s string)
SetToken sets the "token" field.
func (*UserPushTokenMutation) SetUpdatedAt ¶
func (m *UserPushTokenMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*UserPushTokenMutation) SetUserID ¶
func (m *UserPushTokenMutation) SetUserID(s string)
SetUserID sets the "user_id" field.
func (*UserPushTokenMutation) Token ¶
func (m *UserPushTokenMutation) Token() (r string, exists bool)
Token returns the value of the "token" field in the mutation.
func (UserPushTokenMutation) Tx ¶
func (m UserPushTokenMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserPushTokenMutation) Type ¶
func (m *UserPushTokenMutation) Type() string
Type returns the node type of this mutation (UserPushToken).
func (*UserPushTokenMutation) UpdatedAt ¶
func (m *UserPushTokenMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UserPushTokenMutation) UserID ¶
func (m *UserPushTokenMutation) UserID() (r string, exists bool)
UserID returns the value of the "user_id" field in the mutation.
type UserPushTokenQuery ¶
type UserPushTokenQuery struct {
// contains filtered or unexported fields
}
UserPushTokenQuery is the builder for querying UserPushToken entities.
func (*UserPushTokenQuery) All ¶
func (uptq *UserPushTokenQuery) All(ctx context.Context) ([]*UserPushToken, error)
All executes the query and returns a list of UserPushTokens.
func (*UserPushTokenQuery) AllX ¶
func (uptq *UserPushTokenQuery) AllX(ctx context.Context) []*UserPushToken
AllX is like All, but panics if an error occurs.
func (*UserPushTokenQuery) Clone ¶
func (uptq *UserPushTokenQuery) Clone() *UserPushTokenQuery
Clone returns a duplicate of the UserPushTokenQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserPushTokenQuery) Count ¶
func (uptq *UserPushTokenQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserPushTokenQuery) CountX ¶
func (uptq *UserPushTokenQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserPushTokenQuery) Exist ¶
func (uptq *UserPushTokenQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserPushTokenQuery) ExistX ¶
func (uptq *UserPushTokenQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserPushTokenQuery) First ¶
func (uptq *UserPushTokenQuery) First(ctx context.Context) (*UserPushToken, error)
First returns the first UserPushToken entity from the query. Returns a *NotFoundError when no UserPushToken was found.
func (*UserPushTokenQuery) FirstID ¶
func (uptq *UserPushTokenQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserPushToken ID from the query. Returns a *NotFoundError when no UserPushToken ID was found.
func (*UserPushTokenQuery) FirstIDX ¶
func (uptq *UserPushTokenQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserPushTokenQuery) FirstX ¶
func (uptq *UserPushTokenQuery) FirstX(ctx context.Context) *UserPushToken
FirstX is like First, but panics if an error occurs.
func (*UserPushTokenQuery) GroupBy ¶
func (uptq *UserPushTokenQuery) GroupBy(field string, fields ...string) *UserPushTokenGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
UserID string `json:"user_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.UserPushToken.Query().
GroupBy(userpushtoken.FieldUserID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*UserPushTokenQuery) IDs ¶
func (uptq *UserPushTokenQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of UserPushToken IDs.
func (*UserPushTokenQuery) IDsX ¶
func (uptq *UserPushTokenQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserPushTokenQuery) Limit ¶
func (uptq *UserPushTokenQuery) Limit(limit int) *UserPushTokenQuery
Limit adds a limit step to the query.
func (*UserPushTokenQuery) Offset ¶
func (uptq *UserPushTokenQuery) Offset(offset int) *UserPushTokenQuery
Offset adds an offset step to the query.
func (*UserPushTokenQuery) Only ¶
func (uptq *UserPushTokenQuery) Only(ctx context.Context) (*UserPushToken, error)
Only returns a single UserPushToken entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one UserPushToken entity is not found. Returns a *NotFoundError when no UserPushToken entities are found.
func (*UserPushTokenQuery) OnlyID ¶
func (uptq *UserPushTokenQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UserPushToken ID in the query. Returns a *NotSingularError when exactly one UserPushToken ID is not found. Returns a *NotFoundError when no entities are found.
func (*UserPushTokenQuery) OnlyIDX ¶
func (uptq *UserPushTokenQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserPushTokenQuery) OnlyX ¶
func (uptq *UserPushTokenQuery) OnlyX(ctx context.Context) *UserPushToken
OnlyX is like Only, but panics if an error occurs.
func (*UserPushTokenQuery) Order ¶
func (uptq *UserPushTokenQuery) Order(o ...OrderFunc) *UserPushTokenQuery
Order adds an order step to the query.
func (*UserPushTokenQuery) Select ¶
func (uptq *UserPushTokenQuery) Select(field string, fields ...string) *UserPushTokenSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
UserID string `json:"user_id,omitempty"`
}
client.UserPushToken.Query().
Select(userpushtoken.FieldUserID).
Scan(ctx, &v)
func (*UserPushTokenQuery) Unique ¶
func (uptq *UserPushTokenQuery) Unique(unique bool) *UserPushTokenQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserPushTokenQuery) Where ¶
func (uptq *UserPushTokenQuery) Where(ps ...predicate.UserPushToken) *UserPushTokenQuery
Where adds a new predicate for the UserPushTokenQuery builder.
type UserPushTokenSelect ¶
type UserPushTokenSelect struct {
*UserPushTokenQuery
// contains filtered or unexported fields
}
UserPushTokenSelect is the builder for selecting fields of UserPushToken entities.
func (*UserPushTokenSelect) Bool ¶
func (upts *UserPushTokenSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserPushTokenSelect) BoolX ¶
func (upts *UserPushTokenSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserPushTokenSelect) Bools ¶
func (upts *UserPushTokenSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserPushTokenSelect) BoolsX ¶
func (upts *UserPushTokenSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserPushTokenSelect) Float64 ¶
func (upts *UserPushTokenSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserPushTokenSelect) Float64X ¶
func (upts *UserPushTokenSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserPushTokenSelect) Float64s ¶
func (upts *UserPushTokenSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserPushTokenSelect) Float64sX ¶
func (upts *UserPushTokenSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserPushTokenSelect) Int ¶
func (upts *UserPushTokenSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserPushTokenSelect) IntX ¶
func (upts *UserPushTokenSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserPushTokenSelect) Ints ¶
func (upts *UserPushTokenSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserPushTokenSelect) IntsX ¶
func (upts *UserPushTokenSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserPushTokenSelect) Scan ¶
func (upts *UserPushTokenSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UserPushTokenSelect) ScanX ¶
func (upts *UserPushTokenSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserPushTokenSelect) String ¶
func (upts *UserPushTokenSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UserPushTokenSelect) StringX ¶
func (upts *UserPushTokenSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserPushTokenUpdate ¶
type UserPushTokenUpdate struct {
// contains filtered or unexported fields
}
UserPushTokenUpdate is the builder for updating UserPushToken entities.
func (*UserPushTokenUpdate) Exec ¶
func (uptu *UserPushTokenUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserPushTokenUpdate) ExecX ¶
func (uptu *UserPushTokenUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserPushTokenUpdate) Mutation ¶
func (uptu *UserPushTokenUpdate) Mutation() *UserPushTokenMutation
Mutation returns the UserPushTokenMutation object of the builder.
func (*UserPushTokenUpdate) Save ¶
func (uptu *UserPushTokenUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserPushTokenUpdate) SaveX ¶
func (uptu *UserPushTokenUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserPushTokenUpdate) SetAppID ¶
func (uptu *UserPushTokenUpdate) SetAppID(s string) *UserPushTokenUpdate
SetAppID sets the "app_id" field.
func (*UserPushTokenUpdate) SetCreatedAt ¶
func (uptu *UserPushTokenUpdate) SetCreatedAt(t time.Time) *UserPushTokenUpdate
SetCreatedAt sets the "created_at" field.
func (*UserPushTokenUpdate) SetNillableCreatedAt ¶
func (uptu *UserPushTokenUpdate) SetNillableCreatedAt(t *time.Time) *UserPushTokenUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserPushTokenUpdate) SetToken ¶
func (uptu *UserPushTokenUpdate) SetToken(s string) *UserPushTokenUpdate
SetToken sets the "token" field.
func (*UserPushTokenUpdate) SetUpdatedAt ¶
func (uptu *UserPushTokenUpdate) SetUpdatedAt(t time.Time) *UserPushTokenUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserPushTokenUpdate) SetUserID ¶
func (uptu *UserPushTokenUpdate) SetUserID(s string) *UserPushTokenUpdate
SetUserID sets the "user_id" field.
func (*UserPushTokenUpdate) Where ¶
func (uptu *UserPushTokenUpdate) Where(ps ...predicate.UserPushToken) *UserPushTokenUpdate
Where adds a new predicate for the UserPushTokenUpdate builder.
type UserPushTokenUpdateOne ¶
type UserPushTokenUpdateOne struct {
// contains filtered or unexported fields
}
UserPushTokenUpdateOne is the builder for updating a single UserPushToken entity.
func (*UserPushTokenUpdateOne) Exec ¶
func (uptuo *UserPushTokenUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserPushTokenUpdateOne) ExecX ¶
func (uptuo *UserPushTokenUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserPushTokenUpdateOne) Mutation ¶
func (uptuo *UserPushTokenUpdateOne) Mutation() *UserPushTokenMutation
Mutation returns the UserPushTokenMutation object of the builder.
func (*UserPushTokenUpdateOne) Save ¶
func (uptuo *UserPushTokenUpdateOne) Save(ctx context.Context) (*UserPushToken, error)
Save executes the query and returns the updated UserPushToken entity.
func (*UserPushTokenUpdateOne) SaveX ¶
func (uptuo *UserPushTokenUpdateOne) SaveX(ctx context.Context) *UserPushToken
SaveX is like Save, but panics if an error occurs.
func (*UserPushTokenUpdateOne) Select ¶
func (uptuo *UserPushTokenUpdateOne) Select(field string, fields ...string) *UserPushTokenUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserPushTokenUpdateOne) SetAppID ¶
func (uptuo *UserPushTokenUpdateOne) SetAppID(s string) *UserPushTokenUpdateOne
SetAppID sets the "app_id" field.
func (*UserPushTokenUpdateOne) SetCreatedAt ¶
func (uptuo *UserPushTokenUpdateOne) SetCreatedAt(t time.Time) *UserPushTokenUpdateOne
SetCreatedAt sets the "created_at" field.
func (*UserPushTokenUpdateOne) SetNillableCreatedAt ¶
func (uptuo *UserPushTokenUpdateOne) SetNillableCreatedAt(t *time.Time) *UserPushTokenUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserPushTokenUpdateOne) SetToken ¶
func (uptuo *UserPushTokenUpdateOne) SetToken(s string) *UserPushTokenUpdateOne
SetToken sets the "token" field.
func (*UserPushTokenUpdateOne) SetUpdatedAt ¶
func (uptuo *UserPushTokenUpdateOne) SetUpdatedAt(t time.Time) *UserPushTokenUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserPushTokenUpdateOne) SetUserID ¶
func (uptuo *UserPushTokenUpdateOne) SetUserID(s string) *UserPushTokenUpdateOne
SetUserID sets the "user_id" field.
type UserPushTokens ¶
type UserPushTokens []*UserPushToken
UserPushTokens is a parsable slice of UserPushToken.
type ValidationError ¶
type ValidationError struct {
Name string // Field or edge name.
// contains filtered or unexported fields
}
ValidationError returns when validating a field fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files
¶
- client.go
- config.go
- context.go
- ent.go
- generate.go
- mutation.go
- runtime.go
- tx.go
- userplatformtokens.go
- userplatformtokens_create.go
- userplatformtokens_delete.go
- userplatformtokens_query.go
- userplatformtokens_update.go
- userpushtoken.go
- userpushtoken_create.go
- userpushtoken_delete.go
- userpushtoken_query.go
- userpushtoken_update.go