Documentation
¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type GoroutineTrace
- type GoroutineTraceClient
- func (c *GoroutineTraceClient) Create() *GoroutineTraceCreate
- func (c *GoroutineTraceClient) CreateBulk(builders ...*GoroutineTraceCreate) *GoroutineTraceCreateBulk
- func (c *GoroutineTraceClient) Delete() *GoroutineTraceDelete
- func (c *GoroutineTraceClient) DeleteOne(gt *GoroutineTrace) *GoroutineTraceDeleteOne
- func (c *GoroutineTraceClient) DeleteOneID(id int64) *GoroutineTraceDeleteOne
- func (c *GoroutineTraceClient) Get(ctx context.Context, id int64) (*GoroutineTrace, error)
- func (c *GoroutineTraceClient) GetX(ctx context.Context, id int64) *GoroutineTrace
- func (c *GoroutineTraceClient) Hooks() []Hook
- func (c *GoroutineTraceClient) Intercept(interceptors ...Interceptor)
- func (c *GoroutineTraceClient) Interceptors() []Interceptor
- func (c *GoroutineTraceClient) MapCreateBulk(slice any, setFunc func(*GoroutineTraceCreate, int)) *GoroutineTraceCreateBulk
- func (c *GoroutineTraceClient) Query() *GoroutineTraceQuery
- func (c *GoroutineTraceClient) Update() *GoroutineTraceUpdate
- func (c *GoroutineTraceClient) UpdateOne(gt *GoroutineTrace) *GoroutineTraceUpdateOne
- func (c *GoroutineTraceClient) UpdateOneID(id int64) *GoroutineTraceUpdateOne
- func (c *GoroutineTraceClient) Use(hooks ...Hook)
- type GoroutineTraceCreate
- func (gtc *GoroutineTraceCreate) Exec(ctx context.Context) error
- func (gtc *GoroutineTraceCreate) ExecX(ctx context.Context)
- func (gtc *GoroutineTraceCreate) Mutation() *GoroutineTraceMutation
- func (gtc *GoroutineTraceCreate) Save(ctx context.Context) (*GoroutineTrace, error)
- func (gtc *GoroutineTraceCreate) SaveX(ctx context.Context) *GoroutineTrace
- func (gtc *GoroutineTraceCreate) SetCreateTime(s string) *GoroutineTraceCreate
- func (gtc *GoroutineTraceCreate) SetID(i int64) *GoroutineTraceCreate
- func (gtc *GoroutineTraceCreate) SetInitFuncName(s string) *GoroutineTraceCreate
- func (gtc *GoroutineTraceCreate) SetIsFinished(i int) *GoroutineTraceCreate
- func (gtc *GoroutineTraceCreate) SetNillableCreateTime(s *string) *GoroutineTraceCreate
- func (gtc *GoroutineTraceCreate) SetNillableInitFuncName(s *string) *GoroutineTraceCreate
- func (gtc *GoroutineTraceCreate) SetNillableIsFinished(i *int) *GoroutineTraceCreate
- func (gtc *GoroutineTraceCreate) SetNillableTimeCost(s *string) *GoroutineTraceCreate
- func (gtc *GoroutineTraceCreate) SetOriginGid(u uint64) *GoroutineTraceCreate
- func (gtc *GoroutineTraceCreate) SetTimeCost(s string) *GoroutineTraceCreate
- type GoroutineTraceCreateBulk
- func (gtcb *GoroutineTraceCreateBulk) Exec(ctx context.Context) error
- func (gtcb *GoroutineTraceCreateBulk) ExecX(ctx context.Context)
- func (gtcb *GoroutineTraceCreateBulk) Save(ctx context.Context) ([]*GoroutineTrace, error)
- func (gtcb *GoroutineTraceCreateBulk) SaveX(ctx context.Context) []*GoroutineTrace
- type GoroutineTraceDelete
- type GoroutineTraceDeleteOne
- type GoroutineTraceGroupBy
- func (gtgb *GoroutineTraceGroupBy) Aggregate(fns ...AggregateFunc) *GoroutineTraceGroupBy
- func (s *GoroutineTraceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GoroutineTraceGroupBy) BoolX(ctx context.Context) bool
- func (s *GoroutineTraceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GoroutineTraceGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GoroutineTraceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GoroutineTraceGroupBy) Float64X(ctx context.Context) float64
- func (s *GoroutineTraceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GoroutineTraceGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GoroutineTraceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GoroutineTraceGroupBy) IntX(ctx context.Context) int
- func (s *GoroutineTraceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GoroutineTraceGroupBy) IntsX(ctx context.Context) []int
- func (gtgb *GoroutineTraceGroupBy) Scan(ctx context.Context, v any) error
- func (s *GoroutineTraceGroupBy) ScanX(ctx context.Context, v any)
- func (s *GoroutineTraceGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GoroutineTraceGroupBy) StringX(ctx context.Context) string
- func (s *GoroutineTraceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GoroutineTraceGroupBy) StringsX(ctx context.Context) []string
- type GoroutineTraceMutation
- func (m *GoroutineTraceMutation) AddField(name string, value ent.Value) error
- func (m *GoroutineTraceMutation) AddIsFinished(i int)
- func (m *GoroutineTraceMutation) AddOriginGid(u int64)
- func (m *GoroutineTraceMutation) AddedEdges() []string
- func (m *GoroutineTraceMutation) AddedField(name string) (ent.Value, bool)
- func (m *GoroutineTraceMutation) AddedFields() []string
- func (m *GoroutineTraceMutation) AddedIDs(name string) []ent.Value
- func (m *GoroutineTraceMutation) AddedIsFinished() (r int, exists bool)
- func (m *GoroutineTraceMutation) AddedOriginGid() (r int64, exists bool)
- func (m *GoroutineTraceMutation) ClearCreateTime()
- func (m *GoroutineTraceMutation) ClearEdge(name string) error
- func (m *GoroutineTraceMutation) ClearField(name string) error
- func (m *GoroutineTraceMutation) ClearInitFuncName()
- func (m *GoroutineTraceMutation) ClearIsFinished()
- func (m *GoroutineTraceMutation) ClearTimeCost()
- func (m *GoroutineTraceMutation) ClearedEdges() []string
- func (m *GoroutineTraceMutation) ClearedFields() []string
- func (m GoroutineTraceMutation) Client() *Client
- func (m *GoroutineTraceMutation) CreateTime() (r string, exists bool)
- func (m *GoroutineTraceMutation) CreateTimeCleared() bool
- func (m *GoroutineTraceMutation) EdgeCleared(name string) bool
- func (m *GoroutineTraceMutation) Field(name string) (ent.Value, bool)
- func (m *GoroutineTraceMutation) FieldCleared(name string) bool
- func (m *GoroutineTraceMutation) Fields() []string
- func (m *GoroutineTraceMutation) ID() (id int64, exists bool)
- func (m *GoroutineTraceMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *GoroutineTraceMutation) InitFuncName() (r string, exists bool)
- func (m *GoroutineTraceMutation) InitFuncNameCleared() bool
- func (m *GoroutineTraceMutation) IsFinished() (r int, exists bool)
- func (m *GoroutineTraceMutation) IsFinishedCleared() bool
- func (m *GoroutineTraceMutation) OldCreateTime(ctx context.Context) (v string, err error)
- func (m *GoroutineTraceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GoroutineTraceMutation) OldInitFuncName(ctx context.Context) (v string, err error)
- func (m *GoroutineTraceMutation) OldIsFinished(ctx context.Context) (v int, err error)
- func (m *GoroutineTraceMutation) OldOriginGid(ctx context.Context) (v uint64, err error)
- func (m *GoroutineTraceMutation) OldTimeCost(ctx context.Context) (v string, err error)
- func (m *GoroutineTraceMutation) Op() Op
- func (m *GoroutineTraceMutation) OriginGid() (r uint64, exists bool)
- func (m *GoroutineTraceMutation) RemovedEdges() []string
- func (m *GoroutineTraceMutation) RemovedIDs(name string) []ent.Value
- func (m *GoroutineTraceMutation) ResetCreateTime()
- func (m *GoroutineTraceMutation) ResetEdge(name string) error
- func (m *GoroutineTraceMutation) ResetField(name string) error
- func (m *GoroutineTraceMutation) ResetInitFuncName()
- func (m *GoroutineTraceMutation) ResetIsFinished()
- func (m *GoroutineTraceMutation) ResetOriginGid()
- func (m *GoroutineTraceMutation) ResetTimeCost()
- func (m *GoroutineTraceMutation) SetCreateTime(s string)
- func (m *GoroutineTraceMutation) SetField(name string, value ent.Value) error
- func (m *GoroutineTraceMutation) SetID(id int64)
- func (m *GoroutineTraceMutation) SetInitFuncName(s string)
- func (m *GoroutineTraceMutation) SetIsFinished(i int)
- func (m *GoroutineTraceMutation) SetOp(op Op)
- func (m *GoroutineTraceMutation) SetOriginGid(u uint64)
- func (m *GoroutineTraceMutation) SetTimeCost(s string)
- func (m *GoroutineTraceMutation) TimeCost() (r string, exists bool)
- func (m *GoroutineTraceMutation) TimeCostCleared() bool
- func (m GoroutineTraceMutation) Tx() (*Tx, error)
- func (m *GoroutineTraceMutation) Type() string
- func (m *GoroutineTraceMutation) Where(ps ...predicate.GoroutineTrace)
- func (m *GoroutineTraceMutation) WhereP(ps ...func(*sql.Selector))
- type GoroutineTraceQuery
- func (gtq *GoroutineTraceQuery) Aggregate(fns ...AggregateFunc) *GoroutineTraceSelect
- func (gtq *GoroutineTraceQuery) All(ctx context.Context) ([]*GoroutineTrace, error)
- func (gtq *GoroutineTraceQuery) AllX(ctx context.Context) []*GoroutineTrace
- func (gtq *GoroutineTraceQuery) Clone() *GoroutineTraceQuery
- func (gtq *GoroutineTraceQuery) Count(ctx context.Context) (int, error)
- func (gtq *GoroutineTraceQuery) CountX(ctx context.Context) int
- func (gtq *GoroutineTraceQuery) Exist(ctx context.Context) (bool, error)
- func (gtq *GoroutineTraceQuery) ExistX(ctx context.Context) bool
- func (gtq *GoroutineTraceQuery) First(ctx context.Context) (*GoroutineTrace, error)
- func (gtq *GoroutineTraceQuery) FirstID(ctx context.Context) (id int64, err error)
- func (gtq *GoroutineTraceQuery) FirstIDX(ctx context.Context) int64
- func (gtq *GoroutineTraceQuery) FirstX(ctx context.Context) *GoroutineTrace
- func (gtq *GoroutineTraceQuery) GroupBy(field string, fields ...string) *GoroutineTraceGroupBy
- func (gtq *GoroutineTraceQuery) IDs(ctx context.Context) (ids []int64, err error)
- func (gtq *GoroutineTraceQuery) IDsX(ctx context.Context) []int64
- func (gtq *GoroutineTraceQuery) Limit(limit int) *GoroutineTraceQuery
- func (gtq *GoroutineTraceQuery) Offset(offset int) *GoroutineTraceQuery
- func (gtq *GoroutineTraceQuery) Only(ctx context.Context) (*GoroutineTrace, error)
- func (gtq *GoroutineTraceQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (gtq *GoroutineTraceQuery) OnlyIDX(ctx context.Context) int64
- func (gtq *GoroutineTraceQuery) OnlyX(ctx context.Context) *GoroutineTrace
- func (gtq *GoroutineTraceQuery) Order(o ...goroutinetrace.OrderOption) *GoroutineTraceQuery
- func (gtq *GoroutineTraceQuery) Select(fields ...string) *GoroutineTraceSelect
- func (gtq *GoroutineTraceQuery) Unique(unique bool) *GoroutineTraceQuery
- func (gtq *GoroutineTraceQuery) Where(ps ...predicate.GoroutineTrace) *GoroutineTraceQuery
- type GoroutineTraceSelect
- func (gts *GoroutineTraceSelect) Aggregate(fns ...AggregateFunc) *GoroutineTraceSelect
- func (s *GoroutineTraceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GoroutineTraceSelect) BoolX(ctx context.Context) bool
- func (s *GoroutineTraceSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GoroutineTraceSelect) BoolsX(ctx context.Context) []bool
- func (s *GoroutineTraceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GoroutineTraceSelect) Float64X(ctx context.Context) float64
- func (s *GoroutineTraceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GoroutineTraceSelect) Float64sX(ctx context.Context) []float64
- func (s *GoroutineTraceSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GoroutineTraceSelect) IntX(ctx context.Context) int
- func (s *GoroutineTraceSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GoroutineTraceSelect) IntsX(ctx context.Context) []int
- func (gts *GoroutineTraceSelect) Scan(ctx context.Context, v any) error
- func (s *GoroutineTraceSelect) ScanX(ctx context.Context, v any)
- func (s *GoroutineTraceSelect) String(ctx context.Context) (_ string, err error)
- func (s *GoroutineTraceSelect) StringX(ctx context.Context) string
- func (s *GoroutineTraceSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GoroutineTraceSelect) StringsX(ctx context.Context) []string
- type GoroutineTraceUpdate
- func (gtu *GoroutineTraceUpdate) AddIsFinished(i int) *GoroutineTraceUpdate
- func (gtu *GoroutineTraceUpdate) AddOriginGid(u int64) *GoroutineTraceUpdate
- func (gtu *GoroutineTraceUpdate) ClearCreateTime() *GoroutineTraceUpdate
- func (gtu *GoroutineTraceUpdate) ClearInitFuncName() *GoroutineTraceUpdate
- func (gtu *GoroutineTraceUpdate) ClearIsFinished() *GoroutineTraceUpdate
- func (gtu *GoroutineTraceUpdate) ClearTimeCost() *GoroutineTraceUpdate
- func (gtu *GoroutineTraceUpdate) Exec(ctx context.Context) error
- func (gtu *GoroutineTraceUpdate) ExecX(ctx context.Context)
- func (gtu *GoroutineTraceUpdate) Mutation() *GoroutineTraceMutation
- func (gtu *GoroutineTraceUpdate) Save(ctx context.Context) (int, error)
- func (gtu *GoroutineTraceUpdate) SaveX(ctx context.Context) int
- func (gtu *GoroutineTraceUpdate) SetCreateTime(s string) *GoroutineTraceUpdate
- func (gtu *GoroutineTraceUpdate) SetInitFuncName(s string) *GoroutineTraceUpdate
- func (gtu *GoroutineTraceUpdate) SetIsFinished(i int) *GoroutineTraceUpdate
- func (gtu *GoroutineTraceUpdate) SetNillableCreateTime(s *string) *GoroutineTraceUpdate
- func (gtu *GoroutineTraceUpdate) SetNillableInitFuncName(s *string) *GoroutineTraceUpdate
- func (gtu *GoroutineTraceUpdate) SetNillableIsFinished(i *int) *GoroutineTraceUpdate
- func (gtu *GoroutineTraceUpdate) SetNillableOriginGid(u *uint64) *GoroutineTraceUpdate
- func (gtu *GoroutineTraceUpdate) SetNillableTimeCost(s *string) *GoroutineTraceUpdate
- func (gtu *GoroutineTraceUpdate) SetOriginGid(u uint64) *GoroutineTraceUpdate
- func (gtu *GoroutineTraceUpdate) SetTimeCost(s string) *GoroutineTraceUpdate
- func (gtu *GoroutineTraceUpdate) Where(ps ...predicate.GoroutineTrace) *GoroutineTraceUpdate
- type GoroutineTraceUpdateOne
- func (gtuo *GoroutineTraceUpdateOne) AddIsFinished(i int) *GoroutineTraceUpdateOne
- func (gtuo *GoroutineTraceUpdateOne) AddOriginGid(u int64) *GoroutineTraceUpdateOne
- func (gtuo *GoroutineTraceUpdateOne) ClearCreateTime() *GoroutineTraceUpdateOne
- func (gtuo *GoroutineTraceUpdateOne) ClearInitFuncName() *GoroutineTraceUpdateOne
- func (gtuo *GoroutineTraceUpdateOne) ClearIsFinished() *GoroutineTraceUpdateOne
- func (gtuo *GoroutineTraceUpdateOne) ClearTimeCost() *GoroutineTraceUpdateOne
- func (gtuo *GoroutineTraceUpdateOne) Exec(ctx context.Context) error
- func (gtuo *GoroutineTraceUpdateOne) ExecX(ctx context.Context)
- func (gtuo *GoroutineTraceUpdateOne) Mutation() *GoroutineTraceMutation
- func (gtuo *GoroutineTraceUpdateOne) Save(ctx context.Context) (*GoroutineTrace, error)
- func (gtuo *GoroutineTraceUpdateOne) SaveX(ctx context.Context) *GoroutineTrace
- func (gtuo *GoroutineTraceUpdateOne) Select(field string, fields ...string) *GoroutineTraceUpdateOne
- func (gtuo *GoroutineTraceUpdateOne) SetCreateTime(s string) *GoroutineTraceUpdateOne
- func (gtuo *GoroutineTraceUpdateOne) SetInitFuncName(s string) *GoroutineTraceUpdateOne
- func (gtuo *GoroutineTraceUpdateOne) SetIsFinished(i int) *GoroutineTraceUpdateOne
- func (gtuo *GoroutineTraceUpdateOne) SetNillableCreateTime(s *string) *GoroutineTraceUpdateOne
- func (gtuo *GoroutineTraceUpdateOne) SetNillableInitFuncName(s *string) *GoroutineTraceUpdateOne
- func (gtuo *GoroutineTraceUpdateOne) SetNillableIsFinished(i *int) *GoroutineTraceUpdateOne
- func (gtuo *GoroutineTraceUpdateOne) SetNillableOriginGid(u *uint64) *GoroutineTraceUpdateOne
- func (gtuo *GoroutineTraceUpdateOne) SetNillableTimeCost(s *string) *GoroutineTraceUpdateOne
- func (gtuo *GoroutineTraceUpdateOne) SetOriginGid(u uint64) *GoroutineTraceUpdateOne
- func (gtuo *GoroutineTraceUpdateOne) SetTimeCost(s string) *GoroutineTraceUpdateOne
- func (gtuo *GoroutineTraceUpdateOne) Where(ps ...predicate.GoroutineTrace) *GoroutineTraceUpdateOne
- type GoroutineTraces
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraceData
- type TraceDataClient
- func (c *TraceDataClient) Create() *TraceDataCreate
- func (c *TraceDataClient) CreateBulk(builders ...*TraceDataCreate) *TraceDataCreateBulk
- func (c *TraceDataClient) Delete() *TraceDataDelete
- func (c *TraceDataClient) DeleteOne(td *TraceData) *TraceDataDeleteOne
- func (c *TraceDataClient) DeleteOneID(id int) *TraceDataDeleteOne
- func (c *TraceDataClient) Get(ctx context.Context, id int) (*TraceData, error)
- func (c *TraceDataClient) GetX(ctx context.Context, id int) *TraceData
- func (c *TraceDataClient) Hooks() []Hook
- func (c *TraceDataClient) Intercept(interceptors ...Interceptor)
- func (c *TraceDataClient) Interceptors() []Interceptor
- func (c *TraceDataClient) MapCreateBulk(slice any, setFunc func(*TraceDataCreate, int)) *TraceDataCreateBulk
- func (c *TraceDataClient) Query() *TraceDataQuery
- func (c *TraceDataClient) Update() *TraceDataUpdate
- func (c *TraceDataClient) UpdateOne(td *TraceData) *TraceDataUpdateOne
- func (c *TraceDataClient) UpdateOneID(id int) *TraceDataUpdateOne
- func (c *TraceDataClient) Use(hooks ...Hook)
- type TraceDataCreate
- func (tdc *TraceDataCreate) Exec(ctx context.Context) error
- func (tdc *TraceDataCreate) ExecX(ctx context.Context)
- func (tdc *TraceDataCreate) Mutation() *TraceDataMutation
- func (tdc *TraceDataCreate) Save(ctx context.Context) (*TraceData, error)
- func (tdc *TraceDataCreate) SaveX(ctx context.Context) *TraceData
- func (tdc *TraceDataCreate) SetCreatedAt(s string) *TraceDataCreate
- func (tdc *TraceDataCreate) SetGid(u uint64) *TraceDataCreate
- func (tdc *TraceDataCreate) SetID(i int) *TraceDataCreate
- func (tdc *TraceDataCreate) SetIndent(i int) *TraceDataCreate
- func (tdc *TraceDataCreate) SetName(s string) *TraceDataCreate
- func (tdc *TraceDataCreate) SetNillableIndent(i *int) *TraceDataCreate
- func (tdc *TraceDataCreate) SetNillableParentId(i *int64) *TraceDataCreate
- func (tdc *TraceDataCreate) SetNillableSeq(s *string) *TraceDataCreate
- func (tdc *TraceDataCreate) SetNillableTimeCost(s *string) *TraceDataCreate
- func (tdc *TraceDataCreate) SetParams(fp []functrace.TraceParams) *TraceDataCreate
- func (tdc *TraceDataCreate) SetParentId(i int64) *TraceDataCreate
- func (tdc *TraceDataCreate) SetSeq(s string) *TraceDataCreate
- func (tdc *TraceDataCreate) SetTimeCost(s string) *TraceDataCreate
- type TraceDataCreateBulk
- type TraceDataDelete
- type TraceDataDeleteOne
- type TraceDataGroupBy
- func (tdgb *TraceDataGroupBy) Aggregate(fns ...AggregateFunc) *TraceDataGroupBy
- func (s *TraceDataGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TraceDataGroupBy) BoolX(ctx context.Context) bool
- func (s *TraceDataGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TraceDataGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TraceDataGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TraceDataGroupBy) Float64X(ctx context.Context) float64
- func (s *TraceDataGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TraceDataGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TraceDataGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TraceDataGroupBy) IntX(ctx context.Context) int
- func (s *TraceDataGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TraceDataGroupBy) IntsX(ctx context.Context) []int
- func (tdgb *TraceDataGroupBy) Scan(ctx context.Context, v any) error
- func (s *TraceDataGroupBy) ScanX(ctx context.Context, v any)
- func (s *TraceDataGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TraceDataGroupBy) StringX(ctx context.Context) string
- func (s *TraceDataGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TraceDataGroupBy) StringsX(ctx context.Context) []string
- type TraceDataMutation
- func (m *TraceDataMutation) AddField(name string, value ent.Value) error
- func (m *TraceDataMutation) AddGid(u int64)
- func (m *TraceDataMutation) AddIndent(i int)
- func (m *TraceDataMutation) AddParentId(i int64)
- func (m *TraceDataMutation) AddedEdges() []string
- func (m *TraceDataMutation) AddedField(name string) (ent.Value, bool)
- func (m *TraceDataMutation) AddedFields() []string
- func (m *TraceDataMutation) AddedGid() (r int64, exists bool)
- func (m *TraceDataMutation) AddedIDs(name string) []ent.Value
- func (m *TraceDataMutation) AddedIndent() (r int, exists bool)
- func (m *TraceDataMutation) AddedParentId() (r int64, exists bool)
- func (m *TraceDataMutation) AppendParams(fp []functrace.TraceParams)
- func (m *TraceDataMutation) AppendedParams() ([]functrace.TraceParams, bool)
- func (m *TraceDataMutation) ClearEdge(name string) error
- func (m *TraceDataMutation) ClearField(name string) error
- func (m *TraceDataMutation) ClearParams()
- func (m *TraceDataMutation) ClearParentId()
- func (m *TraceDataMutation) ClearSeq()
- func (m *TraceDataMutation) ClearTimeCost()
- func (m *TraceDataMutation) ClearedEdges() []string
- func (m *TraceDataMutation) ClearedFields() []string
- func (m TraceDataMutation) Client() *Client
- func (m *TraceDataMutation) CreatedAt() (r string, exists bool)
- func (m *TraceDataMutation) EdgeCleared(name string) bool
- func (m *TraceDataMutation) Field(name string) (ent.Value, bool)
- func (m *TraceDataMutation) FieldCleared(name string) bool
- func (m *TraceDataMutation) Fields() []string
- func (m *TraceDataMutation) Gid() (r uint64, exists bool)
- func (m *TraceDataMutation) ID() (id int, exists bool)
- func (m *TraceDataMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TraceDataMutation) Indent() (r int, exists bool)
- func (m *TraceDataMutation) Name() (r string, exists bool)
- func (m *TraceDataMutation) OldCreatedAt(ctx context.Context) (v string, err error)
- func (m *TraceDataMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TraceDataMutation) OldGid(ctx context.Context) (v uint64, err error)
- func (m *TraceDataMutation) OldIndent(ctx context.Context) (v int, err error)
- func (m *TraceDataMutation) OldName(ctx context.Context) (v string, err error)
- func (m *TraceDataMutation) OldParams(ctx context.Context) (v []functrace.TraceParams, err error)
- func (m *TraceDataMutation) OldParentId(ctx context.Context) (v int64, err error)
- func (m *TraceDataMutation) OldSeq(ctx context.Context) (v string, err error)
- func (m *TraceDataMutation) OldTimeCost(ctx context.Context) (v string, err error)
- func (m *TraceDataMutation) Op() Op
- func (m *TraceDataMutation) Params() (r []functrace.TraceParams, exists bool)
- func (m *TraceDataMutation) ParamsCleared() bool
- func (m *TraceDataMutation) ParentId() (r int64, exists bool)
- func (m *TraceDataMutation) ParentIdCleared() bool
- func (m *TraceDataMutation) RemovedEdges() []string
- func (m *TraceDataMutation) RemovedIDs(name string) []ent.Value
- func (m *TraceDataMutation) ResetCreatedAt()
- func (m *TraceDataMutation) ResetEdge(name string) error
- func (m *TraceDataMutation) ResetField(name string) error
- func (m *TraceDataMutation) ResetGid()
- func (m *TraceDataMutation) ResetIndent()
- func (m *TraceDataMutation) ResetName()
- func (m *TraceDataMutation) ResetParams()
- func (m *TraceDataMutation) ResetParentId()
- func (m *TraceDataMutation) ResetSeq()
- func (m *TraceDataMutation) ResetTimeCost()
- func (m *TraceDataMutation) Seq() (r string, exists bool)
- func (m *TraceDataMutation) SeqCleared() bool
- func (m *TraceDataMutation) SetCreatedAt(s string)
- func (m *TraceDataMutation) SetField(name string, value ent.Value) error
- func (m *TraceDataMutation) SetGid(u uint64)
- func (m *TraceDataMutation) SetID(id int)
- func (m *TraceDataMutation) SetIndent(i int)
- func (m *TraceDataMutation) SetName(s string)
- func (m *TraceDataMutation) SetOp(op Op)
- func (m *TraceDataMutation) SetParams(fp []functrace.TraceParams)
- func (m *TraceDataMutation) SetParentId(i int64)
- func (m *TraceDataMutation) SetSeq(s string)
- func (m *TraceDataMutation) SetTimeCost(s string)
- func (m *TraceDataMutation) TimeCost() (r string, exists bool)
- func (m *TraceDataMutation) TimeCostCleared() bool
- func (m TraceDataMutation) Tx() (*Tx, error)
- func (m *TraceDataMutation) Type() string
- func (m *TraceDataMutation) Where(ps ...predicate.TraceData)
- func (m *TraceDataMutation) WhereP(ps ...func(*sql.Selector))
- type TraceDataQuery
- func (tdq *TraceDataQuery) Aggregate(fns ...AggregateFunc) *TraceDataSelect
- func (tdq *TraceDataQuery) All(ctx context.Context) ([]*TraceData, error)
- func (tdq *TraceDataQuery) AllX(ctx context.Context) []*TraceData
- func (tdq *TraceDataQuery) Clone() *TraceDataQuery
- func (tdq *TraceDataQuery) Count(ctx context.Context) (int, error)
- func (tdq *TraceDataQuery) CountX(ctx context.Context) int
- func (tdq *TraceDataQuery) Exist(ctx context.Context) (bool, error)
- func (tdq *TraceDataQuery) ExistX(ctx context.Context) bool
- func (tdq *TraceDataQuery) First(ctx context.Context) (*TraceData, error)
- func (tdq *TraceDataQuery) FirstID(ctx context.Context) (id int, err error)
- func (tdq *TraceDataQuery) FirstIDX(ctx context.Context) int
- func (tdq *TraceDataQuery) FirstX(ctx context.Context) *TraceData
- func (tdq *TraceDataQuery) GroupBy(field string, fields ...string) *TraceDataGroupBy
- func (tdq *TraceDataQuery) IDs(ctx context.Context) (ids []int, err error)
- func (tdq *TraceDataQuery) IDsX(ctx context.Context) []int
- func (tdq *TraceDataQuery) Limit(limit int) *TraceDataQuery
- func (tdq *TraceDataQuery) Offset(offset int) *TraceDataQuery
- func (tdq *TraceDataQuery) Only(ctx context.Context) (*TraceData, error)
- func (tdq *TraceDataQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tdq *TraceDataQuery) OnlyIDX(ctx context.Context) int
- func (tdq *TraceDataQuery) OnlyX(ctx context.Context) *TraceData
- func (tdq *TraceDataQuery) Order(o ...tracedata.OrderOption) *TraceDataQuery
- func (tdq *TraceDataQuery) Select(fields ...string) *TraceDataSelect
- func (tdq *TraceDataQuery) Unique(unique bool) *TraceDataQuery
- func (tdq *TraceDataQuery) Where(ps ...predicate.TraceData) *TraceDataQuery
- type TraceDataSelect
- func (tds *TraceDataSelect) Aggregate(fns ...AggregateFunc) *TraceDataSelect
- func (s *TraceDataSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TraceDataSelect) BoolX(ctx context.Context) bool
- func (s *TraceDataSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TraceDataSelect) BoolsX(ctx context.Context) []bool
- func (s *TraceDataSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TraceDataSelect) Float64X(ctx context.Context) float64
- func (s *TraceDataSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TraceDataSelect) Float64sX(ctx context.Context) []float64
- func (s *TraceDataSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TraceDataSelect) IntX(ctx context.Context) int
- func (s *TraceDataSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TraceDataSelect) IntsX(ctx context.Context) []int
- func (tds *TraceDataSelect) Scan(ctx context.Context, v any) error
- func (s *TraceDataSelect) ScanX(ctx context.Context, v any)
- func (s *TraceDataSelect) String(ctx context.Context) (_ string, err error)
- func (s *TraceDataSelect) StringX(ctx context.Context) string
- func (s *TraceDataSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TraceDataSelect) StringsX(ctx context.Context) []string
- type TraceDataSlice
- type TraceDataUpdate
- func (tdu *TraceDataUpdate) AddGid(u int64) *TraceDataUpdate
- func (tdu *TraceDataUpdate) AddIndent(i int) *TraceDataUpdate
- func (tdu *TraceDataUpdate) AddParentId(i int64) *TraceDataUpdate
- func (tdu *TraceDataUpdate) AppendParams(fp []functrace.TraceParams) *TraceDataUpdate
- func (tdu *TraceDataUpdate) ClearParams() *TraceDataUpdate
- func (tdu *TraceDataUpdate) ClearParentId() *TraceDataUpdate
- func (tdu *TraceDataUpdate) ClearSeq() *TraceDataUpdate
- func (tdu *TraceDataUpdate) ClearTimeCost() *TraceDataUpdate
- func (tdu *TraceDataUpdate) Exec(ctx context.Context) error
- func (tdu *TraceDataUpdate) ExecX(ctx context.Context)
- func (tdu *TraceDataUpdate) Mutation() *TraceDataMutation
- func (tdu *TraceDataUpdate) Save(ctx context.Context) (int, error)
- func (tdu *TraceDataUpdate) SaveX(ctx context.Context) int
- func (tdu *TraceDataUpdate) SetCreatedAt(s string) *TraceDataUpdate
- func (tdu *TraceDataUpdate) SetGid(u uint64) *TraceDataUpdate
- func (tdu *TraceDataUpdate) SetIndent(i int) *TraceDataUpdate
- func (tdu *TraceDataUpdate) SetName(s string) *TraceDataUpdate
- func (tdu *TraceDataUpdate) SetNillableCreatedAt(s *string) *TraceDataUpdate
- func (tdu *TraceDataUpdate) SetNillableGid(u *uint64) *TraceDataUpdate
- func (tdu *TraceDataUpdate) SetNillableIndent(i *int) *TraceDataUpdate
- func (tdu *TraceDataUpdate) SetNillableName(s *string) *TraceDataUpdate
- func (tdu *TraceDataUpdate) SetNillableParentId(i *int64) *TraceDataUpdate
- func (tdu *TraceDataUpdate) SetNillableSeq(s *string) *TraceDataUpdate
- func (tdu *TraceDataUpdate) SetNillableTimeCost(s *string) *TraceDataUpdate
- func (tdu *TraceDataUpdate) SetParams(fp []functrace.TraceParams) *TraceDataUpdate
- func (tdu *TraceDataUpdate) SetParentId(i int64) *TraceDataUpdate
- func (tdu *TraceDataUpdate) SetSeq(s string) *TraceDataUpdate
- func (tdu *TraceDataUpdate) SetTimeCost(s string) *TraceDataUpdate
- func (tdu *TraceDataUpdate) Where(ps ...predicate.TraceData) *TraceDataUpdate
- type TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) AddGid(u int64) *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) AddIndent(i int) *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) AddParentId(i int64) *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) AppendParams(fp []functrace.TraceParams) *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) ClearParams() *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) ClearParentId() *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) ClearSeq() *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) ClearTimeCost() *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) Exec(ctx context.Context) error
- func (tduo *TraceDataUpdateOne) ExecX(ctx context.Context)
- func (tduo *TraceDataUpdateOne) Mutation() *TraceDataMutation
- func (tduo *TraceDataUpdateOne) Save(ctx context.Context) (*TraceData, error)
- func (tduo *TraceDataUpdateOne) SaveX(ctx context.Context) *TraceData
- func (tduo *TraceDataUpdateOne) Select(field string, fields ...string) *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) SetCreatedAt(s string) *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) SetGid(u uint64) *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) SetIndent(i int) *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) SetName(s string) *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) SetNillableCreatedAt(s *string) *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) SetNillableGid(u *uint64) *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) SetNillableIndent(i *int) *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) SetNillableName(s *string) *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) SetNillableParentId(i *int64) *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) SetNillableSeq(s *string) *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) SetNillableTimeCost(s *string) *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) SetParams(fp []functrace.TraceParams) *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) SetParentId(i int64) *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) SetSeq(s string) *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) SetTimeCost(s string) *TraceDataUpdateOne
- func (tduo *TraceDataUpdateOne) Where(ps ...predicate.TraceData) *TraceDataUpdateOne
- 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. TypeGoroutineTrace = "GoroutineTrace" TypeTraceData = "TraceData" )
Variables ¶
var ErrTxStarted = errors.New("gen: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(gen.As(gen.Sum(field1), "sum_field1"), (gen.As(gen.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // GoroutineTrace is the client for interacting with the GoroutineTrace builders. GoroutineTrace *GoroutineTraceClient // TraceData is the client for interacting with the TraceData builders. TraceData *TraceDataClient // 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(). GoroutineTrace. 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 GoroutineTrace ¶
type GoroutineTrace struct { // ID of the ent. ID int64 `json:"id,omitempty"` // OriginGid holds the value of the "originGid" field. OriginGid uint64 `json:"originGid,omitempty"` // TimeCost holds the value of the "timeCost" field. TimeCost string `json:"timeCost,omitempty"` // CreateTime holds the value of the "createTime" field. CreateTime string `json:"createTime,omitempty"` // IsFinished holds the value of the "isFinished" field. IsFinished int `json:"isFinished,omitempty"` // InitFuncName holds the value of the "initFuncName" field. InitFuncName string `json:"initFuncName,omitempty"` // contains filtered or unexported fields }
GoroutineTrace is the model entity for the GoroutineTrace schema.
func (*GoroutineTrace) String ¶
func (gt *GoroutineTrace) String() string
String implements the fmt.Stringer.
func (*GoroutineTrace) Unwrap ¶
func (gt *GoroutineTrace) Unwrap() *GoroutineTrace
Unwrap unwraps the GoroutineTrace 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 (*GoroutineTrace) Update ¶
func (gt *GoroutineTrace) Update() *GoroutineTraceUpdateOne
Update returns a builder for updating this GoroutineTrace. Note that you need to call GoroutineTrace.Unwrap() before calling this method if this GoroutineTrace was returned from a transaction, and the transaction was committed or rolled back.
type GoroutineTraceClient ¶
type GoroutineTraceClient struct {
// contains filtered or unexported fields
}
GoroutineTraceClient is a client for the GoroutineTrace schema.
func NewGoroutineTraceClient ¶
func NewGoroutineTraceClient(c config) *GoroutineTraceClient
NewGoroutineTraceClient returns a client for the GoroutineTrace from the given config.
func (*GoroutineTraceClient) Create ¶
func (c *GoroutineTraceClient) Create() *GoroutineTraceCreate
Create returns a builder for creating a GoroutineTrace entity.
func (*GoroutineTraceClient) CreateBulk ¶
func (c *GoroutineTraceClient) CreateBulk(builders ...*GoroutineTraceCreate) *GoroutineTraceCreateBulk
CreateBulk returns a builder for creating a bulk of GoroutineTrace entities.
func (*GoroutineTraceClient) Delete ¶
func (c *GoroutineTraceClient) Delete() *GoroutineTraceDelete
Delete returns a delete builder for GoroutineTrace.
func (*GoroutineTraceClient) DeleteOne ¶
func (c *GoroutineTraceClient) DeleteOne(gt *GoroutineTrace) *GoroutineTraceDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GoroutineTraceClient) DeleteOneID ¶
func (c *GoroutineTraceClient) DeleteOneID(id int64) *GoroutineTraceDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GoroutineTraceClient) Get ¶
func (c *GoroutineTraceClient) Get(ctx context.Context, id int64) (*GoroutineTrace, error)
Get returns a GoroutineTrace entity by its id.
func (*GoroutineTraceClient) GetX ¶
func (c *GoroutineTraceClient) GetX(ctx context.Context, id int64) *GoroutineTrace
GetX is like Get, but panics if an error occurs.
func (*GoroutineTraceClient) Hooks ¶
func (c *GoroutineTraceClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GoroutineTraceClient) Intercept ¶
func (c *GoroutineTraceClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `goroutinetrace.Intercept(f(g(h())))`.
func (*GoroutineTraceClient) Interceptors ¶
func (c *GoroutineTraceClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GoroutineTraceClient) MapCreateBulk ¶
func (c *GoroutineTraceClient) MapCreateBulk(slice any, setFunc func(*GoroutineTraceCreate, int)) *GoroutineTraceCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*GoroutineTraceClient) Query ¶
func (c *GoroutineTraceClient) Query() *GoroutineTraceQuery
Query returns a query builder for GoroutineTrace.
func (*GoroutineTraceClient) Update ¶
func (c *GoroutineTraceClient) Update() *GoroutineTraceUpdate
Update returns an update builder for GoroutineTrace.
func (*GoroutineTraceClient) UpdateOne ¶
func (c *GoroutineTraceClient) UpdateOne(gt *GoroutineTrace) *GoroutineTraceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GoroutineTraceClient) UpdateOneID ¶
func (c *GoroutineTraceClient) UpdateOneID(id int64) *GoroutineTraceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GoroutineTraceClient) Use ¶
func (c *GoroutineTraceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `goroutinetrace.Hooks(f(g(h())))`.
type GoroutineTraceCreate ¶
type GoroutineTraceCreate struct {
// contains filtered or unexported fields
}
GoroutineTraceCreate is the builder for creating a GoroutineTrace entity.
func (*GoroutineTraceCreate) Exec ¶
func (gtc *GoroutineTraceCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GoroutineTraceCreate) ExecX ¶
func (gtc *GoroutineTraceCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GoroutineTraceCreate) Mutation ¶
func (gtc *GoroutineTraceCreate) Mutation() *GoroutineTraceMutation
Mutation returns the GoroutineTraceMutation object of the builder.
func (*GoroutineTraceCreate) Save ¶
func (gtc *GoroutineTraceCreate) Save(ctx context.Context) (*GoroutineTrace, error)
Save creates the GoroutineTrace in the database.
func (*GoroutineTraceCreate) SaveX ¶
func (gtc *GoroutineTraceCreate) SaveX(ctx context.Context) *GoroutineTrace
SaveX calls Save and panics if Save returns an error.
func (*GoroutineTraceCreate) SetCreateTime ¶
func (gtc *GoroutineTraceCreate) SetCreateTime(s string) *GoroutineTraceCreate
SetCreateTime sets the "createTime" field.
func (*GoroutineTraceCreate) SetID ¶
func (gtc *GoroutineTraceCreate) SetID(i int64) *GoroutineTraceCreate
SetID sets the "id" field.
func (*GoroutineTraceCreate) SetInitFuncName ¶
func (gtc *GoroutineTraceCreate) SetInitFuncName(s string) *GoroutineTraceCreate
SetInitFuncName sets the "initFuncName" field.
func (*GoroutineTraceCreate) SetIsFinished ¶
func (gtc *GoroutineTraceCreate) SetIsFinished(i int) *GoroutineTraceCreate
SetIsFinished sets the "isFinished" field.
func (*GoroutineTraceCreate) SetNillableCreateTime ¶
func (gtc *GoroutineTraceCreate) SetNillableCreateTime(s *string) *GoroutineTraceCreate
SetNillableCreateTime sets the "createTime" field if the given value is not nil.
func (*GoroutineTraceCreate) SetNillableInitFuncName ¶
func (gtc *GoroutineTraceCreate) SetNillableInitFuncName(s *string) *GoroutineTraceCreate
SetNillableInitFuncName sets the "initFuncName" field if the given value is not nil.
func (*GoroutineTraceCreate) SetNillableIsFinished ¶
func (gtc *GoroutineTraceCreate) SetNillableIsFinished(i *int) *GoroutineTraceCreate
SetNillableIsFinished sets the "isFinished" field if the given value is not nil.
func (*GoroutineTraceCreate) SetNillableTimeCost ¶
func (gtc *GoroutineTraceCreate) SetNillableTimeCost(s *string) *GoroutineTraceCreate
SetNillableTimeCost sets the "timeCost" field if the given value is not nil.
func (*GoroutineTraceCreate) SetOriginGid ¶
func (gtc *GoroutineTraceCreate) SetOriginGid(u uint64) *GoroutineTraceCreate
SetOriginGid sets the "originGid" field.
func (*GoroutineTraceCreate) SetTimeCost ¶
func (gtc *GoroutineTraceCreate) SetTimeCost(s string) *GoroutineTraceCreate
SetTimeCost sets the "timeCost" field.
type GoroutineTraceCreateBulk ¶
type GoroutineTraceCreateBulk struct {
// contains filtered or unexported fields
}
GoroutineTraceCreateBulk is the builder for creating many GoroutineTrace entities in bulk.
func (*GoroutineTraceCreateBulk) Exec ¶
func (gtcb *GoroutineTraceCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GoroutineTraceCreateBulk) ExecX ¶
func (gtcb *GoroutineTraceCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GoroutineTraceCreateBulk) Save ¶
func (gtcb *GoroutineTraceCreateBulk) Save(ctx context.Context) ([]*GoroutineTrace, error)
Save creates the GoroutineTrace entities in the database.
func (*GoroutineTraceCreateBulk) SaveX ¶
func (gtcb *GoroutineTraceCreateBulk) SaveX(ctx context.Context) []*GoroutineTrace
SaveX is like Save, but panics if an error occurs.
type GoroutineTraceDelete ¶
type GoroutineTraceDelete struct {
// contains filtered or unexported fields
}
GoroutineTraceDelete is the builder for deleting a GoroutineTrace entity.
func (*GoroutineTraceDelete) Exec ¶
func (gtd *GoroutineTraceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GoroutineTraceDelete) ExecX ¶
func (gtd *GoroutineTraceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GoroutineTraceDelete) Where ¶
func (gtd *GoroutineTraceDelete) Where(ps ...predicate.GoroutineTrace) *GoroutineTraceDelete
Where appends a list predicates to the GoroutineTraceDelete builder.
type GoroutineTraceDeleteOne ¶
type GoroutineTraceDeleteOne struct {
// contains filtered or unexported fields
}
GoroutineTraceDeleteOne is the builder for deleting a single GoroutineTrace entity.
func (*GoroutineTraceDeleteOne) Exec ¶
func (gtdo *GoroutineTraceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GoroutineTraceDeleteOne) ExecX ¶
func (gtdo *GoroutineTraceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GoroutineTraceDeleteOne) Where ¶
func (gtdo *GoroutineTraceDeleteOne) Where(ps ...predicate.GoroutineTrace) *GoroutineTraceDeleteOne
Where appends a list predicates to the GoroutineTraceDelete builder.
type GoroutineTraceGroupBy ¶
type GoroutineTraceGroupBy struct {
// contains filtered or unexported fields
}
GoroutineTraceGroupBy is the group-by builder for GoroutineTrace entities.
func (*GoroutineTraceGroupBy) Aggregate ¶
func (gtgb *GoroutineTraceGroupBy) Aggregate(fns ...AggregateFunc) *GoroutineTraceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GoroutineTraceGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GoroutineTraceGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GoroutineTraceGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GoroutineTraceGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GoroutineTraceGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*GoroutineTraceGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GoroutineTraceGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GoroutineTraceGroupBy) Scan ¶
func (gtgb *GoroutineTraceGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GoroutineTraceGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GoroutineTraceMutation ¶
type GoroutineTraceMutation struct {
// contains filtered or unexported fields
}
GoroutineTraceMutation represents an operation that mutates the GoroutineTrace nodes in the graph.
func (*GoroutineTraceMutation) AddField ¶
func (m *GoroutineTraceMutation) 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 (*GoroutineTraceMutation) AddIsFinished ¶
func (m *GoroutineTraceMutation) AddIsFinished(i int)
AddIsFinished adds i to the "isFinished" field.
func (*GoroutineTraceMutation) AddOriginGid ¶
func (m *GoroutineTraceMutation) AddOriginGid(u int64)
AddOriginGid adds u to the "originGid" field.
func (*GoroutineTraceMutation) AddedEdges ¶
func (m *GoroutineTraceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GoroutineTraceMutation) AddedField ¶
func (m *GoroutineTraceMutation) 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 (*GoroutineTraceMutation) AddedFields ¶
func (m *GoroutineTraceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GoroutineTraceMutation) AddedIDs ¶
func (m *GoroutineTraceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GoroutineTraceMutation) AddedIsFinished ¶
func (m *GoroutineTraceMutation) AddedIsFinished() (r int, exists bool)
AddedIsFinished returns the value that was added to the "isFinished" field in this mutation.
func (*GoroutineTraceMutation) AddedOriginGid ¶
func (m *GoroutineTraceMutation) AddedOriginGid() (r int64, exists bool)
AddedOriginGid returns the value that was added to the "originGid" field in this mutation.
func (*GoroutineTraceMutation) ClearCreateTime ¶
func (m *GoroutineTraceMutation) ClearCreateTime()
ClearCreateTime clears the value of the "createTime" field.
func (*GoroutineTraceMutation) ClearEdge ¶
func (m *GoroutineTraceMutation) 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 (*GoroutineTraceMutation) ClearField ¶
func (m *GoroutineTraceMutation) 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 (*GoroutineTraceMutation) ClearInitFuncName ¶
func (m *GoroutineTraceMutation) ClearInitFuncName()
ClearInitFuncName clears the value of the "initFuncName" field.
func (*GoroutineTraceMutation) ClearIsFinished ¶
func (m *GoroutineTraceMutation) ClearIsFinished()
ClearIsFinished clears the value of the "isFinished" field.
func (*GoroutineTraceMutation) ClearTimeCost ¶
func (m *GoroutineTraceMutation) ClearTimeCost()
ClearTimeCost clears the value of the "timeCost" field.
func (*GoroutineTraceMutation) ClearedEdges ¶
func (m *GoroutineTraceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GoroutineTraceMutation) ClearedFields ¶
func (m *GoroutineTraceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GoroutineTraceMutation) Client ¶
func (m GoroutineTraceMutation) 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 (*GoroutineTraceMutation) CreateTime ¶
func (m *GoroutineTraceMutation) CreateTime() (r string, exists bool)
CreateTime returns the value of the "createTime" field in the mutation.
func (*GoroutineTraceMutation) CreateTimeCleared ¶
func (m *GoroutineTraceMutation) CreateTimeCleared() bool
CreateTimeCleared returns if the "createTime" field was cleared in this mutation.
func (*GoroutineTraceMutation) EdgeCleared ¶
func (m *GoroutineTraceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GoroutineTraceMutation) Field ¶
func (m *GoroutineTraceMutation) 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 (*GoroutineTraceMutation) FieldCleared ¶
func (m *GoroutineTraceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GoroutineTraceMutation) Fields ¶
func (m *GoroutineTraceMutation) 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 (*GoroutineTraceMutation) ID ¶
func (m *GoroutineTraceMutation) 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 (*GoroutineTraceMutation) IDs ¶
func (m *GoroutineTraceMutation) 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 (*GoroutineTraceMutation) InitFuncName ¶
func (m *GoroutineTraceMutation) InitFuncName() (r string, exists bool)
InitFuncName returns the value of the "initFuncName" field in the mutation.
func (*GoroutineTraceMutation) InitFuncNameCleared ¶
func (m *GoroutineTraceMutation) InitFuncNameCleared() bool
InitFuncNameCleared returns if the "initFuncName" field was cleared in this mutation.
func (*GoroutineTraceMutation) IsFinished ¶
func (m *GoroutineTraceMutation) IsFinished() (r int, exists bool)
IsFinished returns the value of the "isFinished" field in the mutation.
func (*GoroutineTraceMutation) IsFinishedCleared ¶
func (m *GoroutineTraceMutation) IsFinishedCleared() bool
IsFinishedCleared returns if the "isFinished" field was cleared in this mutation.
func (*GoroutineTraceMutation) OldCreateTime ¶
func (m *GoroutineTraceMutation) OldCreateTime(ctx context.Context) (v string, err error)
OldCreateTime returns the old "createTime" field's value of the GoroutineTrace entity. If the GoroutineTrace 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 (*GoroutineTraceMutation) 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 (*GoroutineTraceMutation) OldInitFuncName ¶
func (m *GoroutineTraceMutation) OldInitFuncName(ctx context.Context) (v string, err error)
OldInitFuncName returns the old "initFuncName" field's value of the GoroutineTrace entity. If the GoroutineTrace 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 (*GoroutineTraceMutation) OldIsFinished ¶
func (m *GoroutineTraceMutation) OldIsFinished(ctx context.Context) (v int, err error)
OldIsFinished returns the old "isFinished" field's value of the GoroutineTrace entity. If the GoroutineTrace 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 (*GoroutineTraceMutation) OldOriginGid ¶
func (m *GoroutineTraceMutation) OldOriginGid(ctx context.Context) (v uint64, err error)
OldOriginGid returns the old "originGid" field's value of the GoroutineTrace entity. If the GoroutineTrace 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 (*GoroutineTraceMutation) OldTimeCost ¶
func (m *GoroutineTraceMutation) OldTimeCost(ctx context.Context) (v string, err error)
OldTimeCost returns the old "timeCost" field's value of the GoroutineTrace entity. If the GoroutineTrace 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 (*GoroutineTraceMutation) Op ¶
func (m *GoroutineTraceMutation) Op() Op
Op returns the operation name.
func (*GoroutineTraceMutation) OriginGid ¶
func (m *GoroutineTraceMutation) OriginGid() (r uint64, exists bool)
OriginGid returns the value of the "originGid" field in the mutation.
func (*GoroutineTraceMutation) RemovedEdges ¶
func (m *GoroutineTraceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GoroutineTraceMutation) RemovedIDs ¶
func (m *GoroutineTraceMutation) 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 (*GoroutineTraceMutation) ResetCreateTime ¶
func (m *GoroutineTraceMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "createTime" field.
func (*GoroutineTraceMutation) ResetEdge ¶
func (m *GoroutineTraceMutation) 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 (*GoroutineTraceMutation) ResetField ¶
func (m *GoroutineTraceMutation) 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 (*GoroutineTraceMutation) ResetInitFuncName ¶
func (m *GoroutineTraceMutation) ResetInitFuncName()
ResetInitFuncName resets all changes to the "initFuncName" field.
func (*GoroutineTraceMutation) ResetIsFinished ¶
func (m *GoroutineTraceMutation) ResetIsFinished()
ResetIsFinished resets all changes to the "isFinished" field.
func (*GoroutineTraceMutation) ResetOriginGid ¶
func (m *GoroutineTraceMutation) ResetOriginGid()
ResetOriginGid resets all changes to the "originGid" field.
func (*GoroutineTraceMutation) ResetTimeCost ¶
func (m *GoroutineTraceMutation) ResetTimeCost()
ResetTimeCost resets all changes to the "timeCost" field.
func (*GoroutineTraceMutation) SetCreateTime ¶
func (m *GoroutineTraceMutation) SetCreateTime(s string)
SetCreateTime sets the "createTime" field.
func (*GoroutineTraceMutation) SetField ¶
func (m *GoroutineTraceMutation) 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 (*GoroutineTraceMutation) SetID ¶
func (m *GoroutineTraceMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of GoroutineTrace entities.
func (*GoroutineTraceMutation) SetInitFuncName ¶
func (m *GoroutineTraceMutation) SetInitFuncName(s string)
SetInitFuncName sets the "initFuncName" field.
func (*GoroutineTraceMutation) SetIsFinished ¶
func (m *GoroutineTraceMutation) SetIsFinished(i int)
SetIsFinished sets the "isFinished" field.
func (*GoroutineTraceMutation) SetOp ¶
func (m *GoroutineTraceMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GoroutineTraceMutation) SetOriginGid ¶
func (m *GoroutineTraceMutation) SetOriginGid(u uint64)
SetOriginGid sets the "originGid" field.
func (*GoroutineTraceMutation) SetTimeCost ¶
func (m *GoroutineTraceMutation) SetTimeCost(s string)
SetTimeCost sets the "timeCost" field.
func (*GoroutineTraceMutation) TimeCost ¶
func (m *GoroutineTraceMutation) TimeCost() (r string, exists bool)
TimeCost returns the value of the "timeCost" field in the mutation.
func (*GoroutineTraceMutation) TimeCostCleared ¶
func (m *GoroutineTraceMutation) TimeCostCleared() bool
TimeCostCleared returns if the "timeCost" field was cleared in this mutation.
func (GoroutineTraceMutation) Tx ¶
func (m GoroutineTraceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GoroutineTraceMutation) Type ¶
func (m *GoroutineTraceMutation) Type() string
Type returns the node type of this mutation (GoroutineTrace).
func (*GoroutineTraceMutation) Where ¶
func (m *GoroutineTraceMutation) Where(ps ...predicate.GoroutineTrace)
Where appends a list predicates to the GoroutineTraceMutation builder.
func (*GoroutineTraceMutation) WhereP ¶
func (m *GoroutineTraceMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GoroutineTraceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GoroutineTraceQuery ¶
type GoroutineTraceQuery struct {
// contains filtered or unexported fields
}
GoroutineTraceQuery is the builder for querying GoroutineTrace entities.
func (*GoroutineTraceQuery) Aggregate ¶
func (gtq *GoroutineTraceQuery) Aggregate(fns ...AggregateFunc) *GoroutineTraceSelect
Aggregate returns a GoroutineTraceSelect configured with the given aggregations.
func (*GoroutineTraceQuery) All ¶
func (gtq *GoroutineTraceQuery) All(ctx context.Context) ([]*GoroutineTrace, error)
All executes the query and returns a list of GoroutineTraces.
func (*GoroutineTraceQuery) AllX ¶
func (gtq *GoroutineTraceQuery) AllX(ctx context.Context) []*GoroutineTrace
AllX is like All, but panics if an error occurs.
func (*GoroutineTraceQuery) Clone ¶
func (gtq *GoroutineTraceQuery) Clone() *GoroutineTraceQuery
Clone returns a duplicate of the GoroutineTraceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GoroutineTraceQuery) Count ¶
func (gtq *GoroutineTraceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GoroutineTraceQuery) CountX ¶
func (gtq *GoroutineTraceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GoroutineTraceQuery) Exist ¶
func (gtq *GoroutineTraceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GoroutineTraceQuery) ExistX ¶
func (gtq *GoroutineTraceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GoroutineTraceQuery) First ¶
func (gtq *GoroutineTraceQuery) First(ctx context.Context) (*GoroutineTrace, error)
First returns the first GoroutineTrace entity from the query. Returns a *NotFoundError when no GoroutineTrace was found.
func (*GoroutineTraceQuery) FirstID ¶
func (gtq *GoroutineTraceQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first GoroutineTrace ID from the query. Returns a *NotFoundError when no GoroutineTrace ID was found.
func (*GoroutineTraceQuery) FirstIDX ¶
func (gtq *GoroutineTraceQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*GoroutineTraceQuery) FirstX ¶
func (gtq *GoroutineTraceQuery) FirstX(ctx context.Context) *GoroutineTrace
FirstX is like First, but panics if an error occurs.
func (*GoroutineTraceQuery) GroupBy ¶
func (gtq *GoroutineTraceQuery) GroupBy(field string, fields ...string) *GoroutineTraceGroupBy
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 { OriginGid uint64 `json:"originGid,omitempty"` Count int `json:"count,omitempty"` } client.GoroutineTrace.Query(). GroupBy(goroutinetrace.FieldOriginGid). Aggregate(gen.Count()). Scan(ctx, &v)
func (*GoroutineTraceQuery) IDs ¶
func (gtq *GoroutineTraceQuery) IDs(ctx context.Context) (ids []int64, err error)
IDs executes the query and returns a list of GoroutineTrace IDs.
func (*GoroutineTraceQuery) IDsX ¶
func (gtq *GoroutineTraceQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*GoroutineTraceQuery) Limit ¶
func (gtq *GoroutineTraceQuery) Limit(limit int) *GoroutineTraceQuery
Limit the number of records to be returned by this query.
func (*GoroutineTraceQuery) Offset ¶
func (gtq *GoroutineTraceQuery) Offset(offset int) *GoroutineTraceQuery
Offset to start from.
func (*GoroutineTraceQuery) Only ¶
func (gtq *GoroutineTraceQuery) Only(ctx context.Context) (*GoroutineTrace, error)
Only returns a single GoroutineTrace entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GoroutineTrace entity is found. Returns a *NotFoundError when no GoroutineTrace entities are found.
func (*GoroutineTraceQuery) OnlyID ¶
func (gtq *GoroutineTraceQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only GoroutineTrace ID in the query. Returns a *NotSingularError when more than one GoroutineTrace ID is found. Returns a *NotFoundError when no entities are found.
func (*GoroutineTraceQuery) OnlyIDX ¶
func (gtq *GoroutineTraceQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GoroutineTraceQuery) OnlyX ¶
func (gtq *GoroutineTraceQuery) OnlyX(ctx context.Context) *GoroutineTrace
OnlyX is like Only, but panics if an error occurs.
func (*GoroutineTraceQuery) Order ¶
func (gtq *GoroutineTraceQuery) Order(o ...goroutinetrace.OrderOption) *GoroutineTraceQuery
Order specifies how the records should be ordered.
func (*GoroutineTraceQuery) Select ¶
func (gtq *GoroutineTraceQuery) Select(fields ...string) *GoroutineTraceSelect
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 { OriginGid uint64 `json:"originGid,omitempty"` } client.GoroutineTrace.Query(). Select(goroutinetrace.FieldOriginGid). Scan(ctx, &v)
func (*GoroutineTraceQuery) Unique ¶
func (gtq *GoroutineTraceQuery) Unique(unique bool) *GoroutineTraceQuery
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 (*GoroutineTraceQuery) Where ¶
func (gtq *GoroutineTraceQuery) Where(ps ...predicate.GoroutineTrace) *GoroutineTraceQuery
Where adds a new predicate for the GoroutineTraceQuery builder.
type GoroutineTraceSelect ¶
type GoroutineTraceSelect struct { *GoroutineTraceQuery // contains filtered or unexported fields }
GoroutineTraceSelect is the builder for selecting fields of GoroutineTrace entities.
func (*GoroutineTraceSelect) Aggregate ¶
func (gts *GoroutineTraceSelect) Aggregate(fns ...AggregateFunc) *GoroutineTraceSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GoroutineTraceSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GoroutineTraceSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GoroutineTraceSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GoroutineTraceSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GoroutineTraceSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GoroutineTraceSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GoroutineTraceSelect) Scan ¶
func (gts *GoroutineTraceSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GoroutineTraceSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GoroutineTraceUpdate ¶
type GoroutineTraceUpdate struct {
// contains filtered or unexported fields
}
GoroutineTraceUpdate is the builder for updating GoroutineTrace entities.
func (*GoroutineTraceUpdate) AddIsFinished ¶
func (gtu *GoroutineTraceUpdate) AddIsFinished(i int) *GoroutineTraceUpdate
AddIsFinished adds i to the "isFinished" field.
func (*GoroutineTraceUpdate) AddOriginGid ¶
func (gtu *GoroutineTraceUpdate) AddOriginGid(u int64) *GoroutineTraceUpdate
AddOriginGid adds u to the "originGid" field.
func (*GoroutineTraceUpdate) ClearCreateTime ¶
func (gtu *GoroutineTraceUpdate) ClearCreateTime() *GoroutineTraceUpdate
ClearCreateTime clears the value of the "createTime" field.
func (*GoroutineTraceUpdate) ClearInitFuncName ¶
func (gtu *GoroutineTraceUpdate) ClearInitFuncName() *GoroutineTraceUpdate
ClearInitFuncName clears the value of the "initFuncName" field.
func (*GoroutineTraceUpdate) ClearIsFinished ¶
func (gtu *GoroutineTraceUpdate) ClearIsFinished() *GoroutineTraceUpdate
ClearIsFinished clears the value of the "isFinished" field.
func (*GoroutineTraceUpdate) ClearTimeCost ¶
func (gtu *GoroutineTraceUpdate) ClearTimeCost() *GoroutineTraceUpdate
ClearTimeCost clears the value of the "timeCost" field.
func (*GoroutineTraceUpdate) Exec ¶
func (gtu *GoroutineTraceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GoroutineTraceUpdate) ExecX ¶
func (gtu *GoroutineTraceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GoroutineTraceUpdate) Mutation ¶
func (gtu *GoroutineTraceUpdate) Mutation() *GoroutineTraceMutation
Mutation returns the GoroutineTraceMutation object of the builder.
func (*GoroutineTraceUpdate) Save ¶
func (gtu *GoroutineTraceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GoroutineTraceUpdate) SaveX ¶
func (gtu *GoroutineTraceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GoroutineTraceUpdate) SetCreateTime ¶
func (gtu *GoroutineTraceUpdate) SetCreateTime(s string) *GoroutineTraceUpdate
SetCreateTime sets the "createTime" field.
func (*GoroutineTraceUpdate) SetInitFuncName ¶
func (gtu *GoroutineTraceUpdate) SetInitFuncName(s string) *GoroutineTraceUpdate
SetInitFuncName sets the "initFuncName" field.
func (*GoroutineTraceUpdate) SetIsFinished ¶
func (gtu *GoroutineTraceUpdate) SetIsFinished(i int) *GoroutineTraceUpdate
SetIsFinished sets the "isFinished" field.
func (*GoroutineTraceUpdate) SetNillableCreateTime ¶
func (gtu *GoroutineTraceUpdate) SetNillableCreateTime(s *string) *GoroutineTraceUpdate
SetNillableCreateTime sets the "createTime" field if the given value is not nil.
func (*GoroutineTraceUpdate) SetNillableInitFuncName ¶
func (gtu *GoroutineTraceUpdate) SetNillableInitFuncName(s *string) *GoroutineTraceUpdate
SetNillableInitFuncName sets the "initFuncName" field if the given value is not nil.
func (*GoroutineTraceUpdate) SetNillableIsFinished ¶
func (gtu *GoroutineTraceUpdate) SetNillableIsFinished(i *int) *GoroutineTraceUpdate
SetNillableIsFinished sets the "isFinished" field if the given value is not nil.
func (*GoroutineTraceUpdate) SetNillableOriginGid ¶
func (gtu *GoroutineTraceUpdate) SetNillableOriginGid(u *uint64) *GoroutineTraceUpdate
SetNillableOriginGid sets the "originGid" field if the given value is not nil.
func (*GoroutineTraceUpdate) SetNillableTimeCost ¶
func (gtu *GoroutineTraceUpdate) SetNillableTimeCost(s *string) *GoroutineTraceUpdate
SetNillableTimeCost sets the "timeCost" field if the given value is not nil.
func (*GoroutineTraceUpdate) SetOriginGid ¶
func (gtu *GoroutineTraceUpdate) SetOriginGid(u uint64) *GoroutineTraceUpdate
SetOriginGid sets the "originGid" field.
func (*GoroutineTraceUpdate) SetTimeCost ¶
func (gtu *GoroutineTraceUpdate) SetTimeCost(s string) *GoroutineTraceUpdate
SetTimeCost sets the "timeCost" field.
func (*GoroutineTraceUpdate) Where ¶
func (gtu *GoroutineTraceUpdate) Where(ps ...predicate.GoroutineTrace) *GoroutineTraceUpdate
Where appends a list predicates to the GoroutineTraceUpdate builder.
type GoroutineTraceUpdateOne ¶
type GoroutineTraceUpdateOne struct {
// contains filtered or unexported fields
}
GoroutineTraceUpdateOne is the builder for updating a single GoroutineTrace entity.
func (*GoroutineTraceUpdateOne) AddIsFinished ¶
func (gtuo *GoroutineTraceUpdateOne) AddIsFinished(i int) *GoroutineTraceUpdateOne
AddIsFinished adds i to the "isFinished" field.
func (*GoroutineTraceUpdateOne) AddOriginGid ¶
func (gtuo *GoroutineTraceUpdateOne) AddOriginGid(u int64) *GoroutineTraceUpdateOne
AddOriginGid adds u to the "originGid" field.
func (*GoroutineTraceUpdateOne) ClearCreateTime ¶
func (gtuo *GoroutineTraceUpdateOne) ClearCreateTime() *GoroutineTraceUpdateOne
ClearCreateTime clears the value of the "createTime" field.
func (*GoroutineTraceUpdateOne) ClearInitFuncName ¶
func (gtuo *GoroutineTraceUpdateOne) ClearInitFuncName() *GoroutineTraceUpdateOne
ClearInitFuncName clears the value of the "initFuncName" field.
func (*GoroutineTraceUpdateOne) ClearIsFinished ¶
func (gtuo *GoroutineTraceUpdateOne) ClearIsFinished() *GoroutineTraceUpdateOne
ClearIsFinished clears the value of the "isFinished" field.
func (*GoroutineTraceUpdateOne) ClearTimeCost ¶
func (gtuo *GoroutineTraceUpdateOne) ClearTimeCost() *GoroutineTraceUpdateOne
ClearTimeCost clears the value of the "timeCost" field.
func (*GoroutineTraceUpdateOne) Exec ¶
func (gtuo *GoroutineTraceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GoroutineTraceUpdateOne) ExecX ¶
func (gtuo *GoroutineTraceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GoroutineTraceUpdateOne) Mutation ¶
func (gtuo *GoroutineTraceUpdateOne) Mutation() *GoroutineTraceMutation
Mutation returns the GoroutineTraceMutation object of the builder.
func (*GoroutineTraceUpdateOne) Save ¶
func (gtuo *GoroutineTraceUpdateOne) Save(ctx context.Context) (*GoroutineTrace, error)
Save executes the query and returns the updated GoroutineTrace entity.
func (*GoroutineTraceUpdateOne) SaveX ¶
func (gtuo *GoroutineTraceUpdateOne) SaveX(ctx context.Context) *GoroutineTrace
SaveX is like Save, but panics if an error occurs.
func (*GoroutineTraceUpdateOne) Select ¶
func (gtuo *GoroutineTraceUpdateOne) Select(field string, fields ...string) *GoroutineTraceUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GoroutineTraceUpdateOne) SetCreateTime ¶
func (gtuo *GoroutineTraceUpdateOne) SetCreateTime(s string) *GoroutineTraceUpdateOne
SetCreateTime sets the "createTime" field.
func (*GoroutineTraceUpdateOne) SetInitFuncName ¶
func (gtuo *GoroutineTraceUpdateOne) SetInitFuncName(s string) *GoroutineTraceUpdateOne
SetInitFuncName sets the "initFuncName" field.
func (*GoroutineTraceUpdateOne) SetIsFinished ¶
func (gtuo *GoroutineTraceUpdateOne) SetIsFinished(i int) *GoroutineTraceUpdateOne
SetIsFinished sets the "isFinished" field.
func (*GoroutineTraceUpdateOne) SetNillableCreateTime ¶
func (gtuo *GoroutineTraceUpdateOne) SetNillableCreateTime(s *string) *GoroutineTraceUpdateOne
SetNillableCreateTime sets the "createTime" field if the given value is not nil.
func (*GoroutineTraceUpdateOne) SetNillableInitFuncName ¶
func (gtuo *GoroutineTraceUpdateOne) SetNillableInitFuncName(s *string) *GoroutineTraceUpdateOne
SetNillableInitFuncName sets the "initFuncName" field if the given value is not nil.
func (*GoroutineTraceUpdateOne) SetNillableIsFinished ¶
func (gtuo *GoroutineTraceUpdateOne) SetNillableIsFinished(i *int) *GoroutineTraceUpdateOne
SetNillableIsFinished sets the "isFinished" field if the given value is not nil.
func (*GoroutineTraceUpdateOne) SetNillableOriginGid ¶
func (gtuo *GoroutineTraceUpdateOne) SetNillableOriginGid(u *uint64) *GoroutineTraceUpdateOne
SetNillableOriginGid sets the "originGid" field if the given value is not nil.
func (*GoroutineTraceUpdateOne) SetNillableTimeCost ¶
func (gtuo *GoroutineTraceUpdateOne) SetNillableTimeCost(s *string) *GoroutineTraceUpdateOne
SetNillableTimeCost sets the "timeCost" field if the given value is not nil.
func (*GoroutineTraceUpdateOne) SetOriginGid ¶
func (gtuo *GoroutineTraceUpdateOne) SetOriginGid(u uint64) *GoroutineTraceUpdateOne
SetOriginGid sets the "originGid" field.
func (*GoroutineTraceUpdateOne) SetTimeCost ¶
func (gtuo *GoroutineTraceUpdateOne) SetTimeCost(s string) *GoroutineTraceUpdateOne
SetTimeCost sets the "timeCost" field.
func (*GoroutineTraceUpdateOne) Where ¶
func (gtuo *GoroutineTraceUpdateOne) Where(ps ...predicate.GoroutineTrace) *GoroutineTraceUpdateOne
Where appends a list predicates to the GoroutineTraceUpdate builder.
type GoroutineTraces ¶
type GoroutineTraces []*GoroutineTrace
GoroutineTraces is a parsable slice of GoroutineTrace.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type TraceData ¶
type TraceData struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Gid holds the value of the "gid" field. Gid uint64 `json:"gid,omitempty"` // Indent holds the value of the "indent" field. Indent int `json:"indent,omitempty"` // Params holds the value of the "params" field. Params []functrace.TraceParams `json:"params,omitempty"` // TimeCost holds the value of the "timeCost" field. TimeCost string `json:"timeCost,omitempty"` // ParentId holds the value of the "parentId" field. ParentId int64 `json:"parentId,omitempty"` // CreatedAt holds the value of the "createdAt" field. CreatedAt string `json:"createdAt,omitempty"` // Seq holds the value of the "seq" field. Seq string `json:"seq,omitempty"` // contains filtered or unexported fields }
TraceData is the model entity for the TraceData schema.
func (*TraceData) Unwrap ¶
Unwrap unwraps the TraceData 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 (*TraceData) Update ¶
func (td *TraceData) Update() *TraceDataUpdateOne
Update returns a builder for updating this TraceData. Note that you need to call TraceData.Unwrap() before calling this method if this TraceData was returned from a transaction, and the transaction was committed or rolled back.
type TraceDataClient ¶
type TraceDataClient struct {
// contains filtered or unexported fields
}
TraceDataClient is a client for the TraceData schema.
func NewTraceDataClient ¶
func NewTraceDataClient(c config) *TraceDataClient
NewTraceDataClient returns a client for the TraceData from the given config.
func (*TraceDataClient) Create ¶
func (c *TraceDataClient) Create() *TraceDataCreate
Create returns a builder for creating a TraceData entity.
func (*TraceDataClient) CreateBulk ¶
func (c *TraceDataClient) CreateBulk(builders ...*TraceDataCreate) *TraceDataCreateBulk
CreateBulk returns a builder for creating a bulk of TraceData entities.
func (*TraceDataClient) Delete ¶
func (c *TraceDataClient) Delete() *TraceDataDelete
Delete returns a delete builder for TraceData.
func (*TraceDataClient) DeleteOne ¶
func (c *TraceDataClient) DeleteOne(td *TraceData) *TraceDataDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TraceDataClient) DeleteOneID ¶
func (c *TraceDataClient) DeleteOneID(id int) *TraceDataDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TraceDataClient) GetX ¶
func (c *TraceDataClient) GetX(ctx context.Context, id int) *TraceData
GetX is like Get, but panics if an error occurs.
func (*TraceDataClient) Hooks ¶
func (c *TraceDataClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TraceDataClient) Intercept ¶
func (c *TraceDataClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tracedata.Intercept(f(g(h())))`.
func (*TraceDataClient) Interceptors ¶
func (c *TraceDataClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TraceDataClient) MapCreateBulk ¶
func (c *TraceDataClient) MapCreateBulk(slice any, setFunc func(*TraceDataCreate, int)) *TraceDataCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*TraceDataClient) Query ¶
func (c *TraceDataClient) Query() *TraceDataQuery
Query returns a query builder for TraceData.
func (*TraceDataClient) Update ¶
func (c *TraceDataClient) Update() *TraceDataUpdate
Update returns an update builder for TraceData.
func (*TraceDataClient) UpdateOne ¶
func (c *TraceDataClient) UpdateOne(td *TraceData) *TraceDataUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TraceDataClient) UpdateOneID ¶
func (c *TraceDataClient) UpdateOneID(id int) *TraceDataUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TraceDataClient) Use ¶
func (c *TraceDataClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tracedata.Hooks(f(g(h())))`.
type TraceDataCreate ¶
type TraceDataCreate struct {
// contains filtered or unexported fields
}
TraceDataCreate is the builder for creating a TraceData entity.
func (*TraceDataCreate) Exec ¶
func (tdc *TraceDataCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TraceDataCreate) ExecX ¶
func (tdc *TraceDataCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TraceDataCreate) Mutation ¶
func (tdc *TraceDataCreate) Mutation() *TraceDataMutation
Mutation returns the TraceDataMutation object of the builder.
func (*TraceDataCreate) Save ¶
func (tdc *TraceDataCreate) Save(ctx context.Context) (*TraceData, error)
Save creates the TraceData in the database.
func (*TraceDataCreate) SaveX ¶
func (tdc *TraceDataCreate) SaveX(ctx context.Context) *TraceData
SaveX calls Save and panics if Save returns an error.
func (*TraceDataCreate) SetCreatedAt ¶
func (tdc *TraceDataCreate) SetCreatedAt(s string) *TraceDataCreate
SetCreatedAt sets the "createdAt" field.
func (*TraceDataCreate) SetGid ¶
func (tdc *TraceDataCreate) SetGid(u uint64) *TraceDataCreate
SetGid sets the "gid" field.
func (*TraceDataCreate) SetID ¶
func (tdc *TraceDataCreate) SetID(i int) *TraceDataCreate
SetID sets the "id" field.
func (*TraceDataCreate) SetIndent ¶
func (tdc *TraceDataCreate) SetIndent(i int) *TraceDataCreate
SetIndent sets the "indent" field.
func (*TraceDataCreate) SetName ¶
func (tdc *TraceDataCreate) SetName(s string) *TraceDataCreate
SetName sets the "name" field.
func (*TraceDataCreate) SetNillableIndent ¶
func (tdc *TraceDataCreate) SetNillableIndent(i *int) *TraceDataCreate
SetNillableIndent sets the "indent" field if the given value is not nil.
func (*TraceDataCreate) SetNillableParentId ¶
func (tdc *TraceDataCreate) SetNillableParentId(i *int64) *TraceDataCreate
SetNillableParentId sets the "parentId" field if the given value is not nil.
func (*TraceDataCreate) SetNillableSeq ¶
func (tdc *TraceDataCreate) SetNillableSeq(s *string) *TraceDataCreate
SetNillableSeq sets the "seq" field if the given value is not nil.
func (*TraceDataCreate) SetNillableTimeCost ¶
func (tdc *TraceDataCreate) SetNillableTimeCost(s *string) *TraceDataCreate
SetNillableTimeCost sets the "timeCost" field if the given value is not nil.
func (*TraceDataCreate) SetParams ¶
func (tdc *TraceDataCreate) SetParams(fp []functrace.TraceParams) *TraceDataCreate
SetParams sets the "params" field.
func (*TraceDataCreate) SetParentId ¶
func (tdc *TraceDataCreate) SetParentId(i int64) *TraceDataCreate
SetParentId sets the "parentId" field.
func (*TraceDataCreate) SetSeq ¶
func (tdc *TraceDataCreate) SetSeq(s string) *TraceDataCreate
SetSeq sets the "seq" field.
func (*TraceDataCreate) SetTimeCost ¶
func (tdc *TraceDataCreate) SetTimeCost(s string) *TraceDataCreate
SetTimeCost sets the "timeCost" field.
type TraceDataCreateBulk ¶
type TraceDataCreateBulk struct {
// contains filtered or unexported fields
}
TraceDataCreateBulk is the builder for creating many TraceData entities in bulk.
func (*TraceDataCreateBulk) Exec ¶
func (tdcb *TraceDataCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TraceDataCreateBulk) ExecX ¶
func (tdcb *TraceDataCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TraceDataDelete ¶
type TraceDataDelete struct {
// contains filtered or unexported fields
}
TraceDataDelete is the builder for deleting a TraceData entity.
func (*TraceDataDelete) Exec ¶
func (tdd *TraceDataDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TraceDataDelete) ExecX ¶
func (tdd *TraceDataDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TraceDataDelete) Where ¶
func (tdd *TraceDataDelete) Where(ps ...predicate.TraceData) *TraceDataDelete
Where appends a list predicates to the TraceDataDelete builder.
type TraceDataDeleteOne ¶
type TraceDataDeleteOne struct {
// contains filtered or unexported fields
}
TraceDataDeleteOne is the builder for deleting a single TraceData entity.
func (*TraceDataDeleteOne) Exec ¶
func (tddo *TraceDataDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TraceDataDeleteOne) ExecX ¶
func (tddo *TraceDataDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TraceDataDeleteOne) Where ¶
func (tddo *TraceDataDeleteOne) Where(ps ...predicate.TraceData) *TraceDataDeleteOne
Where appends a list predicates to the TraceDataDelete builder.
type TraceDataGroupBy ¶
type TraceDataGroupBy struct {
// contains filtered or unexported fields
}
TraceDataGroupBy is the group-by builder for TraceData entities.
func (*TraceDataGroupBy) Aggregate ¶
func (tdgb *TraceDataGroupBy) Aggregate(fns ...AggregateFunc) *TraceDataGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TraceDataGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TraceDataGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TraceDataGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TraceDataGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TraceDataGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TraceDataGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TraceDataGroupBy) Scan ¶
func (tdgb *TraceDataGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TraceDataGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TraceDataMutation ¶
type TraceDataMutation struct {
// contains filtered or unexported fields
}
TraceDataMutation represents an operation that mutates the TraceData nodes in the graph.
func (*TraceDataMutation) AddField ¶
func (m *TraceDataMutation) 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 (*TraceDataMutation) AddGid ¶
func (m *TraceDataMutation) AddGid(u int64)
AddGid adds u to the "gid" field.
func (*TraceDataMutation) AddIndent ¶
func (m *TraceDataMutation) AddIndent(i int)
AddIndent adds i to the "indent" field.
func (*TraceDataMutation) AddParentId ¶
func (m *TraceDataMutation) AddParentId(i int64)
AddParentId adds i to the "parentId" field.
func (*TraceDataMutation) AddedEdges ¶
func (m *TraceDataMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TraceDataMutation) AddedField ¶
func (m *TraceDataMutation) 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 (*TraceDataMutation) AddedFields ¶
func (m *TraceDataMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TraceDataMutation) AddedGid ¶
func (m *TraceDataMutation) AddedGid() (r int64, exists bool)
AddedGid returns the value that was added to the "gid" field in this mutation.
func (*TraceDataMutation) AddedIDs ¶
func (m *TraceDataMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TraceDataMutation) AddedIndent ¶
func (m *TraceDataMutation) AddedIndent() (r int, exists bool)
AddedIndent returns the value that was added to the "indent" field in this mutation.
func (*TraceDataMutation) AddedParentId ¶
func (m *TraceDataMutation) AddedParentId() (r int64, exists bool)
AddedParentId returns the value that was added to the "parentId" field in this mutation.
func (*TraceDataMutation) AppendParams ¶
func (m *TraceDataMutation) AppendParams(fp []functrace.TraceParams)
AppendParams adds fp to the "params" field.
func (*TraceDataMutation) AppendedParams ¶
func (m *TraceDataMutation) AppendedParams() ([]functrace.TraceParams, bool)
AppendedParams returns the list of values that were appended to the "params" field in this mutation.
func (*TraceDataMutation) ClearEdge ¶
func (m *TraceDataMutation) 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 (*TraceDataMutation) ClearField ¶
func (m *TraceDataMutation) 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 (*TraceDataMutation) ClearParams ¶
func (m *TraceDataMutation) ClearParams()
ClearParams clears the value of the "params" field.
func (*TraceDataMutation) ClearParentId ¶
func (m *TraceDataMutation) ClearParentId()
ClearParentId clears the value of the "parentId" field.
func (*TraceDataMutation) ClearSeq ¶
func (m *TraceDataMutation) ClearSeq()
ClearSeq clears the value of the "seq" field.
func (*TraceDataMutation) ClearTimeCost ¶
func (m *TraceDataMutation) ClearTimeCost()
ClearTimeCost clears the value of the "timeCost" field.
func (*TraceDataMutation) ClearedEdges ¶
func (m *TraceDataMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TraceDataMutation) ClearedFields ¶
func (m *TraceDataMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TraceDataMutation) Client ¶
func (m TraceDataMutation) 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 (*TraceDataMutation) CreatedAt ¶
func (m *TraceDataMutation) CreatedAt() (r string, exists bool)
CreatedAt returns the value of the "createdAt" field in the mutation.
func (*TraceDataMutation) EdgeCleared ¶
func (m *TraceDataMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TraceDataMutation) Field ¶
func (m *TraceDataMutation) 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 (*TraceDataMutation) FieldCleared ¶
func (m *TraceDataMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TraceDataMutation) Fields ¶
func (m *TraceDataMutation) 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 (*TraceDataMutation) Gid ¶
func (m *TraceDataMutation) Gid() (r uint64, exists bool)
Gid returns the value of the "gid" field in the mutation.
func (*TraceDataMutation) ID ¶
func (m *TraceDataMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TraceDataMutation) IDs ¶
func (m *TraceDataMutation) IDs(ctx context.Context) ([]int, 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 (*TraceDataMutation) Indent ¶
func (m *TraceDataMutation) Indent() (r int, exists bool)
Indent returns the value of the "indent" field in the mutation.
func (*TraceDataMutation) Name ¶
func (m *TraceDataMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*TraceDataMutation) OldCreatedAt ¶
func (m *TraceDataMutation) OldCreatedAt(ctx context.Context) (v string, err error)
OldCreatedAt returns the old "createdAt" field's value of the TraceData entity. If the TraceData 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 (*TraceDataMutation) 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 (*TraceDataMutation) OldGid ¶
func (m *TraceDataMutation) OldGid(ctx context.Context) (v uint64, err error)
OldGid returns the old "gid" field's value of the TraceData entity. If the TraceData 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 (*TraceDataMutation) OldIndent ¶
func (m *TraceDataMutation) OldIndent(ctx context.Context) (v int, err error)
OldIndent returns the old "indent" field's value of the TraceData entity. If the TraceData 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 (*TraceDataMutation) OldName ¶
func (m *TraceDataMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the TraceData entity. If the TraceData 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 (*TraceDataMutation) OldParams ¶
func (m *TraceDataMutation) OldParams(ctx context.Context) (v []functrace.TraceParams, err error)
OldParams returns the old "params" field's value of the TraceData entity. If the TraceData 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 (*TraceDataMutation) OldParentId ¶
func (m *TraceDataMutation) OldParentId(ctx context.Context) (v int64, err error)
OldParentId returns the old "parentId" field's value of the TraceData entity. If the TraceData 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 (*TraceDataMutation) OldSeq ¶
func (m *TraceDataMutation) OldSeq(ctx context.Context) (v string, err error)
OldSeq returns the old "seq" field's value of the TraceData entity. If the TraceData 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 (*TraceDataMutation) OldTimeCost ¶
func (m *TraceDataMutation) OldTimeCost(ctx context.Context) (v string, err error)
OldTimeCost returns the old "timeCost" field's value of the TraceData entity. If the TraceData 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 (*TraceDataMutation) Params ¶
func (m *TraceDataMutation) Params() (r []functrace.TraceParams, exists bool)
Params returns the value of the "params" field in the mutation.
func (*TraceDataMutation) ParamsCleared ¶
func (m *TraceDataMutation) ParamsCleared() bool
ParamsCleared returns if the "params" field was cleared in this mutation.
func (*TraceDataMutation) ParentId ¶
func (m *TraceDataMutation) ParentId() (r int64, exists bool)
ParentId returns the value of the "parentId" field in the mutation.
func (*TraceDataMutation) ParentIdCleared ¶
func (m *TraceDataMutation) ParentIdCleared() bool
ParentIdCleared returns if the "parentId" field was cleared in this mutation.
func (*TraceDataMutation) RemovedEdges ¶
func (m *TraceDataMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TraceDataMutation) RemovedIDs ¶
func (m *TraceDataMutation) 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 (*TraceDataMutation) ResetCreatedAt ¶
func (m *TraceDataMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "createdAt" field.
func (*TraceDataMutation) ResetEdge ¶
func (m *TraceDataMutation) 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 (*TraceDataMutation) ResetField ¶
func (m *TraceDataMutation) 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 (*TraceDataMutation) ResetGid ¶
func (m *TraceDataMutation) ResetGid()
ResetGid resets all changes to the "gid" field.
func (*TraceDataMutation) ResetIndent ¶
func (m *TraceDataMutation) ResetIndent()
ResetIndent resets all changes to the "indent" field.
func (*TraceDataMutation) ResetName ¶
func (m *TraceDataMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*TraceDataMutation) ResetParams ¶
func (m *TraceDataMutation) ResetParams()
ResetParams resets all changes to the "params" field.
func (*TraceDataMutation) ResetParentId ¶
func (m *TraceDataMutation) ResetParentId()
ResetParentId resets all changes to the "parentId" field.
func (*TraceDataMutation) ResetSeq ¶
func (m *TraceDataMutation) ResetSeq()
ResetSeq resets all changes to the "seq" field.
func (*TraceDataMutation) ResetTimeCost ¶
func (m *TraceDataMutation) ResetTimeCost()
ResetTimeCost resets all changes to the "timeCost" field.
func (*TraceDataMutation) Seq ¶
func (m *TraceDataMutation) Seq() (r string, exists bool)
Seq returns the value of the "seq" field in the mutation.
func (*TraceDataMutation) SeqCleared ¶
func (m *TraceDataMutation) SeqCleared() bool
SeqCleared returns if the "seq" field was cleared in this mutation.
func (*TraceDataMutation) SetCreatedAt ¶
func (m *TraceDataMutation) SetCreatedAt(s string)
SetCreatedAt sets the "createdAt" field.
func (*TraceDataMutation) SetField ¶
func (m *TraceDataMutation) 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 (*TraceDataMutation) SetGid ¶
func (m *TraceDataMutation) SetGid(u uint64)
SetGid sets the "gid" field.
func (*TraceDataMutation) SetID ¶
func (m *TraceDataMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of TraceData entities.
func (*TraceDataMutation) SetIndent ¶
func (m *TraceDataMutation) SetIndent(i int)
SetIndent sets the "indent" field.
func (*TraceDataMutation) SetName ¶
func (m *TraceDataMutation) SetName(s string)
SetName sets the "name" field.
func (*TraceDataMutation) SetOp ¶
func (m *TraceDataMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TraceDataMutation) SetParams ¶
func (m *TraceDataMutation) SetParams(fp []functrace.TraceParams)
SetParams sets the "params" field.
func (*TraceDataMutation) SetParentId ¶
func (m *TraceDataMutation) SetParentId(i int64)
SetParentId sets the "parentId" field.
func (*TraceDataMutation) SetSeq ¶
func (m *TraceDataMutation) SetSeq(s string)
SetSeq sets the "seq" field.
func (*TraceDataMutation) SetTimeCost ¶
func (m *TraceDataMutation) SetTimeCost(s string)
SetTimeCost sets the "timeCost" field.
func (*TraceDataMutation) TimeCost ¶
func (m *TraceDataMutation) TimeCost() (r string, exists bool)
TimeCost returns the value of the "timeCost" field in the mutation.
func (*TraceDataMutation) TimeCostCleared ¶
func (m *TraceDataMutation) TimeCostCleared() bool
TimeCostCleared returns if the "timeCost" field was cleared in this mutation.
func (TraceDataMutation) Tx ¶
func (m TraceDataMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TraceDataMutation) Type ¶
func (m *TraceDataMutation) Type() string
Type returns the node type of this mutation (TraceData).
func (*TraceDataMutation) Where ¶
func (m *TraceDataMutation) Where(ps ...predicate.TraceData)
Where appends a list predicates to the TraceDataMutation builder.
func (*TraceDataMutation) WhereP ¶
func (m *TraceDataMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TraceDataMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TraceDataQuery ¶
type TraceDataQuery struct {
// contains filtered or unexported fields
}
TraceDataQuery is the builder for querying TraceData entities.
func (*TraceDataQuery) Aggregate ¶
func (tdq *TraceDataQuery) Aggregate(fns ...AggregateFunc) *TraceDataSelect
Aggregate returns a TraceDataSelect configured with the given aggregations.
func (*TraceDataQuery) All ¶
func (tdq *TraceDataQuery) All(ctx context.Context) ([]*TraceData, error)
All executes the query and returns a list of TraceDataSlice.
func (*TraceDataQuery) AllX ¶
func (tdq *TraceDataQuery) AllX(ctx context.Context) []*TraceData
AllX is like All, but panics if an error occurs.
func (*TraceDataQuery) Clone ¶
func (tdq *TraceDataQuery) Clone() *TraceDataQuery
Clone returns a duplicate of the TraceDataQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TraceDataQuery) Count ¶
func (tdq *TraceDataQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TraceDataQuery) CountX ¶
func (tdq *TraceDataQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TraceDataQuery) Exist ¶
func (tdq *TraceDataQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TraceDataQuery) ExistX ¶
func (tdq *TraceDataQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TraceDataQuery) First ¶
func (tdq *TraceDataQuery) First(ctx context.Context) (*TraceData, error)
First returns the first TraceData entity from the query. Returns a *NotFoundError when no TraceData was found.
func (*TraceDataQuery) FirstID ¶
func (tdq *TraceDataQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first TraceData ID from the query. Returns a *NotFoundError when no TraceData ID was found.
func (*TraceDataQuery) FirstIDX ¶
func (tdq *TraceDataQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*TraceDataQuery) FirstX ¶
func (tdq *TraceDataQuery) FirstX(ctx context.Context) *TraceData
FirstX is like First, but panics if an error occurs.
func (*TraceDataQuery) GroupBy ¶
func (tdq *TraceDataQuery) GroupBy(field string, fields ...string) *TraceDataGroupBy
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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.TraceData.Query(). GroupBy(tracedata.FieldName). Aggregate(gen.Count()). Scan(ctx, &v)
func (*TraceDataQuery) IDs ¶
func (tdq *TraceDataQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of TraceData IDs.
func (*TraceDataQuery) IDsX ¶
func (tdq *TraceDataQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*TraceDataQuery) Limit ¶
func (tdq *TraceDataQuery) Limit(limit int) *TraceDataQuery
Limit the number of records to be returned by this query.
func (*TraceDataQuery) Offset ¶
func (tdq *TraceDataQuery) Offset(offset int) *TraceDataQuery
Offset to start from.
func (*TraceDataQuery) Only ¶
func (tdq *TraceDataQuery) Only(ctx context.Context) (*TraceData, error)
Only returns a single TraceData entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TraceData entity is found. Returns a *NotFoundError when no TraceData entities are found.
func (*TraceDataQuery) OnlyID ¶
func (tdq *TraceDataQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only TraceData ID in the query. Returns a *NotSingularError when more than one TraceData ID is found. Returns a *NotFoundError when no entities are found.
func (*TraceDataQuery) OnlyIDX ¶
func (tdq *TraceDataQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TraceDataQuery) OnlyX ¶
func (tdq *TraceDataQuery) OnlyX(ctx context.Context) *TraceData
OnlyX is like Only, but panics if an error occurs.
func (*TraceDataQuery) Order ¶
func (tdq *TraceDataQuery) Order(o ...tracedata.OrderOption) *TraceDataQuery
Order specifies how the records should be ordered.
func (*TraceDataQuery) Select ¶
func (tdq *TraceDataQuery) Select(fields ...string) *TraceDataSelect
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 { Name string `json:"name,omitempty"` } client.TraceData.Query(). Select(tracedata.FieldName). Scan(ctx, &v)
func (*TraceDataQuery) Unique ¶
func (tdq *TraceDataQuery) Unique(unique bool) *TraceDataQuery
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 (*TraceDataQuery) Where ¶
func (tdq *TraceDataQuery) Where(ps ...predicate.TraceData) *TraceDataQuery
Where adds a new predicate for the TraceDataQuery builder.
type TraceDataSelect ¶
type TraceDataSelect struct { *TraceDataQuery // contains filtered or unexported fields }
TraceDataSelect is the builder for selecting fields of TraceData entities.
func (*TraceDataSelect) Aggregate ¶
func (tds *TraceDataSelect) Aggregate(fns ...AggregateFunc) *TraceDataSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TraceDataSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TraceDataSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TraceDataSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TraceDataSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TraceDataSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TraceDataSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TraceDataSelect) Scan ¶
func (tds *TraceDataSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TraceDataSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TraceDataSlice ¶
type TraceDataSlice []*TraceData
TraceDataSlice is a parsable slice of TraceData.
type TraceDataUpdate ¶
type TraceDataUpdate struct {
// contains filtered or unexported fields
}
TraceDataUpdate is the builder for updating TraceData entities.
func (*TraceDataUpdate) AddGid ¶
func (tdu *TraceDataUpdate) AddGid(u int64) *TraceDataUpdate
AddGid adds u to the "gid" field.
func (*TraceDataUpdate) AddIndent ¶
func (tdu *TraceDataUpdate) AddIndent(i int) *TraceDataUpdate
AddIndent adds i to the "indent" field.
func (*TraceDataUpdate) AddParentId ¶
func (tdu *TraceDataUpdate) AddParentId(i int64) *TraceDataUpdate
AddParentId adds i to the "parentId" field.
func (*TraceDataUpdate) AppendParams ¶
func (tdu *TraceDataUpdate) AppendParams(fp []functrace.TraceParams) *TraceDataUpdate
AppendParams appends fp to the "params" field.
func (*TraceDataUpdate) ClearParams ¶
func (tdu *TraceDataUpdate) ClearParams() *TraceDataUpdate
ClearParams clears the value of the "params" field.
func (*TraceDataUpdate) ClearParentId ¶
func (tdu *TraceDataUpdate) ClearParentId() *TraceDataUpdate
ClearParentId clears the value of the "parentId" field.
func (*TraceDataUpdate) ClearSeq ¶
func (tdu *TraceDataUpdate) ClearSeq() *TraceDataUpdate
ClearSeq clears the value of the "seq" field.
func (*TraceDataUpdate) ClearTimeCost ¶
func (tdu *TraceDataUpdate) ClearTimeCost() *TraceDataUpdate
ClearTimeCost clears the value of the "timeCost" field.
func (*TraceDataUpdate) Exec ¶
func (tdu *TraceDataUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TraceDataUpdate) ExecX ¶
func (tdu *TraceDataUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TraceDataUpdate) Mutation ¶
func (tdu *TraceDataUpdate) Mutation() *TraceDataMutation
Mutation returns the TraceDataMutation object of the builder.
func (*TraceDataUpdate) Save ¶
func (tdu *TraceDataUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TraceDataUpdate) SaveX ¶
func (tdu *TraceDataUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TraceDataUpdate) SetCreatedAt ¶
func (tdu *TraceDataUpdate) SetCreatedAt(s string) *TraceDataUpdate
SetCreatedAt sets the "createdAt" field.
func (*TraceDataUpdate) SetGid ¶
func (tdu *TraceDataUpdate) SetGid(u uint64) *TraceDataUpdate
SetGid sets the "gid" field.
func (*TraceDataUpdate) SetIndent ¶
func (tdu *TraceDataUpdate) SetIndent(i int) *TraceDataUpdate
SetIndent sets the "indent" field.
func (*TraceDataUpdate) SetName ¶
func (tdu *TraceDataUpdate) SetName(s string) *TraceDataUpdate
SetName sets the "name" field.
func (*TraceDataUpdate) SetNillableCreatedAt ¶
func (tdu *TraceDataUpdate) SetNillableCreatedAt(s *string) *TraceDataUpdate
SetNillableCreatedAt sets the "createdAt" field if the given value is not nil.
func (*TraceDataUpdate) SetNillableGid ¶
func (tdu *TraceDataUpdate) SetNillableGid(u *uint64) *TraceDataUpdate
SetNillableGid sets the "gid" field if the given value is not nil.
func (*TraceDataUpdate) SetNillableIndent ¶
func (tdu *TraceDataUpdate) SetNillableIndent(i *int) *TraceDataUpdate
SetNillableIndent sets the "indent" field if the given value is not nil.
func (*TraceDataUpdate) SetNillableName ¶
func (tdu *TraceDataUpdate) SetNillableName(s *string) *TraceDataUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*TraceDataUpdate) SetNillableParentId ¶
func (tdu *TraceDataUpdate) SetNillableParentId(i *int64) *TraceDataUpdate
SetNillableParentId sets the "parentId" field if the given value is not nil.
func (*TraceDataUpdate) SetNillableSeq ¶
func (tdu *TraceDataUpdate) SetNillableSeq(s *string) *TraceDataUpdate
SetNillableSeq sets the "seq" field if the given value is not nil.
func (*TraceDataUpdate) SetNillableTimeCost ¶
func (tdu *TraceDataUpdate) SetNillableTimeCost(s *string) *TraceDataUpdate
SetNillableTimeCost sets the "timeCost" field if the given value is not nil.
func (*TraceDataUpdate) SetParams ¶
func (tdu *TraceDataUpdate) SetParams(fp []functrace.TraceParams) *TraceDataUpdate
SetParams sets the "params" field.
func (*TraceDataUpdate) SetParentId ¶
func (tdu *TraceDataUpdate) SetParentId(i int64) *TraceDataUpdate
SetParentId sets the "parentId" field.
func (*TraceDataUpdate) SetSeq ¶
func (tdu *TraceDataUpdate) SetSeq(s string) *TraceDataUpdate
SetSeq sets the "seq" field.
func (*TraceDataUpdate) SetTimeCost ¶
func (tdu *TraceDataUpdate) SetTimeCost(s string) *TraceDataUpdate
SetTimeCost sets the "timeCost" field.
func (*TraceDataUpdate) Where ¶
func (tdu *TraceDataUpdate) Where(ps ...predicate.TraceData) *TraceDataUpdate
Where appends a list predicates to the TraceDataUpdate builder.
type TraceDataUpdateOne ¶
type TraceDataUpdateOne struct {
// contains filtered or unexported fields
}
TraceDataUpdateOne is the builder for updating a single TraceData entity.
func (*TraceDataUpdateOne) AddGid ¶
func (tduo *TraceDataUpdateOne) AddGid(u int64) *TraceDataUpdateOne
AddGid adds u to the "gid" field.
func (*TraceDataUpdateOne) AddIndent ¶
func (tduo *TraceDataUpdateOne) AddIndent(i int) *TraceDataUpdateOne
AddIndent adds i to the "indent" field.
func (*TraceDataUpdateOne) AddParentId ¶
func (tduo *TraceDataUpdateOne) AddParentId(i int64) *TraceDataUpdateOne
AddParentId adds i to the "parentId" field.
func (*TraceDataUpdateOne) AppendParams ¶
func (tduo *TraceDataUpdateOne) AppendParams(fp []functrace.TraceParams) *TraceDataUpdateOne
AppendParams appends fp to the "params" field.
func (*TraceDataUpdateOne) ClearParams ¶
func (tduo *TraceDataUpdateOne) ClearParams() *TraceDataUpdateOne
ClearParams clears the value of the "params" field.
func (*TraceDataUpdateOne) ClearParentId ¶
func (tduo *TraceDataUpdateOne) ClearParentId() *TraceDataUpdateOne
ClearParentId clears the value of the "parentId" field.
func (*TraceDataUpdateOne) ClearSeq ¶
func (tduo *TraceDataUpdateOne) ClearSeq() *TraceDataUpdateOne
ClearSeq clears the value of the "seq" field.
func (*TraceDataUpdateOne) ClearTimeCost ¶
func (tduo *TraceDataUpdateOne) ClearTimeCost() *TraceDataUpdateOne
ClearTimeCost clears the value of the "timeCost" field.
func (*TraceDataUpdateOne) Exec ¶
func (tduo *TraceDataUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TraceDataUpdateOne) ExecX ¶
func (tduo *TraceDataUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TraceDataUpdateOne) Mutation ¶
func (tduo *TraceDataUpdateOne) Mutation() *TraceDataMutation
Mutation returns the TraceDataMutation object of the builder.
func (*TraceDataUpdateOne) Save ¶
func (tduo *TraceDataUpdateOne) Save(ctx context.Context) (*TraceData, error)
Save executes the query and returns the updated TraceData entity.
func (*TraceDataUpdateOne) SaveX ¶
func (tduo *TraceDataUpdateOne) SaveX(ctx context.Context) *TraceData
SaveX is like Save, but panics if an error occurs.
func (*TraceDataUpdateOne) Select ¶
func (tduo *TraceDataUpdateOne) Select(field string, fields ...string) *TraceDataUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TraceDataUpdateOne) SetCreatedAt ¶
func (tduo *TraceDataUpdateOne) SetCreatedAt(s string) *TraceDataUpdateOne
SetCreatedAt sets the "createdAt" field.
func (*TraceDataUpdateOne) SetGid ¶
func (tduo *TraceDataUpdateOne) SetGid(u uint64) *TraceDataUpdateOne
SetGid sets the "gid" field.
func (*TraceDataUpdateOne) SetIndent ¶
func (tduo *TraceDataUpdateOne) SetIndent(i int) *TraceDataUpdateOne
SetIndent sets the "indent" field.
func (*TraceDataUpdateOne) SetName ¶
func (tduo *TraceDataUpdateOne) SetName(s string) *TraceDataUpdateOne
SetName sets the "name" field.
func (*TraceDataUpdateOne) SetNillableCreatedAt ¶
func (tduo *TraceDataUpdateOne) SetNillableCreatedAt(s *string) *TraceDataUpdateOne
SetNillableCreatedAt sets the "createdAt" field if the given value is not nil.
func (*TraceDataUpdateOne) SetNillableGid ¶
func (tduo *TraceDataUpdateOne) SetNillableGid(u *uint64) *TraceDataUpdateOne
SetNillableGid sets the "gid" field if the given value is not nil.
func (*TraceDataUpdateOne) SetNillableIndent ¶
func (tduo *TraceDataUpdateOne) SetNillableIndent(i *int) *TraceDataUpdateOne
SetNillableIndent sets the "indent" field if the given value is not nil.
func (*TraceDataUpdateOne) SetNillableName ¶
func (tduo *TraceDataUpdateOne) SetNillableName(s *string) *TraceDataUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*TraceDataUpdateOne) SetNillableParentId ¶
func (tduo *TraceDataUpdateOne) SetNillableParentId(i *int64) *TraceDataUpdateOne
SetNillableParentId sets the "parentId" field if the given value is not nil.
func (*TraceDataUpdateOne) SetNillableSeq ¶
func (tduo *TraceDataUpdateOne) SetNillableSeq(s *string) *TraceDataUpdateOne
SetNillableSeq sets the "seq" field if the given value is not nil.
func (*TraceDataUpdateOne) SetNillableTimeCost ¶
func (tduo *TraceDataUpdateOne) SetNillableTimeCost(s *string) *TraceDataUpdateOne
SetNillableTimeCost sets the "timeCost" field if the given value is not nil.
func (*TraceDataUpdateOne) SetParams ¶
func (tduo *TraceDataUpdateOne) SetParams(fp []functrace.TraceParams) *TraceDataUpdateOne
SetParams sets the "params" field.
func (*TraceDataUpdateOne) SetParentId ¶
func (tduo *TraceDataUpdateOne) SetParentId(i int64) *TraceDataUpdateOne
SetParentId sets the "parentId" field.
func (*TraceDataUpdateOne) SetSeq ¶
func (tduo *TraceDataUpdateOne) SetSeq(s string) *TraceDataUpdateOne
SetSeq sets the "seq" field.
func (*TraceDataUpdateOne) SetTimeCost ¶
func (tduo *TraceDataUpdateOne) SetTimeCost(s string) *TraceDataUpdateOne
SetTimeCost sets the "timeCost" field.
func (*TraceDataUpdateOne) Where ¶
func (tduo *TraceDataUpdateOne) Where(ps ...predicate.TraceData) *TraceDataUpdateOne
Where appends a list predicates to the TraceDataUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // GoroutineTrace is the client for interacting with the GoroutineTrace builders. GoroutineTrace *GoroutineTraceClient // TraceData is the client for interacting with the TraceData builders. TraceData *TraceDataClient // 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.