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
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RdMessage
- type RdMessageClient
- func (c *RdMessageClient) Create() *RdMessageCreate
- func (c *RdMessageClient) CreateBulk(builders ...*RdMessageCreate) *RdMessageCreateBulk
- func (c *RdMessageClient) Delete() *RdMessageDelete
- func (c *RdMessageClient) DeleteOne(rm *RdMessage) *RdMessageDeleteOne
- func (c *RdMessageClient) DeleteOneID(id int32) *RdMessageDeleteOne
- func (c *RdMessageClient) Get(ctx context.Context, id int32) (*RdMessage, error)
- func (c *RdMessageClient) GetX(ctx context.Context, id int32) *RdMessage
- func (c *RdMessageClient) Hooks() []Hook
- func (c *RdMessageClient) Intercept(interceptors ...Interceptor)
- func (c *RdMessageClient) Interceptors() []Interceptor
- func (c *RdMessageClient) Query() *RdMessageQuery
- func (c *RdMessageClient) Update() *RdMessageUpdate
- func (c *RdMessageClient) UpdateOne(rm *RdMessage) *RdMessageUpdateOne
- func (c *RdMessageClient) UpdateOneID(id int32) *RdMessageUpdateOne
- func (c *RdMessageClient) Use(hooks ...Hook)
- type RdMessageCreate
- func (rmc *RdMessageCreate) Exec(ctx context.Context) error
- func (rmc *RdMessageCreate) ExecX(ctx context.Context)
- func (rmc *RdMessageCreate) Mutation() *RdMessageMutation
- func (rmc *RdMessageCreate) Save(ctx context.Context) (*RdMessage, error)
- func (rmc *RdMessageCreate) SaveX(ctx context.Context) *RdMessage
- func (rmc *RdMessageCreate) SetContent(b *biz.Content) *RdMessageCreate
- func (rmc *RdMessageCreate) SetCreateTime(t time.Time) *RdMessageCreate
- func (rmc *RdMessageCreate) SetID(i int32) *RdMessageCreate
- func (rmc *RdMessageCreate) SetNillableCreateTime(t *time.Time) *RdMessageCreate
- func (rmc *RdMessageCreate) SetNillableRecverUID(i *int32) *RdMessageCreate
- func (rmc *RdMessageCreate) SetNillableSenderUID(i *int32) *RdMessageCreate
- func (rmc *RdMessageCreate) SetRecverUID(i int32) *RdMessageCreate
- func (rmc *RdMessageCreate) SetSenderUID(i int32) *RdMessageCreate
- type RdMessageCreateBulk
- type RdMessageDelete
- type RdMessageDeleteOne
- type RdMessageGroupBy
- func (rmgb *RdMessageGroupBy) Aggregate(fns ...AggregateFunc) *RdMessageGroupBy
- func (s *RdMessageGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RdMessageGroupBy) BoolX(ctx context.Context) bool
- func (s *RdMessageGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RdMessageGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RdMessageGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RdMessageGroupBy) Float64X(ctx context.Context) float64
- func (s *RdMessageGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RdMessageGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RdMessageGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RdMessageGroupBy) IntX(ctx context.Context) int
- func (s *RdMessageGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RdMessageGroupBy) IntsX(ctx context.Context) []int
- func (rmgb *RdMessageGroupBy) Scan(ctx context.Context, v any) error
- func (s *RdMessageGroupBy) ScanX(ctx context.Context, v any)
- func (s *RdMessageGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RdMessageGroupBy) StringX(ctx context.Context) string
- func (s *RdMessageGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RdMessageGroupBy) StringsX(ctx context.Context) []string
- type RdMessageMutation
- func (m *RdMessageMutation) AddField(name string, value ent.Value) error
- func (m *RdMessageMutation) AddRecverUID(i int32)
- func (m *RdMessageMutation) AddSenderUID(i int32)
- func (m *RdMessageMutation) AddedEdges() []string
- func (m *RdMessageMutation) AddedField(name string) (ent.Value, bool)
- func (m *RdMessageMutation) AddedFields() []string
- func (m *RdMessageMutation) AddedIDs(name string) []ent.Value
- func (m *RdMessageMutation) AddedRecverUID() (r int32, exists bool)
- func (m *RdMessageMutation) AddedSenderUID() (r int32, exists bool)
- func (m *RdMessageMutation) ClearEdge(name string) error
- func (m *RdMessageMutation) ClearField(name string) error
- func (m *RdMessageMutation) ClearRecverUID()
- func (m *RdMessageMutation) ClearSenderUID()
- func (m *RdMessageMutation) ClearedEdges() []string
- func (m *RdMessageMutation) ClearedFields() []string
- func (m RdMessageMutation) Client() *Client
- func (m *RdMessageMutation) Content() (r *biz.Content, exists bool)
- func (m *RdMessageMutation) CreateTime() (r time.Time, exists bool)
- func (m *RdMessageMutation) EdgeCleared(name string) bool
- func (m *RdMessageMutation) Field(name string) (ent.Value, bool)
- func (m *RdMessageMutation) FieldCleared(name string) bool
- func (m *RdMessageMutation) Fields() []string
- func (m *RdMessageMutation) ID() (id int32, exists bool)
- func (m *RdMessageMutation) IDs(ctx context.Context) ([]int32, error)
- func (m *RdMessageMutation) OldContent(ctx context.Context) (v *biz.Content, err error)
- func (m *RdMessageMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *RdMessageMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RdMessageMutation) OldRecverUID(ctx context.Context) (v int32, err error)
- func (m *RdMessageMutation) OldSenderUID(ctx context.Context) (v int32, err error)
- func (m *RdMessageMutation) Op() Op
- func (m *RdMessageMutation) RecverUID() (r int32, exists bool)
- func (m *RdMessageMutation) RecverUIDCleared() bool
- func (m *RdMessageMutation) RemovedEdges() []string
- func (m *RdMessageMutation) RemovedIDs(name string) []ent.Value
- func (m *RdMessageMutation) ResetContent()
- func (m *RdMessageMutation) ResetCreateTime()
- func (m *RdMessageMutation) ResetEdge(name string) error
- func (m *RdMessageMutation) ResetField(name string) error
- func (m *RdMessageMutation) ResetRecverUID()
- func (m *RdMessageMutation) ResetSenderUID()
- func (m *RdMessageMutation) SenderUID() (r int32, exists bool)
- func (m *RdMessageMutation) SenderUIDCleared() bool
- func (m *RdMessageMutation) SetContent(b *biz.Content)
- func (m *RdMessageMutation) SetCreateTime(t time.Time)
- func (m *RdMessageMutation) SetField(name string, value ent.Value) error
- func (m *RdMessageMutation) SetID(id int32)
- func (m *RdMessageMutation) SetOp(op Op)
- func (m *RdMessageMutation) SetRecverUID(i int32)
- func (m *RdMessageMutation) SetSenderUID(i int32)
- func (m RdMessageMutation) Tx() (*Tx, error)
- func (m *RdMessageMutation) Type() string
- func (m *RdMessageMutation) Where(ps ...predicate.RdMessage)
- func (m *RdMessageMutation) WhereP(ps ...func(*sql.Selector))
- type RdMessageQuery
- func (rmq *RdMessageQuery) Aggregate(fns ...AggregateFunc) *RdMessageSelect
- func (rmq *RdMessageQuery) All(ctx context.Context) ([]*RdMessage, error)
- func (rmq *RdMessageQuery) AllX(ctx context.Context) []*RdMessage
- func (rmq *RdMessageQuery) Clone() *RdMessageQuery
- func (rmq *RdMessageQuery) Count(ctx context.Context) (int, error)
- func (rmq *RdMessageQuery) CountX(ctx context.Context) int
- func (rmq *RdMessageQuery) Exist(ctx context.Context) (bool, error)
- func (rmq *RdMessageQuery) ExistX(ctx context.Context) bool
- func (rmq *RdMessageQuery) First(ctx context.Context) (*RdMessage, error)
- func (rmq *RdMessageQuery) FirstID(ctx context.Context) (id int32, err error)
- func (rmq *RdMessageQuery) FirstIDX(ctx context.Context) int32
- func (rmq *RdMessageQuery) FirstX(ctx context.Context) *RdMessage
- func (rmq *RdMessageQuery) GroupBy(field string, fields ...string) *RdMessageGroupBy
- func (rmq *RdMessageQuery) IDs(ctx context.Context) ([]int32, error)
- func (rmq *RdMessageQuery) IDsX(ctx context.Context) []int32
- func (rmq *RdMessageQuery) Limit(limit int) *RdMessageQuery
- func (rmq *RdMessageQuery) Offset(offset int) *RdMessageQuery
- func (rmq *RdMessageQuery) Only(ctx context.Context) (*RdMessage, error)
- func (rmq *RdMessageQuery) OnlyID(ctx context.Context) (id int32, err error)
- func (rmq *RdMessageQuery) OnlyIDX(ctx context.Context) int32
- func (rmq *RdMessageQuery) OnlyX(ctx context.Context) *RdMessage
- func (rmq *RdMessageQuery) Order(o ...OrderFunc) *RdMessageQuery
- func (rmq *RdMessageQuery) Select(fields ...string) *RdMessageSelect
- func (rmq *RdMessageQuery) Unique(unique bool) *RdMessageQuery
- func (rmq *RdMessageQuery) Where(ps ...predicate.RdMessage) *RdMessageQuery
- type RdMessageSelect
- func (rms *RdMessageSelect) Aggregate(fns ...AggregateFunc) *RdMessageSelect
- func (s *RdMessageSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RdMessageSelect) BoolX(ctx context.Context) bool
- func (s *RdMessageSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RdMessageSelect) BoolsX(ctx context.Context) []bool
- func (s *RdMessageSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RdMessageSelect) Float64X(ctx context.Context) float64
- func (s *RdMessageSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RdMessageSelect) Float64sX(ctx context.Context) []float64
- func (s *RdMessageSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RdMessageSelect) IntX(ctx context.Context) int
- func (s *RdMessageSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RdMessageSelect) IntsX(ctx context.Context) []int
- func (rms *RdMessageSelect) Scan(ctx context.Context, v any) error
- func (s *RdMessageSelect) ScanX(ctx context.Context, v any)
- func (s *RdMessageSelect) String(ctx context.Context) (_ string, err error)
- func (s *RdMessageSelect) StringX(ctx context.Context) string
- func (s *RdMessageSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RdMessageSelect) StringsX(ctx context.Context) []string
- type RdMessageUpdate
- func (rmu *RdMessageUpdate) AddRecverUID(i int32) *RdMessageUpdate
- func (rmu *RdMessageUpdate) AddSenderUID(i int32) *RdMessageUpdate
- func (rmu *RdMessageUpdate) ClearRecverUID() *RdMessageUpdate
- func (rmu *RdMessageUpdate) ClearSenderUID() *RdMessageUpdate
- func (rmu *RdMessageUpdate) Exec(ctx context.Context) error
- func (rmu *RdMessageUpdate) ExecX(ctx context.Context)
- func (rmu *RdMessageUpdate) Mutation() *RdMessageMutation
- func (rmu *RdMessageUpdate) Save(ctx context.Context) (int, error)
- func (rmu *RdMessageUpdate) SaveX(ctx context.Context) int
- func (rmu *RdMessageUpdate) SetContent(b *biz.Content) *RdMessageUpdate
- func (rmu *RdMessageUpdate) SetCreateTime(t time.Time) *RdMessageUpdate
- func (rmu *RdMessageUpdate) SetNillableCreateTime(t *time.Time) *RdMessageUpdate
- func (rmu *RdMessageUpdate) SetNillableRecverUID(i *int32) *RdMessageUpdate
- func (rmu *RdMessageUpdate) SetNillableSenderUID(i *int32) *RdMessageUpdate
- func (rmu *RdMessageUpdate) SetRecverUID(i int32) *RdMessageUpdate
- func (rmu *RdMessageUpdate) SetSenderUID(i int32) *RdMessageUpdate
- func (rmu *RdMessageUpdate) Where(ps ...predicate.RdMessage) *RdMessageUpdate
- type RdMessageUpdateOne
- func (rmuo *RdMessageUpdateOne) AddRecverUID(i int32) *RdMessageUpdateOne
- func (rmuo *RdMessageUpdateOne) AddSenderUID(i int32) *RdMessageUpdateOne
- func (rmuo *RdMessageUpdateOne) ClearRecverUID() *RdMessageUpdateOne
- func (rmuo *RdMessageUpdateOne) ClearSenderUID() *RdMessageUpdateOne
- func (rmuo *RdMessageUpdateOne) Exec(ctx context.Context) error
- func (rmuo *RdMessageUpdateOne) ExecX(ctx context.Context)
- func (rmuo *RdMessageUpdateOne) Mutation() *RdMessageMutation
- func (rmuo *RdMessageUpdateOne) Save(ctx context.Context) (*RdMessage, error)
- func (rmuo *RdMessageUpdateOne) SaveX(ctx context.Context) *RdMessage
- func (rmuo *RdMessageUpdateOne) Select(field string, fields ...string) *RdMessageUpdateOne
- func (rmuo *RdMessageUpdateOne) SetContent(b *biz.Content) *RdMessageUpdateOne
- func (rmuo *RdMessageUpdateOne) SetCreateTime(t time.Time) *RdMessageUpdateOne
- func (rmuo *RdMessageUpdateOne) SetNillableCreateTime(t *time.Time) *RdMessageUpdateOne
- func (rmuo *RdMessageUpdateOne) SetNillableRecverUID(i *int32) *RdMessageUpdateOne
- func (rmuo *RdMessageUpdateOne) SetNillableSenderUID(i *int32) *RdMessageUpdateOne
- func (rmuo *RdMessageUpdateOne) SetRecverUID(i int32) *RdMessageUpdateOne
- func (rmuo *RdMessageUpdateOne) SetSenderUID(i int32) *RdMessageUpdateOne
- type RdMessages
- type RdMoment
- type RdMomentClient
- func (c *RdMomentClient) Create() *RdMomentCreate
- func (c *RdMomentClient) CreateBulk(builders ...*RdMomentCreate) *RdMomentCreateBulk
- func (c *RdMomentClient) Delete() *RdMomentDelete
- func (c *RdMomentClient) DeleteOne(rm *RdMoment) *RdMomentDeleteOne
- func (c *RdMomentClient) DeleteOneID(id int64) *RdMomentDeleteOne
- func (c *RdMomentClient) Get(ctx context.Context, id int64) (*RdMoment, error)
- func (c *RdMomentClient) GetX(ctx context.Context, id int64) *RdMoment
- func (c *RdMomentClient) Hooks() []Hook
- func (c *RdMomentClient) Intercept(interceptors ...Interceptor)
- func (c *RdMomentClient) Interceptors() []Interceptor
- func (c *RdMomentClient) Query() *RdMomentQuery
- func (c *RdMomentClient) Update() *RdMomentUpdate
- func (c *RdMomentClient) UpdateOne(rm *RdMoment) *RdMomentUpdateOne
- func (c *RdMomentClient) UpdateOneID(id int64) *RdMomentUpdateOne
- func (c *RdMomentClient) Use(hooks ...Hook)
- type RdMomentCreate
- func (rmc *RdMomentCreate) Exec(ctx context.Context) error
- func (rmc *RdMomentCreate) ExecX(ctx context.Context)
- func (rmc *RdMomentCreate) Mutation() *RdMomentMutation
- func (rmc *RdMomentCreate) Save(ctx context.Context) (*RdMoment, error)
- func (rmc *RdMomentCreate) SaveX(ctx context.Context) *RdMoment
- func (rmc *RdMomentCreate) SetByUID(i int32) *RdMomentCreate
- func (rmc *RdMomentCreate) SetID(i int64) *RdMomentCreate
- func (rmc *RdMomentCreate) SetImgs(s []string) *RdMomentCreate
- func (rmc *RdMomentCreate) SetNillableByUID(i *int32) *RdMomentCreate
- func (rmc *RdMomentCreate) SetNillablePublishTime(t *time.Time) *RdMomentCreate
- func (rmc *RdMomentCreate) SetNillableStatus(i *int32) *RdMomentCreate
- func (rmc *RdMomentCreate) SetNillableType(i *int32) *RdMomentCreate
- func (rmc *RdMomentCreate) SetPublishTime(t time.Time) *RdMomentCreate
- func (rmc *RdMomentCreate) SetStatus(i int32) *RdMomentCreate
- func (rmc *RdMomentCreate) SetTxt(s string) *RdMomentCreate
- func (rmc *RdMomentCreate) SetType(i int32) *RdMomentCreate
- type RdMomentCreateBulk
- type RdMomentDelete
- type RdMomentDeleteOne
- type RdMomentGroupBy
- func (rmgb *RdMomentGroupBy) Aggregate(fns ...AggregateFunc) *RdMomentGroupBy
- func (s *RdMomentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RdMomentGroupBy) BoolX(ctx context.Context) bool
- func (s *RdMomentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RdMomentGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RdMomentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RdMomentGroupBy) Float64X(ctx context.Context) float64
- func (s *RdMomentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RdMomentGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RdMomentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RdMomentGroupBy) IntX(ctx context.Context) int
- func (s *RdMomentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RdMomentGroupBy) IntsX(ctx context.Context) []int
- func (rmgb *RdMomentGroupBy) Scan(ctx context.Context, v any) error
- func (s *RdMomentGroupBy) ScanX(ctx context.Context, v any)
- func (s *RdMomentGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RdMomentGroupBy) StringX(ctx context.Context) string
- func (s *RdMomentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RdMomentGroupBy) StringsX(ctx context.Context) []string
- type RdMomentMutation
- func (m *RdMomentMutation) AddByUID(i int32)
- func (m *RdMomentMutation) AddField(name string, value ent.Value) error
- func (m *RdMomentMutation) AddStatus(i int32)
- func (m *RdMomentMutation) AddType(i int32)
- func (m *RdMomentMutation) AddedByUID() (r int32, exists bool)
- func (m *RdMomentMutation) AddedEdges() []string
- func (m *RdMomentMutation) AddedField(name string) (ent.Value, bool)
- func (m *RdMomentMutation) AddedFields() []string
- func (m *RdMomentMutation) AddedIDs(name string) []ent.Value
- func (m *RdMomentMutation) AddedStatus() (r int32, exists bool)
- func (m *RdMomentMutation) AddedType() (r int32, exists bool)
- func (m *RdMomentMutation) AppendImgs(s []string)
- func (m *RdMomentMutation) AppendedImgs() ([]string, bool)
- func (m *RdMomentMutation) ByUID() (r int32, exists bool)
- func (m *RdMomentMutation) ByUIDCleared() bool
- func (m *RdMomentMutation) ClearByUID()
- func (m *RdMomentMutation) ClearEdge(name string) error
- func (m *RdMomentMutation) ClearField(name string) error
- func (m *RdMomentMutation) ClearStatus()
- func (m *RdMomentMutation) ClearType()
- func (m *RdMomentMutation) ClearedEdges() []string
- func (m *RdMomentMutation) ClearedFields() []string
- func (m RdMomentMutation) Client() *Client
- func (m *RdMomentMutation) EdgeCleared(name string) bool
- func (m *RdMomentMutation) Field(name string) (ent.Value, bool)
- func (m *RdMomentMutation) FieldCleared(name string) bool
- func (m *RdMomentMutation) Fields() []string
- func (m *RdMomentMutation) GetType() (r int32, exists bool)
- func (m *RdMomentMutation) ID() (id int64, exists bool)
- func (m *RdMomentMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *RdMomentMutation) Imgs() (r []string, exists bool)
- func (m *RdMomentMutation) OldByUID(ctx context.Context) (v int32, err error)
- func (m *RdMomentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RdMomentMutation) OldImgs(ctx context.Context) (v []string, err error)
- func (m *RdMomentMutation) OldPublishTime(ctx context.Context) (v time.Time, err error)
- func (m *RdMomentMutation) OldStatus(ctx context.Context) (v int32, err error)
- func (m *RdMomentMutation) OldTxt(ctx context.Context) (v string, err error)
- func (m *RdMomentMutation) OldType(ctx context.Context) (v int32, err error)
- func (m *RdMomentMutation) Op() Op
- func (m *RdMomentMutation) PublishTime() (r time.Time, exists bool)
- func (m *RdMomentMutation) RemovedEdges() []string
- func (m *RdMomentMutation) RemovedIDs(name string) []ent.Value
- func (m *RdMomentMutation) ResetByUID()
- func (m *RdMomentMutation) ResetEdge(name string) error
- func (m *RdMomentMutation) ResetField(name string) error
- func (m *RdMomentMutation) ResetImgs()
- func (m *RdMomentMutation) ResetPublishTime()
- func (m *RdMomentMutation) ResetStatus()
- func (m *RdMomentMutation) ResetTxt()
- func (m *RdMomentMutation) ResetType()
- func (m *RdMomentMutation) SetByUID(i int32)
- func (m *RdMomentMutation) SetField(name string, value ent.Value) error
- func (m *RdMomentMutation) SetID(id int64)
- func (m *RdMomentMutation) SetImgs(s []string)
- func (m *RdMomentMutation) SetOp(op Op)
- func (m *RdMomentMutation) SetPublishTime(t time.Time)
- func (m *RdMomentMutation) SetStatus(i int32)
- func (m *RdMomentMutation) SetTxt(s string)
- func (m *RdMomentMutation) SetType(i int32)
- func (m *RdMomentMutation) Status() (r int32, exists bool)
- func (m *RdMomentMutation) StatusCleared() bool
- func (m RdMomentMutation) Tx() (*Tx, error)
- func (m *RdMomentMutation) Txt() (r string, exists bool)
- func (m *RdMomentMutation) Type() string
- func (m *RdMomentMutation) TypeCleared() bool
- func (m *RdMomentMutation) Where(ps ...predicate.RdMoment)
- func (m *RdMomentMutation) WhereP(ps ...func(*sql.Selector))
- type RdMomentQuery
- func (rmq *RdMomentQuery) Aggregate(fns ...AggregateFunc) *RdMomentSelect
- func (rmq *RdMomentQuery) All(ctx context.Context) ([]*RdMoment, error)
- func (rmq *RdMomentQuery) AllX(ctx context.Context) []*RdMoment
- func (rmq *RdMomentQuery) Clone() *RdMomentQuery
- func (rmq *RdMomentQuery) Count(ctx context.Context) (int, error)
- func (rmq *RdMomentQuery) CountX(ctx context.Context) int
- func (rmq *RdMomentQuery) Exist(ctx context.Context) (bool, error)
- func (rmq *RdMomentQuery) ExistX(ctx context.Context) bool
- func (rmq *RdMomentQuery) First(ctx context.Context) (*RdMoment, error)
- func (rmq *RdMomentQuery) FirstID(ctx context.Context) (id int64, err error)
- func (rmq *RdMomentQuery) FirstIDX(ctx context.Context) int64
- func (rmq *RdMomentQuery) FirstX(ctx context.Context) *RdMoment
- func (rmq *RdMomentQuery) GroupBy(field string, fields ...string) *RdMomentGroupBy
- func (rmq *RdMomentQuery) IDs(ctx context.Context) ([]int64, error)
- func (rmq *RdMomentQuery) IDsX(ctx context.Context) []int64
- func (rmq *RdMomentQuery) Limit(limit int) *RdMomentQuery
- func (rmq *RdMomentQuery) Offset(offset int) *RdMomentQuery
- func (rmq *RdMomentQuery) Only(ctx context.Context) (*RdMoment, error)
- func (rmq *RdMomentQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (rmq *RdMomentQuery) OnlyIDX(ctx context.Context) int64
- func (rmq *RdMomentQuery) OnlyX(ctx context.Context) *RdMoment
- func (rmq *RdMomentQuery) Order(o ...OrderFunc) *RdMomentQuery
- func (rmq *RdMomentQuery) Select(fields ...string) *RdMomentSelect
- func (rmq *RdMomentQuery) Unique(unique bool) *RdMomentQuery
- func (rmq *RdMomentQuery) Where(ps ...predicate.RdMoment) *RdMomentQuery
- type RdMomentSelect
- func (rms *RdMomentSelect) Aggregate(fns ...AggregateFunc) *RdMomentSelect
- func (s *RdMomentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RdMomentSelect) BoolX(ctx context.Context) bool
- func (s *RdMomentSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RdMomentSelect) BoolsX(ctx context.Context) []bool
- func (s *RdMomentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RdMomentSelect) Float64X(ctx context.Context) float64
- func (s *RdMomentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RdMomentSelect) Float64sX(ctx context.Context) []float64
- func (s *RdMomentSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RdMomentSelect) IntX(ctx context.Context) int
- func (s *RdMomentSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RdMomentSelect) IntsX(ctx context.Context) []int
- func (rms *RdMomentSelect) Scan(ctx context.Context, v any) error
- func (s *RdMomentSelect) ScanX(ctx context.Context, v any)
- func (s *RdMomentSelect) String(ctx context.Context) (_ string, err error)
- func (s *RdMomentSelect) StringX(ctx context.Context) string
- func (s *RdMomentSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RdMomentSelect) StringsX(ctx context.Context) []string
- type RdMomentUpdate
- func (rmu *RdMomentUpdate) AddByUID(i int32) *RdMomentUpdate
- func (rmu *RdMomentUpdate) AddStatus(i int32) *RdMomentUpdate
- func (rmu *RdMomentUpdate) AddType(i int32) *RdMomentUpdate
- func (rmu *RdMomentUpdate) AppendImgs(s []string) *RdMomentUpdate
- func (rmu *RdMomentUpdate) ClearByUID() *RdMomentUpdate
- func (rmu *RdMomentUpdate) ClearStatus() *RdMomentUpdate
- func (rmu *RdMomentUpdate) ClearType() *RdMomentUpdate
- func (rmu *RdMomentUpdate) Exec(ctx context.Context) error
- func (rmu *RdMomentUpdate) ExecX(ctx context.Context)
- func (rmu *RdMomentUpdate) Mutation() *RdMomentMutation
- func (rmu *RdMomentUpdate) Save(ctx context.Context) (int, error)
- func (rmu *RdMomentUpdate) SaveX(ctx context.Context) int
- func (rmu *RdMomentUpdate) SetByUID(i int32) *RdMomentUpdate
- func (rmu *RdMomentUpdate) SetImgs(s []string) *RdMomentUpdate
- func (rmu *RdMomentUpdate) SetNillableByUID(i *int32) *RdMomentUpdate
- func (rmu *RdMomentUpdate) SetNillablePublishTime(t *time.Time) *RdMomentUpdate
- func (rmu *RdMomentUpdate) SetNillableStatus(i *int32) *RdMomentUpdate
- func (rmu *RdMomentUpdate) SetNillableType(i *int32) *RdMomentUpdate
- func (rmu *RdMomentUpdate) SetPublishTime(t time.Time) *RdMomentUpdate
- func (rmu *RdMomentUpdate) SetStatus(i int32) *RdMomentUpdate
- func (rmu *RdMomentUpdate) SetTxt(s string) *RdMomentUpdate
- func (rmu *RdMomentUpdate) SetType(i int32) *RdMomentUpdate
- func (rmu *RdMomentUpdate) Where(ps ...predicate.RdMoment) *RdMomentUpdate
- type RdMomentUpdateOne
- func (rmuo *RdMomentUpdateOne) AddByUID(i int32) *RdMomentUpdateOne
- func (rmuo *RdMomentUpdateOne) AddStatus(i int32) *RdMomentUpdateOne
- func (rmuo *RdMomentUpdateOne) AddType(i int32) *RdMomentUpdateOne
- func (rmuo *RdMomentUpdateOne) AppendImgs(s []string) *RdMomentUpdateOne
- func (rmuo *RdMomentUpdateOne) ClearByUID() *RdMomentUpdateOne
- func (rmuo *RdMomentUpdateOne) ClearStatus() *RdMomentUpdateOne
- func (rmuo *RdMomentUpdateOne) ClearType() *RdMomentUpdateOne
- func (rmuo *RdMomentUpdateOne) Exec(ctx context.Context) error
- func (rmuo *RdMomentUpdateOne) ExecX(ctx context.Context)
- func (rmuo *RdMomentUpdateOne) Mutation() *RdMomentMutation
- func (rmuo *RdMomentUpdateOne) Save(ctx context.Context) (*RdMoment, error)
- func (rmuo *RdMomentUpdateOne) SaveX(ctx context.Context) *RdMoment
- func (rmuo *RdMomentUpdateOne) Select(field string, fields ...string) *RdMomentUpdateOne
- func (rmuo *RdMomentUpdateOne) SetByUID(i int32) *RdMomentUpdateOne
- func (rmuo *RdMomentUpdateOne) SetImgs(s []string) *RdMomentUpdateOne
- func (rmuo *RdMomentUpdateOne) SetNillableByUID(i *int32) *RdMomentUpdateOne
- func (rmuo *RdMomentUpdateOne) SetNillablePublishTime(t *time.Time) *RdMomentUpdateOne
- func (rmuo *RdMomentUpdateOne) SetNillableStatus(i *int32) *RdMomentUpdateOne
- func (rmuo *RdMomentUpdateOne) SetNillableType(i *int32) *RdMomentUpdateOne
- func (rmuo *RdMomentUpdateOne) SetPublishTime(t time.Time) *RdMomentUpdateOne
- func (rmuo *RdMomentUpdateOne) SetStatus(i int32) *RdMomentUpdateOne
- func (rmuo *RdMomentUpdateOne) SetTxt(s string) *RdMomentUpdateOne
- func (rmuo *RdMomentUpdateOne) SetType(i int32) *RdMomentUpdateOne
- type RdMoments
- type RdRMomentsFollowing
- type RdRMomentsFollowingClient
- func (c *RdRMomentsFollowingClient) Create() *RdRMomentsFollowingCreate
- func (c *RdRMomentsFollowingClient) CreateBulk(builders ...*RdRMomentsFollowingCreate) *RdRMomentsFollowingCreateBulk
- func (c *RdRMomentsFollowingClient) Delete() *RdRMomentsFollowingDelete
- func (c *RdRMomentsFollowingClient) DeleteOne(rrf *RdRMomentsFollowing) *RdRMomentsFollowingDeleteOne
- func (c *RdRMomentsFollowingClient) DeleteOneID(id int64) *RdRMomentsFollowingDeleteOne
- func (c *RdRMomentsFollowingClient) Get(ctx context.Context, id int64) (*RdRMomentsFollowing, error)
- func (c *RdRMomentsFollowingClient) GetX(ctx context.Context, id int64) *RdRMomentsFollowing
- func (c *RdRMomentsFollowingClient) Hooks() []Hook
- func (c *RdRMomentsFollowingClient) Intercept(interceptors ...Interceptor)
- func (c *RdRMomentsFollowingClient) Interceptors() []Interceptor
- func (c *RdRMomentsFollowingClient) Query() *RdRMomentsFollowingQuery
- func (c *RdRMomentsFollowingClient) Update() *RdRMomentsFollowingUpdate
- func (c *RdRMomentsFollowingClient) UpdateOne(rrf *RdRMomentsFollowing) *RdRMomentsFollowingUpdateOne
- func (c *RdRMomentsFollowingClient) UpdateOneID(id int64) *RdRMomentsFollowingUpdateOne
- func (c *RdRMomentsFollowingClient) Use(hooks ...Hook)
- type RdRMomentsFollowingCreate
- func (rrfc *RdRMomentsFollowingCreate) Exec(ctx context.Context) error
- func (rrfc *RdRMomentsFollowingCreate) ExecX(ctx context.Context)
- func (rrfc *RdRMomentsFollowingCreate) Mutation() *RdRMomentsFollowingMutation
- func (rrfc *RdRMomentsFollowingCreate) Save(ctx context.Context) (*RdRMomentsFollowing, error)
- func (rrfc *RdRMomentsFollowingCreate) SaveX(ctx context.Context) *RdRMomentsFollowing
- func (rrfc *RdRMomentsFollowingCreate) SetByUID(i int32) *RdRMomentsFollowingCreate
- func (rrfc *RdRMomentsFollowingCreate) SetForUID(i int32) *RdRMomentsFollowingCreate
- func (rrfc *RdRMomentsFollowingCreate) SetID(i int64) *RdRMomentsFollowingCreate
- func (rrfc *RdRMomentsFollowingCreate) SetImgs(s []string) *RdRMomentsFollowingCreate
- func (rrfc *RdRMomentsFollowingCreate) SetMomentID(i int64) *RdRMomentsFollowingCreate
- func (rrfc *RdRMomentsFollowingCreate) SetMomentType(i int32) *RdRMomentsFollowingCreate
- func (rrfc *RdRMomentsFollowingCreate) SetNillableByUID(i *int32) *RdRMomentsFollowingCreate
- func (rrfc *RdRMomentsFollowingCreate) SetNillableForUID(i *int32) *RdRMomentsFollowingCreate
- func (rrfc *RdRMomentsFollowingCreate) SetNillableMomentID(i *int64) *RdRMomentsFollowingCreate
- func (rrfc *RdRMomentsFollowingCreate) SetNillableMomentType(i *int32) *RdRMomentsFollowingCreate
- func (rrfc *RdRMomentsFollowingCreate) SetNillablePublishTime(t *time.Time) *RdRMomentsFollowingCreate
- func (rrfc *RdRMomentsFollowingCreate) SetNillableStatus(i *int32) *RdRMomentsFollowingCreate
- func (rrfc *RdRMomentsFollowingCreate) SetPublishTime(t time.Time) *RdRMomentsFollowingCreate
- func (rrfc *RdRMomentsFollowingCreate) SetStatus(i int32) *RdRMomentsFollowingCreate
- func (rrfc *RdRMomentsFollowingCreate) SetTxt(s string) *RdRMomentsFollowingCreate
- type RdRMomentsFollowingCreateBulk
- func (rrfcb *RdRMomentsFollowingCreateBulk) Exec(ctx context.Context) error
- func (rrfcb *RdRMomentsFollowingCreateBulk) ExecX(ctx context.Context)
- func (rrfcb *RdRMomentsFollowingCreateBulk) Save(ctx context.Context) ([]*RdRMomentsFollowing, error)
- func (rrfcb *RdRMomentsFollowingCreateBulk) SaveX(ctx context.Context) []*RdRMomentsFollowing
- type RdRMomentsFollowingDelete
- type RdRMomentsFollowingDeleteOne
- type RdRMomentsFollowingGroupBy
- func (rrfgb *RdRMomentsFollowingGroupBy) Aggregate(fns ...AggregateFunc) *RdRMomentsFollowingGroupBy
- func (s *RdRMomentsFollowingGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RdRMomentsFollowingGroupBy) BoolX(ctx context.Context) bool
- func (s *RdRMomentsFollowingGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RdRMomentsFollowingGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RdRMomentsFollowingGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RdRMomentsFollowingGroupBy) Float64X(ctx context.Context) float64
- func (s *RdRMomentsFollowingGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RdRMomentsFollowingGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RdRMomentsFollowingGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RdRMomentsFollowingGroupBy) IntX(ctx context.Context) int
- func (s *RdRMomentsFollowingGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RdRMomentsFollowingGroupBy) IntsX(ctx context.Context) []int
- func (rrfgb *RdRMomentsFollowingGroupBy) Scan(ctx context.Context, v any) error
- func (s *RdRMomentsFollowingGroupBy) ScanX(ctx context.Context, v any)
- func (s *RdRMomentsFollowingGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RdRMomentsFollowingGroupBy) StringX(ctx context.Context) string
- func (s *RdRMomentsFollowingGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RdRMomentsFollowingGroupBy) StringsX(ctx context.Context) []string
- type RdRMomentsFollowingMutation
- func (m *RdRMomentsFollowingMutation) AddByUID(i int32)
- func (m *RdRMomentsFollowingMutation) AddField(name string, value ent.Value) error
- func (m *RdRMomentsFollowingMutation) AddForUID(i int32)
- func (m *RdRMomentsFollowingMutation) AddMomentID(i int64)
- func (m *RdRMomentsFollowingMutation) AddMomentType(i int32)
- func (m *RdRMomentsFollowingMutation) AddStatus(i int32)
- func (m *RdRMomentsFollowingMutation) AddedByUID() (r int32, exists bool)
- func (m *RdRMomentsFollowingMutation) AddedEdges() []string
- func (m *RdRMomentsFollowingMutation) AddedField(name string) (ent.Value, bool)
- func (m *RdRMomentsFollowingMutation) AddedFields() []string
- func (m *RdRMomentsFollowingMutation) AddedForUID() (r int32, exists bool)
- func (m *RdRMomentsFollowingMutation) AddedIDs(name string) []ent.Value
- func (m *RdRMomentsFollowingMutation) AddedMomentID() (r int64, exists bool)
- func (m *RdRMomentsFollowingMutation) AddedMomentType() (r int32, exists bool)
- func (m *RdRMomentsFollowingMutation) AddedStatus() (r int32, exists bool)
- func (m *RdRMomentsFollowingMutation) AppendImgs(s []string)
- func (m *RdRMomentsFollowingMutation) AppendedImgs() ([]string, bool)
- func (m *RdRMomentsFollowingMutation) ByUID() (r int32, exists bool)
- func (m *RdRMomentsFollowingMutation) ByUIDCleared() bool
- func (m *RdRMomentsFollowingMutation) ClearByUID()
- func (m *RdRMomentsFollowingMutation) ClearEdge(name string) error
- func (m *RdRMomentsFollowingMutation) ClearField(name string) error
- func (m *RdRMomentsFollowingMutation) ClearForUID()
- func (m *RdRMomentsFollowingMutation) ClearMomentID()
- func (m *RdRMomentsFollowingMutation) ClearMomentType()
- func (m *RdRMomentsFollowingMutation) ClearStatus()
- func (m *RdRMomentsFollowingMutation) ClearedEdges() []string
- func (m *RdRMomentsFollowingMutation) ClearedFields() []string
- func (m RdRMomentsFollowingMutation) Client() *Client
- func (m *RdRMomentsFollowingMutation) EdgeCleared(name string) bool
- func (m *RdRMomentsFollowingMutation) Field(name string) (ent.Value, bool)
- func (m *RdRMomentsFollowingMutation) FieldCleared(name string) bool
- func (m *RdRMomentsFollowingMutation) Fields() []string
- func (m *RdRMomentsFollowingMutation) ForUID() (r int32, exists bool)
- func (m *RdRMomentsFollowingMutation) ForUIDCleared() bool
- func (m *RdRMomentsFollowingMutation) ID() (id int64, exists bool)
- func (m *RdRMomentsFollowingMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *RdRMomentsFollowingMutation) Imgs() (r []string, exists bool)
- func (m *RdRMomentsFollowingMutation) MomentID() (r int64, exists bool)
- func (m *RdRMomentsFollowingMutation) MomentIDCleared() bool
- func (m *RdRMomentsFollowingMutation) MomentType() (r int32, exists bool)
- func (m *RdRMomentsFollowingMutation) MomentTypeCleared() bool
- func (m *RdRMomentsFollowingMutation) OldByUID(ctx context.Context) (v int32, err error)
- func (m *RdRMomentsFollowingMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RdRMomentsFollowingMutation) OldForUID(ctx context.Context) (v int32, err error)
- func (m *RdRMomentsFollowingMutation) OldImgs(ctx context.Context) (v []string, err error)
- func (m *RdRMomentsFollowingMutation) OldMomentID(ctx context.Context) (v int64, err error)
- func (m *RdRMomentsFollowingMutation) OldMomentType(ctx context.Context) (v int32, err error)
- func (m *RdRMomentsFollowingMutation) OldPublishTime(ctx context.Context) (v time.Time, err error)
- func (m *RdRMomentsFollowingMutation) OldStatus(ctx context.Context) (v int32, err error)
- func (m *RdRMomentsFollowingMutation) OldTxt(ctx context.Context) (v string, err error)
- func (m *RdRMomentsFollowingMutation) Op() Op
- func (m *RdRMomentsFollowingMutation) PublishTime() (r time.Time, exists bool)
- func (m *RdRMomentsFollowingMutation) RemovedEdges() []string
- func (m *RdRMomentsFollowingMutation) RemovedIDs(name string) []ent.Value
- func (m *RdRMomentsFollowingMutation) ResetByUID()
- func (m *RdRMomentsFollowingMutation) ResetEdge(name string) error
- func (m *RdRMomentsFollowingMutation) ResetField(name string) error
- func (m *RdRMomentsFollowingMutation) ResetForUID()
- func (m *RdRMomentsFollowingMutation) ResetImgs()
- func (m *RdRMomentsFollowingMutation) ResetMomentID()
- func (m *RdRMomentsFollowingMutation) ResetMomentType()
- func (m *RdRMomentsFollowingMutation) ResetPublishTime()
- func (m *RdRMomentsFollowingMutation) ResetStatus()
- func (m *RdRMomentsFollowingMutation) ResetTxt()
- func (m *RdRMomentsFollowingMutation) SetByUID(i int32)
- func (m *RdRMomentsFollowingMutation) SetField(name string, value ent.Value) error
- func (m *RdRMomentsFollowingMutation) SetForUID(i int32)
- func (m *RdRMomentsFollowingMutation) SetID(id int64)
- func (m *RdRMomentsFollowingMutation) SetImgs(s []string)
- func (m *RdRMomentsFollowingMutation) SetMomentID(i int64)
- func (m *RdRMomentsFollowingMutation) SetMomentType(i int32)
- func (m *RdRMomentsFollowingMutation) SetOp(op Op)
- func (m *RdRMomentsFollowingMutation) SetPublishTime(t time.Time)
- func (m *RdRMomentsFollowingMutation) SetStatus(i int32)
- func (m *RdRMomentsFollowingMutation) SetTxt(s string)
- func (m *RdRMomentsFollowingMutation) Status() (r int32, exists bool)
- func (m *RdRMomentsFollowingMutation) StatusCleared() bool
- func (m RdRMomentsFollowingMutation) Tx() (*Tx, error)
- func (m *RdRMomentsFollowingMutation) Txt() (r string, exists bool)
- func (m *RdRMomentsFollowingMutation) Type() string
- func (m *RdRMomentsFollowingMutation) Where(ps ...predicate.RdRMomentsFollowing)
- func (m *RdRMomentsFollowingMutation) WhereP(ps ...func(*sql.Selector))
- type RdRMomentsFollowingQuery
- func (rrfq *RdRMomentsFollowingQuery) Aggregate(fns ...AggregateFunc) *RdRMomentsFollowingSelect
- func (rrfq *RdRMomentsFollowingQuery) All(ctx context.Context) ([]*RdRMomentsFollowing, error)
- func (rrfq *RdRMomentsFollowingQuery) AllX(ctx context.Context) []*RdRMomentsFollowing
- func (rrfq *RdRMomentsFollowingQuery) Clone() *RdRMomentsFollowingQuery
- func (rrfq *RdRMomentsFollowingQuery) Count(ctx context.Context) (int, error)
- func (rrfq *RdRMomentsFollowingQuery) CountX(ctx context.Context) int
- func (rrfq *RdRMomentsFollowingQuery) Exist(ctx context.Context) (bool, error)
- func (rrfq *RdRMomentsFollowingQuery) ExistX(ctx context.Context) bool
- func (rrfq *RdRMomentsFollowingQuery) First(ctx context.Context) (*RdRMomentsFollowing, error)
- func (rrfq *RdRMomentsFollowingQuery) FirstID(ctx context.Context) (id int64, err error)
- func (rrfq *RdRMomentsFollowingQuery) FirstIDX(ctx context.Context) int64
- func (rrfq *RdRMomentsFollowingQuery) FirstX(ctx context.Context) *RdRMomentsFollowing
- func (rrfq *RdRMomentsFollowingQuery) GroupBy(field string, fields ...string) *RdRMomentsFollowingGroupBy
- func (rrfq *RdRMomentsFollowingQuery) IDs(ctx context.Context) ([]int64, error)
- func (rrfq *RdRMomentsFollowingQuery) IDsX(ctx context.Context) []int64
- func (rrfq *RdRMomentsFollowingQuery) Limit(limit int) *RdRMomentsFollowingQuery
- func (rrfq *RdRMomentsFollowingQuery) Offset(offset int) *RdRMomentsFollowingQuery
- func (rrfq *RdRMomentsFollowingQuery) Only(ctx context.Context) (*RdRMomentsFollowing, error)
- func (rrfq *RdRMomentsFollowingQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (rrfq *RdRMomentsFollowingQuery) OnlyIDX(ctx context.Context) int64
- func (rrfq *RdRMomentsFollowingQuery) OnlyX(ctx context.Context) *RdRMomentsFollowing
- func (rrfq *RdRMomentsFollowingQuery) Order(o ...OrderFunc) *RdRMomentsFollowingQuery
- func (rrfq *RdRMomentsFollowingQuery) Select(fields ...string) *RdRMomentsFollowingSelect
- func (rrfq *RdRMomentsFollowingQuery) Unique(unique bool) *RdRMomentsFollowingQuery
- func (rrfq *RdRMomentsFollowingQuery) Where(ps ...predicate.RdRMomentsFollowing) *RdRMomentsFollowingQuery
- type RdRMomentsFollowingSelect
- func (rrfs *RdRMomentsFollowingSelect) Aggregate(fns ...AggregateFunc) *RdRMomentsFollowingSelect
- func (s *RdRMomentsFollowingSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RdRMomentsFollowingSelect) BoolX(ctx context.Context) bool
- func (s *RdRMomentsFollowingSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RdRMomentsFollowingSelect) BoolsX(ctx context.Context) []bool
- func (s *RdRMomentsFollowingSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RdRMomentsFollowingSelect) Float64X(ctx context.Context) float64
- func (s *RdRMomentsFollowingSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RdRMomentsFollowingSelect) Float64sX(ctx context.Context) []float64
- func (s *RdRMomentsFollowingSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RdRMomentsFollowingSelect) IntX(ctx context.Context) int
- func (s *RdRMomentsFollowingSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RdRMomentsFollowingSelect) IntsX(ctx context.Context) []int
- func (rrfs *RdRMomentsFollowingSelect) Scan(ctx context.Context, v any) error
- func (s *RdRMomentsFollowingSelect) ScanX(ctx context.Context, v any)
- func (s *RdRMomentsFollowingSelect) String(ctx context.Context) (_ string, err error)
- func (s *RdRMomentsFollowingSelect) StringX(ctx context.Context) string
- func (s *RdRMomentsFollowingSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RdRMomentsFollowingSelect) StringsX(ctx context.Context) []string
- type RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) AddByUID(i int32) *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) AddForUID(i int32) *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) AddMomentID(i int64) *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) AddMomentType(i int32) *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) AddStatus(i int32) *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) AppendImgs(s []string) *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) ClearByUID() *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) ClearForUID() *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) ClearMomentID() *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) ClearMomentType() *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) ClearStatus() *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) Exec(ctx context.Context) error
- func (rrfu *RdRMomentsFollowingUpdate) ExecX(ctx context.Context)
- func (rrfu *RdRMomentsFollowingUpdate) Mutation() *RdRMomentsFollowingMutation
- func (rrfu *RdRMomentsFollowingUpdate) Save(ctx context.Context) (int, error)
- func (rrfu *RdRMomentsFollowingUpdate) SaveX(ctx context.Context) int
- func (rrfu *RdRMomentsFollowingUpdate) SetByUID(i int32) *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) SetForUID(i int32) *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) SetImgs(s []string) *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) SetMomentID(i int64) *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) SetMomentType(i int32) *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) SetNillableByUID(i *int32) *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) SetNillableForUID(i *int32) *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) SetNillableMomentID(i *int64) *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) SetNillableMomentType(i *int32) *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) SetNillablePublishTime(t *time.Time) *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) SetNillableStatus(i *int32) *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) SetPublishTime(t time.Time) *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) SetStatus(i int32) *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) SetTxt(s string) *RdRMomentsFollowingUpdate
- func (rrfu *RdRMomentsFollowingUpdate) Where(ps ...predicate.RdRMomentsFollowing) *RdRMomentsFollowingUpdate
- type RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) AddByUID(i int32) *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) AddForUID(i int32) *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) AddMomentID(i int64) *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) AddMomentType(i int32) *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) AddStatus(i int32) *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) AppendImgs(s []string) *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) ClearByUID() *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) ClearForUID() *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) ClearMomentID() *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) ClearMomentType() *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) ClearStatus() *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) Exec(ctx context.Context) error
- func (rrfuo *RdRMomentsFollowingUpdateOne) ExecX(ctx context.Context)
- func (rrfuo *RdRMomentsFollowingUpdateOne) Mutation() *RdRMomentsFollowingMutation
- func (rrfuo *RdRMomentsFollowingUpdateOne) Save(ctx context.Context) (*RdRMomentsFollowing, error)
- func (rrfuo *RdRMomentsFollowingUpdateOne) SaveX(ctx context.Context) *RdRMomentsFollowing
- func (rrfuo *RdRMomentsFollowingUpdateOne) Select(field string, fields ...string) *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) SetByUID(i int32) *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) SetForUID(i int32) *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) SetImgs(s []string) *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) SetMomentID(i int64) *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) SetMomentType(i int32) *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) SetNillableByUID(i *int32) *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) SetNillableForUID(i *int32) *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) SetNillableMomentID(i *int64) *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) SetNillableMomentType(i *int32) *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) SetNillablePublishTime(t *time.Time) *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) SetNillableStatus(i *int32) *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) SetPublishTime(t time.Time) *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) SetStatus(i int32) *RdRMomentsFollowingUpdateOne
- func (rrfuo *RdRMomentsFollowingUpdateOne) SetTxt(s string) *RdRMomentsFollowingUpdateOne
- type RdRMomentsFollowings
- type RdRUserFollowers
- type RdRUserFollowersClient
- func (c *RdRUserFollowersClient) Create() *RdRUserFollowersCreate
- func (c *RdRUserFollowersClient) CreateBulk(builders ...*RdRUserFollowersCreate) *RdRUserFollowersCreateBulk
- func (c *RdRUserFollowersClient) Delete() *RdRUserFollowersDelete
- func (c *RdRUserFollowersClient) DeleteOne(rrf *RdRUserFollowers) *RdRUserFollowersDeleteOne
- func (c *RdRUserFollowersClient) DeleteOneID(id int64) *RdRUserFollowersDeleteOne
- func (c *RdRUserFollowersClient) Get(ctx context.Context, id int64) (*RdRUserFollowers, error)
- func (c *RdRUserFollowersClient) GetX(ctx context.Context, id int64) *RdRUserFollowers
- func (c *RdRUserFollowersClient) Hooks() []Hook
- func (c *RdRUserFollowersClient) Intercept(interceptors ...Interceptor)
- func (c *RdRUserFollowersClient) Interceptors() []Interceptor
- func (c *RdRUserFollowersClient) Query() *RdRUserFollowersQuery
- func (c *RdRUserFollowersClient) Update() *RdRUserFollowersUpdate
- func (c *RdRUserFollowersClient) UpdateOne(rrf *RdRUserFollowers) *RdRUserFollowersUpdateOne
- func (c *RdRUserFollowersClient) UpdateOneID(id int64) *RdRUserFollowersUpdateOne
- func (c *RdRUserFollowersClient) Use(hooks ...Hook)
- type RdRUserFollowersCreate
- func (rrfc *RdRUserFollowersCreate) Exec(ctx context.Context) error
- func (rrfc *RdRUserFollowersCreate) ExecX(ctx context.Context)
- func (rrfc *RdRUserFollowersCreate) Mutation() *RdRUserFollowersMutation
- func (rrfc *RdRUserFollowersCreate) Save(ctx context.Context) (*RdRUserFollowers, error)
- func (rrfc *RdRUserFollowersCreate) SaveX(ctx context.Context) *RdRUserFollowers
- func (rrfc *RdRUserFollowersCreate) SetCreateTime(t time.Time) *RdRUserFollowersCreate
- func (rrfc *RdRUserFollowersCreate) SetFollowersUID(i int32) *RdRUserFollowersCreate
- func (rrfc *RdRUserFollowersCreate) SetID(i int64) *RdRUserFollowersCreate
- func (rrfc *RdRUserFollowersCreate) SetNillableCreateTime(t *time.Time) *RdRUserFollowersCreate
- func (rrfc *RdRUserFollowersCreate) SetNillableFollowersUID(i *int32) *RdRUserFollowersCreate
- func (rrfc *RdRUserFollowersCreate) SetNillableUID(i *int32) *RdRUserFollowersCreate
- func (rrfc *RdRUserFollowersCreate) SetUID(i int32) *RdRUserFollowersCreate
- type RdRUserFollowersCreateBulk
- func (rrfcb *RdRUserFollowersCreateBulk) Exec(ctx context.Context) error
- func (rrfcb *RdRUserFollowersCreateBulk) ExecX(ctx context.Context)
- func (rrfcb *RdRUserFollowersCreateBulk) Save(ctx context.Context) ([]*RdRUserFollowers, error)
- func (rrfcb *RdRUserFollowersCreateBulk) SaveX(ctx context.Context) []*RdRUserFollowers
- type RdRUserFollowersDelete
- type RdRUserFollowersDeleteOne
- type RdRUserFollowersGroupBy
- func (rrfgb *RdRUserFollowersGroupBy) Aggregate(fns ...AggregateFunc) *RdRUserFollowersGroupBy
- func (s *RdRUserFollowersGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RdRUserFollowersGroupBy) BoolX(ctx context.Context) bool
- func (s *RdRUserFollowersGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RdRUserFollowersGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RdRUserFollowersGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RdRUserFollowersGroupBy) Float64X(ctx context.Context) float64
- func (s *RdRUserFollowersGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RdRUserFollowersGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RdRUserFollowersGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RdRUserFollowersGroupBy) IntX(ctx context.Context) int
- func (s *RdRUserFollowersGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RdRUserFollowersGroupBy) IntsX(ctx context.Context) []int
- func (rrfgb *RdRUserFollowersGroupBy) Scan(ctx context.Context, v any) error
- func (s *RdRUserFollowersGroupBy) ScanX(ctx context.Context, v any)
- func (s *RdRUserFollowersGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RdRUserFollowersGroupBy) StringX(ctx context.Context) string
- func (s *RdRUserFollowersGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RdRUserFollowersGroupBy) StringsX(ctx context.Context) []string
- type RdRUserFollowersMutation
- func (m *RdRUserFollowersMutation) AddField(name string, value ent.Value) error
- func (m *RdRUserFollowersMutation) AddFollowersUID(i int32)
- func (m *RdRUserFollowersMutation) AddUID(i int32)
- func (m *RdRUserFollowersMutation) AddedEdges() []string
- func (m *RdRUserFollowersMutation) AddedField(name string) (ent.Value, bool)
- func (m *RdRUserFollowersMutation) AddedFields() []string
- func (m *RdRUserFollowersMutation) AddedFollowersUID() (r int32, exists bool)
- func (m *RdRUserFollowersMutation) AddedIDs(name string) []ent.Value
- func (m *RdRUserFollowersMutation) AddedUID() (r int32, exists bool)
- func (m *RdRUserFollowersMutation) ClearEdge(name string) error
- func (m *RdRUserFollowersMutation) ClearField(name string) error
- func (m *RdRUserFollowersMutation) ClearFollowersUID()
- func (m *RdRUserFollowersMutation) ClearUID()
- func (m *RdRUserFollowersMutation) ClearedEdges() []string
- func (m *RdRUserFollowersMutation) ClearedFields() []string
- func (m RdRUserFollowersMutation) Client() *Client
- func (m *RdRUserFollowersMutation) CreateTime() (r time.Time, exists bool)
- func (m *RdRUserFollowersMutation) EdgeCleared(name string) bool
- func (m *RdRUserFollowersMutation) Field(name string) (ent.Value, bool)
- func (m *RdRUserFollowersMutation) FieldCleared(name string) bool
- func (m *RdRUserFollowersMutation) Fields() []string
- func (m *RdRUserFollowersMutation) FollowersUID() (r int32, exists bool)
- func (m *RdRUserFollowersMutation) FollowersUIDCleared() bool
- func (m *RdRUserFollowersMutation) ID() (id int64, exists bool)
- func (m *RdRUserFollowersMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *RdRUserFollowersMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *RdRUserFollowersMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RdRUserFollowersMutation) OldFollowersUID(ctx context.Context) (v int32, err error)
- func (m *RdRUserFollowersMutation) OldUID(ctx context.Context) (v int32, err error)
- func (m *RdRUserFollowersMutation) Op() Op
- func (m *RdRUserFollowersMutation) RemovedEdges() []string
- func (m *RdRUserFollowersMutation) RemovedIDs(name string) []ent.Value
- func (m *RdRUserFollowersMutation) ResetCreateTime()
- func (m *RdRUserFollowersMutation) ResetEdge(name string) error
- func (m *RdRUserFollowersMutation) ResetField(name string) error
- func (m *RdRUserFollowersMutation) ResetFollowersUID()
- func (m *RdRUserFollowersMutation) ResetUID()
- func (m *RdRUserFollowersMutation) SetCreateTime(t time.Time)
- func (m *RdRUserFollowersMutation) SetField(name string, value ent.Value) error
- func (m *RdRUserFollowersMutation) SetFollowersUID(i int32)
- func (m *RdRUserFollowersMutation) SetID(id int64)
- func (m *RdRUserFollowersMutation) SetOp(op Op)
- func (m *RdRUserFollowersMutation) SetUID(i int32)
- func (m RdRUserFollowersMutation) Tx() (*Tx, error)
- func (m *RdRUserFollowersMutation) Type() string
- func (m *RdRUserFollowersMutation) UID() (r int32, exists bool)
- func (m *RdRUserFollowersMutation) UIDCleared() bool
- func (m *RdRUserFollowersMutation) Where(ps ...predicate.RdRUserFollowers)
- func (m *RdRUserFollowersMutation) WhereP(ps ...func(*sql.Selector))
- type RdRUserFollowersQuery
- func (rrfq *RdRUserFollowersQuery) Aggregate(fns ...AggregateFunc) *RdRUserFollowersSelect
- func (rrfq *RdRUserFollowersQuery) All(ctx context.Context) ([]*RdRUserFollowers, error)
- func (rrfq *RdRUserFollowersQuery) AllX(ctx context.Context) []*RdRUserFollowers
- func (rrfq *RdRUserFollowersQuery) Clone() *RdRUserFollowersQuery
- func (rrfq *RdRUserFollowersQuery) Count(ctx context.Context) (int, error)
- func (rrfq *RdRUserFollowersQuery) CountX(ctx context.Context) int
- func (rrfq *RdRUserFollowersQuery) Exist(ctx context.Context) (bool, error)
- func (rrfq *RdRUserFollowersQuery) ExistX(ctx context.Context) bool
- func (rrfq *RdRUserFollowersQuery) First(ctx context.Context) (*RdRUserFollowers, error)
- func (rrfq *RdRUserFollowersQuery) FirstID(ctx context.Context) (id int64, err error)
- func (rrfq *RdRUserFollowersQuery) FirstIDX(ctx context.Context) int64
- func (rrfq *RdRUserFollowersQuery) FirstX(ctx context.Context) *RdRUserFollowers
- func (rrfq *RdRUserFollowersQuery) GroupBy(field string, fields ...string) *RdRUserFollowersGroupBy
- func (rrfq *RdRUserFollowersQuery) IDs(ctx context.Context) ([]int64, error)
- func (rrfq *RdRUserFollowersQuery) IDsX(ctx context.Context) []int64
- func (rrfq *RdRUserFollowersQuery) Limit(limit int) *RdRUserFollowersQuery
- func (rrfq *RdRUserFollowersQuery) Offset(offset int) *RdRUserFollowersQuery
- func (rrfq *RdRUserFollowersQuery) Only(ctx context.Context) (*RdRUserFollowers, error)
- func (rrfq *RdRUserFollowersQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (rrfq *RdRUserFollowersQuery) OnlyIDX(ctx context.Context) int64
- func (rrfq *RdRUserFollowersQuery) OnlyX(ctx context.Context) *RdRUserFollowers
- func (rrfq *RdRUserFollowersQuery) Order(o ...OrderFunc) *RdRUserFollowersQuery
- func (rrfq *RdRUserFollowersQuery) Select(fields ...string) *RdRUserFollowersSelect
- func (rrfq *RdRUserFollowersQuery) Unique(unique bool) *RdRUserFollowersQuery
- func (rrfq *RdRUserFollowersQuery) Where(ps ...predicate.RdRUserFollowers) *RdRUserFollowersQuery
- type RdRUserFollowersSelect
- func (rrfs *RdRUserFollowersSelect) Aggregate(fns ...AggregateFunc) *RdRUserFollowersSelect
- func (s *RdRUserFollowersSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RdRUserFollowersSelect) BoolX(ctx context.Context) bool
- func (s *RdRUserFollowersSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RdRUserFollowersSelect) BoolsX(ctx context.Context) []bool
- func (s *RdRUserFollowersSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RdRUserFollowersSelect) Float64X(ctx context.Context) float64
- func (s *RdRUserFollowersSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RdRUserFollowersSelect) Float64sX(ctx context.Context) []float64
- func (s *RdRUserFollowersSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RdRUserFollowersSelect) IntX(ctx context.Context) int
- func (s *RdRUserFollowersSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RdRUserFollowersSelect) IntsX(ctx context.Context) []int
- func (rrfs *RdRUserFollowersSelect) Scan(ctx context.Context, v any) error
- func (s *RdRUserFollowersSelect) ScanX(ctx context.Context, v any)
- func (s *RdRUserFollowersSelect) String(ctx context.Context) (_ string, err error)
- func (s *RdRUserFollowersSelect) StringX(ctx context.Context) string
- func (s *RdRUserFollowersSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RdRUserFollowersSelect) StringsX(ctx context.Context) []string
- type RdRUserFollowersSlice
- type RdRUserFollowersUpdate
- func (rrfu *RdRUserFollowersUpdate) AddFollowersUID(i int32) *RdRUserFollowersUpdate
- func (rrfu *RdRUserFollowersUpdate) AddUID(i int32) *RdRUserFollowersUpdate
- func (rrfu *RdRUserFollowersUpdate) ClearFollowersUID() *RdRUserFollowersUpdate
- func (rrfu *RdRUserFollowersUpdate) ClearUID() *RdRUserFollowersUpdate
- func (rrfu *RdRUserFollowersUpdate) Exec(ctx context.Context) error
- func (rrfu *RdRUserFollowersUpdate) ExecX(ctx context.Context)
- func (rrfu *RdRUserFollowersUpdate) Mutation() *RdRUserFollowersMutation
- func (rrfu *RdRUserFollowersUpdate) Save(ctx context.Context) (int, error)
- func (rrfu *RdRUserFollowersUpdate) SaveX(ctx context.Context) int
- func (rrfu *RdRUserFollowersUpdate) SetCreateTime(t time.Time) *RdRUserFollowersUpdate
- func (rrfu *RdRUserFollowersUpdate) SetFollowersUID(i int32) *RdRUserFollowersUpdate
- func (rrfu *RdRUserFollowersUpdate) SetNillableCreateTime(t *time.Time) *RdRUserFollowersUpdate
- func (rrfu *RdRUserFollowersUpdate) SetNillableFollowersUID(i *int32) *RdRUserFollowersUpdate
- func (rrfu *RdRUserFollowersUpdate) SetNillableUID(i *int32) *RdRUserFollowersUpdate
- func (rrfu *RdRUserFollowersUpdate) SetUID(i int32) *RdRUserFollowersUpdate
- func (rrfu *RdRUserFollowersUpdate) Where(ps ...predicate.RdRUserFollowers) *RdRUserFollowersUpdate
- type RdRUserFollowersUpdateOne
- func (rrfuo *RdRUserFollowersUpdateOne) AddFollowersUID(i int32) *RdRUserFollowersUpdateOne
- func (rrfuo *RdRUserFollowersUpdateOne) AddUID(i int32) *RdRUserFollowersUpdateOne
- func (rrfuo *RdRUserFollowersUpdateOne) ClearFollowersUID() *RdRUserFollowersUpdateOne
- func (rrfuo *RdRUserFollowersUpdateOne) ClearUID() *RdRUserFollowersUpdateOne
- func (rrfuo *RdRUserFollowersUpdateOne) Exec(ctx context.Context) error
- func (rrfuo *RdRUserFollowersUpdateOne) ExecX(ctx context.Context)
- func (rrfuo *RdRUserFollowersUpdateOne) Mutation() *RdRUserFollowersMutation
- func (rrfuo *RdRUserFollowersUpdateOne) Save(ctx context.Context) (*RdRUserFollowers, error)
- func (rrfuo *RdRUserFollowersUpdateOne) SaveX(ctx context.Context) *RdRUserFollowers
- func (rrfuo *RdRUserFollowersUpdateOne) Select(field string, fields ...string) *RdRUserFollowersUpdateOne
- func (rrfuo *RdRUserFollowersUpdateOne) SetCreateTime(t time.Time) *RdRUserFollowersUpdateOne
- func (rrfuo *RdRUserFollowersUpdateOne) SetFollowersUID(i int32) *RdRUserFollowersUpdateOne
- func (rrfuo *RdRUserFollowersUpdateOne) SetNillableCreateTime(t *time.Time) *RdRUserFollowersUpdateOne
- func (rrfuo *RdRUserFollowersUpdateOne) SetNillableFollowersUID(i *int32) *RdRUserFollowersUpdateOne
- func (rrfuo *RdRUserFollowersUpdateOne) SetNillableUID(i *int32) *RdRUserFollowersUpdateOne
- func (rrfuo *RdRUserFollowersUpdateOne) SetUID(i int32) *RdRUserFollowersUpdateOne
- type RdRUserFollowing
- type RdRUserFollowingClient
- func (c *RdRUserFollowingClient) Create() *RdRUserFollowingCreate
- func (c *RdRUserFollowingClient) CreateBulk(builders ...*RdRUserFollowingCreate) *RdRUserFollowingCreateBulk
- func (c *RdRUserFollowingClient) Delete() *RdRUserFollowingDelete
- func (c *RdRUserFollowingClient) DeleteOne(rrf *RdRUserFollowing) *RdRUserFollowingDeleteOne
- func (c *RdRUserFollowingClient) DeleteOneID(id int64) *RdRUserFollowingDeleteOne
- func (c *RdRUserFollowingClient) Get(ctx context.Context, id int64) (*RdRUserFollowing, error)
- func (c *RdRUserFollowingClient) GetX(ctx context.Context, id int64) *RdRUserFollowing
- func (c *RdRUserFollowingClient) Hooks() []Hook
- func (c *RdRUserFollowingClient) Intercept(interceptors ...Interceptor)
- func (c *RdRUserFollowingClient) Interceptors() []Interceptor
- func (c *RdRUserFollowingClient) Query() *RdRUserFollowingQuery
- func (c *RdRUserFollowingClient) Update() *RdRUserFollowingUpdate
- func (c *RdRUserFollowingClient) UpdateOne(rrf *RdRUserFollowing) *RdRUserFollowingUpdateOne
- func (c *RdRUserFollowingClient) UpdateOneID(id int64) *RdRUserFollowingUpdateOne
- func (c *RdRUserFollowingClient) Use(hooks ...Hook)
- type RdRUserFollowingCreate
- func (rrfc *RdRUserFollowingCreate) Exec(ctx context.Context) error
- func (rrfc *RdRUserFollowingCreate) ExecX(ctx context.Context)
- func (rrfc *RdRUserFollowingCreate) Mutation() *RdRUserFollowingMutation
- func (rrfc *RdRUserFollowingCreate) Save(ctx context.Context) (*RdRUserFollowing, error)
- func (rrfc *RdRUserFollowingCreate) SaveX(ctx context.Context) *RdRUserFollowing
- func (rrfc *RdRUserFollowingCreate) SetCreateTime(t time.Time) *RdRUserFollowingCreate
- func (rrfc *RdRUserFollowingCreate) SetFollowingUID(i int32) *RdRUserFollowingCreate
- func (rrfc *RdRUserFollowingCreate) SetID(i int64) *RdRUserFollowingCreate
- func (rrfc *RdRUserFollowingCreate) SetNillableCreateTime(t *time.Time) *RdRUserFollowingCreate
- func (rrfc *RdRUserFollowingCreate) SetNillableFollowingUID(i *int32) *RdRUserFollowingCreate
- func (rrfc *RdRUserFollowingCreate) SetNillableUID(i *int32) *RdRUserFollowingCreate
- func (rrfc *RdRUserFollowingCreate) SetUID(i int32) *RdRUserFollowingCreate
- type RdRUserFollowingCreateBulk
- func (rrfcb *RdRUserFollowingCreateBulk) Exec(ctx context.Context) error
- func (rrfcb *RdRUserFollowingCreateBulk) ExecX(ctx context.Context)
- func (rrfcb *RdRUserFollowingCreateBulk) Save(ctx context.Context) ([]*RdRUserFollowing, error)
- func (rrfcb *RdRUserFollowingCreateBulk) SaveX(ctx context.Context) []*RdRUserFollowing
- type RdRUserFollowingDelete
- type RdRUserFollowingDeleteOne
- type RdRUserFollowingGroupBy
- func (rrfgb *RdRUserFollowingGroupBy) Aggregate(fns ...AggregateFunc) *RdRUserFollowingGroupBy
- func (s *RdRUserFollowingGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RdRUserFollowingGroupBy) BoolX(ctx context.Context) bool
- func (s *RdRUserFollowingGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RdRUserFollowingGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RdRUserFollowingGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RdRUserFollowingGroupBy) Float64X(ctx context.Context) float64
- func (s *RdRUserFollowingGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RdRUserFollowingGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RdRUserFollowingGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RdRUserFollowingGroupBy) IntX(ctx context.Context) int
- func (s *RdRUserFollowingGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RdRUserFollowingGroupBy) IntsX(ctx context.Context) []int
- func (rrfgb *RdRUserFollowingGroupBy) Scan(ctx context.Context, v any) error
- func (s *RdRUserFollowingGroupBy) ScanX(ctx context.Context, v any)
- func (s *RdRUserFollowingGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RdRUserFollowingGroupBy) StringX(ctx context.Context) string
- func (s *RdRUserFollowingGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RdRUserFollowingGroupBy) StringsX(ctx context.Context) []string
- type RdRUserFollowingMutation
- func (m *RdRUserFollowingMutation) AddField(name string, value ent.Value) error
- func (m *RdRUserFollowingMutation) AddFollowingUID(i int32)
- func (m *RdRUserFollowingMutation) AddUID(i int32)
- func (m *RdRUserFollowingMutation) AddedEdges() []string
- func (m *RdRUserFollowingMutation) AddedField(name string) (ent.Value, bool)
- func (m *RdRUserFollowingMutation) AddedFields() []string
- func (m *RdRUserFollowingMutation) AddedFollowingUID() (r int32, exists bool)
- func (m *RdRUserFollowingMutation) AddedIDs(name string) []ent.Value
- func (m *RdRUserFollowingMutation) AddedUID() (r int32, exists bool)
- func (m *RdRUserFollowingMutation) ClearEdge(name string) error
- func (m *RdRUserFollowingMutation) ClearField(name string) error
- func (m *RdRUserFollowingMutation) ClearFollowingUID()
- func (m *RdRUserFollowingMutation) ClearUID()
- func (m *RdRUserFollowingMutation) ClearedEdges() []string
- func (m *RdRUserFollowingMutation) ClearedFields() []string
- func (m RdRUserFollowingMutation) Client() *Client
- func (m *RdRUserFollowingMutation) CreateTime() (r time.Time, exists bool)
- func (m *RdRUserFollowingMutation) EdgeCleared(name string) bool
- func (m *RdRUserFollowingMutation) Field(name string) (ent.Value, bool)
- func (m *RdRUserFollowingMutation) FieldCleared(name string) bool
- func (m *RdRUserFollowingMutation) Fields() []string
- func (m *RdRUserFollowingMutation) FollowingUID() (r int32, exists bool)
- func (m *RdRUserFollowingMutation) FollowingUIDCleared() bool
- func (m *RdRUserFollowingMutation) ID() (id int64, exists bool)
- func (m *RdRUserFollowingMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *RdRUserFollowingMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *RdRUserFollowingMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RdRUserFollowingMutation) OldFollowingUID(ctx context.Context) (v int32, err error)
- func (m *RdRUserFollowingMutation) OldUID(ctx context.Context) (v int32, err error)
- func (m *RdRUserFollowingMutation) Op() Op
- func (m *RdRUserFollowingMutation) RemovedEdges() []string
- func (m *RdRUserFollowingMutation) RemovedIDs(name string) []ent.Value
- func (m *RdRUserFollowingMutation) ResetCreateTime()
- func (m *RdRUserFollowingMutation) ResetEdge(name string) error
- func (m *RdRUserFollowingMutation) ResetField(name string) error
- func (m *RdRUserFollowingMutation) ResetFollowingUID()
- func (m *RdRUserFollowingMutation) ResetUID()
- func (m *RdRUserFollowingMutation) SetCreateTime(t time.Time)
- func (m *RdRUserFollowingMutation) SetField(name string, value ent.Value) error
- func (m *RdRUserFollowingMutation) SetFollowingUID(i int32)
- func (m *RdRUserFollowingMutation) SetID(id int64)
- func (m *RdRUserFollowingMutation) SetOp(op Op)
- func (m *RdRUserFollowingMutation) SetUID(i int32)
- func (m RdRUserFollowingMutation) Tx() (*Tx, error)
- func (m *RdRUserFollowingMutation) Type() string
- func (m *RdRUserFollowingMutation) UID() (r int32, exists bool)
- func (m *RdRUserFollowingMutation) UIDCleared() bool
- func (m *RdRUserFollowingMutation) Where(ps ...predicate.RdRUserFollowing)
- func (m *RdRUserFollowingMutation) WhereP(ps ...func(*sql.Selector))
- type RdRUserFollowingQuery
- func (rrfq *RdRUserFollowingQuery) Aggregate(fns ...AggregateFunc) *RdRUserFollowingSelect
- func (rrfq *RdRUserFollowingQuery) All(ctx context.Context) ([]*RdRUserFollowing, error)
- func (rrfq *RdRUserFollowingQuery) AllX(ctx context.Context) []*RdRUserFollowing
- func (rrfq *RdRUserFollowingQuery) Clone() *RdRUserFollowingQuery
- func (rrfq *RdRUserFollowingQuery) Count(ctx context.Context) (int, error)
- func (rrfq *RdRUserFollowingQuery) CountX(ctx context.Context) int
- func (rrfq *RdRUserFollowingQuery) Exist(ctx context.Context) (bool, error)
- func (rrfq *RdRUserFollowingQuery) ExistX(ctx context.Context) bool
- func (rrfq *RdRUserFollowingQuery) First(ctx context.Context) (*RdRUserFollowing, error)
- func (rrfq *RdRUserFollowingQuery) FirstID(ctx context.Context) (id int64, err error)
- func (rrfq *RdRUserFollowingQuery) FirstIDX(ctx context.Context) int64
- func (rrfq *RdRUserFollowingQuery) FirstX(ctx context.Context) *RdRUserFollowing
- func (rrfq *RdRUserFollowingQuery) GroupBy(field string, fields ...string) *RdRUserFollowingGroupBy
- func (rrfq *RdRUserFollowingQuery) IDs(ctx context.Context) ([]int64, error)
- func (rrfq *RdRUserFollowingQuery) IDsX(ctx context.Context) []int64
- func (rrfq *RdRUserFollowingQuery) Limit(limit int) *RdRUserFollowingQuery
- func (rrfq *RdRUserFollowingQuery) Offset(offset int) *RdRUserFollowingQuery
- func (rrfq *RdRUserFollowingQuery) Only(ctx context.Context) (*RdRUserFollowing, error)
- func (rrfq *RdRUserFollowingQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (rrfq *RdRUserFollowingQuery) OnlyIDX(ctx context.Context) int64
- func (rrfq *RdRUserFollowingQuery) OnlyX(ctx context.Context) *RdRUserFollowing
- func (rrfq *RdRUserFollowingQuery) Order(o ...OrderFunc) *RdRUserFollowingQuery
- func (rrfq *RdRUserFollowingQuery) Select(fields ...string) *RdRUserFollowingSelect
- func (rrfq *RdRUserFollowingQuery) Unique(unique bool) *RdRUserFollowingQuery
- func (rrfq *RdRUserFollowingQuery) Where(ps ...predicate.RdRUserFollowing) *RdRUserFollowingQuery
- type RdRUserFollowingSelect
- func (rrfs *RdRUserFollowingSelect) Aggregate(fns ...AggregateFunc) *RdRUserFollowingSelect
- func (s *RdRUserFollowingSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RdRUserFollowingSelect) BoolX(ctx context.Context) bool
- func (s *RdRUserFollowingSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RdRUserFollowingSelect) BoolsX(ctx context.Context) []bool
- func (s *RdRUserFollowingSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RdRUserFollowingSelect) Float64X(ctx context.Context) float64
- func (s *RdRUserFollowingSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RdRUserFollowingSelect) Float64sX(ctx context.Context) []float64
- func (s *RdRUserFollowingSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RdRUserFollowingSelect) IntX(ctx context.Context) int
- func (s *RdRUserFollowingSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RdRUserFollowingSelect) IntsX(ctx context.Context) []int
- func (rrfs *RdRUserFollowingSelect) Scan(ctx context.Context, v any) error
- func (s *RdRUserFollowingSelect) ScanX(ctx context.Context, v any)
- func (s *RdRUserFollowingSelect) String(ctx context.Context) (_ string, err error)
- func (s *RdRUserFollowingSelect) StringX(ctx context.Context) string
- func (s *RdRUserFollowingSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RdRUserFollowingSelect) StringsX(ctx context.Context) []string
- type RdRUserFollowingUpdate
- func (rrfu *RdRUserFollowingUpdate) AddFollowingUID(i int32) *RdRUserFollowingUpdate
- func (rrfu *RdRUserFollowingUpdate) AddUID(i int32) *RdRUserFollowingUpdate
- func (rrfu *RdRUserFollowingUpdate) ClearFollowingUID() *RdRUserFollowingUpdate
- func (rrfu *RdRUserFollowingUpdate) ClearUID() *RdRUserFollowingUpdate
- func (rrfu *RdRUserFollowingUpdate) Exec(ctx context.Context) error
- func (rrfu *RdRUserFollowingUpdate) ExecX(ctx context.Context)
- func (rrfu *RdRUserFollowingUpdate) Mutation() *RdRUserFollowingMutation
- func (rrfu *RdRUserFollowingUpdate) Save(ctx context.Context) (int, error)
- func (rrfu *RdRUserFollowingUpdate) SaveX(ctx context.Context) int
- func (rrfu *RdRUserFollowingUpdate) SetCreateTime(t time.Time) *RdRUserFollowingUpdate
- func (rrfu *RdRUserFollowingUpdate) SetFollowingUID(i int32) *RdRUserFollowingUpdate
- func (rrfu *RdRUserFollowingUpdate) SetNillableCreateTime(t *time.Time) *RdRUserFollowingUpdate
- func (rrfu *RdRUserFollowingUpdate) SetNillableFollowingUID(i *int32) *RdRUserFollowingUpdate
- func (rrfu *RdRUserFollowingUpdate) SetNillableUID(i *int32) *RdRUserFollowingUpdate
- func (rrfu *RdRUserFollowingUpdate) SetUID(i int32) *RdRUserFollowingUpdate
- func (rrfu *RdRUserFollowingUpdate) Where(ps ...predicate.RdRUserFollowing) *RdRUserFollowingUpdate
- type RdRUserFollowingUpdateOne
- func (rrfuo *RdRUserFollowingUpdateOne) AddFollowingUID(i int32) *RdRUserFollowingUpdateOne
- func (rrfuo *RdRUserFollowingUpdateOne) AddUID(i int32) *RdRUserFollowingUpdateOne
- func (rrfuo *RdRUserFollowingUpdateOne) ClearFollowingUID() *RdRUserFollowingUpdateOne
- func (rrfuo *RdRUserFollowingUpdateOne) ClearUID() *RdRUserFollowingUpdateOne
- func (rrfuo *RdRUserFollowingUpdateOne) Exec(ctx context.Context) error
- func (rrfuo *RdRUserFollowingUpdateOne) ExecX(ctx context.Context)
- func (rrfuo *RdRUserFollowingUpdateOne) Mutation() *RdRUserFollowingMutation
- func (rrfuo *RdRUserFollowingUpdateOne) Save(ctx context.Context) (*RdRUserFollowing, error)
- func (rrfuo *RdRUserFollowingUpdateOne) SaveX(ctx context.Context) *RdRUserFollowing
- func (rrfuo *RdRUserFollowingUpdateOne) Select(field string, fields ...string) *RdRUserFollowingUpdateOne
- func (rrfuo *RdRUserFollowingUpdateOne) SetCreateTime(t time.Time) *RdRUserFollowingUpdateOne
- func (rrfuo *RdRUserFollowingUpdateOne) SetFollowingUID(i int32) *RdRUserFollowingUpdateOne
- func (rrfuo *RdRUserFollowingUpdateOne) SetNillableCreateTime(t *time.Time) *RdRUserFollowingUpdateOne
- func (rrfuo *RdRUserFollowingUpdateOne) SetNillableFollowingUID(i *int32) *RdRUserFollowingUpdateOne
- func (rrfuo *RdRUserFollowingUpdateOne) SetNillableUID(i *int32) *RdRUserFollowingUpdateOne
- func (rrfuo *RdRUserFollowingUpdateOne) SetUID(i int32) *RdRUserFollowingUpdateOne
- type RdRUserFollowings
- type RdUser
- type RdUserClient
- func (c *RdUserClient) Create() *RdUserCreate
- func (c *RdUserClient) CreateBulk(builders ...*RdUserCreate) *RdUserCreateBulk
- func (c *RdUserClient) Delete() *RdUserDelete
- func (c *RdUserClient) DeleteOne(ru *RdUser) *RdUserDeleteOne
- func (c *RdUserClient) DeleteOneID(id int32) *RdUserDeleteOne
- func (c *RdUserClient) Get(ctx context.Context, id int32) (*RdUser, error)
- func (c *RdUserClient) GetX(ctx context.Context, id int32) *RdUser
- func (c *RdUserClient) Hooks() []Hook
- func (c *RdUserClient) Intercept(interceptors ...Interceptor)
- func (c *RdUserClient) Interceptors() []Interceptor
- func (c *RdUserClient) Query() *RdUserQuery
- func (c *RdUserClient) Update() *RdUserUpdate
- func (c *RdUserClient) UpdateOne(ru *RdUser) *RdUserUpdateOne
- func (c *RdUserClient) UpdateOneID(id int32) *RdUserUpdateOne
- func (c *RdUserClient) Use(hooks ...Hook)
- type RdUserCreate
- func (ruc *RdUserCreate) Exec(ctx context.Context) error
- func (ruc *RdUserCreate) ExecX(ctx context.Context)
- func (ruc *RdUserCreate) Mutation() *RdUserMutation
- func (ruc *RdUserCreate) Save(ctx context.Context) (*RdUser, error)
- func (ruc *RdUserCreate) SaveX(ctx context.Context) *RdUser
- func (ruc *RdUserCreate) SetCreateTime(t time.Time) *RdUserCreate
- func (ruc *RdUserCreate) SetID(i int32) *RdUserCreate
- func (ruc *RdUserCreate) SetNick(s string) *RdUserCreate
- func (ruc *RdUserCreate) SetNillableCreateTime(t *time.Time) *RdUserCreate
- func (ruc *RdUserCreate) SetNillableStatus(i *int32) *RdUserCreate
- func (ruc *RdUserCreate) SetStatus(i int32) *RdUserCreate
- type RdUserCreateBulk
- type RdUserDelete
- type RdUserDeleteOne
- type RdUserGroupBy
- func (rugb *RdUserGroupBy) Aggregate(fns ...AggregateFunc) *RdUserGroupBy
- func (s *RdUserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RdUserGroupBy) BoolX(ctx context.Context) bool
- func (s *RdUserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RdUserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RdUserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RdUserGroupBy) Float64X(ctx context.Context) float64
- func (s *RdUserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RdUserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RdUserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RdUserGroupBy) IntX(ctx context.Context) int
- func (s *RdUserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RdUserGroupBy) IntsX(ctx context.Context) []int
- func (rugb *RdUserGroupBy) Scan(ctx context.Context, v any) error
- func (s *RdUserGroupBy) ScanX(ctx context.Context, v any)
- func (s *RdUserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RdUserGroupBy) StringX(ctx context.Context) string
- func (s *RdUserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RdUserGroupBy) StringsX(ctx context.Context) []string
- type RdUserMutation
- func (m *RdUserMutation) AddField(name string, value ent.Value) error
- func (m *RdUserMutation) AddStatus(i int32)
- func (m *RdUserMutation) AddedEdges() []string
- func (m *RdUserMutation) AddedField(name string) (ent.Value, bool)
- func (m *RdUserMutation) AddedFields() []string
- func (m *RdUserMutation) AddedIDs(name string) []ent.Value
- func (m *RdUserMutation) AddedStatus() (r int32, exists bool)
- func (m *RdUserMutation) ClearEdge(name string) error
- func (m *RdUserMutation) ClearField(name string) error
- func (m *RdUserMutation) ClearedEdges() []string
- func (m *RdUserMutation) ClearedFields() []string
- func (m RdUserMutation) Client() *Client
- func (m *RdUserMutation) CreateTime() (r time.Time, exists bool)
- func (m *RdUserMutation) EdgeCleared(name string) bool
- func (m *RdUserMutation) Field(name string) (ent.Value, bool)
- func (m *RdUserMutation) FieldCleared(name string) bool
- func (m *RdUserMutation) Fields() []string
- func (m *RdUserMutation) ID() (id int32, exists bool)
- func (m *RdUserMutation) IDs(ctx context.Context) ([]int32, error)
- func (m *RdUserMutation) Nick() (r string, exists bool)
- func (m *RdUserMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *RdUserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RdUserMutation) OldNick(ctx context.Context) (v string, err error)
- func (m *RdUserMutation) OldStatus(ctx context.Context) (v int32, err error)
- func (m *RdUserMutation) Op() Op
- func (m *RdUserMutation) RemovedEdges() []string
- func (m *RdUserMutation) RemovedIDs(name string) []ent.Value
- func (m *RdUserMutation) ResetCreateTime()
- func (m *RdUserMutation) ResetEdge(name string) error
- func (m *RdUserMutation) ResetField(name string) error
- func (m *RdUserMutation) ResetNick()
- func (m *RdUserMutation) ResetStatus()
- func (m *RdUserMutation) SetCreateTime(t time.Time)
- func (m *RdUserMutation) SetField(name string, value ent.Value) error
- func (m *RdUserMutation) SetID(id int32)
- func (m *RdUserMutation) SetNick(s string)
- func (m *RdUserMutation) SetOp(op Op)
- func (m *RdUserMutation) SetStatus(i int32)
- func (m *RdUserMutation) Status() (r int32, exists bool)
- func (m RdUserMutation) Tx() (*Tx, error)
- func (m *RdUserMutation) Type() string
- func (m *RdUserMutation) Where(ps ...predicate.RdUser)
- func (m *RdUserMutation) WhereP(ps ...func(*sql.Selector))
- type RdUserQuery
- func (ruq *RdUserQuery) Aggregate(fns ...AggregateFunc) *RdUserSelect
- func (ruq *RdUserQuery) All(ctx context.Context) ([]*RdUser, error)
- func (ruq *RdUserQuery) AllX(ctx context.Context) []*RdUser
- func (ruq *RdUserQuery) Clone() *RdUserQuery
- func (ruq *RdUserQuery) Count(ctx context.Context) (int, error)
- func (ruq *RdUserQuery) CountX(ctx context.Context) int
- func (ruq *RdUserQuery) Exist(ctx context.Context) (bool, error)
- func (ruq *RdUserQuery) ExistX(ctx context.Context) bool
- func (ruq *RdUserQuery) First(ctx context.Context) (*RdUser, error)
- func (ruq *RdUserQuery) FirstID(ctx context.Context) (id int32, err error)
- func (ruq *RdUserQuery) FirstIDX(ctx context.Context) int32
- func (ruq *RdUserQuery) FirstX(ctx context.Context) *RdUser
- func (ruq *RdUserQuery) GroupBy(field string, fields ...string) *RdUserGroupBy
- func (ruq *RdUserQuery) IDs(ctx context.Context) ([]int32, error)
- func (ruq *RdUserQuery) IDsX(ctx context.Context) []int32
- func (ruq *RdUserQuery) Limit(limit int) *RdUserQuery
- func (ruq *RdUserQuery) Offset(offset int) *RdUserQuery
- func (ruq *RdUserQuery) Only(ctx context.Context) (*RdUser, error)
- func (ruq *RdUserQuery) OnlyID(ctx context.Context) (id int32, err error)
- func (ruq *RdUserQuery) OnlyIDX(ctx context.Context) int32
- func (ruq *RdUserQuery) OnlyX(ctx context.Context) *RdUser
- func (ruq *RdUserQuery) Order(o ...OrderFunc) *RdUserQuery
- func (ruq *RdUserQuery) Select(fields ...string) *RdUserSelect
- func (ruq *RdUserQuery) Unique(unique bool) *RdUserQuery
- func (ruq *RdUserQuery) Where(ps ...predicate.RdUser) *RdUserQuery
- type RdUserSelect
- func (rus *RdUserSelect) Aggregate(fns ...AggregateFunc) *RdUserSelect
- func (s *RdUserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RdUserSelect) BoolX(ctx context.Context) bool
- func (s *RdUserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RdUserSelect) BoolsX(ctx context.Context) []bool
- func (s *RdUserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RdUserSelect) Float64X(ctx context.Context) float64
- func (s *RdUserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RdUserSelect) Float64sX(ctx context.Context) []float64
- func (s *RdUserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RdUserSelect) IntX(ctx context.Context) int
- func (s *RdUserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RdUserSelect) IntsX(ctx context.Context) []int
- func (rus *RdUserSelect) Scan(ctx context.Context, v any) error
- func (s *RdUserSelect) ScanX(ctx context.Context, v any)
- func (s *RdUserSelect) String(ctx context.Context) (_ string, err error)
- func (s *RdUserSelect) StringX(ctx context.Context) string
- func (s *RdUserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RdUserSelect) StringsX(ctx context.Context) []string
- type RdUserUpdate
- func (ruu *RdUserUpdate) AddStatus(i int32) *RdUserUpdate
- func (ruu *RdUserUpdate) Exec(ctx context.Context) error
- func (ruu *RdUserUpdate) ExecX(ctx context.Context)
- func (ruu *RdUserUpdate) Mutation() *RdUserMutation
- func (ruu *RdUserUpdate) Save(ctx context.Context) (int, error)
- func (ruu *RdUserUpdate) SaveX(ctx context.Context) int
- func (ruu *RdUserUpdate) SetCreateTime(t time.Time) *RdUserUpdate
- func (ruu *RdUserUpdate) SetNick(s string) *RdUserUpdate
- func (ruu *RdUserUpdate) SetNillableCreateTime(t *time.Time) *RdUserUpdate
- func (ruu *RdUserUpdate) SetNillableStatus(i *int32) *RdUserUpdate
- func (ruu *RdUserUpdate) SetStatus(i int32) *RdUserUpdate
- func (ruu *RdUserUpdate) Where(ps ...predicate.RdUser) *RdUserUpdate
- type RdUserUpdateOne
- func (ruuo *RdUserUpdateOne) AddStatus(i int32) *RdUserUpdateOne
- func (ruuo *RdUserUpdateOne) Exec(ctx context.Context) error
- func (ruuo *RdUserUpdateOne) ExecX(ctx context.Context)
- func (ruuo *RdUserUpdateOne) Mutation() *RdUserMutation
- func (ruuo *RdUserUpdateOne) Save(ctx context.Context) (*RdUser, error)
- func (ruuo *RdUserUpdateOne) SaveX(ctx context.Context) *RdUser
- func (ruuo *RdUserUpdateOne) Select(field string, fields ...string) *RdUserUpdateOne
- func (ruuo *RdUserUpdateOne) SetCreateTime(t time.Time) *RdUserUpdateOne
- func (ruuo *RdUserUpdateOne) SetNick(s string) *RdUserUpdateOne
- func (ruuo *RdUserUpdateOne) SetNillableCreateTime(t *time.Time) *RdUserUpdateOne
- func (ruuo *RdUserUpdateOne) SetNillableStatus(i *int32) *RdUserUpdateOne
- func (ruuo *RdUserUpdateOne) SetStatus(i int32) *RdUserUpdateOne
- type RdUsers
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeRdMessage = "RdMessage" TypeRdMoment = "RdMoment" TypeRdRMomentsFollowing = "RdRMomentsFollowing" TypeRdRUserFollowers = "RdRUserFollowers" TypeRdRUserFollowing = "RdRUserFollowing" TypeRdUser = "RdUser" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // RdMessage is the client for interacting with the RdMessage builders. RdMessage *RdMessageClient // RdMoment is the client for interacting with the RdMoment builders. RdMoment *RdMomentClient // RdRMomentsFollowing is the client for interacting with the RdRMomentsFollowing builders. RdRMomentsFollowing *RdRMomentsFollowingClient // RdRUserFollowers is the client for interacting with the RdRUserFollowers builders. RdRUserFollowers *RdRUserFollowersClient // RdRUserFollowing is the client for interacting with the RdRUserFollowing builders. RdRUserFollowing *RdRUserFollowingClient // RdUser is the client for interacting with the RdUser builders. RdUser *RdUserClient // 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(). RdMessage. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RdMessage ¶
type RdMessage struct { // ID of the ent. // 消息ID ID int32 `json:"id,omitempty"` // 发送者id SenderUID int32 `json:"sender_uid,omitempty"` // 接收者id RecverUID int32 `json:"recver_uid,omitempty"` // 聊天内容 Content *biz.Content `json:"content,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // contains filtered or unexported fields }
RdMessage is the model entity for the RdMessage schema.
func (*RdMessage) Unwrap ¶
Unwrap unwraps the RdMessage 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 (*RdMessage) Update ¶
func (rm *RdMessage) Update() *RdMessageUpdateOne
Update returns a builder for updating this RdMessage. Note that you need to call RdMessage.Unwrap() before calling this method if this RdMessage was returned from a transaction, and the transaction was committed or rolled back.
type RdMessageClient ¶
type RdMessageClient struct {
// contains filtered or unexported fields
}
RdMessageClient is a client for the RdMessage schema.
func NewRdMessageClient ¶
func NewRdMessageClient(c config) *RdMessageClient
NewRdMessageClient returns a client for the RdMessage from the given config.
func (*RdMessageClient) Create ¶
func (c *RdMessageClient) Create() *RdMessageCreate
Create returns a builder for creating a RdMessage entity.
func (*RdMessageClient) CreateBulk ¶
func (c *RdMessageClient) CreateBulk(builders ...*RdMessageCreate) *RdMessageCreateBulk
CreateBulk returns a builder for creating a bulk of RdMessage entities.
func (*RdMessageClient) Delete ¶
func (c *RdMessageClient) Delete() *RdMessageDelete
Delete returns a delete builder for RdMessage.
func (*RdMessageClient) DeleteOne ¶
func (c *RdMessageClient) DeleteOne(rm *RdMessage) *RdMessageDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RdMessageClient) DeleteOneID ¶
func (c *RdMessageClient) DeleteOneID(id int32) *RdMessageDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RdMessageClient) GetX ¶
func (c *RdMessageClient) GetX(ctx context.Context, id int32) *RdMessage
GetX is like Get, but panics if an error occurs.
func (*RdMessageClient) Hooks ¶
func (c *RdMessageClient) Hooks() []Hook
Hooks returns the client hooks.
func (*RdMessageClient) Intercept ¶
func (c *RdMessageClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `rdmessage.Intercept(f(g(h())))`.
func (*RdMessageClient) Interceptors ¶
func (c *RdMessageClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RdMessageClient) Query ¶
func (c *RdMessageClient) Query() *RdMessageQuery
Query returns a query builder for RdMessage.
func (*RdMessageClient) Update ¶
func (c *RdMessageClient) Update() *RdMessageUpdate
Update returns an update builder for RdMessage.
func (*RdMessageClient) UpdateOne ¶
func (c *RdMessageClient) UpdateOne(rm *RdMessage) *RdMessageUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RdMessageClient) UpdateOneID ¶
func (c *RdMessageClient) UpdateOneID(id int32) *RdMessageUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RdMessageClient) Use ¶
func (c *RdMessageClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `rdmessage.Hooks(f(g(h())))`.
type RdMessageCreate ¶
type RdMessageCreate struct {
// contains filtered or unexported fields
}
RdMessageCreate is the builder for creating a RdMessage entity.
func (*RdMessageCreate) Exec ¶
func (rmc *RdMessageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RdMessageCreate) ExecX ¶
func (rmc *RdMessageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RdMessageCreate) Mutation ¶
func (rmc *RdMessageCreate) Mutation() *RdMessageMutation
Mutation returns the RdMessageMutation object of the builder.
func (*RdMessageCreate) Save ¶
func (rmc *RdMessageCreate) Save(ctx context.Context) (*RdMessage, error)
Save creates the RdMessage in the database.
func (*RdMessageCreate) SaveX ¶
func (rmc *RdMessageCreate) SaveX(ctx context.Context) *RdMessage
SaveX calls Save and panics if Save returns an error.
func (*RdMessageCreate) SetContent ¶
func (rmc *RdMessageCreate) SetContent(b *biz.Content) *RdMessageCreate
SetContent sets the "content" field.
func (*RdMessageCreate) SetCreateTime ¶
func (rmc *RdMessageCreate) SetCreateTime(t time.Time) *RdMessageCreate
SetCreateTime sets the "create_time" field.
func (*RdMessageCreate) SetID ¶
func (rmc *RdMessageCreate) SetID(i int32) *RdMessageCreate
SetID sets the "id" field.
func (*RdMessageCreate) SetNillableCreateTime ¶
func (rmc *RdMessageCreate) SetNillableCreateTime(t *time.Time) *RdMessageCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*RdMessageCreate) SetNillableRecverUID ¶
func (rmc *RdMessageCreate) SetNillableRecverUID(i *int32) *RdMessageCreate
SetNillableRecverUID sets the "recver_uid" field if the given value is not nil.
func (*RdMessageCreate) SetNillableSenderUID ¶
func (rmc *RdMessageCreate) SetNillableSenderUID(i *int32) *RdMessageCreate
SetNillableSenderUID sets the "sender_uid" field if the given value is not nil.
func (*RdMessageCreate) SetRecverUID ¶
func (rmc *RdMessageCreate) SetRecverUID(i int32) *RdMessageCreate
SetRecverUID sets the "recver_uid" field.
func (*RdMessageCreate) SetSenderUID ¶
func (rmc *RdMessageCreate) SetSenderUID(i int32) *RdMessageCreate
SetSenderUID sets the "sender_uid" field.
type RdMessageCreateBulk ¶
type RdMessageCreateBulk struct {
// contains filtered or unexported fields
}
RdMessageCreateBulk is the builder for creating many RdMessage entities in bulk.
func (*RdMessageCreateBulk) Exec ¶
func (rmcb *RdMessageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RdMessageCreateBulk) ExecX ¶
func (rmcb *RdMessageCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RdMessageDelete ¶
type RdMessageDelete struct {
// contains filtered or unexported fields
}
RdMessageDelete is the builder for deleting a RdMessage entity.
func (*RdMessageDelete) Exec ¶
func (rmd *RdMessageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RdMessageDelete) ExecX ¶
func (rmd *RdMessageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RdMessageDelete) Where ¶
func (rmd *RdMessageDelete) Where(ps ...predicate.RdMessage) *RdMessageDelete
Where appends a list predicates to the RdMessageDelete builder.
type RdMessageDeleteOne ¶
type RdMessageDeleteOne struct {
// contains filtered or unexported fields
}
RdMessageDeleteOne is the builder for deleting a single RdMessage entity.
func (*RdMessageDeleteOne) Exec ¶
func (rmdo *RdMessageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RdMessageDeleteOne) ExecX ¶
func (rmdo *RdMessageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RdMessageGroupBy ¶
type RdMessageGroupBy struct {
// contains filtered or unexported fields
}
RdMessageGroupBy is the group-by builder for RdMessage entities.
func (*RdMessageGroupBy) Aggregate ¶
func (rmgb *RdMessageGroupBy) Aggregate(fns ...AggregateFunc) *RdMessageGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RdMessageGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RdMessageGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RdMessageGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RdMessageGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RdMessageGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RdMessageGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RdMessageGroupBy) Scan ¶
func (rmgb *RdMessageGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RdMessageGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RdMessageMutation ¶
type RdMessageMutation struct {
// contains filtered or unexported fields
}
RdMessageMutation represents an operation that mutates the RdMessage nodes in the graph.
func (*RdMessageMutation) AddField ¶
func (m *RdMessageMutation) 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 (*RdMessageMutation) AddRecverUID ¶
func (m *RdMessageMutation) AddRecverUID(i int32)
AddRecverUID adds i to the "recver_uid" field.
func (*RdMessageMutation) AddSenderUID ¶
func (m *RdMessageMutation) AddSenderUID(i int32)
AddSenderUID adds i to the "sender_uid" field.
func (*RdMessageMutation) AddedEdges ¶
func (m *RdMessageMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RdMessageMutation) AddedField ¶
func (m *RdMessageMutation) 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 (*RdMessageMutation) AddedFields ¶
func (m *RdMessageMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RdMessageMutation) AddedIDs ¶
func (m *RdMessageMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RdMessageMutation) AddedRecverUID ¶
func (m *RdMessageMutation) AddedRecverUID() (r int32, exists bool)
AddedRecverUID returns the value that was added to the "recver_uid" field in this mutation.
func (*RdMessageMutation) AddedSenderUID ¶
func (m *RdMessageMutation) AddedSenderUID() (r int32, exists bool)
AddedSenderUID returns the value that was added to the "sender_uid" field in this mutation.
func (*RdMessageMutation) ClearEdge ¶
func (m *RdMessageMutation) 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 (*RdMessageMutation) ClearField ¶
func (m *RdMessageMutation) 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 (*RdMessageMutation) ClearRecverUID ¶
func (m *RdMessageMutation) ClearRecverUID()
ClearRecverUID clears the value of the "recver_uid" field.
func (*RdMessageMutation) ClearSenderUID ¶
func (m *RdMessageMutation) ClearSenderUID()
ClearSenderUID clears the value of the "sender_uid" field.
func (*RdMessageMutation) ClearedEdges ¶
func (m *RdMessageMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RdMessageMutation) ClearedFields ¶
func (m *RdMessageMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RdMessageMutation) Client ¶
func (m RdMessageMutation) 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 (*RdMessageMutation) Content ¶
func (m *RdMessageMutation) Content() (r *biz.Content, exists bool)
Content returns the value of the "content" field in the mutation.
func (*RdMessageMutation) CreateTime ¶
func (m *RdMessageMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*RdMessageMutation) EdgeCleared ¶
func (m *RdMessageMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RdMessageMutation) Field ¶
func (m *RdMessageMutation) 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 (*RdMessageMutation) FieldCleared ¶
func (m *RdMessageMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RdMessageMutation) Fields ¶
func (m *RdMessageMutation) 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 (*RdMessageMutation) ID ¶
func (m *RdMessageMutation) ID() (id int32, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*RdMessageMutation) IDs ¶
func (m *RdMessageMutation) IDs(ctx context.Context) ([]int32, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*RdMessageMutation) OldContent ¶
OldContent returns the old "content" field's value of the RdMessage entity. If the RdMessage 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 (*RdMessageMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the RdMessage entity. If the RdMessage 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 (*RdMessageMutation) 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 (*RdMessageMutation) OldRecverUID ¶
func (m *RdMessageMutation) OldRecverUID(ctx context.Context) (v int32, err error)
OldRecverUID returns the old "recver_uid" field's value of the RdMessage entity. If the RdMessage 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 (*RdMessageMutation) OldSenderUID ¶
func (m *RdMessageMutation) OldSenderUID(ctx context.Context) (v int32, err error)
OldSenderUID returns the old "sender_uid" field's value of the RdMessage entity. If the RdMessage 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 (*RdMessageMutation) RecverUID ¶
func (m *RdMessageMutation) RecverUID() (r int32, exists bool)
RecverUID returns the value of the "recver_uid" field in the mutation.
func (*RdMessageMutation) RecverUIDCleared ¶
func (m *RdMessageMutation) RecverUIDCleared() bool
RecverUIDCleared returns if the "recver_uid" field was cleared in this mutation.
func (*RdMessageMutation) RemovedEdges ¶
func (m *RdMessageMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RdMessageMutation) RemovedIDs ¶
func (m *RdMessageMutation) 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 (*RdMessageMutation) ResetContent ¶
func (m *RdMessageMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*RdMessageMutation) ResetCreateTime ¶
func (m *RdMessageMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*RdMessageMutation) ResetEdge ¶
func (m *RdMessageMutation) 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 (*RdMessageMutation) ResetField ¶
func (m *RdMessageMutation) 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 (*RdMessageMutation) ResetRecverUID ¶
func (m *RdMessageMutation) ResetRecverUID()
ResetRecverUID resets all changes to the "recver_uid" field.
func (*RdMessageMutation) ResetSenderUID ¶
func (m *RdMessageMutation) ResetSenderUID()
ResetSenderUID resets all changes to the "sender_uid" field.
func (*RdMessageMutation) SenderUID ¶
func (m *RdMessageMutation) SenderUID() (r int32, exists bool)
SenderUID returns the value of the "sender_uid" field in the mutation.
func (*RdMessageMutation) SenderUIDCleared ¶
func (m *RdMessageMutation) SenderUIDCleared() bool
SenderUIDCleared returns if the "sender_uid" field was cleared in this mutation.
func (*RdMessageMutation) SetContent ¶
func (m *RdMessageMutation) SetContent(b *biz.Content)
SetContent sets the "content" field.
func (*RdMessageMutation) SetCreateTime ¶
func (m *RdMessageMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*RdMessageMutation) SetField ¶
func (m *RdMessageMutation) 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 (*RdMessageMutation) SetID ¶
func (m *RdMessageMutation) SetID(id int32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of RdMessage entities.
func (*RdMessageMutation) SetOp ¶
func (m *RdMessageMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*RdMessageMutation) SetRecverUID ¶
func (m *RdMessageMutation) SetRecverUID(i int32)
SetRecverUID sets the "recver_uid" field.
func (*RdMessageMutation) SetSenderUID ¶
func (m *RdMessageMutation) SetSenderUID(i int32)
SetSenderUID sets the "sender_uid" field.
func (RdMessageMutation) Tx ¶
func (m RdMessageMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RdMessageMutation) Type ¶
func (m *RdMessageMutation) Type() string
Type returns the node type of this mutation (RdMessage).
func (*RdMessageMutation) Where ¶
func (m *RdMessageMutation) Where(ps ...predicate.RdMessage)
Where appends a list predicates to the RdMessageMutation builder.
func (*RdMessageMutation) WhereP ¶
func (m *RdMessageMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RdMessageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RdMessageQuery ¶
type RdMessageQuery struct {
// contains filtered or unexported fields
}
RdMessageQuery is the builder for querying RdMessage entities.
func (*RdMessageQuery) Aggregate ¶
func (rmq *RdMessageQuery) Aggregate(fns ...AggregateFunc) *RdMessageSelect
Aggregate returns a RdMessageSelect configured with the given aggregations.
func (*RdMessageQuery) All ¶
func (rmq *RdMessageQuery) All(ctx context.Context) ([]*RdMessage, error)
All executes the query and returns a list of RdMessages.
func (*RdMessageQuery) AllX ¶
func (rmq *RdMessageQuery) AllX(ctx context.Context) []*RdMessage
AllX is like All, but panics if an error occurs.
func (*RdMessageQuery) Clone ¶
func (rmq *RdMessageQuery) Clone() *RdMessageQuery
Clone returns a duplicate of the RdMessageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RdMessageQuery) Count ¶
func (rmq *RdMessageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RdMessageQuery) CountX ¶
func (rmq *RdMessageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RdMessageQuery) Exist ¶
func (rmq *RdMessageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RdMessageQuery) ExistX ¶
func (rmq *RdMessageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RdMessageQuery) First ¶
func (rmq *RdMessageQuery) First(ctx context.Context) (*RdMessage, error)
First returns the first RdMessage entity from the query. Returns a *NotFoundError when no RdMessage was found.
func (*RdMessageQuery) FirstID ¶
func (rmq *RdMessageQuery) FirstID(ctx context.Context) (id int32, err error)
FirstID returns the first RdMessage ID from the query. Returns a *NotFoundError when no RdMessage ID was found.
func (*RdMessageQuery) FirstIDX ¶
func (rmq *RdMessageQuery) FirstIDX(ctx context.Context) int32
FirstIDX is like FirstID, but panics if an error occurs.
func (*RdMessageQuery) FirstX ¶
func (rmq *RdMessageQuery) FirstX(ctx context.Context) *RdMessage
FirstX is like First, but panics if an error occurs.
func (*RdMessageQuery) GroupBy ¶
func (rmq *RdMessageQuery) GroupBy(field string, fields ...string) *RdMessageGroupBy
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 { SenderUID int32 `json:"sender_uid,omitempty"` Count int `json:"count,omitempty"` } client.RdMessage.Query(). GroupBy(rdmessage.FieldSenderUID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RdMessageQuery) IDs ¶
func (rmq *RdMessageQuery) IDs(ctx context.Context) ([]int32, error)
IDs executes the query and returns a list of RdMessage IDs.
func (*RdMessageQuery) IDsX ¶
func (rmq *RdMessageQuery) IDsX(ctx context.Context) []int32
IDsX is like IDs, but panics if an error occurs.
func (*RdMessageQuery) Limit ¶
func (rmq *RdMessageQuery) Limit(limit int) *RdMessageQuery
Limit the number of records to be returned by this query.
func (*RdMessageQuery) Offset ¶
func (rmq *RdMessageQuery) Offset(offset int) *RdMessageQuery
Offset to start from.
func (*RdMessageQuery) Only ¶
func (rmq *RdMessageQuery) Only(ctx context.Context) (*RdMessage, error)
Only returns a single RdMessage entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one RdMessage entity is found. Returns a *NotFoundError when no RdMessage entities are found.
func (*RdMessageQuery) OnlyID ¶
func (rmq *RdMessageQuery) OnlyID(ctx context.Context) (id int32, err error)
OnlyID is like Only, but returns the only RdMessage ID in the query. Returns a *NotSingularError when more than one RdMessage ID is found. Returns a *NotFoundError when no entities are found.
func (*RdMessageQuery) OnlyIDX ¶
func (rmq *RdMessageQuery) OnlyIDX(ctx context.Context) int32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RdMessageQuery) OnlyX ¶
func (rmq *RdMessageQuery) OnlyX(ctx context.Context) *RdMessage
OnlyX is like Only, but panics if an error occurs.
func (*RdMessageQuery) Order ¶
func (rmq *RdMessageQuery) Order(o ...OrderFunc) *RdMessageQuery
Order specifies how the records should be ordered.
func (*RdMessageQuery) Select ¶
func (rmq *RdMessageQuery) Select(fields ...string) *RdMessageSelect
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 { SenderUID int32 `json:"sender_uid,omitempty"` } client.RdMessage.Query(). Select(rdmessage.FieldSenderUID). Scan(ctx, &v)
func (*RdMessageQuery) Unique ¶
func (rmq *RdMessageQuery) Unique(unique bool) *RdMessageQuery
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 (*RdMessageQuery) Where ¶
func (rmq *RdMessageQuery) Where(ps ...predicate.RdMessage) *RdMessageQuery
Where adds a new predicate for the RdMessageQuery builder.
type RdMessageSelect ¶
type RdMessageSelect struct { *RdMessageQuery // contains filtered or unexported fields }
RdMessageSelect is the builder for selecting fields of RdMessage entities.
func (*RdMessageSelect) Aggregate ¶
func (rms *RdMessageSelect) Aggregate(fns ...AggregateFunc) *RdMessageSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RdMessageSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RdMessageSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RdMessageSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RdMessageSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RdMessageSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RdMessageSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RdMessageSelect) Scan ¶
func (rms *RdMessageSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RdMessageSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RdMessageUpdate ¶
type RdMessageUpdate struct {
// contains filtered or unexported fields
}
RdMessageUpdate is the builder for updating RdMessage entities.
func (*RdMessageUpdate) AddRecverUID ¶
func (rmu *RdMessageUpdate) AddRecverUID(i int32) *RdMessageUpdate
AddRecverUID adds i to the "recver_uid" field.
func (*RdMessageUpdate) AddSenderUID ¶
func (rmu *RdMessageUpdate) AddSenderUID(i int32) *RdMessageUpdate
AddSenderUID adds i to the "sender_uid" field.
func (*RdMessageUpdate) ClearRecverUID ¶
func (rmu *RdMessageUpdate) ClearRecverUID() *RdMessageUpdate
ClearRecverUID clears the value of the "recver_uid" field.
func (*RdMessageUpdate) ClearSenderUID ¶
func (rmu *RdMessageUpdate) ClearSenderUID() *RdMessageUpdate
ClearSenderUID clears the value of the "sender_uid" field.
func (*RdMessageUpdate) Exec ¶
func (rmu *RdMessageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RdMessageUpdate) ExecX ¶
func (rmu *RdMessageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RdMessageUpdate) Mutation ¶
func (rmu *RdMessageUpdate) Mutation() *RdMessageMutation
Mutation returns the RdMessageMutation object of the builder.
func (*RdMessageUpdate) Save ¶
func (rmu *RdMessageUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RdMessageUpdate) SaveX ¶
func (rmu *RdMessageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RdMessageUpdate) SetContent ¶
func (rmu *RdMessageUpdate) SetContent(b *biz.Content) *RdMessageUpdate
SetContent sets the "content" field.
func (*RdMessageUpdate) SetCreateTime ¶
func (rmu *RdMessageUpdate) SetCreateTime(t time.Time) *RdMessageUpdate
SetCreateTime sets the "create_time" field.
func (*RdMessageUpdate) SetNillableCreateTime ¶
func (rmu *RdMessageUpdate) SetNillableCreateTime(t *time.Time) *RdMessageUpdate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*RdMessageUpdate) SetNillableRecverUID ¶
func (rmu *RdMessageUpdate) SetNillableRecverUID(i *int32) *RdMessageUpdate
SetNillableRecverUID sets the "recver_uid" field if the given value is not nil.
func (*RdMessageUpdate) SetNillableSenderUID ¶
func (rmu *RdMessageUpdate) SetNillableSenderUID(i *int32) *RdMessageUpdate
SetNillableSenderUID sets the "sender_uid" field if the given value is not nil.
func (*RdMessageUpdate) SetRecverUID ¶
func (rmu *RdMessageUpdate) SetRecverUID(i int32) *RdMessageUpdate
SetRecverUID sets the "recver_uid" field.
func (*RdMessageUpdate) SetSenderUID ¶
func (rmu *RdMessageUpdate) SetSenderUID(i int32) *RdMessageUpdate
SetSenderUID sets the "sender_uid" field.
func (*RdMessageUpdate) Where ¶
func (rmu *RdMessageUpdate) Where(ps ...predicate.RdMessage) *RdMessageUpdate
Where appends a list predicates to the RdMessageUpdate builder.
type RdMessageUpdateOne ¶
type RdMessageUpdateOne struct {
// contains filtered or unexported fields
}
RdMessageUpdateOne is the builder for updating a single RdMessage entity.
func (*RdMessageUpdateOne) AddRecverUID ¶
func (rmuo *RdMessageUpdateOne) AddRecverUID(i int32) *RdMessageUpdateOne
AddRecverUID adds i to the "recver_uid" field.
func (*RdMessageUpdateOne) AddSenderUID ¶
func (rmuo *RdMessageUpdateOne) AddSenderUID(i int32) *RdMessageUpdateOne
AddSenderUID adds i to the "sender_uid" field.
func (*RdMessageUpdateOne) ClearRecverUID ¶
func (rmuo *RdMessageUpdateOne) ClearRecverUID() *RdMessageUpdateOne
ClearRecverUID clears the value of the "recver_uid" field.
func (*RdMessageUpdateOne) ClearSenderUID ¶
func (rmuo *RdMessageUpdateOne) ClearSenderUID() *RdMessageUpdateOne
ClearSenderUID clears the value of the "sender_uid" field.
func (*RdMessageUpdateOne) Exec ¶
func (rmuo *RdMessageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RdMessageUpdateOne) ExecX ¶
func (rmuo *RdMessageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RdMessageUpdateOne) Mutation ¶
func (rmuo *RdMessageUpdateOne) Mutation() *RdMessageMutation
Mutation returns the RdMessageMutation object of the builder.
func (*RdMessageUpdateOne) Save ¶
func (rmuo *RdMessageUpdateOne) Save(ctx context.Context) (*RdMessage, error)
Save executes the query and returns the updated RdMessage entity.
func (*RdMessageUpdateOne) SaveX ¶
func (rmuo *RdMessageUpdateOne) SaveX(ctx context.Context) *RdMessage
SaveX is like Save, but panics if an error occurs.
func (*RdMessageUpdateOne) Select ¶
func (rmuo *RdMessageUpdateOne) Select(field string, fields ...string) *RdMessageUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RdMessageUpdateOne) SetContent ¶
func (rmuo *RdMessageUpdateOne) SetContent(b *biz.Content) *RdMessageUpdateOne
SetContent sets the "content" field.
func (*RdMessageUpdateOne) SetCreateTime ¶
func (rmuo *RdMessageUpdateOne) SetCreateTime(t time.Time) *RdMessageUpdateOne
SetCreateTime sets the "create_time" field.
func (*RdMessageUpdateOne) SetNillableCreateTime ¶
func (rmuo *RdMessageUpdateOne) SetNillableCreateTime(t *time.Time) *RdMessageUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*RdMessageUpdateOne) SetNillableRecverUID ¶
func (rmuo *RdMessageUpdateOne) SetNillableRecverUID(i *int32) *RdMessageUpdateOne
SetNillableRecverUID sets the "recver_uid" field if the given value is not nil.
func (*RdMessageUpdateOne) SetNillableSenderUID ¶
func (rmuo *RdMessageUpdateOne) SetNillableSenderUID(i *int32) *RdMessageUpdateOne
SetNillableSenderUID sets the "sender_uid" field if the given value is not nil.
func (*RdMessageUpdateOne) SetRecverUID ¶
func (rmuo *RdMessageUpdateOne) SetRecverUID(i int32) *RdMessageUpdateOne
SetRecverUID sets the "recver_uid" field.
func (*RdMessageUpdateOne) SetSenderUID ¶
func (rmuo *RdMessageUpdateOne) SetSenderUID(i int32) *RdMessageUpdateOne
SetSenderUID sets the "sender_uid" field.
type RdMoment ¶
type RdMoment struct { // ID of the ent. ID int64 `json:"id,omitempty"` // 动态类型 1图文 2视频 3专栏 Type int32 `json:"type,omitempty"` // 谁发布的动态 ByUID int32 `json:"by_uid,omitempty"` // 文字 Txt string `json:"txt,omitempty"` // 动态的图片数组 Imgs []string `json:"imgs,omitempty"` // 关注的人uid Status int32 `json:"status,omitempty"` // PublishTime holds the value of the "publish_time" field. PublishTime time.Time `json:"publish_time,omitempty"` // contains filtered or unexported fields }
RdMoment is the model entity for the RdMoment schema.
func (*RdMoment) Unwrap ¶
Unwrap unwraps the RdMoment 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 (*RdMoment) Update ¶
func (rm *RdMoment) Update() *RdMomentUpdateOne
Update returns a builder for updating this RdMoment. Note that you need to call RdMoment.Unwrap() before calling this method if this RdMoment was returned from a transaction, and the transaction was committed or rolled back.
type RdMomentClient ¶
type RdMomentClient struct {
// contains filtered or unexported fields
}
RdMomentClient is a client for the RdMoment schema.
func NewRdMomentClient ¶
func NewRdMomentClient(c config) *RdMomentClient
NewRdMomentClient returns a client for the RdMoment from the given config.
func (*RdMomentClient) Create ¶
func (c *RdMomentClient) Create() *RdMomentCreate
Create returns a builder for creating a RdMoment entity.
func (*RdMomentClient) CreateBulk ¶
func (c *RdMomentClient) CreateBulk(builders ...*RdMomentCreate) *RdMomentCreateBulk
CreateBulk returns a builder for creating a bulk of RdMoment entities.
func (*RdMomentClient) Delete ¶
func (c *RdMomentClient) Delete() *RdMomentDelete
Delete returns a delete builder for RdMoment.
func (*RdMomentClient) DeleteOne ¶
func (c *RdMomentClient) DeleteOne(rm *RdMoment) *RdMomentDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RdMomentClient) DeleteOneID ¶
func (c *RdMomentClient) DeleteOneID(id int64) *RdMomentDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RdMomentClient) GetX ¶
func (c *RdMomentClient) GetX(ctx context.Context, id int64) *RdMoment
GetX is like Get, but panics if an error occurs.
func (*RdMomentClient) Hooks ¶
func (c *RdMomentClient) Hooks() []Hook
Hooks returns the client hooks.
func (*RdMomentClient) Intercept ¶
func (c *RdMomentClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `rdmoment.Intercept(f(g(h())))`.
func (*RdMomentClient) Interceptors ¶
func (c *RdMomentClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RdMomentClient) Query ¶
func (c *RdMomentClient) Query() *RdMomentQuery
Query returns a query builder for RdMoment.
func (*RdMomentClient) Update ¶
func (c *RdMomentClient) Update() *RdMomentUpdate
Update returns an update builder for RdMoment.
func (*RdMomentClient) UpdateOne ¶
func (c *RdMomentClient) UpdateOne(rm *RdMoment) *RdMomentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RdMomentClient) UpdateOneID ¶
func (c *RdMomentClient) UpdateOneID(id int64) *RdMomentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RdMomentClient) Use ¶
func (c *RdMomentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `rdmoment.Hooks(f(g(h())))`.
type RdMomentCreate ¶
type RdMomentCreate struct {
// contains filtered or unexported fields
}
RdMomentCreate is the builder for creating a RdMoment entity.
func (*RdMomentCreate) Exec ¶
func (rmc *RdMomentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RdMomentCreate) ExecX ¶
func (rmc *RdMomentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RdMomentCreate) Mutation ¶
func (rmc *RdMomentCreate) Mutation() *RdMomentMutation
Mutation returns the RdMomentMutation object of the builder.
func (*RdMomentCreate) Save ¶
func (rmc *RdMomentCreate) Save(ctx context.Context) (*RdMoment, error)
Save creates the RdMoment in the database.
func (*RdMomentCreate) SaveX ¶
func (rmc *RdMomentCreate) SaveX(ctx context.Context) *RdMoment
SaveX calls Save and panics if Save returns an error.
func (*RdMomentCreate) SetByUID ¶
func (rmc *RdMomentCreate) SetByUID(i int32) *RdMomentCreate
SetByUID sets the "by_uid" field.
func (*RdMomentCreate) SetID ¶
func (rmc *RdMomentCreate) SetID(i int64) *RdMomentCreate
SetID sets the "id" field.
func (*RdMomentCreate) SetImgs ¶
func (rmc *RdMomentCreate) SetImgs(s []string) *RdMomentCreate
SetImgs sets the "imgs" field.
func (*RdMomentCreate) SetNillableByUID ¶
func (rmc *RdMomentCreate) SetNillableByUID(i *int32) *RdMomentCreate
SetNillableByUID sets the "by_uid" field if the given value is not nil.
func (*RdMomentCreate) SetNillablePublishTime ¶
func (rmc *RdMomentCreate) SetNillablePublishTime(t *time.Time) *RdMomentCreate
SetNillablePublishTime sets the "publish_time" field if the given value is not nil.
func (*RdMomentCreate) SetNillableStatus ¶
func (rmc *RdMomentCreate) SetNillableStatus(i *int32) *RdMomentCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*RdMomentCreate) SetNillableType ¶
func (rmc *RdMomentCreate) SetNillableType(i *int32) *RdMomentCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*RdMomentCreate) SetPublishTime ¶
func (rmc *RdMomentCreate) SetPublishTime(t time.Time) *RdMomentCreate
SetPublishTime sets the "publish_time" field.
func (*RdMomentCreate) SetStatus ¶
func (rmc *RdMomentCreate) SetStatus(i int32) *RdMomentCreate
SetStatus sets the "status" field.
func (*RdMomentCreate) SetTxt ¶
func (rmc *RdMomentCreate) SetTxt(s string) *RdMomentCreate
SetTxt sets the "txt" field.
func (*RdMomentCreate) SetType ¶
func (rmc *RdMomentCreate) SetType(i int32) *RdMomentCreate
SetType sets the "type" field.
type RdMomentCreateBulk ¶
type RdMomentCreateBulk struct {
// contains filtered or unexported fields
}
RdMomentCreateBulk is the builder for creating many RdMoment entities in bulk.
func (*RdMomentCreateBulk) Exec ¶
func (rmcb *RdMomentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RdMomentCreateBulk) ExecX ¶
func (rmcb *RdMomentCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RdMomentDelete ¶
type RdMomentDelete struct {
// contains filtered or unexported fields
}
RdMomentDelete is the builder for deleting a RdMoment entity.
func (*RdMomentDelete) Exec ¶
func (rmd *RdMomentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RdMomentDelete) ExecX ¶
func (rmd *RdMomentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RdMomentDelete) Where ¶
func (rmd *RdMomentDelete) Where(ps ...predicate.RdMoment) *RdMomentDelete
Where appends a list predicates to the RdMomentDelete builder.
type RdMomentDeleteOne ¶
type RdMomentDeleteOne struct {
// contains filtered or unexported fields
}
RdMomentDeleteOne is the builder for deleting a single RdMoment entity.
func (*RdMomentDeleteOne) Exec ¶
func (rmdo *RdMomentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RdMomentDeleteOne) ExecX ¶
func (rmdo *RdMomentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RdMomentGroupBy ¶
type RdMomentGroupBy struct {
// contains filtered or unexported fields
}
RdMomentGroupBy is the group-by builder for RdMoment entities.
func (*RdMomentGroupBy) Aggregate ¶
func (rmgb *RdMomentGroupBy) Aggregate(fns ...AggregateFunc) *RdMomentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RdMomentGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RdMomentGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RdMomentGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RdMomentGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RdMomentGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RdMomentGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RdMomentGroupBy) Scan ¶
func (rmgb *RdMomentGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RdMomentGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RdMomentMutation ¶
type RdMomentMutation struct {
// contains filtered or unexported fields
}
RdMomentMutation represents an operation that mutates the RdMoment nodes in the graph.
func (*RdMomentMutation) AddByUID ¶
func (m *RdMomentMutation) AddByUID(i int32)
AddByUID adds i to the "by_uid" field.
func (*RdMomentMutation) AddField ¶
func (m *RdMomentMutation) 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 (*RdMomentMutation) AddStatus ¶
func (m *RdMomentMutation) AddStatus(i int32)
AddStatus adds i to the "status" field.
func (*RdMomentMutation) AddType ¶
func (m *RdMomentMutation) AddType(i int32)
AddType adds i to the "type" field.
func (*RdMomentMutation) AddedByUID ¶
func (m *RdMomentMutation) AddedByUID() (r int32, exists bool)
AddedByUID returns the value that was added to the "by_uid" field in this mutation.
func (*RdMomentMutation) AddedEdges ¶
func (m *RdMomentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RdMomentMutation) AddedField ¶
func (m *RdMomentMutation) 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 (*RdMomentMutation) AddedFields ¶
func (m *RdMomentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RdMomentMutation) AddedIDs ¶
func (m *RdMomentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RdMomentMutation) AddedStatus ¶
func (m *RdMomentMutation) AddedStatus() (r int32, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*RdMomentMutation) AddedType ¶
func (m *RdMomentMutation) AddedType() (r int32, exists bool)
AddedType returns the value that was added to the "type" field in this mutation.
func (*RdMomentMutation) AppendImgs ¶
func (m *RdMomentMutation) AppendImgs(s []string)
AppendImgs adds s to the "imgs" field.
func (*RdMomentMutation) AppendedImgs ¶
func (m *RdMomentMutation) AppendedImgs() ([]string, bool)
AppendedImgs returns the list of values that were appended to the "imgs" field in this mutation.
func (*RdMomentMutation) ByUID ¶
func (m *RdMomentMutation) ByUID() (r int32, exists bool)
ByUID returns the value of the "by_uid" field in the mutation.
func (*RdMomentMutation) ByUIDCleared ¶
func (m *RdMomentMutation) ByUIDCleared() bool
ByUIDCleared returns if the "by_uid" field was cleared in this mutation.
func (*RdMomentMutation) ClearByUID ¶
func (m *RdMomentMutation) ClearByUID()
ClearByUID clears the value of the "by_uid" field.
func (*RdMomentMutation) ClearEdge ¶
func (m *RdMomentMutation) 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 (*RdMomentMutation) ClearField ¶
func (m *RdMomentMutation) 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 (*RdMomentMutation) ClearStatus ¶
func (m *RdMomentMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*RdMomentMutation) ClearType ¶
func (m *RdMomentMutation) ClearType()
ClearType clears the value of the "type" field.
func (*RdMomentMutation) ClearedEdges ¶
func (m *RdMomentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RdMomentMutation) ClearedFields ¶
func (m *RdMomentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RdMomentMutation) Client ¶
func (m RdMomentMutation) 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 (*RdMomentMutation) EdgeCleared ¶
func (m *RdMomentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RdMomentMutation) Field ¶
func (m *RdMomentMutation) 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 (*RdMomentMutation) FieldCleared ¶
func (m *RdMomentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RdMomentMutation) Fields ¶
func (m *RdMomentMutation) 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 (*RdMomentMutation) GetType ¶
func (m *RdMomentMutation) GetType() (r int32, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*RdMomentMutation) ID ¶
func (m *RdMomentMutation) ID() (id int64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*RdMomentMutation) IDs ¶
func (m *RdMomentMutation) IDs(ctx context.Context) ([]int64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*RdMomentMutation) Imgs ¶
func (m *RdMomentMutation) Imgs() (r []string, exists bool)
Imgs returns the value of the "imgs" field in the mutation.
func (*RdMomentMutation) OldByUID ¶
func (m *RdMomentMutation) OldByUID(ctx context.Context) (v int32, err error)
OldByUID returns the old "by_uid" field's value of the RdMoment entity. If the RdMoment 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 (*RdMomentMutation) 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 (*RdMomentMutation) OldImgs ¶
func (m *RdMomentMutation) OldImgs(ctx context.Context) (v []string, err error)
OldImgs returns the old "imgs" field's value of the RdMoment entity. If the RdMoment 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 (*RdMomentMutation) OldPublishTime ¶
OldPublishTime returns the old "publish_time" field's value of the RdMoment entity. If the RdMoment 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 (*RdMomentMutation) OldStatus ¶
func (m *RdMomentMutation) OldStatus(ctx context.Context) (v int32, err error)
OldStatus returns the old "status" field's value of the RdMoment entity. If the RdMoment 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 (*RdMomentMutation) OldTxt ¶
func (m *RdMomentMutation) OldTxt(ctx context.Context) (v string, err error)
OldTxt returns the old "txt" field's value of the RdMoment entity. If the RdMoment 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 (*RdMomentMutation) OldType ¶
func (m *RdMomentMutation) OldType(ctx context.Context) (v int32, err error)
OldType returns the old "type" field's value of the RdMoment entity. If the RdMoment 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 (*RdMomentMutation) PublishTime ¶
func (m *RdMomentMutation) PublishTime() (r time.Time, exists bool)
PublishTime returns the value of the "publish_time" field in the mutation.
func (*RdMomentMutation) RemovedEdges ¶
func (m *RdMomentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RdMomentMutation) RemovedIDs ¶
func (m *RdMomentMutation) 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 (*RdMomentMutation) ResetByUID ¶
func (m *RdMomentMutation) ResetByUID()
ResetByUID resets all changes to the "by_uid" field.
func (*RdMomentMutation) ResetEdge ¶
func (m *RdMomentMutation) 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 (*RdMomentMutation) ResetField ¶
func (m *RdMomentMutation) 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 (*RdMomentMutation) ResetImgs ¶
func (m *RdMomentMutation) ResetImgs()
ResetImgs resets all changes to the "imgs" field.
func (*RdMomentMutation) ResetPublishTime ¶
func (m *RdMomentMutation) ResetPublishTime()
ResetPublishTime resets all changes to the "publish_time" field.
func (*RdMomentMutation) ResetStatus ¶
func (m *RdMomentMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*RdMomentMutation) ResetTxt ¶
func (m *RdMomentMutation) ResetTxt()
ResetTxt resets all changes to the "txt" field.
func (*RdMomentMutation) ResetType ¶
func (m *RdMomentMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*RdMomentMutation) SetByUID ¶
func (m *RdMomentMutation) SetByUID(i int32)
SetByUID sets the "by_uid" field.
func (*RdMomentMutation) SetField ¶
func (m *RdMomentMutation) 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 (*RdMomentMutation) SetID ¶
func (m *RdMomentMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of RdMoment entities.
func (*RdMomentMutation) SetImgs ¶
func (m *RdMomentMutation) SetImgs(s []string)
SetImgs sets the "imgs" field.
func (*RdMomentMutation) SetOp ¶
func (m *RdMomentMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*RdMomentMutation) SetPublishTime ¶
func (m *RdMomentMutation) SetPublishTime(t time.Time)
SetPublishTime sets the "publish_time" field.
func (*RdMomentMutation) SetStatus ¶
func (m *RdMomentMutation) SetStatus(i int32)
SetStatus sets the "status" field.
func (*RdMomentMutation) SetTxt ¶
func (m *RdMomentMutation) SetTxt(s string)
SetTxt sets the "txt" field.
func (*RdMomentMutation) SetType ¶
func (m *RdMomentMutation) SetType(i int32)
SetType sets the "type" field.
func (*RdMomentMutation) Status ¶
func (m *RdMomentMutation) Status() (r int32, exists bool)
Status returns the value of the "status" field in the mutation.
func (*RdMomentMutation) StatusCleared ¶
func (m *RdMomentMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (RdMomentMutation) Tx ¶
func (m RdMomentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RdMomentMutation) Txt ¶
func (m *RdMomentMutation) Txt() (r string, exists bool)
Txt returns the value of the "txt" field in the mutation.
func (*RdMomentMutation) Type ¶
func (m *RdMomentMutation) Type() string
Type returns the node type of this mutation (RdMoment).
func (*RdMomentMutation) TypeCleared ¶
func (m *RdMomentMutation) TypeCleared() bool
TypeCleared returns if the "type" field was cleared in this mutation.
func (*RdMomentMutation) Where ¶
func (m *RdMomentMutation) Where(ps ...predicate.RdMoment)
Where appends a list predicates to the RdMomentMutation builder.
func (*RdMomentMutation) WhereP ¶
func (m *RdMomentMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RdMomentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RdMomentQuery ¶
type RdMomentQuery struct {
// contains filtered or unexported fields
}
RdMomentQuery is the builder for querying RdMoment entities.
func (*RdMomentQuery) Aggregate ¶
func (rmq *RdMomentQuery) Aggregate(fns ...AggregateFunc) *RdMomentSelect
Aggregate returns a RdMomentSelect configured with the given aggregations.
func (*RdMomentQuery) All ¶
func (rmq *RdMomentQuery) All(ctx context.Context) ([]*RdMoment, error)
All executes the query and returns a list of RdMoments.
func (*RdMomentQuery) AllX ¶
func (rmq *RdMomentQuery) AllX(ctx context.Context) []*RdMoment
AllX is like All, but panics if an error occurs.
func (*RdMomentQuery) Clone ¶
func (rmq *RdMomentQuery) Clone() *RdMomentQuery
Clone returns a duplicate of the RdMomentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RdMomentQuery) Count ¶
func (rmq *RdMomentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RdMomentQuery) CountX ¶
func (rmq *RdMomentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RdMomentQuery) Exist ¶
func (rmq *RdMomentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RdMomentQuery) ExistX ¶
func (rmq *RdMomentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RdMomentQuery) First ¶
func (rmq *RdMomentQuery) First(ctx context.Context) (*RdMoment, error)
First returns the first RdMoment entity from the query. Returns a *NotFoundError when no RdMoment was found.
func (*RdMomentQuery) FirstID ¶
func (rmq *RdMomentQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first RdMoment ID from the query. Returns a *NotFoundError when no RdMoment ID was found.
func (*RdMomentQuery) FirstIDX ¶
func (rmq *RdMomentQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*RdMomentQuery) FirstX ¶
func (rmq *RdMomentQuery) FirstX(ctx context.Context) *RdMoment
FirstX is like First, but panics if an error occurs.
func (*RdMomentQuery) GroupBy ¶
func (rmq *RdMomentQuery) GroupBy(field string, fields ...string) *RdMomentGroupBy
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 int32 `json:"type,omitempty"` Count int `json:"count,omitempty"` } client.RdMoment.Query(). GroupBy(rdmoment.FieldType). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RdMomentQuery) IDs ¶
func (rmq *RdMomentQuery) IDs(ctx context.Context) ([]int64, error)
IDs executes the query and returns a list of RdMoment IDs.
func (*RdMomentQuery) IDsX ¶
func (rmq *RdMomentQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*RdMomentQuery) Limit ¶
func (rmq *RdMomentQuery) Limit(limit int) *RdMomentQuery
Limit the number of records to be returned by this query.
func (*RdMomentQuery) Offset ¶
func (rmq *RdMomentQuery) Offset(offset int) *RdMomentQuery
Offset to start from.
func (*RdMomentQuery) Only ¶
func (rmq *RdMomentQuery) Only(ctx context.Context) (*RdMoment, error)
Only returns a single RdMoment entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one RdMoment entity is found. Returns a *NotFoundError when no RdMoment entities are found.
func (*RdMomentQuery) OnlyID ¶
func (rmq *RdMomentQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only RdMoment ID in the query. Returns a *NotSingularError when more than one RdMoment ID is found. Returns a *NotFoundError when no entities are found.
func (*RdMomentQuery) OnlyIDX ¶
func (rmq *RdMomentQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RdMomentQuery) OnlyX ¶
func (rmq *RdMomentQuery) OnlyX(ctx context.Context) *RdMoment
OnlyX is like Only, but panics if an error occurs.
func (*RdMomentQuery) Order ¶
func (rmq *RdMomentQuery) Order(o ...OrderFunc) *RdMomentQuery
Order specifies how the records should be ordered.
func (*RdMomentQuery) Select ¶
func (rmq *RdMomentQuery) Select(fields ...string) *RdMomentSelect
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 int32 `json:"type,omitempty"` } client.RdMoment.Query(). Select(rdmoment.FieldType). Scan(ctx, &v)
func (*RdMomentQuery) Unique ¶
func (rmq *RdMomentQuery) Unique(unique bool) *RdMomentQuery
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 (*RdMomentQuery) Where ¶
func (rmq *RdMomentQuery) Where(ps ...predicate.RdMoment) *RdMomentQuery
Where adds a new predicate for the RdMomentQuery builder.
type RdMomentSelect ¶
type RdMomentSelect struct { *RdMomentQuery // contains filtered or unexported fields }
RdMomentSelect is the builder for selecting fields of RdMoment entities.
func (*RdMomentSelect) Aggregate ¶
func (rms *RdMomentSelect) Aggregate(fns ...AggregateFunc) *RdMomentSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RdMomentSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RdMomentSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RdMomentSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RdMomentSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RdMomentSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RdMomentSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RdMomentSelect) Scan ¶
func (rms *RdMomentSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RdMomentSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RdMomentUpdate ¶
type RdMomentUpdate struct {
// contains filtered or unexported fields
}
RdMomentUpdate is the builder for updating RdMoment entities.
func (*RdMomentUpdate) AddByUID ¶
func (rmu *RdMomentUpdate) AddByUID(i int32) *RdMomentUpdate
AddByUID adds i to the "by_uid" field.
func (*RdMomentUpdate) AddStatus ¶
func (rmu *RdMomentUpdate) AddStatus(i int32) *RdMomentUpdate
AddStatus adds i to the "status" field.
func (*RdMomentUpdate) AddType ¶
func (rmu *RdMomentUpdate) AddType(i int32) *RdMomentUpdate
AddType adds i to the "type" field.
func (*RdMomentUpdate) AppendImgs ¶
func (rmu *RdMomentUpdate) AppendImgs(s []string) *RdMomentUpdate
AppendImgs appends s to the "imgs" field.
func (*RdMomentUpdate) ClearByUID ¶
func (rmu *RdMomentUpdate) ClearByUID() *RdMomentUpdate
ClearByUID clears the value of the "by_uid" field.
func (*RdMomentUpdate) ClearStatus ¶
func (rmu *RdMomentUpdate) ClearStatus() *RdMomentUpdate
ClearStatus clears the value of the "status" field.
func (*RdMomentUpdate) ClearType ¶
func (rmu *RdMomentUpdate) ClearType() *RdMomentUpdate
ClearType clears the value of the "type" field.
func (*RdMomentUpdate) Exec ¶
func (rmu *RdMomentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RdMomentUpdate) ExecX ¶
func (rmu *RdMomentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RdMomentUpdate) Mutation ¶
func (rmu *RdMomentUpdate) Mutation() *RdMomentMutation
Mutation returns the RdMomentMutation object of the builder.
func (*RdMomentUpdate) Save ¶
func (rmu *RdMomentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RdMomentUpdate) SaveX ¶
func (rmu *RdMomentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RdMomentUpdate) SetByUID ¶
func (rmu *RdMomentUpdate) SetByUID(i int32) *RdMomentUpdate
SetByUID sets the "by_uid" field.
func (*RdMomentUpdate) SetImgs ¶
func (rmu *RdMomentUpdate) SetImgs(s []string) *RdMomentUpdate
SetImgs sets the "imgs" field.
func (*RdMomentUpdate) SetNillableByUID ¶
func (rmu *RdMomentUpdate) SetNillableByUID(i *int32) *RdMomentUpdate
SetNillableByUID sets the "by_uid" field if the given value is not nil.
func (*RdMomentUpdate) SetNillablePublishTime ¶
func (rmu *RdMomentUpdate) SetNillablePublishTime(t *time.Time) *RdMomentUpdate
SetNillablePublishTime sets the "publish_time" field if the given value is not nil.
func (*RdMomentUpdate) SetNillableStatus ¶
func (rmu *RdMomentUpdate) SetNillableStatus(i *int32) *RdMomentUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*RdMomentUpdate) SetNillableType ¶
func (rmu *RdMomentUpdate) SetNillableType(i *int32) *RdMomentUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*RdMomentUpdate) SetPublishTime ¶
func (rmu *RdMomentUpdate) SetPublishTime(t time.Time) *RdMomentUpdate
SetPublishTime sets the "publish_time" field.
func (*RdMomentUpdate) SetStatus ¶
func (rmu *RdMomentUpdate) SetStatus(i int32) *RdMomentUpdate
SetStatus sets the "status" field.
func (*RdMomentUpdate) SetTxt ¶
func (rmu *RdMomentUpdate) SetTxt(s string) *RdMomentUpdate
SetTxt sets the "txt" field.
func (*RdMomentUpdate) SetType ¶
func (rmu *RdMomentUpdate) SetType(i int32) *RdMomentUpdate
SetType sets the "type" field.
func (*RdMomentUpdate) Where ¶
func (rmu *RdMomentUpdate) Where(ps ...predicate.RdMoment) *RdMomentUpdate
Where appends a list predicates to the RdMomentUpdate builder.
type RdMomentUpdateOne ¶
type RdMomentUpdateOne struct {
// contains filtered or unexported fields
}
RdMomentUpdateOne is the builder for updating a single RdMoment entity.
func (*RdMomentUpdateOne) AddByUID ¶
func (rmuo *RdMomentUpdateOne) AddByUID(i int32) *RdMomentUpdateOne
AddByUID adds i to the "by_uid" field.
func (*RdMomentUpdateOne) AddStatus ¶
func (rmuo *RdMomentUpdateOne) AddStatus(i int32) *RdMomentUpdateOne
AddStatus adds i to the "status" field.
func (*RdMomentUpdateOne) AddType ¶
func (rmuo *RdMomentUpdateOne) AddType(i int32) *RdMomentUpdateOne
AddType adds i to the "type" field.
func (*RdMomentUpdateOne) AppendImgs ¶
func (rmuo *RdMomentUpdateOne) AppendImgs(s []string) *RdMomentUpdateOne
AppendImgs appends s to the "imgs" field.
func (*RdMomentUpdateOne) ClearByUID ¶
func (rmuo *RdMomentUpdateOne) ClearByUID() *RdMomentUpdateOne
ClearByUID clears the value of the "by_uid" field.
func (*RdMomentUpdateOne) ClearStatus ¶
func (rmuo *RdMomentUpdateOne) ClearStatus() *RdMomentUpdateOne
ClearStatus clears the value of the "status" field.
func (*RdMomentUpdateOne) ClearType ¶
func (rmuo *RdMomentUpdateOne) ClearType() *RdMomentUpdateOne
ClearType clears the value of the "type" field.
func (*RdMomentUpdateOne) Exec ¶
func (rmuo *RdMomentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RdMomentUpdateOne) ExecX ¶
func (rmuo *RdMomentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RdMomentUpdateOne) Mutation ¶
func (rmuo *RdMomentUpdateOne) Mutation() *RdMomentMutation
Mutation returns the RdMomentMutation object of the builder.
func (*RdMomentUpdateOne) Save ¶
func (rmuo *RdMomentUpdateOne) Save(ctx context.Context) (*RdMoment, error)
Save executes the query and returns the updated RdMoment entity.
func (*RdMomentUpdateOne) SaveX ¶
func (rmuo *RdMomentUpdateOne) SaveX(ctx context.Context) *RdMoment
SaveX is like Save, but panics if an error occurs.
func (*RdMomentUpdateOne) Select ¶
func (rmuo *RdMomentUpdateOne) Select(field string, fields ...string) *RdMomentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RdMomentUpdateOne) SetByUID ¶
func (rmuo *RdMomentUpdateOne) SetByUID(i int32) *RdMomentUpdateOne
SetByUID sets the "by_uid" field.
func (*RdMomentUpdateOne) SetImgs ¶
func (rmuo *RdMomentUpdateOne) SetImgs(s []string) *RdMomentUpdateOne
SetImgs sets the "imgs" field.
func (*RdMomentUpdateOne) SetNillableByUID ¶
func (rmuo *RdMomentUpdateOne) SetNillableByUID(i *int32) *RdMomentUpdateOne
SetNillableByUID sets the "by_uid" field if the given value is not nil.
func (*RdMomentUpdateOne) SetNillablePublishTime ¶
func (rmuo *RdMomentUpdateOne) SetNillablePublishTime(t *time.Time) *RdMomentUpdateOne
SetNillablePublishTime sets the "publish_time" field if the given value is not nil.
func (*RdMomentUpdateOne) SetNillableStatus ¶
func (rmuo *RdMomentUpdateOne) SetNillableStatus(i *int32) *RdMomentUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*RdMomentUpdateOne) SetNillableType ¶
func (rmuo *RdMomentUpdateOne) SetNillableType(i *int32) *RdMomentUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*RdMomentUpdateOne) SetPublishTime ¶
func (rmuo *RdMomentUpdateOne) SetPublishTime(t time.Time) *RdMomentUpdateOne
SetPublishTime sets the "publish_time" field.
func (*RdMomentUpdateOne) SetStatus ¶
func (rmuo *RdMomentUpdateOne) SetStatus(i int32) *RdMomentUpdateOne
SetStatus sets the "status" field.
func (*RdMomentUpdateOne) SetTxt ¶
func (rmuo *RdMomentUpdateOne) SetTxt(s string) *RdMomentUpdateOne
SetTxt sets the "txt" field.
func (*RdMomentUpdateOne) SetType ¶
func (rmuo *RdMomentUpdateOne) SetType(i int32) *RdMomentUpdateOne
SetType sets the "type" field.
type RdRMomentsFollowing ¶
type RdRMomentsFollowing struct { // ID of the ent. ID int64 `json:"id,omitempty"` // 动态类型 1图文 2视频 3专栏 MomentID int64 `json:"moment_id,omitempty"` // 谁发布的动态 MomentType int32 `json:"moment_type,omitempty"` // 谁发布的动态 ByUID int32 `json:"by_uid,omitempty"` // 谁关注的动态 ForUID int32 `json:"for_uid,omitempty"` // 文字 Txt string `json:"txt,omitempty"` // 动态的图片数组 Imgs []string `json:"imgs,omitempty"` // 关注的人uid Status int32 `json:"status,omitempty"` // PublishTime holds the value of the "publish_time" field. PublishTime time.Time `json:"publish_time,omitempty"` // contains filtered or unexported fields }
RdRMomentsFollowing is the model entity for the RdRMomentsFollowing schema.
func (*RdRMomentsFollowing) String ¶
func (rrf *RdRMomentsFollowing) String() string
String implements the fmt.Stringer.
func (*RdRMomentsFollowing) Unwrap ¶
func (rrf *RdRMomentsFollowing) Unwrap() *RdRMomentsFollowing
Unwrap unwraps the RdRMomentsFollowing 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 (*RdRMomentsFollowing) Update ¶
func (rrf *RdRMomentsFollowing) Update() *RdRMomentsFollowingUpdateOne
Update returns a builder for updating this RdRMomentsFollowing. Note that you need to call RdRMomentsFollowing.Unwrap() before calling this method if this RdRMomentsFollowing was returned from a transaction, and the transaction was committed or rolled back.
type RdRMomentsFollowingClient ¶
type RdRMomentsFollowingClient struct {
// contains filtered or unexported fields
}
RdRMomentsFollowingClient is a client for the RdRMomentsFollowing schema.
func NewRdRMomentsFollowingClient ¶
func NewRdRMomentsFollowingClient(c config) *RdRMomentsFollowingClient
NewRdRMomentsFollowingClient returns a client for the RdRMomentsFollowing from the given config.
func (*RdRMomentsFollowingClient) Create ¶
func (c *RdRMomentsFollowingClient) Create() *RdRMomentsFollowingCreate
Create returns a builder for creating a RdRMomentsFollowing entity.
func (*RdRMomentsFollowingClient) CreateBulk ¶
func (c *RdRMomentsFollowingClient) CreateBulk(builders ...*RdRMomentsFollowingCreate) *RdRMomentsFollowingCreateBulk
CreateBulk returns a builder for creating a bulk of RdRMomentsFollowing entities.
func (*RdRMomentsFollowingClient) Delete ¶
func (c *RdRMomentsFollowingClient) Delete() *RdRMomentsFollowingDelete
Delete returns a delete builder for RdRMomentsFollowing.
func (*RdRMomentsFollowingClient) DeleteOne ¶
func (c *RdRMomentsFollowingClient) DeleteOne(rrf *RdRMomentsFollowing) *RdRMomentsFollowingDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RdRMomentsFollowingClient) DeleteOneID ¶
func (c *RdRMomentsFollowingClient) DeleteOneID(id int64) *RdRMomentsFollowingDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RdRMomentsFollowingClient) Get ¶
func (c *RdRMomentsFollowingClient) Get(ctx context.Context, id int64) (*RdRMomentsFollowing, error)
Get returns a RdRMomentsFollowing entity by its id.
func (*RdRMomentsFollowingClient) GetX ¶
func (c *RdRMomentsFollowingClient) GetX(ctx context.Context, id int64) *RdRMomentsFollowing
GetX is like Get, but panics if an error occurs.
func (*RdRMomentsFollowingClient) Hooks ¶
func (c *RdRMomentsFollowingClient) Hooks() []Hook
Hooks returns the client hooks.
func (*RdRMomentsFollowingClient) Intercept ¶
func (c *RdRMomentsFollowingClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `rdrmomentsfollowing.Intercept(f(g(h())))`.
func (*RdRMomentsFollowingClient) Interceptors ¶
func (c *RdRMomentsFollowingClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RdRMomentsFollowingClient) Query ¶
func (c *RdRMomentsFollowingClient) Query() *RdRMomentsFollowingQuery
Query returns a query builder for RdRMomentsFollowing.
func (*RdRMomentsFollowingClient) Update ¶
func (c *RdRMomentsFollowingClient) Update() *RdRMomentsFollowingUpdate
Update returns an update builder for RdRMomentsFollowing.
func (*RdRMomentsFollowingClient) UpdateOne ¶
func (c *RdRMomentsFollowingClient) UpdateOne(rrf *RdRMomentsFollowing) *RdRMomentsFollowingUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RdRMomentsFollowingClient) UpdateOneID ¶
func (c *RdRMomentsFollowingClient) UpdateOneID(id int64) *RdRMomentsFollowingUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RdRMomentsFollowingClient) Use ¶
func (c *RdRMomentsFollowingClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `rdrmomentsfollowing.Hooks(f(g(h())))`.
type RdRMomentsFollowingCreate ¶
type RdRMomentsFollowingCreate struct {
// contains filtered or unexported fields
}
RdRMomentsFollowingCreate is the builder for creating a RdRMomentsFollowing entity.
func (*RdRMomentsFollowingCreate) Exec ¶
func (rrfc *RdRMomentsFollowingCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RdRMomentsFollowingCreate) ExecX ¶
func (rrfc *RdRMomentsFollowingCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RdRMomentsFollowingCreate) Mutation ¶
func (rrfc *RdRMomentsFollowingCreate) Mutation() *RdRMomentsFollowingMutation
Mutation returns the RdRMomentsFollowingMutation object of the builder.
func (*RdRMomentsFollowingCreate) Save ¶
func (rrfc *RdRMomentsFollowingCreate) Save(ctx context.Context) (*RdRMomentsFollowing, error)
Save creates the RdRMomentsFollowing in the database.
func (*RdRMomentsFollowingCreate) SaveX ¶
func (rrfc *RdRMomentsFollowingCreate) SaveX(ctx context.Context) *RdRMomentsFollowing
SaveX calls Save and panics if Save returns an error.
func (*RdRMomentsFollowingCreate) SetByUID ¶
func (rrfc *RdRMomentsFollowingCreate) SetByUID(i int32) *RdRMomentsFollowingCreate
SetByUID sets the "by_uid" field.
func (*RdRMomentsFollowingCreate) SetForUID ¶
func (rrfc *RdRMomentsFollowingCreate) SetForUID(i int32) *RdRMomentsFollowingCreate
SetForUID sets the "for_uid" field.
func (*RdRMomentsFollowingCreate) SetID ¶
func (rrfc *RdRMomentsFollowingCreate) SetID(i int64) *RdRMomentsFollowingCreate
SetID sets the "id" field.
func (*RdRMomentsFollowingCreate) SetImgs ¶
func (rrfc *RdRMomentsFollowingCreate) SetImgs(s []string) *RdRMomentsFollowingCreate
SetImgs sets the "imgs" field.
func (*RdRMomentsFollowingCreate) SetMomentID ¶
func (rrfc *RdRMomentsFollowingCreate) SetMomentID(i int64) *RdRMomentsFollowingCreate
SetMomentID sets the "moment_id" field.
func (*RdRMomentsFollowingCreate) SetMomentType ¶
func (rrfc *RdRMomentsFollowingCreate) SetMomentType(i int32) *RdRMomentsFollowingCreate
SetMomentType sets the "moment_type" field.
func (*RdRMomentsFollowingCreate) SetNillableByUID ¶
func (rrfc *RdRMomentsFollowingCreate) SetNillableByUID(i *int32) *RdRMomentsFollowingCreate
SetNillableByUID sets the "by_uid" field if the given value is not nil.
func (*RdRMomentsFollowingCreate) SetNillableForUID ¶
func (rrfc *RdRMomentsFollowingCreate) SetNillableForUID(i *int32) *RdRMomentsFollowingCreate
SetNillableForUID sets the "for_uid" field if the given value is not nil.
func (*RdRMomentsFollowingCreate) SetNillableMomentID ¶
func (rrfc *RdRMomentsFollowingCreate) SetNillableMomentID(i *int64) *RdRMomentsFollowingCreate
SetNillableMomentID sets the "moment_id" field if the given value is not nil.
func (*RdRMomentsFollowingCreate) SetNillableMomentType ¶
func (rrfc *RdRMomentsFollowingCreate) SetNillableMomentType(i *int32) *RdRMomentsFollowingCreate
SetNillableMomentType sets the "moment_type" field if the given value is not nil.
func (*RdRMomentsFollowingCreate) SetNillablePublishTime ¶
func (rrfc *RdRMomentsFollowingCreate) SetNillablePublishTime(t *time.Time) *RdRMomentsFollowingCreate
SetNillablePublishTime sets the "publish_time" field if the given value is not nil.
func (*RdRMomentsFollowingCreate) SetNillableStatus ¶
func (rrfc *RdRMomentsFollowingCreate) SetNillableStatus(i *int32) *RdRMomentsFollowingCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*RdRMomentsFollowingCreate) SetPublishTime ¶
func (rrfc *RdRMomentsFollowingCreate) SetPublishTime(t time.Time) *RdRMomentsFollowingCreate
SetPublishTime sets the "publish_time" field.
func (*RdRMomentsFollowingCreate) SetStatus ¶
func (rrfc *RdRMomentsFollowingCreate) SetStatus(i int32) *RdRMomentsFollowingCreate
SetStatus sets the "status" field.
func (*RdRMomentsFollowingCreate) SetTxt ¶
func (rrfc *RdRMomentsFollowingCreate) SetTxt(s string) *RdRMomentsFollowingCreate
SetTxt sets the "txt" field.
type RdRMomentsFollowingCreateBulk ¶
type RdRMomentsFollowingCreateBulk struct {
// contains filtered or unexported fields
}
RdRMomentsFollowingCreateBulk is the builder for creating many RdRMomentsFollowing entities in bulk.
func (*RdRMomentsFollowingCreateBulk) Exec ¶
func (rrfcb *RdRMomentsFollowingCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RdRMomentsFollowingCreateBulk) ExecX ¶
func (rrfcb *RdRMomentsFollowingCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RdRMomentsFollowingCreateBulk) Save ¶
func (rrfcb *RdRMomentsFollowingCreateBulk) Save(ctx context.Context) ([]*RdRMomentsFollowing, error)
Save creates the RdRMomentsFollowing entities in the database.
func (*RdRMomentsFollowingCreateBulk) SaveX ¶
func (rrfcb *RdRMomentsFollowingCreateBulk) SaveX(ctx context.Context) []*RdRMomentsFollowing
SaveX is like Save, but panics if an error occurs.
type RdRMomentsFollowingDelete ¶
type RdRMomentsFollowingDelete struct {
// contains filtered or unexported fields
}
RdRMomentsFollowingDelete is the builder for deleting a RdRMomentsFollowing entity.
func (*RdRMomentsFollowingDelete) Exec ¶
func (rrfd *RdRMomentsFollowingDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RdRMomentsFollowingDelete) ExecX ¶
func (rrfd *RdRMomentsFollowingDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RdRMomentsFollowingDelete) Where ¶
func (rrfd *RdRMomentsFollowingDelete) Where(ps ...predicate.RdRMomentsFollowing) *RdRMomentsFollowingDelete
Where appends a list predicates to the RdRMomentsFollowingDelete builder.
type RdRMomentsFollowingDeleteOne ¶
type RdRMomentsFollowingDeleteOne struct {
// contains filtered or unexported fields
}
RdRMomentsFollowingDeleteOne is the builder for deleting a single RdRMomentsFollowing entity.
func (*RdRMomentsFollowingDeleteOne) Exec ¶
func (rrfdo *RdRMomentsFollowingDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RdRMomentsFollowingDeleteOne) ExecX ¶
func (rrfdo *RdRMomentsFollowingDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RdRMomentsFollowingGroupBy ¶
type RdRMomentsFollowingGroupBy struct {
// contains filtered or unexported fields
}
RdRMomentsFollowingGroupBy is the group-by builder for RdRMomentsFollowing entities.
func (*RdRMomentsFollowingGroupBy) Aggregate ¶
func (rrfgb *RdRMomentsFollowingGroupBy) Aggregate(fns ...AggregateFunc) *RdRMomentsFollowingGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RdRMomentsFollowingGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RdRMomentsFollowingGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RdRMomentsFollowingGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RdRMomentsFollowingGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*RdRMomentsFollowingGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RdRMomentsFollowingGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*RdRMomentsFollowingGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RdRMomentsFollowingGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RdRMomentsFollowingGroupBy) Scan ¶
func (rrfgb *RdRMomentsFollowingGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RdRMomentsFollowingGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RdRMomentsFollowingMutation ¶
type RdRMomentsFollowingMutation struct {
// contains filtered or unexported fields
}
RdRMomentsFollowingMutation represents an operation that mutates the RdRMomentsFollowing nodes in the graph.
func (*RdRMomentsFollowingMutation) AddByUID ¶
func (m *RdRMomentsFollowingMutation) AddByUID(i int32)
AddByUID adds i to the "by_uid" field.
func (*RdRMomentsFollowingMutation) AddField ¶
func (m *RdRMomentsFollowingMutation) 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 (*RdRMomentsFollowingMutation) AddForUID ¶
func (m *RdRMomentsFollowingMutation) AddForUID(i int32)
AddForUID adds i to the "for_uid" field.
func (*RdRMomentsFollowingMutation) AddMomentID ¶
func (m *RdRMomentsFollowingMutation) AddMomentID(i int64)
AddMomentID adds i to the "moment_id" field.
func (*RdRMomentsFollowingMutation) AddMomentType ¶
func (m *RdRMomentsFollowingMutation) AddMomentType(i int32)
AddMomentType adds i to the "moment_type" field.
func (*RdRMomentsFollowingMutation) AddStatus ¶
func (m *RdRMomentsFollowingMutation) AddStatus(i int32)
AddStatus adds i to the "status" field.
func (*RdRMomentsFollowingMutation) AddedByUID ¶
func (m *RdRMomentsFollowingMutation) AddedByUID() (r int32, exists bool)
AddedByUID returns the value that was added to the "by_uid" field in this mutation.
func (*RdRMomentsFollowingMutation) AddedEdges ¶
func (m *RdRMomentsFollowingMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RdRMomentsFollowingMutation) AddedField ¶
func (m *RdRMomentsFollowingMutation) 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 (*RdRMomentsFollowingMutation) AddedFields ¶
func (m *RdRMomentsFollowingMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RdRMomentsFollowingMutation) AddedForUID ¶
func (m *RdRMomentsFollowingMutation) AddedForUID() (r int32, exists bool)
AddedForUID returns the value that was added to the "for_uid" field in this mutation.
func (*RdRMomentsFollowingMutation) AddedIDs ¶
func (m *RdRMomentsFollowingMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RdRMomentsFollowingMutation) AddedMomentID ¶
func (m *RdRMomentsFollowingMutation) AddedMomentID() (r int64, exists bool)
AddedMomentID returns the value that was added to the "moment_id" field in this mutation.
func (*RdRMomentsFollowingMutation) AddedMomentType ¶
func (m *RdRMomentsFollowingMutation) AddedMomentType() (r int32, exists bool)
AddedMomentType returns the value that was added to the "moment_type" field in this mutation.
func (*RdRMomentsFollowingMutation) AddedStatus ¶
func (m *RdRMomentsFollowingMutation) AddedStatus() (r int32, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*RdRMomentsFollowingMutation) AppendImgs ¶
func (m *RdRMomentsFollowingMutation) AppendImgs(s []string)
AppendImgs adds s to the "imgs" field.
func (*RdRMomentsFollowingMutation) AppendedImgs ¶
func (m *RdRMomentsFollowingMutation) AppendedImgs() ([]string, bool)
AppendedImgs returns the list of values that were appended to the "imgs" field in this mutation.
func (*RdRMomentsFollowingMutation) ByUID ¶
func (m *RdRMomentsFollowingMutation) ByUID() (r int32, exists bool)
ByUID returns the value of the "by_uid" field in the mutation.
func (*RdRMomentsFollowingMutation) ByUIDCleared ¶
func (m *RdRMomentsFollowingMutation) ByUIDCleared() bool
ByUIDCleared returns if the "by_uid" field was cleared in this mutation.
func (*RdRMomentsFollowingMutation) ClearByUID ¶
func (m *RdRMomentsFollowingMutation) ClearByUID()
ClearByUID clears the value of the "by_uid" field.
func (*RdRMomentsFollowingMutation) ClearEdge ¶
func (m *RdRMomentsFollowingMutation) 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 (*RdRMomentsFollowingMutation) ClearField ¶
func (m *RdRMomentsFollowingMutation) 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 (*RdRMomentsFollowingMutation) ClearForUID ¶
func (m *RdRMomentsFollowingMutation) ClearForUID()
ClearForUID clears the value of the "for_uid" field.
func (*RdRMomentsFollowingMutation) ClearMomentID ¶
func (m *RdRMomentsFollowingMutation) ClearMomentID()
ClearMomentID clears the value of the "moment_id" field.
func (*RdRMomentsFollowingMutation) ClearMomentType ¶
func (m *RdRMomentsFollowingMutation) ClearMomentType()
ClearMomentType clears the value of the "moment_type" field.
func (*RdRMomentsFollowingMutation) ClearStatus ¶
func (m *RdRMomentsFollowingMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*RdRMomentsFollowingMutation) ClearedEdges ¶
func (m *RdRMomentsFollowingMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RdRMomentsFollowingMutation) ClearedFields ¶
func (m *RdRMomentsFollowingMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RdRMomentsFollowingMutation) Client ¶
func (m RdRMomentsFollowingMutation) 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 (*RdRMomentsFollowingMutation) EdgeCleared ¶
func (m *RdRMomentsFollowingMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RdRMomentsFollowingMutation) Field ¶
func (m *RdRMomentsFollowingMutation) 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 (*RdRMomentsFollowingMutation) FieldCleared ¶
func (m *RdRMomentsFollowingMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RdRMomentsFollowingMutation) Fields ¶
func (m *RdRMomentsFollowingMutation) 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 (*RdRMomentsFollowingMutation) ForUID ¶
func (m *RdRMomentsFollowingMutation) ForUID() (r int32, exists bool)
ForUID returns the value of the "for_uid" field in the mutation.
func (*RdRMomentsFollowingMutation) ForUIDCleared ¶
func (m *RdRMomentsFollowingMutation) ForUIDCleared() bool
ForUIDCleared returns if the "for_uid" field was cleared in this mutation.
func (*RdRMomentsFollowingMutation) ID ¶
func (m *RdRMomentsFollowingMutation) ID() (id int64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*RdRMomentsFollowingMutation) IDs ¶
func (m *RdRMomentsFollowingMutation) IDs(ctx context.Context) ([]int64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*RdRMomentsFollowingMutation) Imgs ¶
func (m *RdRMomentsFollowingMutation) Imgs() (r []string, exists bool)
Imgs returns the value of the "imgs" field in the mutation.
func (*RdRMomentsFollowingMutation) MomentID ¶
func (m *RdRMomentsFollowingMutation) MomentID() (r int64, exists bool)
MomentID returns the value of the "moment_id" field in the mutation.
func (*RdRMomentsFollowingMutation) MomentIDCleared ¶
func (m *RdRMomentsFollowingMutation) MomentIDCleared() bool
MomentIDCleared returns if the "moment_id" field was cleared in this mutation.
func (*RdRMomentsFollowingMutation) MomentType ¶
func (m *RdRMomentsFollowingMutation) MomentType() (r int32, exists bool)
MomentType returns the value of the "moment_type" field in the mutation.
func (*RdRMomentsFollowingMutation) MomentTypeCleared ¶
func (m *RdRMomentsFollowingMutation) MomentTypeCleared() bool
MomentTypeCleared returns if the "moment_type" field was cleared in this mutation.
func (*RdRMomentsFollowingMutation) OldByUID ¶
func (m *RdRMomentsFollowingMutation) OldByUID(ctx context.Context) (v int32, err error)
OldByUID returns the old "by_uid" field's value of the RdRMomentsFollowing entity. If the RdRMomentsFollowing 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 (*RdRMomentsFollowingMutation) 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 (*RdRMomentsFollowingMutation) OldForUID ¶
func (m *RdRMomentsFollowingMutation) OldForUID(ctx context.Context) (v int32, err error)
OldForUID returns the old "for_uid" field's value of the RdRMomentsFollowing entity. If the RdRMomentsFollowing 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 (*RdRMomentsFollowingMutation) OldImgs ¶
func (m *RdRMomentsFollowingMutation) OldImgs(ctx context.Context) (v []string, err error)
OldImgs returns the old "imgs" field's value of the RdRMomentsFollowing entity. If the RdRMomentsFollowing 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 (*RdRMomentsFollowingMutation) OldMomentID ¶
func (m *RdRMomentsFollowingMutation) OldMomentID(ctx context.Context) (v int64, err error)
OldMomentID returns the old "moment_id" field's value of the RdRMomentsFollowing entity. If the RdRMomentsFollowing 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 (*RdRMomentsFollowingMutation) OldMomentType ¶
func (m *RdRMomentsFollowingMutation) OldMomentType(ctx context.Context) (v int32, err error)
OldMomentType returns the old "moment_type" field's value of the RdRMomentsFollowing entity. If the RdRMomentsFollowing 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 (*RdRMomentsFollowingMutation) OldPublishTime ¶
OldPublishTime returns the old "publish_time" field's value of the RdRMomentsFollowing entity. If the RdRMomentsFollowing 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 (*RdRMomentsFollowingMutation) OldStatus ¶
func (m *RdRMomentsFollowingMutation) OldStatus(ctx context.Context) (v int32, err error)
OldStatus returns the old "status" field's value of the RdRMomentsFollowing entity. If the RdRMomentsFollowing 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 (*RdRMomentsFollowingMutation) OldTxt ¶
func (m *RdRMomentsFollowingMutation) OldTxt(ctx context.Context) (v string, err error)
OldTxt returns the old "txt" field's value of the RdRMomentsFollowing entity. If the RdRMomentsFollowing 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 (*RdRMomentsFollowingMutation) Op ¶
func (m *RdRMomentsFollowingMutation) Op() Op
Op returns the operation name.
func (*RdRMomentsFollowingMutation) PublishTime ¶
func (m *RdRMomentsFollowingMutation) PublishTime() (r time.Time, exists bool)
PublishTime returns the value of the "publish_time" field in the mutation.
func (*RdRMomentsFollowingMutation) RemovedEdges ¶
func (m *RdRMomentsFollowingMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RdRMomentsFollowingMutation) RemovedIDs ¶
func (m *RdRMomentsFollowingMutation) 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 (*RdRMomentsFollowingMutation) ResetByUID ¶
func (m *RdRMomentsFollowingMutation) ResetByUID()
ResetByUID resets all changes to the "by_uid" field.
func (*RdRMomentsFollowingMutation) ResetEdge ¶
func (m *RdRMomentsFollowingMutation) 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 (*RdRMomentsFollowingMutation) ResetField ¶
func (m *RdRMomentsFollowingMutation) 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 (*RdRMomentsFollowingMutation) ResetForUID ¶
func (m *RdRMomentsFollowingMutation) ResetForUID()
ResetForUID resets all changes to the "for_uid" field.
func (*RdRMomentsFollowingMutation) ResetImgs ¶
func (m *RdRMomentsFollowingMutation) ResetImgs()
ResetImgs resets all changes to the "imgs" field.
func (*RdRMomentsFollowingMutation) ResetMomentID ¶
func (m *RdRMomentsFollowingMutation) ResetMomentID()
ResetMomentID resets all changes to the "moment_id" field.
func (*RdRMomentsFollowingMutation) ResetMomentType ¶
func (m *RdRMomentsFollowingMutation) ResetMomentType()
ResetMomentType resets all changes to the "moment_type" field.
func (*RdRMomentsFollowingMutation) ResetPublishTime ¶
func (m *RdRMomentsFollowingMutation) ResetPublishTime()
ResetPublishTime resets all changes to the "publish_time" field.
func (*RdRMomentsFollowingMutation) ResetStatus ¶
func (m *RdRMomentsFollowingMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*RdRMomentsFollowingMutation) ResetTxt ¶
func (m *RdRMomentsFollowingMutation) ResetTxt()
ResetTxt resets all changes to the "txt" field.
func (*RdRMomentsFollowingMutation) SetByUID ¶
func (m *RdRMomentsFollowingMutation) SetByUID(i int32)
SetByUID sets the "by_uid" field.
func (*RdRMomentsFollowingMutation) SetField ¶
func (m *RdRMomentsFollowingMutation) 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 (*RdRMomentsFollowingMutation) SetForUID ¶
func (m *RdRMomentsFollowingMutation) SetForUID(i int32)
SetForUID sets the "for_uid" field.
func (*RdRMomentsFollowingMutation) SetID ¶
func (m *RdRMomentsFollowingMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of RdRMomentsFollowing entities.
func (*RdRMomentsFollowingMutation) SetImgs ¶
func (m *RdRMomentsFollowingMutation) SetImgs(s []string)
SetImgs sets the "imgs" field.
func (*RdRMomentsFollowingMutation) SetMomentID ¶
func (m *RdRMomentsFollowingMutation) SetMomentID(i int64)
SetMomentID sets the "moment_id" field.
func (*RdRMomentsFollowingMutation) SetMomentType ¶
func (m *RdRMomentsFollowingMutation) SetMomentType(i int32)
SetMomentType sets the "moment_type" field.
func (*RdRMomentsFollowingMutation) SetOp ¶
func (m *RdRMomentsFollowingMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*RdRMomentsFollowingMutation) SetPublishTime ¶
func (m *RdRMomentsFollowingMutation) SetPublishTime(t time.Time)
SetPublishTime sets the "publish_time" field.
func (*RdRMomentsFollowingMutation) SetStatus ¶
func (m *RdRMomentsFollowingMutation) SetStatus(i int32)
SetStatus sets the "status" field.
func (*RdRMomentsFollowingMutation) SetTxt ¶
func (m *RdRMomentsFollowingMutation) SetTxt(s string)
SetTxt sets the "txt" field.
func (*RdRMomentsFollowingMutation) Status ¶
func (m *RdRMomentsFollowingMutation) Status() (r int32, exists bool)
Status returns the value of the "status" field in the mutation.
func (*RdRMomentsFollowingMutation) StatusCleared ¶
func (m *RdRMomentsFollowingMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (RdRMomentsFollowingMutation) Tx ¶
func (m RdRMomentsFollowingMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RdRMomentsFollowingMutation) Txt ¶
func (m *RdRMomentsFollowingMutation) Txt() (r string, exists bool)
Txt returns the value of the "txt" field in the mutation.
func (*RdRMomentsFollowingMutation) Type ¶
func (m *RdRMomentsFollowingMutation) Type() string
Type returns the node type of this mutation (RdRMomentsFollowing).
func (*RdRMomentsFollowingMutation) Where ¶
func (m *RdRMomentsFollowingMutation) Where(ps ...predicate.RdRMomentsFollowing)
Where appends a list predicates to the RdRMomentsFollowingMutation builder.
func (*RdRMomentsFollowingMutation) WhereP ¶
func (m *RdRMomentsFollowingMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RdRMomentsFollowingMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RdRMomentsFollowingQuery ¶
type RdRMomentsFollowingQuery struct {
// contains filtered or unexported fields
}
RdRMomentsFollowingQuery is the builder for querying RdRMomentsFollowing entities.
func (*RdRMomentsFollowingQuery) Aggregate ¶
func (rrfq *RdRMomentsFollowingQuery) Aggregate(fns ...AggregateFunc) *RdRMomentsFollowingSelect
Aggregate returns a RdRMomentsFollowingSelect configured with the given aggregations.
func (*RdRMomentsFollowingQuery) All ¶
func (rrfq *RdRMomentsFollowingQuery) All(ctx context.Context) ([]*RdRMomentsFollowing, error)
All executes the query and returns a list of RdRMomentsFollowings.
func (*RdRMomentsFollowingQuery) AllX ¶
func (rrfq *RdRMomentsFollowingQuery) AllX(ctx context.Context) []*RdRMomentsFollowing
AllX is like All, but panics if an error occurs.
func (*RdRMomentsFollowingQuery) Clone ¶
func (rrfq *RdRMomentsFollowingQuery) Clone() *RdRMomentsFollowingQuery
Clone returns a duplicate of the RdRMomentsFollowingQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RdRMomentsFollowingQuery) Count ¶
func (rrfq *RdRMomentsFollowingQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RdRMomentsFollowingQuery) CountX ¶
func (rrfq *RdRMomentsFollowingQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RdRMomentsFollowingQuery) Exist ¶
func (rrfq *RdRMomentsFollowingQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RdRMomentsFollowingQuery) ExistX ¶
func (rrfq *RdRMomentsFollowingQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RdRMomentsFollowingQuery) First ¶
func (rrfq *RdRMomentsFollowingQuery) First(ctx context.Context) (*RdRMomentsFollowing, error)
First returns the first RdRMomentsFollowing entity from the query. Returns a *NotFoundError when no RdRMomentsFollowing was found.
func (*RdRMomentsFollowingQuery) FirstID ¶
func (rrfq *RdRMomentsFollowingQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first RdRMomentsFollowing ID from the query. Returns a *NotFoundError when no RdRMomentsFollowing ID was found.
func (*RdRMomentsFollowingQuery) FirstIDX ¶
func (rrfq *RdRMomentsFollowingQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*RdRMomentsFollowingQuery) FirstX ¶
func (rrfq *RdRMomentsFollowingQuery) FirstX(ctx context.Context) *RdRMomentsFollowing
FirstX is like First, but panics if an error occurs.
func (*RdRMomentsFollowingQuery) GroupBy ¶
func (rrfq *RdRMomentsFollowingQuery) GroupBy(field string, fields ...string) *RdRMomentsFollowingGroupBy
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 { MomentID int64 `json:"moment_id,omitempty"` Count int `json:"count,omitempty"` } client.RdRMomentsFollowing.Query(). GroupBy(rdrmomentsfollowing.FieldMomentID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RdRMomentsFollowingQuery) IDs ¶
func (rrfq *RdRMomentsFollowingQuery) IDs(ctx context.Context) ([]int64, error)
IDs executes the query and returns a list of RdRMomentsFollowing IDs.
func (*RdRMomentsFollowingQuery) IDsX ¶
func (rrfq *RdRMomentsFollowingQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*RdRMomentsFollowingQuery) Limit ¶
func (rrfq *RdRMomentsFollowingQuery) Limit(limit int) *RdRMomentsFollowingQuery
Limit the number of records to be returned by this query.
func (*RdRMomentsFollowingQuery) Offset ¶
func (rrfq *RdRMomentsFollowingQuery) Offset(offset int) *RdRMomentsFollowingQuery
Offset to start from.
func (*RdRMomentsFollowingQuery) Only ¶
func (rrfq *RdRMomentsFollowingQuery) Only(ctx context.Context) (*RdRMomentsFollowing, error)
Only returns a single RdRMomentsFollowing entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one RdRMomentsFollowing entity is found. Returns a *NotFoundError when no RdRMomentsFollowing entities are found.
func (*RdRMomentsFollowingQuery) OnlyID ¶
func (rrfq *RdRMomentsFollowingQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only RdRMomentsFollowing ID in the query. Returns a *NotSingularError when more than one RdRMomentsFollowing ID is found. Returns a *NotFoundError when no entities are found.
func (*RdRMomentsFollowingQuery) OnlyIDX ¶
func (rrfq *RdRMomentsFollowingQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RdRMomentsFollowingQuery) OnlyX ¶
func (rrfq *RdRMomentsFollowingQuery) OnlyX(ctx context.Context) *RdRMomentsFollowing
OnlyX is like Only, but panics if an error occurs.
func (*RdRMomentsFollowingQuery) Order ¶
func (rrfq *RdRMomentsFollowingQuery) Order(o ...OrderFunc) *RdRMomentsFollowingQuery
Order specifies how the records should be ordered.
func (*RdRMomentsFollowingQuery) Select ¶
func (rrfq *RdRMomentsFollowingQuery) Select(fields ...string) *RdRMomentsFollowingSelect
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 { MomentID int64 `json:"moment_id,omitempty"` } client.RdRMomentsFollowing.Query(). Select(rdrmomentsfollowing.FieldMomentID). Scan(ctx, &v)
func (*RdRMomentsFollowingQuery) Unique ¶
func (rrfq *RdRMomentsFollowingQuery) Unique(unique bool) *RdRMomentsFollowingQuery
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 (*RdRMomentsFollowingQuery) Where ¶
func (rrfq *RdRMomentsFollowingQuery) Where(ps ...predicate.RdRMomentsFollowing) *RdRMomentsFollowingQuery
Where adds a new predicate for the RdRMomentsFollowingQuery builder.
type RdRMomentsFollowingSelect ¶
type RdRMomentsFollowingSelect struct { *RdRMomentsFollowingQuery // contains filtered or unexported fields }
RdRMomentsFollowingSelect is the builder for selecting fields of RdRMomentsFollowing entities.
func (*RdRMomentsFollowingSelect) Aggregate ¶
func (rrfs *RdRMomentsFollowingSelect) Aggregate(fns ...AggregateFunc) *RdRMomentsFollowingSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RdRMomentsFollowingSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RdRMomentsFollowingSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RdRMomentsFollowingSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RdRMomentsFollowingSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*RdRMomentsFollowingSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RdRMomentsFollowingSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*RdRMomentsFollowingSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RdRMomentsFollowingSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RdRMomentsFollowingSelect) Scan ¶
func (rrfs *RdRMomentsFollowingSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RdRMomentsFollowingSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RdRMomentsFollowingUpdate ¶
type RdRMomentsFollowingUpdate struct {
// contains filtered or unexported fields
}
RdRMomentsFollowingUpdate is the builder for updating RdRMomentsFollowing entities.
func (*RdRMomentsFollowingUpdate) AddByUID ¶
func (rrfu *RdRMomentsFollowingUpdate) AddByUID(i int32) *RdRMomentsFollowingUpdate
AddByUID adds i to the "by_uid" field.
func (*RdRMomentsFollowingUpdate) AddForUID ¶
func (rrfu *RdRMomentsFollowingUpdate) AddForUID(i int32) *RdRMomentsFollowingUpdate
AddForUID adds i to the "for_uid" field.
func (*RdRMomentsFollowingUpdate) AddMomentID ¶
func (rrfu *RdRMomentsFollowingUpdate) AddMomentID(i int64) *RdRMomentsFollowingUpdate
AddMomentID adds i to the "moment_id" field.
func (*RdRMomentsFollowingUpdate) AddMomentType ¶
func (rrfu *RdRMomentsFollowingUpdate) AddMomentType(i int32) *RdRMomentsFollowingUpdate
AddMomentType adds i to the "moment_type" field.
func (*RdRMomentsFollowingUpdate) AddStatus ¶
func (rrfu *RdRMomentsFollowingUpdate) AddStatus(i int32) *RdRMomentsFollowingUpdate
AddStatus adds i to the "status" field.
func (*RdRMomentsFollowingUpdate) AppendImgs ¶
func (rrfu *RdRMomentsFollowingUpdate) AppendImgs(s []string) *RdRMomentsFollowingUpdate
AppendImgs appends s to the "imgs" field.
func (*RdRMomentsFollowingUpdate) ClearByUID ¶
func (rrfu *RdRMomentsFollowingUpdate) ClearByUID() *RdRMomentsFollowingUpdate
ClearByUID clears the value of the "by_uid" field.
func (*RdRMomentsFollowingUpdate) ClearForUID ¶
func (rrfu *RdRMomentsFollowingUpdate) ClearForUID() *RdRMomentsFollowingUpdate
ClearForUID clears the value of the "for_uid" field.
func (*RdRMomentsFollowingUpdate) ClearMomentID ¶
func (rrfu *RdRMomentsFollowingUpdate) ClearMomentID() *RdRMomentsFollowingUpdate
ClearMomentID clears the value of the "moment_id" field.
func (*RdRMomentsFollowingUpdate) ClearMomentType ¶
func (rrfu *RdRMomentsFollowingUpdate) ClearMomentType() *RdRMomentsFollowingUpdate
ClearMomentType clears the value of the "moment_type" field.
func (*RdRMomentsFollowingUpdate) ClearStatus ¶
func (rrfu *RdRMomentsFollowingUpdate) ClearStatus() *RdRMomentsFollowingUpdate
ClearStatus clears the value of the "status" field.
func (*RdRMomentsFollowingUpdate) Exec ¶
func (rrfu *RdRMomentsFollowingUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RdRMomentsFollowingUpdate) ExecX ¶
func (rrfu *RdRMomentsFollowingUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RdRMomentsFollowingUpdate) Mutation ¶
func (rrfu *RdRMomentsFollowingUpdate) Mutation() *RdRMomentsFollowingMutation
Mutation returns the RdRMomentsFollowingMutation object of the builder.
func (*RdRMomentsFollowingUpdate) Save ¶
func (rrfu *RdRMomentsFollowingUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RdRMomentsFollowingUpdate) SaveX ¶
func (rrfu *RdRMomentsFollowingUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RdRMomentsFollowingUpdate) SetByUID ¶
func (rrfu *RdRMomentsFollowingUpdate) SetByUID(i int32) *RdRMomentsFollowingUpdate
SetByUID sets the "by_uid" field.
func (*RdRMomentsFollowingUpdate) SetForUID ¶
func (rrfu *RdRMomentsFollowingUpdate) SetForUID(i int32) *RdRMomentsFollowingUpdate
SetForUID sets the "for_uid" field.
func (*RdRMomentsFollowingUpdate) SetImgs ¶
func (rrfu *RdRMomentsFollowingUpdate) SetImgs(s []string) *RdRMomentsFollowingUpdate
SetImgs sets the "imgs" field.
func (*RdRMomentsFollowingUpdate) SetMomentID ¶
func (rrfu *RdRMomentsFollowingUpdate) SetMomentID(i int64) *RdRMomentsFollowingUpdate
SetMomentID sets the "moment_id" field.
func (*RdRMomentsFollowingUpdate) SetMomentType ¶
func (rrfu *RdRMomentsFollowingUpdate) SetMomentType(i int32) *RdRMomentsFollowingUpdate
SetMomentType sets the "moment_type" field.
func (*RdRMomentsFollowingUpdate) SetNillableByUID ¶
func (rrfu *RdRMomentsFollowingUpdate) SetNillableByUID(i *int32) *RdRMomentsFollowingUpdate
SetNillableByUID sets the "by_uid" field if the given value is not nil.
func (*RdRMomentsFollowingUpdate) SetNillableForUID ¶
func (rrfu *RdRMomentsFollowingUpdate) SetNillableForUID(i *int32) *RdRMomentsFollowingUpdate
SetNillableForUID sets the "for_uid" field if the given value is not nil.
func (*RdRMomentsFollowingUpdate) SetNillableMomentID ¶
func (rrfu *RdRMomentsFollowingUpdate) SetNillableMomentID(i *int64) *RdRMomentsFollowingUpdate
SetNillableMomentID sets the "moment_id" field if the given value is not nil.
func (*RdRMomentsFollowingUpdate) SetNillableMomentType ¶
func (rrfu *RdRMomentsFollowingUpdate) SetNillableMomentType(i *int32) *RdRMomentsFollowingUpdate
SetNillableMomentType sets the "moment_type" field if the given value is not nil.
func (*RdRMomentsFollowingUpdate) SetNillablePublishTime ¶
func (rrfu *RdRMomentsFollowingUpdate) SetNillablePublishTime(t *time.Time) *RdRMomentsFollowingUpdate
SetNillablePublishTime sets the "publish_time" field if the given value is not nil.
func (*RdRMomentsFollowingUpdate) SetNillableStatus ¶
func (rrfu *RdRMomentsFollowingUpdate) SetNillableStatus(i *int32) *RdRMomentsFollowingUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*RdRMomentsFollowingUpdate) SetPublishTime ¶
func (rrfu *RdRMomentsFollowingUpdate) SetPublishTime(t time.Time) *RdRMomentsFollowingUpdate
SetPublishTime sets the "publish_time" field.
func (*RdRMomentsFollowingUpdate) SetStatus ¶
func (rrfu *RdRMomentsFollowingUpdate) SetStatus(i int32) *RdRMomentsFollowingUpdate
SetStatus sets the "status" field.
func (*RdRMomentsFollowingUpdate) SetTxt ¶
func (rrfu *RdRMomentsFollowingUpdate) SetTxt(s string) *RdRMomentsFollowingUpdate
SetTxt sets the "txt" field.
func (*RdRMomentsFollowingUpdate) Where ¶
func (rrfu *RdRMomentsFollowingUpdate) Where(ps ...predicate.RdRMomentsFollowing) *RdRMomentsFollowingUpdate
Where appends a list predicates to the RdRMomentsFollowingUpdate builder.
type RdRMomentsFollowingUpdateOne ¶
type RdRMomentsFollowingUpdateOne struct {
// contains filtered or unexported fields
}
RdRMomentsFollowingUpdateOne is the builder for updating a single RdRMomentsFollowing entity.
func (*RdRMomentsFollowingUpdateOne) AddByUID ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) AddByUID(i int32) *RdRMomentsFollowingUpdateOne
AddByUID adds i to the "by_uid" field.
func (*RdRMomentsFollowingUpdateOne) AddForUID ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) AddForUID(i int32) *RdRMomentsFollowingUpdateOne
AddForUID adds i to the "for_uid" field.
func (*RdRMomentsFollowingUpdateOne) AddMomentID ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) AddMomentID(i int64) *RdRMomentsFollowingUpdateOne
AddMomentID adds i to the "moment_id" field.
func (*RdRMomentsFollowingUpdateOne) AddMomentType ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) AddMomentType(i int32) *RdRMomentsFollowingUpdateOne
AddMomentType adds i to the "moment_type" field.
func (*RdRMomentsFollowingUpdateOne) AddStatus ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) AddStatus(i int32) *RdRMomentsFollowingUpdateOne
AddStatus adds i to the "status" field.
func (*RdRMomentsFollowingUpdateOne) AppendImgs ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) AppendImgs(s []string) *RdRMomentsFollowingUpdateOne
AppendImgs appends s to the "imgs" field.
func (*RdRMomentsFollowingUpdateOne) ClearByUID ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) ClearByUID() *RdRMomentsFollowingUpdateOne
ClearByUID clears the value of the "by_uid" field.
func (*RdRMomentsFollowingUpdateOne) ClearForUID ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) ClearForUID() *RdRMomentsFollowingUpdateOne
ClearForUID clears the value of the "for_uid" field.
func (*RdRMomentsFollowingUpdateOne) ClearMomentID ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) ClearMomentID() *RdRMomentsFollowingUpdateOne
ClearMomentID clears the value of the "moment_id" field.
func (*RdRMomentsFollowingUpdateOne) ClearMomentType ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) ClearMomentType() *RdRMomentsFollowingUpdateOne
ClearMomentType clears the value of the "moment_type" field.
func (*RdRMomentsFollowingUpdateOne) ClearStatus ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) ClearStatus() *RdRMomentsFollowingUpdateOne
ClearStatus clears the value of the "status" field.
func (*RdRMomentsFollowingUpdateOne) Exec ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RdRMomentsFollowingUpdateOne) ExecX ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RdRMomentsFollowingUpdateOne) Mutation ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) Mutation() *RdRMomentsFollowingMutation
Mutation returns the RdRMomentsFollowingMutation object of the builder.
func (*RdRMomentsFollowingUpdateOne) Save ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) Save(ctx context.Context) (*RdRMomentsFollowing, error)
Save executes the query and returns the updated RdRMomentsFollowing entity.
func (*RdRMomentsFollowingUpdateOne) SaveX ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) SaveX(ctx context.Context) *RdRMomentsFollowing
SaveX is like Save, but panics if an error occurs.
func (*RdRMomentsFollowingUpdateOne) Select ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) Select(field string, fields ...string) *RdRMomentsFollowingUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RdRMomentsFollowingUpdateOne) SetByUID ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) SetByUID(i int32) *RdRMomentsFollowingUpdateOne
SetByUID sets the "by_uid" field.
func (*RdRMomentsFollowingUpdateOne) SetForUID ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) SetForUID(i int32) *RdRMomentsFollowingUpdateOne
SetForUID sets the "for_uid" field.
func (*RdRMomentsFollowingUpdateOne) SetImgs ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) SetImgs(s []string) *RdRMomentsFollowingUpdateOne
SetImgs sets the "imgs" field.
func (*RdRMomentsFollowingUpdateOne) SetMomentID ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) SetMomentID(i int64) *RdRMomentsFollowingUpdateOne
SetMomentID sets the "moment_id" field.
func (*RdRMomentsFollowingUpdateOne) SetMomentType ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) SetMomentType(i int32) *RdRMomentsFollowingUpdateOne
SetMomentType sets the "moment_type" field.
func (*RdRMomentsFollowingUpdateOne) SetNillableByUID ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) SetNillableByUID(i *int32) *RdRMomentsFollowingUpdateOne
SetNillableByUID sets the "by_uid" field if the given value is not nil.
func (*RdRMomentsFollowingUpdateOne) SetNillableForUID ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) SetNillableForUID(i *int32) *RdRMomentsFollowingUpdateOne
SetNillableForUID sets the "for_uid" field if the given value is not nil.
func (*RdRMomentsFollowingUpdateOne) SetNillableMomentID ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) SetNillableMomentID(i *int64) *RdRMomentsFollowingUpdateOne
SetNillableMomentID sets the "moment_id" field if the given value is not nil.
func (*RdRMomentsFollowingUpdateOne) SetNillableMomentType ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) SetNillableMomentType(i *int32) *RdRMomentsFollowingUpdateOne
SetNillableMomentType sets the "moment_type" field if the given value is not nil.
func (*RdRMomentsFollowingUpdateOne) SetNillablePublishTime ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) SetNillablePublishTime(t *time.Time) *RdRMomentsFollowingUpdateOne
SetNillablePublishTime sets the "publish_time" field if the given value is not nil.
func (*RdRMomentsFollowingUpdateOne) SetNillableStatus ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) SetNillableStatus(i *int32) *RdRMomentsFollowingUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*RdRMomentsFollowingUpdateOne) SetPublishTime ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) SetPublishTime(t time.Time) *RdRMomentsFollowingUpdateOne
SetPublishTime sets the "publish_time" field.
func (*RdRMomentsFollowingUpdateOne) SetStatus ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) SetStatus(i int32) *RdRMomentsFollowingUpdateOne
SetStatus sets the "status" field.
func (*RdRMomentsFollowingUpdateOne) SetTxt ¶
func (rrfuo *RdRMomentsFollowingUpdateOne) SetTxt(s string) *RdRMomentsFollowingUpdateOne
SetTxt sets the "txt" field.
type RdRMomentsFollowings ¶
type RdRMomentsFollowings []*RdRMomentsFollowing
RdRMomentsFollowings is a parsable slice of RdRMomentsFollowing.
type RdRUserFollowers ¶
type RdRUserFollowers struct { // ID of the ent. ID int64 `json:"id,omitempty"` // uid UID int32 `json:"uid,omitempty"` // 粉丝uid FollowersUID int32 `json:"followers_uid,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // contains filtered or unexported fields }
RdRUserFollowers is the model entity for the RdRUserFollowers schema.
func (*RdRUserFollowers) String ¶
func (rrf *RdRUserFollowers) String() string
String implements the fmt.Stringer.
func (*RdRUserFollowers) Unwrap ¶
func (rrf *RdRUserFollowers) Unwrap() *RdRUserFollowers
Unwrap unwraps the RdRUserFollowers 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 (*RdRUserFollowers) Update ¶
func (rrf *RdRUserFollowers) Update() *RdRUserFollowersUpdateOne
Update returns a builder for updating this RdRUserFollowers. Note that you need to call RdRUserFollowers.Unwrap() before calling this method if this RdRUserFollowers was returned from a transaction, and the transaction was committed or rolled back.
type RdRUserFollowersClient ¶
type RdRUserFollowersClient struct {
// contains filtered or unexported fields
}
RdRUserFollowersClient is a client for the RdRUserFollowers schema.
func NewRdRUserFollowersClient ¶
func NewRdRUserFollowersClient(c config) *RdRUserFollowersClient
NewRdRUserFollowersClient returns a client for the RdRUserFollowers from the given config.
func (*RdRUserFollowersClient) Create ¶
func (c *RdRUserFollowersClient) Create() *RdRUserFollowersCreate
Create returns a builder for creating a RdRUserFollowers entity.
func (*RdRUserFollowersClient) CreateBulk ¶
func (c *RdRUserFollowersClient) CreateBulk(builders ...*RdRUserFollowersCreate) *RdRUserFollowersCreateBulk
CreateBulk returns a builder for creating a bulk of RdRUserFollowers entities.
func (*RdRUserFollowersClient) Delete ¶
func (c *RdRUserFollowersClient) Delete() *RdRUserFollowersDelete
Delete returns a delete builder for RdRUserFollowers.
func (*RdRUserFollowersClient) DeleteOne ¶
func (c *RdRUserFollowersClient) DeleteOne(rrf *RdRUserFollowers) *RdRUserFollowersDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RdRUserFollowersClient) DeleteOneID ¶
func (c *RdRUserFollowersClient) DeleteOneID(id int64) *RdRUserFollowersDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RdRUserFollowersClient) Get ¶
func (c *RdRUserFollowersClient) Get(ctx context.Context, id int64) (*RdRUserFollowers, error)
Get returns a RdRUserFollowers entity by its id.
func (*RdRUserFollowersClient) GetX ¶
func (c *RdRUserFollowersClient) GetX(ctx context.Context, id int64) *RdRUserFollowers
GetX is like Get, but panics if an error occurs.
func (*RdRUserFollowersClient) Hooks ¶
func (c *RdRUserFollowersClient) Hooks() []Hook
Hooks returns the client hooks.
func (*RdRUserFollowersClient) Intercept ¶
func (c *RdRUserFollowersClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `rdruserfollowers.Intercept(f(g(h())))`.
func (*RdRUserFollowersClient) Interceptors ¶
func (c *RdRUserFollowersClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RdRUserFollowersClient) Query ¶
func (c *RdRUserFollowersClient) Query() *RdRUserFollowersQuery
Query returns a query builder for RdRUserFollowers.
func (*RdRUserFollowersClient) Update ¶
func (c *RdRUserFollowersClient) Update() *RdRUserFollowersUpdate
Update returns an update builder for RdRUserFollowers.
func (*RdRUserFollowersClient) UpdateOne ¶
func (c *RdRUserFollowersClient) UpdateOne(rrf *RdRUserFollowers) *RdRUserFollowersUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RdRUserFollowersClient) UpdateOneID ¶
func (c *RdRUserFollowersClient) UpdateOneID(id int64) *RdRUserFollowersUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RdRUserFollowersClient) Use ¶
func (c *RdRUserFollowersClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `rdruserfollowers.Hooks(f(g(h())))`.
type RdRUserFollowersCreate ¶
type RdRUserFollowersCreate struct {
// contains filtered or unexported fields
}
RdRUserFollowersCreate is the builder for creating a RdRUserFollowers entity.
func (*RdRUserFollowersCreate) Exec ¶
func (rrfc *RdRUserFollowersCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RdRUserFollowersCreate) ExecX ¶
func (rrfc *RdRUserFollowersCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RdRUserFollowersCreate) Mutation ¶
func (rrfc *RdRUserFollowersCreate) Mutation() *RdRUserFollowersMutation
Mutation returns the RdRUserFollowersMutation object of the builder.
func (*RdRUserFollowersCreate) Save ¶
func (rrfc *RdRUserFollowersCreate) Save(ctx context.Context) (*RdRUserFollowers, error)
Save creates the RdRUserFollowers in the database.
func (*RdRUserFollowersCreate) SaveX ¶
func (rrfc *RdRUserFollowersCreate) SaveX(ctx context.Context) *RdRUserFollowers
SaveX calls Save and panics if Save returns an error.
func (*RdRUserFollowersCreate) SetCreateTime ¶
func (rrfc *RdRUserFollowersCreate) SetCreateTime(t time.Time) *RdRUserFollowersCreate
SetCreateTime sets the "create_time" field.
func (*RdRUserFollowersCreate) SetFollowersUID ¶
func (rrfc *RdRUserFollowersCreate) SetFollowersUID(i int32) *RdRUserFollowersCreate
SetFollowersUID sets the "followers_uid" field.
func (*RdRUserFollowersCreate) SetID ¶
func (rrfc *RdRUserFollowersCreate) SetID(i int64) *RdRUserFollowersCreate
SetID sets the "id" field.
func (*RdRUserFollowersCreate) SetNillableCreateTime ¶
func (rrfc *RdRUserFollowersCreate) SetNillableCreateTime(t *time.Time) *RdRUserFollowersCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*RdRUserFollowersCreate) SetNillableFollowersUID ¶
func (rrfc *RdRUserFollowersCreate) SetNillableFollowersUID(i *int32) *RdRUserFollowersCreate
SetNillableFollowersUID sets the "followers_uid" field if the given value is not nil.
func (*RdRUserFollowersCreate) SetNillableUID ¶
func (rrfc *RdRUserFollowersCreate) SetNillableUID(i *int32) *RdRUserFollowersCreate
SetNillableUID sets the "uid" field if the given value is not nil.
func (*RdRUserFollowersCreate) SetUID ¶
func (rrfc *RdRUserFollowersCreate) SetUID(i int32) *RdRUserFollowersCreate
SetUID sets the "uid" field.
type RdRUserFollowersCreateBulk ¶
type RdRUserFollowersCreateBulk struct {
// contains filtered or unexported fields
}
RdRUserFollowersCreateBulk is the builder for creating many RdRUserFollowers entities in bulk.
func (*RdRUserFollowersCreateBulk) Exec ¶
func (rrfcb *RdRUserFollowersCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RdRUserFollowersCreateBulk) ExecX ¶
func (rrfcb *RdRUserFollowersCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RdRUserFollowersCreateBulk) Save ¶
func (rrfcb *RdRUserFollowersCreateBulk) Save(ctx context.Context) ([]*RdRUserFollowers, error)
Save creates the RdRUserFollowers entities in the database.
func (*RdRUserFollowersCreateBulk) SaveX ¶
func (rrfcb *RdRUserFollowersCreateBulk) SaveX(ctx context.Context) []*RdRUserFollowers
SaveX is like Save, but panics if an error occurs.
type RdRUserFollowersDelete ¶
type RdRUserFollowersDelete struct {
// contains filtered or unexported fields
}
RdRUserFollowersDelete is the builder for deleting a RdRUserFollowers entity.
func (*RdRUserFollowersDelete) Exec ¶
func (rrfd *RdRUserFollowersDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RdRUserFollowersDelete) ExecX ¶
func (rrfd *RdRUserFollowersDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RdRUserFollowersDelete) Where ¶
func (rrfd *RdRUserFollowersDelete) Where(ps ...predicate.RdRUserFollowers) *RdRUserFollowersDelete
Where appends a list predicates to the RdRUserFollowersDelete builder.
type RdRUserFollowersDeleteOne ¶
type RdRUserFollowersDeleteOne struct {
// contains filtered or unexported fields
}
RdRUserFollowersDeleteOne is the builder for deleting a single RdRUserFollowers entity.
func (*RdRUserFollowersDeleteOne) Exec ¶
func (rrfdo *RdRUserFollowersDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RdRUserFollowersDeleteOne) ExecX ¶
func (rrfdo *RdRUserFollowersDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RdRUserFollowersGroupBy ¶
type RdRUserFollowersGroupBy struct {
// contains filtered or unexported fields
}
RdRUserFollowersGroupBy is the group-by builder for RdRUserFollowers entities.
func (*RdRUserFollowersGroupBy) Aggregate ¶
func (rrfgb *RdRUserFollowersGroupBy) Aggregate(fns ...AggregateFunc) *RdRUserFollowersGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RdRUserFollowersGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowersGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowersGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowersGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowersGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*RdRUserFollowersGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowersGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowersGroupBy) Scan ¶
func (rrfgb *RdRUserFollowersGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RdRUserFollowersGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RdRUserFollowersMutation ¶
type RdRUserFollowersMutation struct {
// contains filtered or unexported fields
}
RdRUserFollowersMutation represents an operation that mutates the RdRUserFollowers nodes in the graph.
func (*RdRUserFollowersMutation) AddField ¶
func (m *RdRUserFollowersMutation) 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 (*RdRUserFollowersMutation) AddFollowersUID ¶
func (m *RdRUserFollowersMutation) AddFollowersUID(i int32)
AddFollowersUID adds i to the "followers_uid" field.
func (*RdRUserFollowersMutation) AddUID ¶
func (m *RdRUserFollowersMutation) AddUID(i int32)
AddUID adds i to the "uid" field.
func (*RdRUserFollowersMutation) AddedEdges ¶
func (m *RdRUserFollowersMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RdRUserFollowersMutation) AddedField ¶
func (m *RdRUserFollowersMutation) 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 (*RdRUserFollowersMutation) AddedFields ¶
func (m *RdRUserFollowersMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RdRUserFollowersMutation) AddedFollowersUID ¶
func (m *RdRUserFollowersMutation) AddedFollowersUID() (r int32, exists bool)
AddedFollowersUID returns the value that was added to the "followers_uid" field in this mutation.
func (*RdRUserFollowersMutation) AddedIDs ¶
func (m *RdRUserFollowersMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RdRUserFollowersMutation) AddedUID ¶
func (m *RdRUserFollowersMutation) AddedUID() (r int32, exists bool)
AddedUID returns the value that was added to the "uid" field in this mutation.
func (*RdRUserFollowersMutation) ClearEdge ¶
func (m *RdRUserFollowersMutation) 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 (*RdRUserFollowersMutation) ClearField ¶
func (m *RdRUserFollowersMutation) 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 (*RdRUserFollowersMutation) ClearFollowersUID ¶
func (m *RdRUserFollowersMutation) ClearFollowersUID()
ClearFollowersUID clears the value of the "followers_uid" field.
func (*RdRUserFollowersMutation) ClearUID ¶
func (m *RdRUserFollowersMutation) ClearUID()
ClearUID clears the value of the "uid" field.
func (*RdRUserFollowersMutation) ClearedEdges ¶
func (m *RdRUserFollowersMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RdRUserFollowersMutation) ClearedFields ¶
func (m *RdRUserFollowersMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RdRUserFollowersMutation) Client ¶
func (m RdRUserFollowersMutation) 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 (*RdRUserFollowersMutation) CreateTime ¶
func (m *RdRUserFollowersMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*RdRUserFollowersMutation) EdgeCleared ¶
func (m *RdRUserFollowersMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RdRUserFollowersMutation) Field ¶
func (m *RdRUserFollowersMutation) 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 (*RdRUserFollowersMutation) FieldCleared ¶
func (m *RdRUserFollowersMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RdRUserFollowersMutation) Fields ¶
func (m *RdRUserFollowersMutation) 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 (*RdRUserFollowersMutation) FollowersUID ¶
func (m *RdRUserFollowersMutation) FollowersUID() (r int32, exists bool)
FollowersUID returns the value of the "followers_uid" field in the mutation.
func (*RdRUserFollowersMutation) FollowersUIDCleared ¶
func (m *RdRUserFollowersMutation) FollowersUIDCleared() bool
FollowersUIDCleared returns if the "followers_uid" field was cleared in this mutation.
func (*RdRUserFollowersMutation) ID ¶
func (m *RdRUserFollowersMutation) ID() (id int64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*RdRUserFollowersMutation) IDs ¶
func (m *RdRUserFollowersMutation) IDs(ctx context.Context) ([]int64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*RdRUserFollowersMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the RdRUserFollowers entity. If the RdRUserFollowers 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 (*RdRUserFollowersMutation) 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 (*RdRUserFollowersMutation) OldFollowersUID ¶
func (m *RdRUserFollowersMutation) OldFollowersUID(ctx context.Context) (v int32, err error)
OldFollowersUID returns the old "followers_uid" field's value of the RdRUserFollowers entity. If the RdRUserFollowers 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 (*RdRUserFollowersMutation) OldUID ¶
func (m *RdRUserFollowersMutation) OldUID(ctx context.Context) (v int32, err error)
OldUID returns the old "uid" field's value of the RdRUserFollowers entity. If the RdRUserFollowers 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 (*RdRUserFollowersMutation) Op ¶
func (m *RdRUserFollowersMutation) Op() Op
Op returns the operation name.
func (*RdRUserFollowersMutation) RemovedEdges ¶
func (m *RdRUserFollowersMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RdRUserFollowersMutation) RemovedIDs ¶
func (m *RdRUserFollowersMutation) 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 (*RdRUserFollowersMutation) ResetCreateTime ¶
func (m *RdRUserFollowersMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*RdRUserFollowersMutation) ResetEdge ¶
func (m *RdRUserFollowersMutation) 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 (*RdRUserFollowersMutation) ResetField ¶
func (m *RdRUserFollowersMutation) 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 (*RdRUserFollowersMutation) ResetFollowersUID ¶
func (m *RdRUserFollowersMutation) ResetFollowersUID()
ResetFollowersUID resets all changes to the "followers_uid" field.
func (*RdRUserFollowersMutation) ResetUID ¶
func (m *RdRUserFollowersMutation) ResetUID()
ResetUID resets all changes to the "uid" field.
func (*RdRUserFollowersMutation) SetCreateTime ¶
func (m *RdRUserFollowersMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*RdRUserFollowersMutation) SetField ¶
func (m *RdRUserFollowersMutation) 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 (*RdRUserFollowersMutation) SetFollowersUID ¶
func (m *RdRUserFollowersMutation) SetFollowersUID(i int32)
SetFollowersUID sets the "followers_uid" field.
func (*RdRUserFollowersMutation) SetID ¶
func (m *RdRUserFollowersMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of RdRUserFollowers entities.
func (*RdRUserFollowersMutation) SetOp ¶
func (m *RdRUserFollowersMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*RdRUserFollowersMutation) SetUID ¶
func (m *RdRUserFollowersMutation) SetUID(i int32)
SetUID sets the "uid" field.
func (RdRUserFollowersMutation) Tx ¶
func (m RdRUserFollowersMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RdRUserFollowersMutation) Type ¶
func (m *RdRUserFollowersMutation) Type() string
Type returns the node type of this mutation (RdRUserFollowers).
func (*RdRUserFollowersMutation) UID ¶
func (m *RdRUserFollowersMutation) UID() (r int32, exists bool)
UID returns the value of the "uid" field in the mutation.
func (*RdRUserFollowersMutation) UIDCleared ¶
func (m *RdRUserFollowersMutation) UIDCleared() bool
UIDCleared returns if the "uid" field was cleared in this mutation.
func (*RdRUserFollowersMutation) Where ¶
func (m *RdRUserFollowersMutation) Where(ps ...predicate.RdRUserFollowers)
Where appends a list predicates to the RdRUserFollowersMutation builder.
func (*RdRUserFollowersMutation) WhereP ¶
func (m *RdRUserFollowersMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RdRUserFollowersMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RdRUserFollowersQuery ¶
type RdRUserFollowersQuery struct {
// contains filtered or unexported fields
}
RdRUserFollowersQuery is the builder for querying RdRUserFollowers entities.
func (*RdRUserFollowersQuery) Aggregate ¶
func (rrfq *RdRUserFollowersQuery) Aggregate(fns ...AggregateFunc) *RdRUserFollowersSelect
Aggregate returns a RdRUserFollowersSelect configured with the given aggregations.
func (*RdRUserFollowersQuery) All ¶
func (rrfq *RdRUserFollowersQuery) All(ctx context.Context) ([]*RdRUserFollowers, error)
All executes the query and returns a list of RdRUserFollowersSlice.
func (*RdRUserFollowersQuery) AllX ¶
func (rrfq *RdRUserFollowersQuery) AllX(ctx context.Context) []*RdRUserFollowers
AllX is like All, but panics if an error occurs.
func (*RdRUserFollowersQuery) Clone ¶
func (rrfq *RdRUserFollowersQuery) Clone() *RdRUserFollowersQuery
Clone returns a duplicate of the RdRUserFollowersQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RdRUserFollowersQuery) Count ¶
func (rrfq *RdRUserFollowersQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RdRUserFollowersQuery) CountX ¶
func (rrfq *RdRUserFollowersQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RdRUserFollowersQuery) Exist ¶
func (rrfq *RdRUserFollowersQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RdRUserFollowersQuery) ExistX ¶
func (rrfq *RdRUserFollowersQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RdRUserFollowersQuery) First ¶
func (rrfq *RdRUserFollowersQuery) First(ctx context.Context) (*RdRUserFollowers, error)
First returns the first RdRUserFollowers entity from the query. Returns a *NotFoundError when no RdRUserFollowers was found.
func (*RdRUserFollowersQuery) FirstID ¶
func (rrfq *RdRUserFollowersQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first RdRUserFollowers ID from the query. Returns a *NotFoundError when no RdRUserFollowers ID was found.
func (*RdRUserFollowersQuery) FirstIDX ¶
func (rrfq *RdRUserFollowersQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*RdRUserFollowersQuery) FirstX ¶
func (rrfq *RdRUserFollowersQuery) FirstX(ctx context.Context) *RdRUserFollowers
FirstX is like First, but panics if an error occurs.
func (*RdRUserFollowersQuery) GroupBy ¶
func (rrfq *RdRUserFollowersQuery) GroupBy(field string, fields ...string) *RdRUserFollowersGroupBy
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 { UID int32 `json:"uid,omitempty"` Count int `json:"count,omitempty"` } client.RdRUserFollowers.Query(). GroupBy(rdruserfollowers.FieldUID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RdRUserFollowersQuery) IDs ¶
func (rrfq *RdRUserFollowersQuery) IDs(ctx context.Context) ([]int64, error)
IDs executes the query and returns a list of RdRUserFollowers IDs.
func (*RdRUserFollowersQuery) IDsX ¶
func (rrfq *RdRUserFollowersQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*RdRUserFollowersQuery) Limit ¶
func (rrfq *RdRUserFollowersQuery) Limit(limit int) *RdRUserFollowersQuery
Limit the number of records to be returned by this query.
func (*RdRUserFollowersQuery) Offset ¶
func (rrfq *RdRUserFollowersQuery) Offset(offset int) *RdRUserFollowersQuery
Offset to start from.
func (*RdRUserFollowersQuery) Only ¶
func (rrfq *RdRUserFollowersQuery) Only(ctx context.Context) (*RdRUserFollowers, error)
Only returns a single RdRUserFollowers entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one RdRUserFollowers entity is found. Returns a *NotFoundError when no RdRUserFollowers entities are found.
func (*RdRUserFollowersQuery) OnlyID ¶
func (rrfq *RdRUserFollowersQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only RdRUserFollowers ID in the query. Returns a *NotSingularError when more than one RdRUserFollowers ID is found. Returns a *NotFoundError when no entities are found.
func (*RdRUserFollowersQuery) OnlyIDX ¶
func (rrfq *RdRUserFollowersQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RdRUserFollowersQuery) OnlyX ¶
func (rrfq *RdRUserFollowersQuery) OnlyX(ctx context.Context) *RdRUserFollowers
OnlyX is like Only, but panics if an error occurs.
func (*RdRUserFollowersQuery) Order ¶
func (rrfq *RdRUserFollowersQuery) Order(o ...OrderFunc) *RdRUserFollowersQuery
Order specifies how the records should be ordered.
func (*RdRUserFollowersQuery) Select ¶
func (rrfq *RdRUserFollowersQuery) Select(fields ...string) *RdRUserFollowersSelect
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 { UID int32 `json:"uid,omitempty"` } client.RdRUserFollowers.Query(). Select(rdruserfollowers.FieldUID). Scan(ctx, &v)
func (*RdRUserFollowersQuery) Unique ¶
func (rrfq *RdRUserFollowersQuery) Unique(unique bool) *RdRUserFollowersQuery
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 (*RdRUserFollowersQuery) Where ¶
func (rrfq *RdRUserFollowersQuery) Where(ps ...predicate.RdRUserFollowers) *RdRUserFollowersQuery
Where adds a new predicate for the RdRUserFollowersQuery builder.
type RdRUserFollowersSelect ¶
type RdRUserFollowersSelect struct { *RdRUserFollowersQuery // contains filtered or unexported fields }
RdRUserFollowersSelect is the builder for selecting fields of RdRUserFollowers entities.
func (*RdRUserFollowersSelect) Aggregate ¶
func (rrfs *RdRUserFollowersSelect) Aggregate(fns ...AggregateFunc) *RdRUserFollowersSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RdRUserFollowersSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowersSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowersSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowersSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowersSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*RdRUserFollowersSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowersSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowersSelect) Scan ¶
func (rrfs *RdRUserFollowersSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RdRUserFollowersSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RdRUserFollowersSlice ¶
type RdRUserFollowersSlice []*RdRUserFollowers
RdRUserFollowersSlice is a parsable slice of RdRUserFollowers.
type RdRUserFollowersUpdate ¶
type RdRUserFollowersUpdate struct {
// contains filtered or unexported fields
}
RdRUserFollowersUpdate is the builder for updating RdRUserFollowers entities.
func (*RdRUserFollowersUpdate) AddFollowersUID ¶
func (rrfu *RdRUserFollowersUpdate) AddFollowersUID(i int32) *RdRUserFollowersUpdate
AddFollowersUID adds i to the "followers_uid" field.
func (*RdRUserFollowersUpdate) AddUID ¶
func (rrfu *RdRUserFollowersUpdate) AddUID(i int32) *RdRUserFollowersUpdate
AddUID adds i to the "uid" field.
func (*RdRUserFollowersUpdate) ClearFollowersUID ¶
func (rrfu *RdRUserFollowersUpdate) ClearFollowersUID() *RdRUserFollowersUpdate
ClearFollowersUID clears the value of the "followers_uid" field.
func (*RdRUserFollowersUpdate) ClearUID ¶
func (rrfu *RdRUserFollowersUpdate) ClearUID() *RdRUserFollowersUpdate
ClearUID clears the value of the "uid" field.
func (*RdRUserFollowersUpdate) Exec ¶
func (rrfu *RdRUserFollowersUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RdRUserFollowersUpdate) ExecX ¶
func (rrfu *RdRUserFollowersUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RdRUserFollowersUpdate) Mutation ¶
func (rrfu *RdRUserFollowersUpdate) Mutation() *RdRUserFollowersMutation
Mutation returns the RdRUserFollowersMutation object of the builder.
func (*RdRUserFollowersUpdate) Save ¶
func (rrfu *RdRUserFollowersUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RdRUserFollowersUpdate) SaveX ¶
func (rrfu *RdRUserFollowersUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RdRUserFollowersUpdate) SetCreateTime ¶
func (rrfu *RdRUserFollowersUpdate) SetCreateTime(t time.Time) *RdRUserFollowersUpdate
SetCreateTime sets the "create_time" field.
func (*RdRUserFollowersUpdate) SetFollowersUID ¶
func (rrfu *RdRUserFollowersUpdate) SetFollowersUID(i int32) *RdRUserFollowersUpdate
SetFollowersUID sets the "followers_uid" field.
func (*RdRUserFollowersUpdate) SetNillableCreateTime ¶
func (rrfu *RdRUserFollowersUpdate) SetNillableCreateTime(t *time.Time) *RdRUserFollowersUpdate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*RdRUserFollowersUpdate) SetNillableFollowersUID ¶
func (rrfu *RdRUserFollowersUpdate) SetNillableFollowersUID(i *int32) *RdRUserFollowersUpdate
SetNillableFollowersUID sets the "followers_uid" field if the given value is not nil.
func (*RdRUserFollowersUpdate) SetNillableUID ¶
func (rrfu *RdRUserFollowersUpdate) SetNillableUID(i *int32) *RdRUserFollowersUpdate
SetNillableUID sets the "uid" field if the given value is not nil.
func (*RdRUserFollowersUpdate) SetUID ¶
func (rrfu *RdRUserFollowersUpdate) SetUID(i int32) *RdRUserFollowersUpdate
SetUID sets the "uid" field.
func (*RdRUserFollowersUpdate) Where ¶
func (rrfu *RdRUserFollowersUpdate) Where(ps ...predicate.RdRUserFollowers) *RdRUserFollowersUpdate
Where appends a list predicates to the RdRUserFollowersUpdate builder.
type RdRUserFollowersUpdateOne ¶
type RdRUserFollowersUpdateOne struct {
// contains filtered or unexported fields
}
RdRUserFollowersUpdateOne is the builder for updating a single RdRUserFollowers entity.
func (*RdRUserFollowersUpdateOne) AddFollowersUID ¶
func (rrfuo *RdRUserFollowersUpdateOne) AddFollowersUID(i int32) *RdRUserFollowersUpdateOne
AddFollowersUID adds i to the "followers_uid" field.
func (*RdRUserFollowersUpdateOne) AddUID ¶
func (rrfuo *RdRUserFollowersUpdateOne) AddUID(i int32) *RdRUserFollowersUpdateOne
AddUID adds i to the "uid" field.
func (*RdRUserFollowersUpdateOne) ClearFollowersUID ¶
func (rrfuo *RdRUserFollowersUpdateOne) ClearFollowersUID() *RdRUserFollowersUpdateOne
ClearFollowersUID clears the value of the "followers_uid" field.
func (*RdRUserFollowersUpdateOne) ClearUID ¶
func (rrfuo *RdRUserFollowersUpdateOne) ClearUID() *RdRUserFollowersUpdateOne
ClearUID clears the value of the "uid" field.
func (*RdRUserFollowersUpdateOne) Exec ¶
func (rrfuo *RdRUserFollowersUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RdRUserFollowersUpdateOne) ExecX ¶
func (rrfuo *RdRUserFollowersUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RdRUserFollowersUpdateOne) Mutation ¶
func (rrfuo *RdRUserFollowersUpdateOne) Mutation() *RdRUserFollowersMutation
Mutation returns the RdRUserFollowersMutation object of the builder.
func (*RdRUserFollowersUpdateOne) Save ¶
func (rrfuo *RdRUserFollowersUpdateOne) Save(ctx context.Context) (*RdRUserFollowers, error)
Save executes the query and returns the updated RdRUserFollowers entity.
func (*RdRUserFollowersUpdateOne) SaveX ¶
func (rrfuo *RdRUserFollowersUpdateOne) SaveX(ctx context.Context) *RdRUserFollowers
SaveX is like Save, but panics if an error occurs.
func (*RdRUserFollowersUpdateOne) Select ¶
func (rrfuo *RdRUserFollowersUpdateOne) Select(field string, fields ...string) *RdRUserFollowersUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RdRUserFollowersUpdateOne) SetCreateTime ¶
func (rrfuo *RdRUserFollowersUpdateOne) SetCreateTime(t time.Time) *RdRUserFollowersUpdateOne
SetCreateTime sets the "create_time" field.
func (*RdRUserFollowersUpdateOne) SetFollowersUID ¶
func (rrfuo *RdRUserFollowersUpdateOne) SetFollowersUID(i int32) *RdRUserFollowersUpdateOne
SetFollowersUID sets the "followers_uid" field.
func (*RdRUserFollowersUpdateOne) SetNillableCreateTime ¶
func (rrfuo *RdRUserFollowersUpdateOne) SetNillableCreateTime(t *time.Time) *RdRUserFollowersUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*RdRUserFollowersUpdateOne) SetNillableFollowersUID ¶
func (rrfuo *RdRUserFollowersUpdateOne) SetNillableFollowersUID(i *int32) *RdRUserFollowersUpdateOne
SetNillableFollowersUID sets the "followers_uid" field if the given value is not nil.
func (*RdRUserFollowersUpdateOne) SetNillableUID ¶
func (rrfuo *RdRUserFollowersUpdateOne) SetNillableUID(i *int32) *RdRUserFollowersUpdateOne
SetNillableUID sets the "uid" field if the given value is not nil.
func (*RdRUserFollowersUpdateOne) SetUID ¶
func (rrfuo *RdRUserFollowersUpdateOne) SetUID(i int32) *RdRUserFollowersUpdateOne
SetUID sets the "uid" field.
type RdRUserFollowing ¶
type RdRUserFollowing struct { // ID of the ent. ID int64 `json:"id,omitempty"` // uid UID int32 `json:"uid,omitempty"` // 关注的人uid FollowingUID int32 `json:"following_uid,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // contains filtered or unexported fields }
RdRUserFollowing is the model entity for the RdRUserFollowing schema.
func (*RdRUserFollowing) String ¶
func (rrf *RdRUserFollowing) String() string
String implements the fmt.Stringer.
func (*RdRUserFollowing) Unwrap ¶
func (rrf *RdRUserFollowing) Unwrap() *RdRUserFollowing
Unwrap unwraps the RdRUserFollowing 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 (*RdRUserFollowing) Update ¶
func (rrf *RdRUserFollowing) Update() *RdRUserFollowingUpdateOne
Update returns a builder for updating this RdRUserFollowing. Note that you need to call RdRUserFollowing.Unwrap() before calling this method if this RdRUserFollowing was returned from a transaction, and the transaction was committed or rolled back.
type RdRUserFollowingClient ¶
type RdRUserFollowingClient struct {
// contains filtered or unexported fields
}
RdRUserFollowingClient is a client for the RdRUserFollowing schema.
func NewRdRUserFollowingClient ¶
func NewRdRUserFollowingClient(c config) *RdRUserFollowingClient
NewRdRUserFollowingClient returns a client for the RdRUserFollowing from the given config.
func (*RdRUserFollowingClient) Create ¶
func (c *RdRUserFollowingClient) Create() *RdRUserFollowingCreate
Create returns a builder for creating a RdRUserFollowing entity.
func (*RdRUserFollowingClient) CreateBulk ¶
func (c *RdRUserFollowingClient) CreateBulk(builders ...*RdRUserFollowingCreate) *RdRUserFollowingCreateBulk
CreateBulk returns a builder for creating a bulk of RdRUserFollowing entities.
func (*RdRUserFollowingClient) Delete ¶
func (c *RdRUserFollowingClient) Delete() *RdRUserFollowingDelete
Delete returns a delete builder for RdRUserFollowing.
func (*RdRUserFollowingClient) DeleteOne ¶
func (c *RdRUserFollowingClient) DeleteOne(rrf *RdRUserFollowing) *RdRUserFollowingDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RdRUserFollowingClient) DeleteOneID ¶
func (c *RdRUserFollowingClient) DeleteOneID(id int64) *RdRUserFollowingDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RdRUserFollowingClient) Get ¶
func (c *RdRUserFollowingClient) Get(ctx context.Context, id int64) (*RdRUserFollowing, error)
Get returns a RdRUserFollowing entity by its id.
func (*RdRUserFollowingClient) GetX ¶
func (c *RdRUserFollowingClient) GetX(ctx context.Context, id int64) *RdRUserFollowing
GetX is like Get, but panics if an error occurs.
func (*RdRUserFollowingClient) Hooks ¶
func (c *RdRUserFollowingClient) Hooks() []Hook
Hooks returns the client hooks.
func (*RdRUserFollowingClient) Intercept ¶
func (c *RdRUserFollowingClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `rdruserfollowing.Intercept(f(g(h())))`.
func (*RdRUserFollowingClient) Interceptors ¶
func (c *RdRUserFollowingClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RdRUserFollowingClient) Query ¶
func (c *RdRUserFollowingClient) Query() *RdRUserFollowingQuery
Query returns a query builder for RdRUserFollowing.
func (*RdRUserFollowingClient) Update ¶
func (c *RdRUserFollowingClient) Update() *RdRUserFollowingUpdate
Update returns an update builder for RdRUserFollowing.
func (*RdRUserFollowingClient) UpdateOne ¶
func (c *RdRUserFollowingClient) UpdateOne(rrf *RdRUserFollowing) *RdRUserFollowingUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RdRUserFollowingClient) UpdateOneID ¶
func (c *RdRUserFollowingClient) UpdateOneID(id int64) *RdRUserFollowingUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RdRUserFollowingClient) Use ¶
func (c *RdRUserFollowingClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `rdruserfollowing.Hooks(f(g(h())))`.
type RdRUserFollowingCreate ¶
type RdRUserFollowingCreate struct {
// contains filtered or unexported fields
}
RdRUserFollowingCreate is the builder for creating a RdRUserFollowing entity.
func (*RdRUserFollowingCreate) Exec ¶
func (rrfc *RdRUserFollowingCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RdRUserFollowingCreate) ExecX ¶
func (rrfc *RdRUserFollowingCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RdRUserFollowingCreate) Mutation ¶
func (rrfc *RdRUserFollowingCreate) Mutation() *RdRUserFollowingMutation
Mutation returns the RdRUserFollowingMutation object of the builder.
func (*RdRUserFollowingCreate) Save ¶
func (rrfc *RdRUserFollowingCreate) Save(ctx context.Context) (*RdRUserFollowing, error)
Save creates the RdRUserFollowing in the database.
func (*RdRUserFollowingCreate) SaveX ¶
func (rrfc *RdRUserFollowingCreate) SaveX(ctx context.Context) *RdRUserFollowing
SaveX calls Save and panics if Save returns an error.
func (*RdRUserFollowingCreate) SetCreateTime ¶
func (rrfc *RdRUserFollowingCreate) SetCreateTime(t time.Time) *RdRUserFollowingCreate
SetCreateTime sets the "create_time" field.
func (*RdRUserFollowingCreate) SetFollowingUID ¶
func (rrfc *RdRUserFollowingCreate) SetFollowingUID(i int32) *RdRUserFollowingCreate
SetFollowingUID sets the "following_uid" field.
func (*RdRUserFollowingCreate) SetID ¶
func (rrfc *RdRUserFollowingCreate) SetID(i int64) *RdRUserFollowingCreate
SetID sets the "id" field.
func (*RdRUserFollowingCreate) SetNillableCreateTime ¶
func (rrfc *RdRUserFollowingCreate) SetNillableCreateTime(t *time.Time) *RdRUserFollowingCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*RdRUserFollowingCreate) SetNillableFollowingUID ¶
func (rrfc *RdRUserFollowingCreate) SetNillableFollowingUID(i *int32) *RdRUserFollowingCreate
SetNillableFollowingUID sets the "following_uid" field if the given value is not nil.
func (*RdRUserFollowingCreate) SetNillableUID ¶
func (rrfc *RdRUserFollowingCreate) SetNillableUID(i *int32) *RdRUserFollowingCreate
SetNillableUID sets the "uid" field if the given value is not nil.
func (*RdRUserFollowingCreate) SetUID ¶
func (rrfc *RdRUserFollowingCreate) SetUID(i int32) *RdRUserFollowingCreate
SetUID sets the "uid" field.
type RdRUserFollowingCreateBulk ¶
type RdRUserFollowingCreateBulk struct {
// contains filtered or unexported fields
}
RdRUserFollowingCreateBulk is the builder for creating many RdRUserFollowing entities in bulk.
func (*RdRUserFollowingCreateBulk) Exec ¶
func (rrfcb *RdRUserFollowingCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RdRUserFollowingCreateBulk) ExecX ¶
func (rrfcb *RdRUserFollowingCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RdRUserFollowingCreateBulk) Save ¶
func (rrfcb *RdRUserFollowingCreateBulk) Save(ctx context.Context) ([]*RdRUserFollowing, error)
Save creates the RdRUserFollowing entities in the database.
func (*RdRUserFollowingCreateBulk) SaveX ¶
func (rrfcb *RdRUserFollowingCreateBulk) SaveX(ctx context.Context) []*RdRUserFollowing
SaveX is like Save, but panics if an error occurs.
type RdRUserFollowingDelete ¶
type RdRUserFollowingDelete struct {
// contains filtered or unexported fields
}
RdRUserFollowingDelete is the builder for deleting a RdRUserFollowing entity.
func (*RdRUserFollowingDelete) Exec ¶
func (rrfd *RdRUserFollowingDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RdRUserFollowingDelete) ExecX ¶
func (rrfd *RdRUserFollowingDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RdRUserFollowingDelete) Where ¶
func (rrfd *RdRUserFollowingDelete) Where(ps ...predicate.RdRUserFollowing) *RdRUserFollowingDelete
Where appends a list predicates to the RdRUserFollowingDelete builder.
type RdRUserFollowingDeleteOne ¶
type RdRUserFollowingDeleteOne struct {
// contains filtered or unexported fields
}
RdRUserFollowingDeleteOne is the builder for deleting a single RdRUserFollowing entity.
func (*RdRUserFollowingDeleteOne) Exec ¶
func (rrfdo *RdRUserFollowingDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RdRUserFollowingDeleteOne) ExecX ¶
func (rrfdo *RdRUserFollowingDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RdRUserFollowingGroupBy ¶
type RdRUserFollowingGroupBy struct {
// contains filtered or unexported fields
}
RdRUserFollowingGroupBy is the group-by builder for RdRUserFollowing entities.
func (*RdRUserFollowingGroupBy) Aggregate ¶
func (rrfgb *RdRUserFollowingGroupBy) Aggregate(fns ...AggregateFunc) *RdRUserFollowingGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RdRUserFollowingGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowingGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowingGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowingGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowingGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*RdRUserFollowingGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowingGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowingGroupBy) Scan ¶
func (rrfgb *RdRUserFollowingGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RdRUserFollowingGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RdRUserFollowingMutation ¶
type RdRUserFollowingMutation struct {
// contains filtered or unexported fields
}
RdRUserFollowingMutation represents an operation that mutates the RdRUserFollowing nodes in the graph.
func (*RdRUserFollowingMutation) AddField ¶
func (m *RdRUserFollowingMutation) 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 (*RdRUserFollowingMutation) AddFollowingUID ¶
func (m *RdRUserFollowingMutation) AddFollowingUID(i int32)
AddFollowingUID adds i to the "following_uid" field.
func (*RdRUserFollowingMutation) AddUID ¶
func (m *RdRUserFollowingMutation) AddUID(i int32)
AddUID adds i to the "uid" field.
func (*RdRUserFollowingMutation) AddedEdges ¶
func (m *RdRUserFollowingMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RdRUserFollowingMutation) AddedField ¶
func (m *RdRUserFollowingMutation) 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 (*RdRUserFollowingMutation) AddedFields ¶
func (m *RdRUserFollowingMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RdRUserFollowingMutation) AddedFollowingUID ¶
func (m *RdRUserFollowingMutation) AddedFollowingUID() (r int32, exists bool)
AddedFollowingUID returns the value that was added to the "following_uid" field in this mutation.
func (*RdRUserFollowingMutation) AddedIDs ¶
func (m *RdRUserFollowingMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RdRUserFollowingMutation) AddedUID ¶
func (m *RdRUserFollowingMutation) AddedUID() (r int32, exists bool)
AddedUID returns the value that was added to the "uid" field in this mutation.
func (*RdRUserFollowingMutation) ClearEdge ¶
func (m *RdRUserFollowingMutation) 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 (*RdRUserFollowingMutation) ClearField ¶
func (m *RdRUserFollowingMutation) 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 (*RdRUserFollowingMutation) ClearFollowingUID ¶
func (m *RdRUserFollowingMutation) ClearFollowingUID()
ClearFollowingUID clears the value of the "following_uid" field.
func (*RdRUserFollowingMutation) ClearUID ¶
func (m *RdRUserFollowingMutation) ClearUID()
ClearUID clears the value of the "uid" field.
func (*RdRUserFollowingMutation) ClearedEdges ¶
func (m *RdRUserFollowingMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RdRUserFollowingMutation) ClearedFields ¶
func (m *RdRUserFollowingMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RdRUserFollowingMutation) Client ¶
func (m RdRUserFollowingMutation) 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 (*RdRUserFollowingMutation) CreateTime ¶
func (m *RdRUserFollowingMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*RdRUserFollowingMutation) EdgeCleared ¶
func (m *RdRUserFollowingMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RdRUserFollowingMutation) Field ¶
func (m *RdRUserFollowingMutation) 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 (*RdRUserFollowingMutation) FieldCleared ¶
func (m *RdRUserFollowingMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RdRUserFollowingMutation) Fields ¶
func (m *RdRUserFollowingMutation) 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 (*RdRUserFollowingMutation) FollowingUID ¶
func (m *RdRUserFollowingMutation) FollowingUID() (r int32, exists bool)
FollowingUID returns the value of the "following_uid" field in the mutation.
func (*RdRUserFollowingMutation) FollowingUIDCleared ¶
func (m *RdRUserFollowingMutation) FollowingUIDCleared() bool
FollowingUIDCleared returns if the "following_uid" field was cleared in this mutation.
func (*RdRUserFollowingMutation) ID ¶
func (m *RdRUserFollowingMutation) ID() (id int64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*RdRUserFollowingMutation) IDs ¶
func (m *RdRUserFollowingMutation) IDs(ctx context.Context) ([]int64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*RdRUserFollowingMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the RdRUserFollowing entity. If the RdRUserFollowing 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 (*RdRUserFollowingMutation) 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 (*RdRUserFollowingMutation) OldFollowingUID ¶
func (m *RdRUserFollowingMutation) OldFollowingUID(ctx context.Context) (v int32, err error)
OldFollowingUID returns the old "following_uid" field's value of the RdRUserFollowing entity. If the RdRUserFollowing 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 (*RdRUserFollowingMutation) OldUID ¶
func (m *RdRUserFollowingMutation) OldUID(ctx context.Context) (v int32, err error)
OldUID returns the old "uid" field's value of the RdRUserFollowing entity. If the RdRUserFollowing 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 (*RdRUserFollowingMutation) Op ¶
func (m *RdRUserFollowingMutation) Op() Op
Op returns the operation name.
func (*RdRUserFollowingMutation) RemovedEdges ¶
func (m *RdRUserFollowingMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RdRUserFollowingMutation) RemovedIDs ¶
func (m *RdRUserFollowingMutation) 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 (*RdRUserFollowingMutation) ResetCreateTime ¶
func (m *RdRUserFollowingMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*RdRUserFollowingMutation) ResetEdge ¶
func (m *RdRUserFollowingMutation) 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 (*RdRUserFollowingMutation) ResetField ¶
func (m *RdRUserFollowingMutation) 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 (*RdRUserFollowingMutation) ResetFollowingUID ¶
func (m *RdRUserFollowingMutation) ResetFollowingUID()
ResetFollowingUID resets all changes to the "following_uid" field.
func (*RdRUserFollowingMutation) ResetUID ¶
func (m *RdRUserFollowingMutation) ResetUID()
ResetUID resets all changes to the "uid" field.
func (*RdRUserFollowingMutation) SetCreateTime ¶
func (m *RdRUserFollowingMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*RdRUserFollowingMutation) SetField ¶
func (m *RdRUserFollowingMutation) 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 (*RdRUserFollowingMutation) SetFollowingUID ¶
func (m *RdRUserFollowingMutation) SetFollowingUID(i int32)
SetFollowingUID sets the "following_uid" field.
func (*RdRUserFollowingMutation) SetID ¶
func (m *RdRUserFollowingMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of RdRUserFollowing entities.
func (*RdRUserFollowingMutation) SetOp ¶
func (m *RdRUserFollowingMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*RdRUserFollowingMutation) SetUID ¶
func (m *RdRUserFollowingMutation) SetUID(i int32)
SetUID sets the "uid" field.
func (RdRUserFollowingMutation) Tx ¶
func (m RdRUserFollowingMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RdRUserFollowingMutation) Type ¶
func (m *RdRUserFollowingMutation) Type() string
Type returns the node type of this mutation (RdRUserFollowing).
func (*RdRUserFollowingMutation) UID ¶
func (m *RdRUserFollowingMutation) UID() (r int32, exists bool)
UID returns the value of the "uid" field in the mutation.
func (*RdRUserFollowingMutation) UIDCleared ¶
func (m *RdRUserFollowingMutation) UIDCleared() bool
UIDCleared returns if the "uid" field was cleared in this mutation.
func (*RdRUserFollowingMutation) Where ¶
func (m *RdRUserFollowingMutation) Where(ps ...predicate.RdRUserFollowing)
Where appends a list predicates to the RdRUserFollowingMutation builder.
func (*RdRUserFollowingMutation) WhereP ¶
func (m *RdRUserFollowingMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RdRUserFollowingMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RdRUserFollowingQuery ¶
type RdRUserFollowingQuery struct {
// contains filtered or unexported fields
}
RdRUserFollowingQuery is the builder for querying RdRUserFollowing entities.
func (*RdRUserFollowingQuery) Aggregate ¶
func (rrfq *RdRUserFollowingQuery) Aggregate(fns ...AggregateFunc) *RdRUserFollowingSelect
Aggregate returns a RdRUserFollowingSelect configured with the given aggregations.
func (*RdRUserFollowingQuery) All ¶
func (rrfq *RdRUserFollowingQuery) All(ctx context.Context) ([]*RdRUserFollowing, error)
All executes the query and returns a list of RdRUserFollowings.
func (*RdRUserFollowingQuery) AllX ¶
func (rrfq *RdRUserFollowingQuery) AllX(ctx context.Context) []*RdRUserFollowing
AllX is like All, but panics if an error occurs.
func (*RdRUserFollowingQuery) Clone ¶
func (rrfq *RdRUserFollowingQuery) Clone() *RdRUserFollowingQuery
Clone returns a duplicate of the RdRUserFollowingQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RdRUserFollowingQuery) Count ¶
func (rrfq *RdRUserFollowingQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RdRUserFollowingQuery) CountX ¶
func (rrfq *RdRUserFollowingQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RdRUserFollowingQuery) Exist ¶
func (rrfq *RdRUserFollowingQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RdRUserFollowingQuery) ExistX ¶
func (rrfq *RdRUserFollowingQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RdRUserFollowingQuery) First ¶
func (rrfq *RdRUserFollowingQuery) First(ctx context.Context) (*RdRUserFollowing, error)
First returns the first RdRUserFollowing entity from the query. Returns a *NotFoundError when no RdRUserFollowing was found.
func (*RdRUserFollowingQuery) FirstID ¶
func (rrfq *RdRUserFollowingQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first RdRUserFollowing ID from the query. Returns a *NotFoundError when no RdRUserFollowing ID was found.
func (*RdRUserFollowingQuery) FirstIDX ¶
func (rrfq *RdRUserFollowingQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*RdRUserFollowingQuery) FirstX ¶
func (rrfq *RdRUserFollowingQuery) FirstX(ctx context.Context) *RdRUserFollowing
FirstX is like First, but panics if an error occurs.
func (*RdRUserFollowingQuery) GroupBy ¶
func (rrfq *RdRUserFollowingQuery) GroupBy(field string, fields ...string) *RdRUserFollowingGroupBy
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 { UID int32 `json:"uid,omitempty"` Count int `json:"count,omitempty"` } client.RdRUserFollowing.Query(). GroupBy(rdruserfollowing.FieldUID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RdRUserFollowingQuery) IDs ¶
func (rrfq *RdRUserFollowingQuery) IDs(ctx context.Context) ([]int64, error)
IDs executes the query and returns a list of RdRUserFollowing IDs.
func (*RdRUserFollowingQuery) IDsX ¶
func (rrfq *RdRUserFollowingQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*RdRUserFollowingQuery) Limit ¶
func (rrfq *RdRUserFollowingQuery) Limit(limit int) *RdRUserFollowingQuery
Limit the number of records to be returned by this query.
func (*RdRUserFollowingQuery) Offset ¶
func (rrfq *RdRUserFollowingQuery) Offset(offset int) *RdRUserFollowingQuery
Offset to start from.
func (*RdRUserFollowingQuery) Only ¶
func (rrfq *RdRUserFollowingQuery) Only(ctx context.Context) (*RdRUserFollowing, error)
Only returns a single RdRUserFollowing entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one RdRUserFollowing entity is found. Returns a *NotFoundError when no RdRUserFollowing entities are found.
func (*RdRUserFollowingQuery) OnlyID ¶
func (rrfq *RdRUserFollowingQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only RdRUserFollowing ID in the query. Returns a *NotSingularError when more than one RdRUserFollowing ID is found. Returns a *NotFoundError when no entities are found.
func (*RdRUserFollowingQuery) OnlyIDX ¶
func (rrfq *RdRUserFollowingQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RdRUserFollowingQuery) OnlyX ¶
func (rrfq *RdRUserFollowingQuery) OnlyX(ctx context.Context) *RdRUserFollowing
OnlyX is like Only, but panics if an error occurs.
func (*RdRUserFollowingQuery) Order ¶
func (rrfq *RdRUserFollowingQuery) Order(o ...OrderFunc) *RdRUserFollowingQuery
Order specifies how the records should be ordered.
func (*RdRUserFollowingQuery) Select ¶
func (rrfq *RdRUserFollowingQuery) Select(fields ...string) *RdRUserFollowingSelect
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 { UID int32 `json:"uid,omitempty"` } client.RdRUserFollowing.Query(). Select(rdruserfollowing.FieldUID). Scan(ctx, &v)
func (*RdRUserFollowingQuery) Unique ¶
func (rrfq *RdRUserFollowingQuery) Unique(unique bool) *RdRUserFollowingQuery
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 (*RdRUserFollowingQuery) Where ¶
func (rrfq *RdRUserFollowingQuery) Where(ps ...predicate.RdRUserFollowing) *RdRUserFollowingQuery
Where adds a new predicate for the RdRUserFollowingQuery builder.
type RdRUserFollowingSelect ¶
type RdRUserFollowingSelect struct { *RdRUserFollowingQuery // contains filtered or unexported fields }
RdRUserFollowingSelect is the builder for selecting fields of RdRUserFollowing entities.
func (*RdRUserFollowingSelect) Aggregate ¶
func (rrfs *RdRUserFollowingSelect) Aggregate(fns ...AggregateFunc) *RdRUserFollowingSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RdRUserFollowingSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowingSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowingSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowingSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowingSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*RdRUserFollowingSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowingSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RdRUserFollowingSelect) Scan ¶
func (rrfs *RdRUserFollowingSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RdRUserFollowingSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RdRUserFollowingUpdate ¶
type RdRUserFollowingUpdate struct {
// contains filtered or unexported fields
}
RdRUserFollowingUpdate is the builder for updating RdRUserFollowing entities.
func (*RdRUserFollowingUpdate) AddFollowingUID ¶
func (rrfu *RdRUserFollowingUpdate) AddFollowingUID(i int32) *RdRUserFollowingUpdate
AddFollowingUID adds i to the "following_uid" field.
func (*RdRUserFollowingUpdate) AddUID ¶
func (rrfu *RdRUserFollowingUpdate) AddUID(i int32) *RdRUserFollowingUpdate
AddUID adds i to the "uid" field.
func (*RdRUserFollowingUpdate) ClearFollowingUID ¶
func (rrfu *RdRUserFollowingUpdate) ClearFollowingUID() *RdRUserFollowingUpdate
ClearFollowingUID clears the value of the "following_uid" field.
func (*RdRUserFollowingUpdate) ClearUID ¶
func (rrfu *RdRUserFollowingUpdate) ClearUID() *RdRUserFollowingUpdate
ClearUID clears the value of the "uid" field.
func (*RdRUserFollowingUpdate) Exec ¶
func (rrfu *RdRUserFollowingUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RdRUserFollowingUpdate) ExecX ¶
func (rrfu *RdRUserFollowingUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RdRUserFollowingUpdate) Mutation ¶
func (rrfu *RdRUserFollowingUpdate) Mutation() *RdRUserFollowingMutation
Mutation returns the RdRUserFollowingMutation object of the builder.
func (*RdRUserFollowingUpdate) Save ¶
func (rrfu *RdRUserFollowingUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RdRUserFollowingUpdate) SaveX ¶
func (rrfu *RdRUserFollowingUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RdRUserFollowingUpdate) SetCreateTime ¶
func (rrfu *RdRUserFollowingUpdate) SetCreateTime(t time.Time) *RdRUserFollowingUpdate
SetCreateTime sets the "create_time" field.
func (*RdRUserFollowingUpdate) SetFollowingUID ¶
func (rrfu *RdRUserFollowingUpdate) SetFollowingUID(i int32) *RdRUserFollowingUpdate
SetFollowingUID sets the "following_uid" field.
func (*RdRUserFollowingUpdate) SetNillableCreateTime ¶
func (rrfu *RdRUserFollowingUpdate) SetNillableCreateTime(t *time.Time) *RdRUserFollowingUpdate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*RdRUserFollowingUpdate) SetNillableFollowingUID ¶
func (rrfu *RdRUserFollowingUpdate) SetNillableFollowingUID(i *int32) *RdRUserFollowingUpdate
SetNillableFollowingUID sets the "following_uid" field if the given value is not nil.
func (*RdRUserFollowingUpdate) SetNillableUID ¶
func (rrfu *RdRUserFollowingUpdate) SetNillableUID(i *int32) *RdRUserFollowingUpdate
SetNillableUID sets the "uid" field if the given value is not nil.
func (*RdRUserFollowingUpdate) SetUID ¶
func (rrfu *RdRUserFollowingUpdate) SetUID(i int32) *RdRUserFollowingUpdate
SetUID sets the "uid" field.
func (*RdRUserFollowingUpdate) Where ¶
func (rrfu *RdRUserFollowingUpdate) Where(ps ...predicate.RdRUserFollowing) *RdRUserFollowingUpdate
Where appends a list predicates to the RdRUserFollowingUpdate builder.
type RdRUserFollowingUpdateOne ¶
type RdRUserFollowingUpdateOne struct {
// contains filtered or unexported fields
}
RdRUserFollowingUpdateOne is the builder for updating a single RdRUserFollowing entity.
func (*RdRUserFollowingUpdateOne) AddFollowingUID ¶
func (rrfuo *RdRUserFollowingUpdateOne) AddFollowingUID(i int32) *RdRUserFollowingUpdateOne
AddFollowingUID adds i to the "following_uid" field.
func (*RdRUserFollowingUpdateOne) AddUID ¶
func (rrfuo *RdRUserFollowingUpdateOne) AddUID(i int32) *RdRUserFollowingUpdateOne
AddUID adds i to the "uid" field.
func (*RdRUserFollowingUpdateOne) ClearFollowingUID ¶
func (rrfuo *RdRUserFollowingUpdateOne) ClearFollowingUID() *RdRUserFollowingUpdateOne
ClearFollowingUID clears the value of the "following_uid" field.
func (*RdRUserFollowingUpdateOne) ClearUID ¶
func (rrfuo *RdRUserFollowingUpdateOne) ClearUID() *RdRUserFollowingUpdateOne
ClearUID clears the value of the "uid" field.
func (*RdRUserFollowingUpdateOne) Exec ¶
func (rrfuo *RdRUserFollowingUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RdRUserFollowingUpdateOne) ExecX ¶
func (rrfuo *RdRUserFollowingUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RdRUserFollowingUpdateOne) Mutation ¶
func (rrfuo *RdRUserFollowingUpdateOne) Mutation() *RdRUserFollowingMutation
Mutation returns the RdRUserFollowingMutation object of the builder.
func (*RdRUserFollowingUpdateOne) Save ¶
func (rrfuo *RdRUserFollowingUpdateOne) Save(ctx context.Context) (*RdRUserFollowing, error)
Save executes the query and returns the updated RdRUserFollowing entity.
func (*RdRUserFollowingUpdateOne) SaveX ¶
func (rrfuo *RdRUserFollowingUpdateOne) SaveX(ctx context.Context) *RdRUserFollowing
SaveX is like Save, but panics if an error occurs.
func (*RdRUserFollowingUpdateOne) Select ¶
func (rrfuo *RdRUserFollowingUpdateOne) Select(field string, fields ...string) *RdRUserFollowingUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RdRUserFollowingUpdateOne) SetCreateTime ¶
func (rrfuo *RdRUserFollowingUpdateOne) SetCreateTime(t time.Time) *RdRUserFollowingUpdateOne
SetCreateTime sets the "create_time" field.
func (*RdRUserFollowingUpdateOne) SetFollowingUID ¶
func (rrfuo *RdRUserFollowingUpdateOne) SetFollowingUID(i int32) *RdRUserFollowingUpdateOne
SetFollowingUID sets the "following_uid" field.
func (*RdRUserFollowingUpdateOne) SetNillableCreateTime ¶
func (rrfuo *RdRUserFollowingUpdateOne) SetNillableCreateTime(t *time.Time) *RdRUserFollowingUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*RdRUserFollowingUpdateOne) SetNillableFollowingUID ¶
func (rrfuo *RdRUserFollowingUpdateOne) SetNillableFollowingUID(i *int32) *RdRUserFollowingUpdateOne
SetNillableFollowingUID sets the "following_uid" field if the given value is not nil.
func (*RdRUserFollowingUpdateOne) SetNillableUID ¶
func (rrfuo *RdRUserFollowingUpdateOne) SetNillableUID(i *int32) *RdRUserFollowingUpdateOne
SetNillableUID sets the "uid" field if the given value is not nil.
func (*RdRUserFollowingUpdateOne) SetUID ¶
func (rrfuo *RdRUserFollowingUpdateOne) SetUID(i int32) *RdRUserFollowingUpdateOne
SetUID sets the "uid" field.
type RdRUserFollowings ¶
type RdRUserFollowings []*RdRUserFollowing
RdRUserFollowings is a parsable slice of RdRUserFollowing.
type RdUser ¶
type RdUser struct { // ID of the ent. // 用户ID ID int32 `json:"id,omitempty"` // 昵称 Nick string `json:"nick,omitempty"` // 状态 1可用 2不可用 Status int32 `json:"status,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // contains filtered or unexported fields }
RdUser is the model entity for the RdUser schema.
func (*RdUser) Unwrap ¶
Unwrap unwraps the RdUser 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 (*RdUser) Update ¶
func (ru *RdUser) Update() *RdUserUpdateOne
Update returns a builder for updating this RdUser. Note that you need to call RdUser.Unwrap() before calling this method if this RdUser was returned from a transaction, and the transaction was committed or rolled back.
type RdUserClient ¶
type RdUserClient struct {
// contains filtered or unexported fields
}
RdUserClient is a client for the RdUser schema.
func NewRdUserClient ¶
func NewRdUserClient(c config) *RdUserClient
NewRdUserClient returns a client for the RdUser from the given config.
func (*RdUserClient) Create ¶
func (c *RdUserClient) Create() *RdUserCreate
Create returns a builder for creating a RdUser entity.
func (*RdUserClient) CreateBulk ¶
func (c *RdUserClient) CreateBulk(builders ...*RdUserCreate) *RdUserCreateBulk
CreateBulk returns a builder for creating a bulk of RdUser entities.
func (*RdUserClient) Delete ¶
func (c *RdUserClient) Delete() *RdUserDelete
Delete returns a delete builder for RdUser.
func (*RdUserClient) DeleteOne ¶
func (c *RdUserClient) DeleteOne(ru *RdUser) *RdUserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RdUserClient) DeleteOneID ¶
func (c *RdUserClient) DeleteOneID(id int32) *RdUserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RdUserClient) GetX ¶
func (c *RdUserClient) GetX(ctx context.Context, id int32) *RdUser
GetX is like Get, but panics if an error occurs.
func (*RdUserClient) Intercept ¶
func (c *RdUserClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `rduser.Intercept(f(g(h())))`.
func (*RdUserClient) Interceptors ¶
func (c *RdUserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RdUserClient) Query ¶
func (c *RdUserClient) Query() *RdUserQuery
Query returns a query builder for RdUser.
func (*RdUserClient) Update ¶
func (c *RdUserClient) Update() *RdUserUpdate
Update returns an update builder for RdUser.
func (*RdUserClient) UpdateOne ¶
func (c *RdUserClient) UpdateOne(ru *RdUser) *RdUserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RdUserClient) UpdateOneID ¶
func (c *RdUserClient) UpdateOneID(id int32) *RdUserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RdUserClient) Use ¶
func (c *RdUserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `rduser.Hooks(f(g(h())))`.
type RdUserCreate ¶
type RdUserCreate struct {
// contains filtered or unexported fields
}
RdUserCreate is the builder for creating a RdUser entity.
func (*RdUserCreate) Exec ¶
func (ruc *RdUserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RdUserCreate) ExecX ¶
func (ruc *RdUserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RdUserCreate) Mutation ¶
func (ruc *RdUserCreate) Mutation() *RdUserMutation
Mutation returns the RdUserMutation object of the builder.
func (*RdUserCreate) Save ¶
func (ruc *RdUserCreate) Save(ctx context.Context) (*RdUser, error)
Save creates the RdUser in the database.
func (*RdUserCreate) SaveX ¶
func (ruc *RdUserCreate) SaveX(ctx context.Context) *RdUser
SaveX calls Save and panics if Save returns an error.
func (*RdUserCreate) SetCreateTime ¶
func (ruc *RdUserCreate) SetCreateTime(t time.Time) *RdUserCreate
SetCreateTime sets the "create_time" field.
func (*RdUserCreate) SetID ¶
func (ruc *RdUserCreate) SetID(i int32) *RdUserCreate
SetID sets the "id" field.
func (*RdUserCreate) SetNick ¶
func (ruc *RdUserCreate) SetNick(s string) *RdUserCreate
SetNick sets the "nick" field.
func (*RdUserCreate) SetNillableCreateTime ¶
func (ruc *RdUserCreate) SetNillableCreateTime(t *time.Time) *RdUserCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*RdUserCreate) SetNillableStatus ¶
func (ruc *RdUserCreate) SetNillableStatus(i *int32) *RdUserCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*RdUserCreate) SetStatus ¶
func (ruc *RdUserCreate) SetStatus(i int32) *RdUserCreate
SetStatus sets the "status" field.
type RdUserCreateBulk ¶
type RdUserCreateBulk struct {
// contains filtered or unexported fields
}
RdUserCreateBulk is the builder for creating many RdUser entities in bulk.
func (*RdUserCreateBulk) Exec ¶
func (rucb *RdUserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RdUserCreateBulk) ExecX ¶
func (rucb *RdUserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RdUserDelete ¶
type RdUserDelete struct {
// contains filtered or unexported fields
}
RdUserDelete is the builder for deleting a RdUser entity.
func (*RdUserDelete) Exec ¶
func (rud *RdUserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RdUserDelete) ExecX ¶
func (rud *RdUserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RdUserDelete) Where ¶
func (rud *RdUserDelete) Where(ps ...predicate.RdUser) *RdUserDelete
Where appends a list predicates to the RdUserDelete builder.
type RdUserDeleteOne ¶
type RdUserDeleteOne struct {
// contains filtered or unexported fields
}
RdUserDeleteOne is the builder for deleting a single RdUser entity.
func (*RdUserDeleteOne) Exec ¶
func (rudo *RdUserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RdUserDeleteOne) ExecX ¶
func (rudo *RdUserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RdUserGroupBy ¶
type RdUserGroupBy struct {
// contains filtered or unexported fields
}
RdUserGroupBy is the group-by builder for RdUser entities.
func (*RdUserGroupBy) Aggregate ¶
func (rugb *RdUserGroupBy) Aggregate(fns ...AggregateFunc) *RdUserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RdUserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RdUserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RdUserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RdUserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RdUserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RdUserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RdUserGroupBy) Scan ¶
func (rugb *RdUserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RdUserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RdUserMutation ¶
type RdUserMutation struct {
// contains filtered or unexported fields
}
RdUserMutation represents an operation that mutates the RdUser nodes in the graph.
func (*RdUserMutation) AddField ¶
func (m *RdUserMutation) 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 (*RdUserMutation) AddStatus ¶
func (m *RdUserMutation) AddStatus(i int32)
AddStatus adds i to the "status" field.
func (*RdUserMutation) AddedEdges ¶
func (m *RdUserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RdUserMutation) AddedField ¶
func (m *RdUserMutation) 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 (*RdUserMutation) AddedFields ¶
func (m *RdUserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RdUserMutation) AddedIDs ¶
func (m *RdUserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RdUserMutation) AddedStatus ¶
func (m *RdUserMutation) AddedStatus() (r int32, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*RdUserMutation) ClearEdge ¶
func (m *RdUserMutation) 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 (*RdUserMutation) ClearField ¶
func (m *RdUserMutation) 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 (*RdUserMutation) ClearedEdges ¶
func (m *RdUserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RdUserMutation) ClearedFields ¶
func (m *RdUserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RdUserMutation) Client ¶
func (m RdUserMutation) 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 (*RdUserMutation) CreateTime ¶
func (m *RdUserMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*RdUserMutation) EdgeCleared ¶
func (m *RdUserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RdUserMutation) Field ¶
func (m *RdUserMutation) 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 (*RdUserMutation) FieldCleared ¶
func (m *RdUserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RdUserMutation) Fields ¶
func (m *RdUserMutation) 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 (*RdUserMutation) ID ¶
func (m *RdUserMutation) ID() (id int32, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*RdUserMutation) IDs ¶
func (m *RdUserMutation) IDs(ctx context.Context) ([]int32, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*RdUserMutation) Nick ¶
func (m *RdUserMutation) Nick() (r string, exists bool)
Nick returns the value of the "nick" field in the mutation.
func (*RdUserMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the RdUser entity. If the RdUser 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 (*RdUserMutation) 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 (*RdUserMutation) OldNick ¶
func (m *RdUserMutation) OldNick(ctx context.Context) (v string, err error)
OldNick returns the old "nick" field's value of the RdUser entity. If the RdUser 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 (*RdUserMutation) OldStatus ¶
func (m *RdUserMutation) OldStatus(ctx context.Context) (v int32, err error)
OldStatus returns the old "status" field's value of the RdUser entity. If the RdUser 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 (*RdUserMutation) RemovedEdges ¶
func (m *RdUserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RdUserMutation) RemovedIDs ¶
func (m *RdUserMutation) 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 (*RdUserMutation) ResetCreateTime ¶
func (m *RdUserMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*RdUserMutation) ResetEdge ¶
func (m *RdUserMutation) 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 (*RdUserMutation) ResetField ¶
func (m *RdUserMutation) 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 (*RdUserMutation) ResetNick ¶
func (m *RdUserMutation) ResetNick()
ResetNick resets all changes to the "nick" field.
func (*RdUserMutation) ResetStatus ¶
func (m *RdUserMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*RdUserMutation) SetCreateTime ¶
func (m *RdUserMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*RdUserMutation) SetField ¶
func (m *RdUserMutation) 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 (*RdUserMutation) SetID ¶
func (m *RdUserMutation) SetID(id int32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of RdUser entities.
func (*RdUserMutation) SetNick ¶
func (m *RdUserMutation) SetNick(s string)
SetNick sets the "nick" field.
func (*RdUserMutation) SetOp ¶
func (m *RdUserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*RdUserMutation) SetStatus ¶
func (m *RdUserMutation) SetStatus(i int32)
SetStatus sets the "status" field.
func (*RdUserMutation) Status ¶
func (m *RdUserMutation) Status() (r int32, exists bool)
Status returns the value of the "status" field in the mutation.
func (RdUserMutation) Tx ¶
func (m RdUserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RdUserMutation) Type ¶
func (m *RdUserMutation) Type() string
Type returns the node type of this mutation (RdUser).
func (*RdUserMutation) Where ¶
func (m *RdUserMutation) Where(ps ...predicate.RdUser)
Where appends a list predicates to the RdUserMutation builder.
func (*RdUserMutation) WhereP ¶
func (m *RdUserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RdUserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RdUserQuery ¶
type RdUserQuery struct {
// contains filtered or unexported fields
}
RdUserQuery is the builder for querying RdUser entities.
func (*RdUserQuery) Aggregate ¶
func (ruq *RdUserQuery) Aggregate(fns ...AggregateFunc) *RdUserSelect
Aggregate returns a RdUserSelect configured with the given aggregations.
func (*RdUserQuery) All ¶
func (ruq *RdUserQuery) All(ctx context.Context) ([]*RdUser, error)
All executes the query and returns a list of RdUsers.
func (*RdUserQuery) AllX ¶
func (ruq *RdUserQuery) AllX(ctx context.Context) []*RdUser
AllX is like All, but panics if an error occurs.
func (*RdUserQuery) Clone ¶
func (ruq *RdUserQuery) Clone() *RdUserQuery
Clone returns a duplicate of the RdUserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RdUserQuery) Count ¶
func (ruq *RdUserQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RdUserQuery) CountX ¶
func (ruq *RdUserQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RdUserQuery) Exist ¶
func (ruq *RdUserQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RdUserQuery) ExistX ¶
func (ruq *RdUserQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RdUserQuery) First ¶
func (ruq *RdUserQuery) First(ctx context.Context) (*RdUser, error)
First returns the first RdUser entity from the query. Returns a *NotFoundError when no RdUser was found.
func (*RdUserQuery) FirstID ¶
func (ruq *RdUserQuery) FirstID(ctx context.Context) (id int32, err error)
FirstID returns the first RdUser ID from the query. Returns a *NotFoundError when no RdUser ID was found.
func (*RdUserQuery) FirstIDX ¶
func (ruq *RdUserQuery) FirstIDX(ctx context.Context) int32
FirstIDX is like FirstID, but panics if an error occurs.
func (*RdUserQuery) FirstX ¶
func (ruq *RdUserQuery) FirstX(ctx context.Context) *RdUser
FirstX is like First, but panics if an error occurs.
func (*RdUserQuery) GroupBy ¶
func (ruq *RdUserQuery) GroupBy(field string, fields ...string) *RdUserGroupBy
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 { Nick string `json:"nick,omitempty"` Count int `json:"count,omitempty"` } client.RdUser.Query(). GroupBy(rduser.FieldNick). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RdUserQuery) IDs ¶
func (ruq *RdUserQuery) IDs(ctx context.Context) ([]int32, error)
IDs executes the query and returns a list of RdUser IDs.
func (*RdUserQuery) IDsX ¶
func (ruq *RdUserQuery) IDsX(ctx context.Context) []int32
IDsX is like IDs, but panics if an error occurs.
func (*RdUserQuery) Limit ¶
func (ruq *RdUserQuery) Limit(limit int) *RdUserQuery
Limit the number of records to be returned by this query.
func (*RdUserQuery) Offset ¶
func (ruq *RdUserQuery) Offset(offset int) *RdUserQuery
Offset to start from.
func (*RdUserQuery) Only ¶
func (ruq *RdUserQuery) Only(ctx context.Context) (*RdUser, error)
Only returns a single RdUser entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one RdUser entity is found. Returns a *NotFoundError when no RdUser entities are found.
func (*RdUserQuery) OnlyID ¶
func (ruq *RdUserQuery) OnlyID(ctx context.Context) (id int32, err error)
OnlyID is like Only, but returns the only RdUser ID in the query. Returns a *NotSingularError when more than one RdUser ID is found. Returns a *NotFoundError when no entities are found.
func (*RdUserQuery) OnlyIDX ¶
func (ruq *RdUserQuery) OnlyIDX(ctx context.Context) int32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RdUserQuery) OnlyX ¶
func (ruq *RdUserQuery) OnlyX(ctx context.Context) *RdUser
OnlyX is like Only, but panics if an error occurs.
func (*RdUserQuery) Order ¶
func (ruq *RdUserQuery) Order(o ...OrderFunc) *RdUserQuery
Order specifies how the records should be ordered.
func (*RdUserQuery) Select ¶
func (ruq *RdUserQuery) Select(fields ...string) *RdUserSelect
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 { Nick string `json:"nick,omitempty"` } client.RdUser.Query(). Select(rduser.FieldNick). Scan(ctx, &v)
func (*RdUserQuery) Unique ¶
func (ruq *RdUserQuery) Unique(unique bool) *RdUserQuery
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 (*RdUserQuery) Where ¶
func (ruq *RdUserQuery) Where(ps ...predicate.RdUser) *RdUserQuery
Where adds a new predicate for the RdUserQuery builder.
type RdUserSelect ¶
type RdUserSelect struct { *RdUserQuery // contains filtered or unexported fields }
RdUserSelect is the builder for selecting fields of RdUser entities.
func (*RdUserSelect) Aggregate ¶
func (rus *RdUserSelect) Aggregate(fns ...AggregateFunc) *RdUserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RdUserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RdUserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RdUserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RdUserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RdUserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RdUserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RdUserSelect) Scan ¶
func (rus *RdUserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RdUserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RdUserUpdate ¶
type RdUserUpdate struct {
// contains filtered or unexported fields
}
RdUserUpdate is the builder for updating RdUser entities.
func (*RdUserUpdate) AddStatus ¶
func (ruu *RdUserUpdate) AddStatus(i int32) *RdUserUpdate
AddStatus adds i to the "status" field.
func (*RdUserUpdate) Exec ¶
func (ruu *RdUserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RdUserUpdate) ExecX ¶
func (ruu *RdUserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RdUserUpdate) Mutation ¶
func (ruu *RdUserUpdate) Mutation() *RdUserMutation
Mutation returns the RdUserMutation object of the builder.
func (*RdUserUpdate) Save ¶
func (ruu *RdUserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RdUserUpdate) SaveX ¶
func (ruu *RdUserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RdUserUpdate) SetCreateTime ¶
func (ruu *RdUserUpdate) SetCreateTime(t time.Time) *RdUserUpdate
SetCreateTime sets the "create_time" field.
func (*RdUserUpdate) SetNick ¶
func (ruu *RdUserUpdate) SetNick(s string) *RdUserUpdate
SetNick sets the "nick" field.
func (*RdUserUpdate) SetNillableCreateTime ¶
func (ruu *RdUserUpdate) SetNillableCreateTime(t *time.Time) *RdUserUpdate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*RdUserUpdate) SetNillableStatus ¶
func (ruu *RdUserUpdate) SetNillableStatus(i *int32) *RdUserUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*RdUserUpdate) SetStatus ¶
func (ruu *RdUserUpdate) SetStatus(i int32) *RdUserUpdate
SetStatus sets the "status" field.
func (*RdUserUpdate) Where ¶
func (ruu *RdUserUpdate) Where(ps ...predicate.RdUser) *RdUserUpdate
Where appends a list predicates to the RdUserUpdate builder.
type RdUserUpdateOne ¶
type RdUserUpdateOne struct {
// contains filtered or unexported fields
}
RdUserUpdateOne is the builder for updating a single RdUser entity.
func (*RdUserUpdateOne) AddStatus ¶
func (ruuo *RdUserUpdateOne) AddStatus(i int32) *RdUserUpdateOne
AddStatus adds i to the "status" field.
func (*RdUserUpdateOne) Exec ¶
func (ruuo *RdUserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RdUserUpdateOne) ExecX ¶
func (ruuo *RdUserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RdUserUpdateOne) Mutation ¶
func (ruuo *RdUserUpdateOne) Mutation() *RdUserMutation
Mutation returns the RdUserMutation object of the builder.
func (*RdUserUpdateOne) Save ¶
func (ruuo *RdUserUpdateOne) Save(ctx context.Context) (*RdUser, error)
Save executes the query and returns the updated RdUser entity.
func (*RdUserUpdateOne) SaveX ¶
func (ruuo *RdUserUpdateOne) SaveX(ctx context.Context) *RdUser
SaveX is like Save, but panics if an error occurs.
func (*RdUserUpdateOne) Select ¶
func (ruuo *RdUserUpdateOne) Select(field string, fields ...string) *RdUserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RdUserUpdateOne) SetCreateTime ¶
func (ruuo *RdUserUpdateOne) SetCreateTime(t time.Time) *RdUserUpdateOne
SetCreateTime sets the "create_time" field.
func (*RdUserUpdateOne) SetNick ¶
func (ruuo *RdUserUpdateOne) SetNick(s string) *RdUserUpdateOne
SetNick sets the "nick" field.
func (*RdUserUpdateOne) SetNillableCreateTime ¶
func (ruuo *RdUserUpdateOne) SetNillableCreateTime(t *time.Time) *RdUserUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*RdUserUpdateOne) SetNillableStatus ¶
func (ruuo *RdUserUpdateOne) SetNillableStatus(i *int32) *RdUserUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*RdUserUpdateOne) SetStatus ¶
func (ruuo *RdUserUpdateOne) SetStatus(i int32) *RdUserUpdateOne
SetStatus sets the "status" field.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // RdMessage is the client for interacting with the RdMessage builders. RdMessage *RdMessageClient // RdMoment is the client for interacting with the RdMoment builders. RdMoment *RdMomentClient // RdRMomentsFollowing is the client for interacting with the RdRMomentsFollowing builders. RdRMomentsFollowing *RdRMomentsFollowingClient // RdRUserFollowers is the client for interacting with the RdRUserFollowers builders. RdRUserFollowers *RdRUserFollowersClient // RdRUserFollowing is the client for interacting with the RdRUserFollowing builders. RdRUserFollowing *RdRUserFollowingClient // RdUser is the client for interacting with the RdUser builders. RdUser *RdUserClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- client.go
- config.go
- context.go
- ent.go
- mutation.go
- rdmessage.go
- rdmessage_create.go
- rdmessage_delete.go
- rdmessage_query.go
- rdmessage_update.go
- rdmoment.go
- rdmoment_create.go
- rdmoment_delete.go
- rdmoment_query.go
- rdmoment_update.go
- rdrmomentsfollowing.go
- rdrmomentsfollowing_create.go
- rdrmomentsfollowing_delete.go
- rdrmomentsfollowing_query.go
- rdrmomentsfollowing_update.go
- rdruserfollowers.go
- rdruserfollowers_create.go
- rdruserfollowers_delete.go
- rdruserfollowers_query.go
- rdruserfollowers_update.go
- rdruserfollowing.go
- rdruserfollowing_create.go
- rdruserfollowing_delete.go
- rdruserfollowing_query.go
- rdruserfollowing_update.go
- rduser.go
- rduser_create.go
- rduser_delete.go
- rduser_query.go
- rduser_update.go
- runtime.go
- tx.go