gen

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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 Asc

func Asc(fields ...string) func(*sql.Selector)

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) func(*sql.Selector)

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

IsConstraintError returns a boolean indicating whether the error is a constraint failure.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns a boolean indicating whether the error is a not found error.

func IsNotLoaded

func IsNotLoaded(err error) bool

IsNotLoaded returns a boolean indicating whether the error is a not loaded error.

func IsNotSingular

func IsNotSingular(err error) bool

IsNotSingular returns a boolean indicating whether the error is a not singular error.

func IsValidationError

func IsValidationError(err error) bool

IsValidationError returns a boolean indicating whether the error is a validation error.

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

func NewContext(parent context.Context, c *Client) context.Context

NewContext returns a new context with the given Client attached.

func NewTxContext

func NewTxContext(parent context.Context, tx *Tx) context.Context

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

AggregateFunc applies an aggregation step on the group-by traversal/selector.

func As

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

func FromContext(ctx context.Context) *Client

FromContext returns a Client stored inside a context, or nil if there isn't one.

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

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) BeginTx

func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug

func (c *Client) Debug() *Client

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(...)`.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

func (c *Client) Use(hooks ...Hook)

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

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.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

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 Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

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

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.

func (*GoroutineTrace) Value

func (gt *GoroutineTrace) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the GoroutineTrace. This includes values selected through modifiers, order, etc.

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

Create returns a builder for creating a GoroutineTrace entity.

func (*GoroutineTraceClient) CreateBulk

CreateBulk returns a builder for creating a bulk of GoroutineTrace entities.

func (*GoroutineTraceClient) Delete

Delete returns a delete builder for GoroutineTrace.

func (*GoroutineTraceClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*GoroutineTraceClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*GoroutineTraceClient) Get

Get returns a GoroutineTrace entity by its id.

func (*GoroutineTraceClient) GetX

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

Query returns a query builder for GoroutineTrace.

func (*GoroutineTraceClient) Update

Update returns an update builder for GoroutineTrace.

func (*GoroutineTraceClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*GoroutineTraceClient) UpdateOneID

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

Mutation returns the GoroutineTraceMutation object of the builder.

func (*GoroutineTraceCreate) Save

Save creates the GoroutineTrace in the database.

func (*GoroutineTraceCreate) SaveX

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

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

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

Save creates the GoroutineTrace entities in the database.

func (*GoroutineTraceCreateBulk) SaveX

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

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

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

Aggregate adds the given aggregation functions to the group-by query.

func (*GoroutineTraceGroupBy) Bool

func (s *GoroutineTraceGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*GoroutineTraceGroupBy) BoolX

func (s *GoroutineTraceGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*GoroutineTraceGroupBy) Bools

func (s *GoroutineTraceGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*GoroutineTraceGroupBy) BoolsX

func (s *GoroutineTraceGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*GoroutineTraceGroupBy) Float64

func (s *GoroutineTraceGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*GoroutineTraceGroupBy) Float64X

func (s *GoroutineTraceGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*GoroutineTraceGroupBy) Float64s

func (s *GoroutineTraceGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*GoroutineTraceGroupBy) Float64sX

func (s *GoroutineTraceGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*GoroutineTraceGroupBy) Int

func (s *GoroutineTraceGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*GoroutineTraceGroupBy) IntX

func (s *GoroutineTraceGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*GoroutineTraceGroupBy) Ints

func (s *GoroutineTraceGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*GoroutineTraceGroupBy) IntsX

func (s *GoroutineTraceGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *GoroutineTraceGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*GoroutineTraceGroupBy) String

func (s *GoroutineTraceGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*GoroutineTraceGroupBy) StringX

func (s *GoroutineTraceGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*GoroutineTraceGroupBy) Strings

func (s *GoroutineTraceGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*GoroutineTraceGroupBy) StringsX

func (s *GoroutineTraceGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

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

func (m *GoroutineTraceMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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

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

All executes the query and returns a list of GoroutineTraces.

func (*GoroutineTraceQuery) AllX

AllX is like All, but panics if an error occurs.

func (*GoroutineTraceQuery) Clone

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

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

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

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

OnlyX is like Only, but panics if an error occurs.

func (*GoroutineTraceQuery) Order

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

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

Aggregate adds the given aggregation functions to the selector query.

func (*GoroutineTraceSelect) Bool

func (s *GoroutineTraceSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*GoroutineTraceSelect) BoolX

func (s *GoroutineTraceSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*GoroutineTraceSelect) Bools

func (s *GoroutineTraceSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*GoroutineTraceSelect) BoolsX

func (s *GoroutineTraceSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*GoroutineTraceSelect) Float64

func (s *GoroutineTraceSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*GoroutineTraceSelect) Float64X

func (s *GoroutineTraceSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*GoroutineTraceSelect) Float64s

func (s *GoroutineTraceSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*GoroutineTraceSelect) Float64sX

func (s *GoroutineTraceSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*GoroutineTraceSelect) Int

func (s *GoroutineTraceSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*GoroutineTraceSelect) IntX

func (s *GoroutineTraceSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*GoroutineTraceSelect) Ints

func (s *GoroutineTraceSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*GoroutineTraceSelect) IntsX

func (s *GoroutineTraceSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *GoroutineTraceSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*GoroutineTraceSelect) String

func (s *GoroutineTraceSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*GoroutineTraceSelect) StringX

func (s *GoroutineTraceSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*GoroutineTraceSelect) Strings

func (s *GoroutineTraceSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*GoroutineTraceSelect) StringsX

func (s *GoroutineTraceSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

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

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

Mutation returns the GoroutineTraceMutation object of the builder.

func (*GoroutineTraceUpdateOne) Save

Save executes the query and returns the updated GoroutineTrace entity.

func (*GoroutineTraceUpdateOne) SaveX

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

SetOriginGid sets the "originGid" field.

func (*GoroutineTraceUpdateOne) SetTimeCost

SetTimeCost sets the "timeCost" field.

func (*GoroutineTraceUpdateOne) Where

Where appends a list predicates to the GoroutineTraceUpdate builder.

type GoroutineTraces

type GoroutineTraces []*GoroutineTrace

GoroutineTraces is a parsable slice of GoroutineTrace.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

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 Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

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 Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

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

type RollbackFunc func(context.Context, *Tx) error

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.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

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

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

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) String

func (td *TraceData) String() string

String implements the fmt.Stringer.

func (*TraceData) Unwrap

func (td *TraceData) Unwrap() *TraceData

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.

func (*TraceData) Value

func (td *TraceData) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the TraceData. This includes values selected through modifiers, order, etc.

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) Get

func (c *TraceDataClient) Get(ctx context.Context, id int) (*TraceData, error)

Get returns a TraceData 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.

func (*TraceDataCreateBulk) Save

func (tdcb *TraceDataCreateBulk) Save(ctx context.Context) ([]*TraceData, error)

Save creates the TraceData entities in the database.

func (*TraceDataCreateBulk) SaveX

func (tdcb *TraceDataCreateBulk) SaveX(ctx context.Context) []*TraceData

SaveX is like Save, 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

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

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

func (s *TraceDataGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TraceDataGroupBy) BoolX

func (s *TraceDataGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TraceDataGroupBy) Bools

func (s *TraceDataGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TraceDataGroupBy) BoolsX

func (s *TraceDataGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TraceDataGroupBy) Float64

func (s *TraceDataGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TraceDataGroupBy) Float64X

func (s *TraceDataGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TraceDataGroupBy) Float64s

func (s *TraceDataGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TraceDataGroupBy) Float64sX

func (s *TraceDataGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TraceDataGroupBy) Int

func (s *TraceDataGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TraceDataGroupBy) IntX

func (s *TraceDataGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TraceDataGroupBy) Ints

func (s *TraceDataGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TraceDataGroupBy) IntsX

func (s *TraceDataGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *TraceDataGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TraceDataGroupBy) String

func (s *TraceDataGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TraceDataGroupBy) StringX

func (s *TraceDataGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TraceDataGroupBy) Strings

func (s *TraceDataGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TraceDataGroupBy) StringsX

func (s *TraceDataGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

func (m *TraceDataMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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) Op

func (m *TraceDataMutation) Op() Op

Op returns the operation name.

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

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

func (s *TraceDataSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TraceDataSelect) BoolX

func (s *TraceDataSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TraceDataSelect) Bools

func (s *TraceDataSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TraceDataSelect) BoolsX

func (s *TraceDataSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TraceDataSelect) Float64

func (s *TraceDataSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TraceDataSelect) Float64X

func (s *TraceDataSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TraceDataSelect) Float64s

func (s *TraceDataSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TraceDataSelect) Float64sX

func (s *TraceDataSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TraceDataSelect) Int

func (s *TraceDataSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TraceDataSelect) IntX

func (s *TraceDataSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TraceDataSelect) Ints

func (s *TraceDataSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TraceDataSelect) IntsX

func (s *TraceDataSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *TraceDataSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TraceDataSelect) String

func (s *TraceDataSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TraceDataSelect) StringX

func (s *TraceDataSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TraceDataSelect) Strings

func (s *TraceDataSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TraceDataSelect) StringsX

func (s *TraceDataSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

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

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

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 Traverser

type Traverser = ent.Traverser

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

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

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.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL