ent

package
v0.0.0-...-166cf9e Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2025 License: MIT Imports: 25 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.
	TypeExecution   = "Execution"
	TypeFunction    = "Function"
	TypeLangRuntime = "LangRuntime"
	TypeTenant      = "Tenant"
)

Variables

View Source
var ErrTxStarted = errors.New("ent: 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(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")).
Scan(ctx, &v)

func Count

func Count() AggregateFunc

Count applies the "count" aggregation function on each group.

func Max

func Max(field string) AggregateFunc

Max applies the "max" aggregation function on the given field of each group.

func Mean

func Mean(field string) AggregateFunc

Mean applies the "mean" aggregation function on the given field of each group.

func Min

func Min(field string) AggregateFunc

Min applies the "min" aggregation function on the given field of each group.

func Sum

func Sum(field string) AggregateFunc

Sum applies the "sum" aggregation function on the given field of each group.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Execution is the client for interacting with the Execution builders.
	Execution *ExecutionClient
	// Function is the client for interacting with the Function builders.
	Function *FunctionClient
	// LangRuntime is the client for interacting with the LangRuntime builders.
	LangRuntime *LangRuntimeClient
	// Tenant is the client for interacting with the Tenant builders.
	Tenant *TenantClient
	// 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().
	Execution.
	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 Execution

type Execution struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// TenantID holds the value of the "tenant_id" field.
	TenantID uuid.UUID `json:"tenant_id,omitempty"`
	// FunctionID holds the value of the "function_id" field.
	FunctionID uuid.UUID `json:"function_id,omitempty"`
	// RequestID holds the value of the "request_id" field.
	RequestID string `json:"request_id,omitempty"`
	// VMID holds the value of the "vm_id" field.
	VMID string `json:"vm_id,omitempty"`
	// StatusCode holds the value of the "status_code" field.
	StatusCode int `json:"status_code,omitempty"`
	// RequestPayload holds the value of the "request_payload" field.
	RequestPayload map[string]interface{} `json:"request_payload,omitempty"`
	// ResponsePayload holds the value of the "response_payload" field.
	ResponsePayload map[string]interface{} `json:"response_payload,omitempty"`
	// Error holds the value of the "error" field.
	Error string `json:"error,omitempty"`
	// Logs holds the value of the "logs" field.
	Logs []string `json:"logs,omitempty"`
	// DurationMs holds the value of the "duration_ms" field.
	DurationMs int64 `json:"duration_ms,omitempty"`
	// BilledDurationMs holds the value of the "billed_duration_ms" field.
	BilledDurationMs int64 `json:"billed_duration_ms,omitempty"`
	// MemoryUsedMB holds the value of the "memory_used_mb" field.
	MemoryUsedMB int `json:"memory_used_mb,omitempty"`
	// StartedAt holds the value of the "started_at" field.
	StartedAt time.Time `json:"started_at,omitempty"`
	// CompletedAt holds the value of the "completed_at" field.
	CompletedAt time.Time `json:"completed_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ExecutionQuery when eager-loading is set.
	Edges ExecutionEdges `json:"edges"`
	// contains filtered or unexported fields
}

Execution is the model entity for the Execution schema.

func (*Execution) QueryFunction

func (e *Execution) QueryFunction() *FunctionQuery

QueryFunction queries the "function" edge of the Execution entity.

func (*Execution) QueryTenant

func (e *Execution) QueryTenant() *TenantQuery

QueryTenant queries the "tenant" edge of the Execution entity.

func (*Execution) String

func (e *Execution) String() string

String implements the fmt.Stringer.

func (*Execution) Unwrap

func (e *Execution) Unwrap() *Execution

Unwrap unwraps the Execution 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 (*Execution) Update

func (e *Execution) Update() *ExecutionUpdateOne

Update returns a builder for updating this Execution. Note that you need to call Execution.Unwrap() before calling this method if this Execution was returned from a transaction, and the transaction was committed or rolled back.

func (*Execution) Value

func (e *Execution) Value(name string) (ent.Value, error)

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

type ExecutionClient

type ExecutionClient struct {
	// contains filtered or unexported fields
}

ExecutionClient is a client for the Execution schema.

func NewExecutionClient

func NewExecutionClient(c config) *ExecutionClient

NewExecutionClient returns a client for the Execution from the given config.

func (*ExecutionClient) Create

func (c *ExecutionClient) Create() *ExecutionCreate

Create returns a builder for creating a Execution entity.

func (*ExecutionClient) CreateBulk

func (c *ExecutionClient) CreateBulk(builders ...*ExecutionCreate) *ExecutionCreateBulk

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

func (*ExecutionClient) Delete

func (c *ExecutionClient) Delete() *ExecutionDelete

Delete returns a delete builder for Execution.

func (*ExecutionClient) DeleteOne

func (c *ExecutionClient) DeleteOne(e *Execution) *ExecutionDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ExecutionClient) DeleteOneID

func (c *ExecutionClient) DeleteOneID(id uuid.UUID) *ExecutionDeleteOne

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

func (*ExecutionClient) Get

func (c *ExecutionClient) Get(ctx context.Context, id uuid.UUID) (*Execution, error)

Get returns a Execution entity by its id.

func (*ExecutionClient) GetX

func (c *ExecutionClient) GetX(ctx context.Context, id uuid.UUID) *Execution

GetX is like Get, but panics if an error occurs.

func (*ExecutionClient) Hooks

func (c *ExecutionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ExecutionClient) Intercept

func (c *ExecutionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `execution.Intercept(f(g(h())))`.

func (*ExecutionClient) Interceptors

func (c *ExecutionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ExecutionClient) MapCreateBulk

func (c *ExecutionClient) MapCreateBulk(slice any, setFunc func(*ExecutionCreate, int)) *ExecutionCreateBulk

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 (*ExecutionClient) Query

func (c *ExecutionClient) Query() *ExecutionQuery

Query returns a query builder for Execution.

func (*ExecutionClient) QueryFunction

func (c *ExecutionClient) QueryFunction(e *Execution) *FunctionQuery

QueryFunction queries the function edge of a Execution.

func (*ExecutionClient) QueryTenant

func (c *ExecutionClient) QueryTenant(e *Execution) *TenantQuery

QueryTenant queries the tenant edge of a Execution.

func (*ExecutionClient) Update

func (c *ExecutionClient) Update() *ExecutionUpdate

Update returns an update builder for Execution.

func (*ExecutionClient) UpdateOne

func (c *ExecutionClient) UpdateOne(e *Execution) *ExecutionUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ExecutionClient) UpdateOneID

func (c *ExecutionClient) UpdateOneID(id uuid.UUID) *ExecutionUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ExecutionClient) Use

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

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `execution.Hooks(f(g(h())))`.

type ExecutionCreate

type ExecutionCreate struct {
	// contains filtered or unexported fields
}

ExecutionCreate is the builder for creating a Execution entity.

func (*ExecutionCreate) Exec

func (ec *ExecutionCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ExecutionCreate) ExecX

func (ec *ExecutionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ExecutionCreate) Mutation

func (ec *ExecutionCreate) Mutation() *ExecutionMutation

Mutation returns the ExecutionMutation object of the builder.

func (*ExecutionCreate) Save

func (ec *ExecutionCreate) Save(ctx context.Context) (*Execution, error)

Save creates the Execution in the database.

func (*ExecutionCreate) SaveX

func (ec *ExecutionCreate) SaveX(ctx context.Context) *Execution

SaveX calls Save and panics if Save returns an error.

func (*ExecutionCreate) SetBilledDurationMs

func (ec *ExecutionCreate) SetBilledDurationMs(i int64) *ExecutionCreate

SetBilledDurationMs sets the "billed_duration_ms" field.

func (*ExecutionCreate) SetCompletedAt

func (ec *ExecutionCreate) SetCompletedAt(t time.Time) *ExecutionCreate

SetCompletedAt sets the "completed_at" field.

func (*ExecutionCreate) SetCreatedAt

func (ec *ExecutionCreate) SetCreatedAt(t time.Time) *ExecutionCreate

SetCreatedAt sets the "created_at" field.

func (*ExecutionCreate) SetDurationMs

func (ec *ExecutionCreate) SetDurationMs(i int64) *ExecutionCreate

SetDurationMs sets the "duration_ms" field.

func (*ExecutionCreate) SetError

func (ec *ExecutionCreate) SetError(s string) *ExecutionCreate

SetError sets the "error" field.

func (*ExecutionCreate) SetFunction

func (ec *ExecutionCreate) SetFunction(f *Function) *ExecutionCreate

SetFunction sets the "function" edge to the Function entity.

func (*ExecutionCreate) SetFunctionID

func (ec *ExecutionCreate) SetFunctionID(u uuid.UUID) *ExecutionCreate

SetFunctionID sets the "function_id" field.

func (*ExecutionCreate) SetID

func (ec *ExecutionCreate) SetID(u uuid.UUID) *ExecutionCreate

SetID sets the "id" field.

func (*ExecutionCreate) SetLogs

func (ec *ExecutionCreate) SetLogs(s []string) *ExecutionCreate

SetLogs sets the "logs" field.

func (*ExecutionCreate) SetMemoryUsedMB

func (ec *ExecutionCreate) SetMemoryUsedMB(i int) *ExecutionCreate

SetMemoryUsedMB sets the "memory_used_mb" field.

func (*ExecutionCreate) SetNillableBilledDurationMs

func (ec *ExecutionCreate) SetNillableBilledDurationMs(i *int64) *ExecutionCreate

SetNillableBilledDurationMs sets the "billed_duration_ms" field if the given value is not nil.

func (*ExecutionCreate) SetNillableCompletedAt

func (ec *ExecutionCreate) SetNillableCompletedAt(t *time.Time) *ExecutionCreate

SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.

func (*ExecutionCreate) SetNillableCreatedAt

func (ec *ExecutionCreate) SetNillableCreatedAt(t *time.Time) *ExecutionCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ExecutionCreate) SetNillableDurationMs

func (ec *ExecutionCreate) SetNillableDurationMs(i *int64) *ExecutionCreate

SetNillableDurationMs sets the "duration_ms" field if the given value is not nil.

func (*ExecutionCreate) SetNillableError

func (ec *ExecutionCreate) SetNillableError(s *string) *ExecutionCreate

SetNillableError sets the "error" field if the given value is not nil.

func (*ExecutionCreate) SetNillableID

func (ec *ExecutionCreate) SetNillableID(u *uuid.UUID) *ExecutionCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*ExecutionCreate) SetNillableMemoryUsedMB

func (ec *ExecutionCreate) SetNillableMemoryUsedMB(i *int) *ExecutionCreate

SetNillableMemoryUsedMB sets the "memory_used_mb" field if the given value is not nil.

func (*ExecutionCreate) SetNillableStartedAt

func (ec *ExecutionCreate) SetNillableStartedAt(t *time.Time) *ExecutionCreate

SetNillableStartedAt sets the "started_at" field if the given value is not nil.

func (*ExecutionCreate) SetNillableStatusCode

func (ec *ExecutionCreate) SetNillableStatusCode(i *int) *ExecutionCreate

SetNillableStatusCode sets the "status_code" field if the given value is not nil.

func (*ExecutionCreate) SetNillableVMID

func (ec *ExecutionCreate) SetNillableVMID(s *string) *ExecutionCreate

SetNillableVMID sets the "vm_id" field if the given value is not nil.

func (*ExecutionCreate) SetRequestID

func (ec *ExecutionCreate) SetRequestID(s string) *ExecutionCreate

SetRequestID sets the "request_id" field.

func (*ExecutionCreate) SetRequestPayload

func (ec *ExecutionCreate) SetRequestPayload(m map[string]interface{}) *ExecutionCreate

SetRequestPayload sets the "request_payload" field.

func (*ExecutionCreate) SetResponsePayload

func (ec *ExecutionCreate) SetResponsePayload(m map[string]interface{}) *ExecutionCreate

SetResponsePayload sets the "response_payload" field.

func (*ExecutionCreate) SetStartedAt

func (ec *ExecutionCreate) SetStartedAt(t time.Time) *ExecutionCreate

SetStartedAt sets the "started_at" field.

func (*ExecutionCreate) SetStatusCode

func (ec *ExecutionCreate) SetStatusCode(i int) *ExecutionCreate

SetStatusCode sets the "status_code" field.

func (*ExecutionCreate) SetTenant

func (ec *ExecutionCreate) SetTenant(t *Tenant) *ExecutionCreate

SetTenant sets the "tenant" edge to the Tenant entity.

func (*ExecutionCreate) SetTenantID

func (ec *ExecutionCreate) SetTenantID(u uuid.UUID) *ExecutionCreate

SetTenantID sets the "tenant_id" field.

func (*ExecutionCreate) SetVMID

func (ec *ExecutionCreate) SetVMID(s string) *ExecutionCreate

SetVMID sets the "vm_id" field.

type ExecutionCreateBulk

type ExecutionCreateBulk struct {
	// contains filtered or unexported fields
}

ExecutionCreateBulk is the builder for creating many Execution entities in bulk.

func (*ExecutionCreateBulk) Exec

func (ecb *ExecutionCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ExecutionCreateBulk) ExecX

func (ecb *ExecutionCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ExecutionCreateBulk) Save

func (ecb *ExecutionCreateBulk) Save(ctx context.Context) ([]*Execution, error)

Save creates the Execution entities in the database.

func (*ExecutionCreateBulk) SaveX

func (ecb *ExecutionCreateBulk) SaveX(ctx context.Context) []*Execution

SaveX is like Save, but panics if an error occurs.

type ExecutionDelete

type ExecutionDelete struct {
	// contains filtered or unexported fields
}

ExecutionDelete is the builder for deleting a Execution entity.

func (*ExecutionDelete) Exec

func (ed *ExecutionDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ExecutionDelete) ExecX

func (ed *ExecutionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ExecutionDelete) Where

Where appends a list predicates to the ExecutionDelete builder.

type ExecutionDeleteOne

type ExecutionDeleteOne struct {
	// contains filtered or unexported fields
}

ExecutionDeleteOne is the builder for deleting a single Execution entity.

func (*ExecutionDeleteOne) Exec

func (edo *ExecutionDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ExecutionDeleteOne) ExecX

func (edo *ExecutionDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ExecutionDeleteOne) Where

Where appends a list predicates to the ExecutionDelete builder.

type ExecutionEdges

type ExecutionEdges struct {
	// Tenant holds the value of the tenant edge.
	Tenant *Tenant `json:"tenant,omitempty"`
	// Function holds the value of the function edge.
	Function *Function `json:"function,omitempty"`
	// contains filtered or unexported fields
}

ExecutionEdges holds the relations/edges for other nodes in the graph.

func (ExecutionEdges) FunctionOrErr

func (e ExecutionEdges) FunctionOrErr() (*Function, error)

FunctionOrErr returns the Function value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ExecutionEdges) TenantOrErr

func (e ExecutionEdges) TenantOrErr() (*Tenant, error)

TenantOrErr returns the Tenant value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ExecutionGroupBy

type ExecutionGroupBy struct {
	// contains filtered or unexported fields
}

ExecutionGroupBy is the group-by builder for Execution entities.

func (*ExecutionGroupBy) Aggregate

func (egb *ExecutionGroupBy) Aggregate(fns ...AggregateFunc) *ExecutionGroupBy

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

func (*ExecutionGroupBy) Bool

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

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

func (*ExecutionGroupBy) BoolX

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

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

func (*ExecutionGroupBy) Bools

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

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

func (*ExecutionGroupBy) BoolsX

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

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

func (*ExecutionGroupBy) Float64

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

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

func (*ExecutionGroupBy) Float64X

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

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

func (*ExecutionGroupBy) Float64s

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

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

func (*ExecutionGroupBy) Float64sX

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

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

func (*ExecutionGroupBy) Int

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

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

func (*ExecutionGroupBy) IntX

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

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

func (*ExecutionGroupBy) Ints

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

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

func (*ExecutionGroupBy) IntsX

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

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

func (*ExecutionGroupBy) Scan

func (egb *ExecutionGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ExecutionGroupBy) ScanX

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

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

func (*ExecutionGroupBy) String

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

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

func (*ExecutionGroupBy) StringX

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

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

func (*ExecutionGroupBy) Strings

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

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

func (*ExecutionGroupBy) StringsX

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

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

type ExecutionMutation

type ExecutionMutation struct {
	// contains filtered or unexported fields
}

ExecutionMutation represents an operation that mutates the Execution nodes in the graph.

func (*ExecutionMutation) AddBilledDurationMs

func (m *ExecutionMutation) AddBilledDurationMs(i int64)

AddBilledDurationMs adds i to the "billed_duration_ms" field.

func (*ExecutionMutation) AddDurationMs

func (m *ExecutionMutation) AddDurationMs(i int64)

AddDurationMs adds i to the "duration_ms" field.

func (*ExecutionMutation) AddField

func (m *ExecutionMutation) 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 (*ExecutionMutation) AddMemoryUsedMB

func (m *ExecutionMutation) AddMemoryUsedMB(i int)

AddMemoryUsedMB adds i to the "memory_used_mb" field.

func (*ExecutionMutation) AddStatusCode

func (m *ExecutionMutation) AddStatusCode(i int)

AddStatusCode adds i to the "status_code" field.

func (*ExecutionMutation) AddedBilledDurationMs

func (m *ExecutionMutation) AddedBilledDurationMs() (r int64, exists bool)

AddedBilledDurationMs returns the value that was added to the "billed_duration_ms" field in this mutation.

func (*ExecutionMutation) AddedDurationMs

func (m *ExecutionMutation) AddedDurationMs() (r int64, exists bool)

AddedDurationMs returns the value that was added to the "duration_ms" field in this mutation.

func (*ExecutionMutation) AddedEdges

func (m *ExecutionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ExecutionMutation) AddedField

func (m *ExecutionMutation) 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 (*ExecutionMutation) AddedFields

func (m *ExecutionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ExecutionMutation) AddedIDs

func (m *ExecutionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ExecutionMutation) AddedMemoryUsedMB

func (m *ExecutionMutation) AddedMemoryUsedMB() (r int, exists bool)

AddedMemoryUsedMB returns the value that was added to the "memory_used_mb" field in this mutation.

func (*ExecutionMutation) AddedStatusCode

func (m *ExecutionMutation) AddedStatusCode() (r int, exists bool)

AddedStatusCode returns the value that was added to the "status_code" field in this mutation.

func (*ExecutionMutation) AppendLogs

func (m *ExecutionMutation) AppendLogs(s []string)

AppendLogs adds s to the "logs" field.

func (*ExecutionMutation) AppendedLogs

func (m *ExecutionMutation) AppendedLogs() ([]string, bool)

AppendedLogs returns the list of values that were appended to the "logs" field in this mutation.

func (*ExecutionMutation) BilledDurationMs

func (m *ExecutionMutation) BilledDurationMs() (r int64, exists bool)

BilledDurationMs returns the value of the "billed_duration_ms" field in the mutation.

func (*ExecutionMutation) ClearCompletedAt

func (m *ExecutionMutation) ClearCompletedAt()

ClearCompletedAt clears the value of the "completed_at" field.

func (*ExecutionMutation) ClearEdge

func (m *ExecutionMutation) 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 (*ExecutionMutation) ClearError

func (m *ExecutionMutation) ClearError()

ClearError clears the value of the "error" field.

func (*ExecutionMutation) ClearField

func (m *ExecutionMutation) 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 (*ExecutionMutation) ClearFunction

func (m *ExecutionMutation) ClearFunction()

ClearFunction clears the "function" edge to the Function entity.

func (*ExecutionMutation) ClearLogs

func (m *ExecutionMutation) ClearLogs()

ClearLogs clears the value of the "logs" field.

func (*ExecutionMutation) ClearRequestPayload

func (m *ExecutionMutation) ClearRequestPayload()

ClearRequestPayload clears the value of the "request_payload" field.

func (*ExecutionMutation) ClearResponsePayload

func (m *ExecutionMutation) ClearResponsePayload()

ClearResponsePayload clears the value of the "response_payload" field.

func (*ExecutionMutation) ClearTenant

func (m *ExecutionMutation) ClearTenant()

ClearTenant clears the "tenant" edge to the Tenant entity.

func (*ExecutionMutation) ClearVMID

func (m *ExecutionMutation) ClearVMID()

ClearVMID clears the value of the "vm_id" field.

func (*ExecutionMutation) ClearedEdges

func (m *ExecutionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ExecutionMutation) ClearedFields

func (m *ExecutionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ExecutionMutation) Client

func (m ExecutionMutation) 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 (*ExecutionMutation) CompletedAt

func (m *ExecutionMutation) CompletedAt() (r time.Time, exists bool)

CompletedAt returns the value of the "completed_at" field in the mutation.

func (*ExecutionMutation) CompletedAtCleared

func (m *ExecutionMutation) CompletedAtCleared() bool

CompletedAtCleared returns if the "completed_at" field was cleared in this mutation.

func (*ExecutionMutation) CreatedAt

func (m *ExecutionMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*ExecutionMutation) DurationMs

func (m *ExecutionMutation) DurationMs() (r int64, exists bool)

DurationMs returns the value of the "duration_ms" field in the mutation.

func (*ExecutionMutation) EdgeCleared

func (m *ExecutionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ExecutionMutation) Error

func (m *ExecutionMutation) Error() (r string, exists bool)

Error returns the value of the "error" field in the mutation.

func (*ExecutionMutation) ErrorCleared

func (m *ExecutionMutation) ErrorCleared() bool

ErrorCleared returns if the "error" field was cleared in this mutation.

func (*ExecutionMutation) Field

func (m *ExecutionMutation) 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 (*ExecutionMutation) FieldCleared

func (m *ExecutionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ExecutionMutation) Fields

func (m *ExecutionMutation) 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 (*ExecutionMutation) FunctionCleared

func (m *ExecutionMutation) FunctionCleared() bool

FunctionCleared reports if the "function" edge to the Function entity was cleared.

func (*ExecutionMutation) FunctionID

func (m *ExecutionMutation) FunctionID() (r uuid.UUID, exists bool)

FunctionID returns the value of the "function_id" field in the mutation.

func (*ExecutionMutation) FunctionIDs

func (m *ExecutionMutation) FunctionIDs() (ids []uuid.UUID)

FunctionIDs returns the "function" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use FunctionID instead. It exists only for internal usage by the builders.

func (*ExecutionMutation) ID

func (m *ExecutionMutation) ID() (id uuid.UUID, 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 (*ExecutionMutation) IDs

func (m *ExecutionMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*ExecutionMutation) Logs

func (m *ExecutionMutation) Logs() (r []string, exists bool)

Logs returns the value of the "logs" field in the mutation.

func (*ExecutionMutation) LogsCleared

func (m *ExecutionMutation) LogsCleared() bool

LogsCleared returns if the "logs" field was cleared in this mutation.

func (*ExecutionMutation) MemoryUsedMB

func (m *ExecutionMutation) MemoryUsedMB() (r int, exists bool)

MemoryUsedMB returns the value of the "memory_used_mb" field in the mutation.

func (*ExecutionMutation) OldBilledDurationMs

func (m *ExecutionMutation) OldBilledDurationMs(ctx context.Context) (v int64, err error)

OldBilledDurationMs returns the old "billed_duration_ms" field's value of the Execution entity. If the Execution 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 (*ExecutionMutation) OldCompletedAt

func (m *ExecutionMutation) OldCompletedAt(ctx context.Context) (v time.Time, err error)

OldCompletedAt returns the old "completed_at" field's value of the Execution entity. If the Execution 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 (*ExecutionMutation) OldCreatedAt

func (m *ExecutionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Execution entity. If the Execution 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 (*ExecutionMutation) OldDurationMs

func (m *ExecutionMutation) OldDurationMs(ctx context.Context) (v int64, err error)

OldDurationMs returns the old "duration_ms" field's value of the Execution entity. If the Execution 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 (*ExecutionMutation) OldError

func (m *ExecutionMutation) OldError(ctx context.Context) (v string, err error)

OldError returns the old "error" field's value of the Execution entity. If the Execution 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 (*ExecutionMutation) OldField

func (m *ExecutionMutation) 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 (*ExecutionMutation) OldFunctionID

func (m *ExecutionMutation) OldFunctionID(ctx context.Context) (v uuid.UUID, err error)

OldFunctionID returns the old "function_id" field's value of the Execution entity. If the Execution 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 (*ExecutionMutation) OldLogs

func (m *ExecutionMutation) OldLogs(ctx context.Context) (v []string, err error)

OldLogs returns the old "logs" field's value of the Execution entity. If the Execution 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 (*ExecutionMutation) OldMemoryUsedMB

func (m *ExecutionMutation) OldMemoryUsedMB(ctx context.Context) (v int, err error)

OldMemoryUsedMB returns the old "memory_used_mb" field's value of the Execution entity. If the Execution 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 (*ExecutionMutation) OldRequestID

func (m *ExecutionMutation) OldRequestID(ctx context.Context) (v string, err error)

OldRequestID returns the old "request_id" field's value of the Execution entity. If the Execution 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 (*ExecutionMutation) OldRequestPayload

func (m *ExecutionMutation) OldRequestPayload(ctx context.Context) (v map[string]interface{}, err error)

OldRequestPayload returns the old "request_payload" field's value of the Execution entity. If the Execution 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 (*ExecutionMutation) OldResponsePayload

func (m *ExecutionMutation) OldResponsePayload(ctx context.Context) (v map[string]interface{}, err error)

OldResponsePayload returns the old "response_payload" field's value of the Execution entity. If the Execution 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 (*ExecutionMutation) OldStartedAt

func (m *ExecutionMutation) OldStartedAt(ctx context.Context) (v time.Time, err error)

OldStartedAt returns the old "started_at" field's value of the Execution entity. If the Execution 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 (*ExecutionMutation) OldStatusCode

func (m *ExecutionMutation) OldStatusCode(ctx context.Context) (v int, err error)

OldStatusCode returns the old "status_code" field's value of the Execution entity. If the Execution 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 (*ExecutionMutation) OldTenantID

func (m *ExecutionMutation) OldTenantID(ctx context.Context) (v uuid.UUID, err error)

OldTenantID returns the old "tenant_id" field's value of the Execution entity. If the Execution 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 (*ExecutionMutation) OldVMID

func (m *ExecutionMutation) OldVMID(ctx context.Context) (v string, err error)

OldVMID returns the old "vm_id" field's value of the Execution entity. If the Execution 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 (*ExecutionMutation) Op

func (m *ExecutionMutation) Op() Op

Op returns the operation name.

func (*ExecutionMutation) RemovedEdges

func (m *ExecutionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ExecutionMutation) RemovedIDs

func (m *ExecutionMutation) 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 (*ExecutionMutation) RequestID

func (m *ExecutionMutation) RequestID() (r string, exists bool)

RequestID returns the value of the "request_id" field in the mutation.

func (*ExecutionMutation) RequestPayload

func (m *ExecutionMutation) RequestPayload() (r map[string]interface{}, exists bool)

RequestPayload returns the value of the "request_payload" field in the mutation.

func (*ExecutionMutation) RequestPayloadCleared

func (m *ExecutionMutation) RequestPayloadCleared() bool

RequestPayloadCleared returns if the "request_payload" field was cleared in this mutation.

func (*ExecutionMutation) ResetBilledDurationMs

func (m *ExecutionMutation) ResetBilledDurationMs()

ResetBilledDurationMs resets all changes to the "billed_duration_ms" field.

func (*ExecutionMutation) ResetCompletedAt

func (m *ExecutionMutation) ResetCompletedAt()

ResetCompletedAt resets all changes to the "completed_at" field.

func (*ExecutionMutation) ResetCreatedAt

func (m *ExecutionMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ExecutionMutation) ResetDurationMs

func (m *ExecutionMutation) ResetDurationMs()

ResetDurationMs resets all changes to the "duration_ms" field.

func (*ExecutionMutation) ResetEdge

func (m *ExecutionMutation) 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 (*ExecutionMutation) ResetError

func (m *ExecutionMutation) ResetError()

ResetError resets all changes to the "error" field.

func (*ExecutionMutation) ResetField

func (m *ExecutionMutation) 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 (*ExecutionMutation) ResetFunction

func (m *ExecutionMutation) ResetFunction()

ResetFunction resets all changes to the "function" edge.

func (*ExecutionMutation) ResetFunctionID

func (m *ExecutionMutation) ResetFunctionID()

ResetFunctionID resets all changes to the "function_id" field.

func (*ExecutionMutation) ResetLogs

func (m *ExecutionMutation) ResetLogs()

ResetLogs resets all changes to the "logs" field.

func (*ExecutionMutation) ResetMemoryUsedMB

func (m *ExecutionMutation) ResetMemoryUsedMB()

ResetMemoryUsedMB resets all changes to the "memory_used_mb" field.

func (*ExecutionMutation) ResetRequestID

func (m *ExecutionMutation) ResetRequestID()

ResetRequestID resets all changes to the "request_id" field.

func (*ExecutionMutation) ResetRequestPayload

func (m *ExecutionMutation) ResetRequestPayload()

ResetRequestPayload resets all changes to the "request_payload" field.

func (*ExecutionMutation) ResetResponsePayload

func (m *ExecutionMutation) ResetResponsePayload()

ResetResponsePayload resets all changes to the "response_payload" field.

func (*ExecutionMutation) ResetStartedAt

func (m *ExecutionMutation) ResetStartedAt()

ResetStartedAt resets all changes to the "started_at" field.

func (*ExecutionMutation) ResetStatusCode

func (m *ExecutionMutation) ResetStatusCode()

ResetStatusCode resets all changes to the "status_code" field.

func (*ExecutionMutation) ResetTenant

func (m *ExecutionMutation) ResetTenant()

ResetTenant resets all changes to the "tenant" edge.

func (*ExecutionMutation) ResetTenantID

func (m *ExecutionMutation) ResetTenantID()

ResetTenantID resets all changes to the "tenant_id" field.

func (*ExecutionMutation) ResetVMID

func (m *ExecutionMutation) ResetVMID()

ResetVMID resets all changes to the "vm_id" field.

func (*ExecutionMutation) ResponsePayload

func (m *ExecutionMutation) ResponsePayload() (r map[string]interface{}, exists bool)

ResponsePayload returns the value of the "response_payload" field in the mutation.

func (*ExecutionMutation) ResponsePayloadCleared

func (m *ExecutionMutation) ResponsePayloadCleared() bool

ResponsePayloadCleared returns if the "response_payload" field was cleared in this mutation.

func (*ExecutionMutation) SetBilledDurationMs

func (m *ExecutionMutation) SetBilledDurationMs(i int64)

SetBilledDurationMs sets the "billed_duration_ms" field.

func (*ExecutionMutation) SetCompletedAt

func (m *ExecutionMutation) SetCompletedAt(t time.Time)

SetCompletedAt sets the "completed_at" field.

func (*ExecutionMutation) SetCreatedAt

func (m *ExecutionMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*ExecutionMutation) SetDurationMs

func (m *ExecutionMutation) SetDurationMs(i int64)

SetDurationMs sets the "duration_ms" field.

func (*ExecutionMutation) SetError

func (m *ExecutionMutation) SetError(s string)

SetError sets the "error" field.

func (*ExecutionMutation) SetField

func (m *ExecutionMutation) 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 (*ExecutionMutation) SetFunctionID

func (m *ExecutionMutation) SetFunctionID(u uuid.UUID)

SetFunctionID sets the "function_id" field.

func (*ExecutionMutation) SetID

func (m *ExecutionMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Execution entities.

func (*ExecutionMutation) SetLogs

func (m *ExecutionMutation) SetLogs(s []string)

SetLogs sets the "logs" field.

func (*ExecutionMutation) SetMemoryUsedMB

func (m *ExecutionMutation) SetMemoryUsedMB(i int)

SetMemoryUsedMB sets the "memory_used_mb" field.

func (*ExecutionMutation) SetOp

func (m *ExecutionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ExecutionMutation) SetRequestID

func (m *ExecutionMutation) SetRequestID(s string)

SetRequestID sets the "request_id" field.

func (*ExecutionMutation) SetRequestPayload

func (m *ExecutionMutation) SetRequestPayload(value map[string]interface{})

SetRequestPayload sets the "request_payload" field.

func (*ExecutionMutation) SetResponsePayload

func (m *ExecutionMutation) SetResponsePayload(value map[string]interface{})

SetResponsePayload sets the "response_payload" field.

func (*ExecutionMutation) SetStartedAt

func (m *ExecutionMutation) SetStartedAt(t time.Time)

SetStartedAt sets the "started_at" field.

func (*ExecutionMutation) SetStatusCode

func (m *ExecutionMutation) SetStatusCode(i int)

SetStatusCode sets the "status_code" field.

func (*ExecutionMutation) SetTenantID

func (m *ExecutionMutation) SetTenantID(u uuid.UUID)

SetTenantID sets the "tenant_id" field.

func (*ExecutionMutation) SetVMID

func (m *ExecutionMutation) SetVMID(s string)

SetVMID sets the "vm_id" field.

func (*ExecutionMutation) StartedAt

func (m *ExecutionMutation) StartedAt() (r time.Time, exists bool)

StartedAt returns the value of the "started_at" field in the mutation.

func (*ExecutionMutation) StatusCode

func (m *ExecutionMutation) StatusCode() (r int, exists bool)

StatusCode returns the value of the "status_code" field in the mutation.

func (*ExecutionMutation) TenantCleared

func (m *ExecutionMutation) TenantCleared() bool

TenantCleared reports if the "tenant" edge to the Tenant entity was cleared.

func (*ExecutionMutation) TenantID

func (m *ExecutionMutation) TenantID() (r uuid.UUID, exists bool)

TenantID returns the value of the "tenant_id" field in the mutation.

func (*ExecutionMutation) TenantIDs

func (m *ExecutionMutation) TenantIDs() (ids []uuid.UUID)

TenantIDs returns the "tenant" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TenantID instead. It exists only for internal usage by the builders.

func (ExecutionMutation) Tx

func (m ExecutionMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ExecutionMutation) Type

func (m *ExecutionMutation) Type() string

Type returns the node type of this mutation (Execution).

func (*ExecutionMutation) VMID

func (m *ExecutionMutation) VMID() (r string, exists bool)

VMID returns the value of the "vm_id" field in the mutation.

func (*ExecutionMutation) VMIDCleared

func (m *ExecutionMutation) VMIDCleared() bool

VMIDCleared returns if the "vm_id" field was cleared in this mutation.

func (*ExecutionMutation) Where

func (m *ExecutionMutation) Where(ps ...predicate.Execution)

Where appends a list predicates to the ExecutionMutation builder.

func (*ExecutionMutation) WhereP

func (m *ExecutionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ExecutionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ExecutionQuery

type ExecutionQuery struct {
	// contains filtered or unexported fields
}

ExecutionQuery is the builder for querying Execution entities.

func (*ExecutionQuery) Aggregate

func (eq *ExecutionQuery) Aggregate(fns ...AggregateFunc) *ExecutionSelect

Aggregate returns a ExecutionSelect configured with the given aggregations.

func (*ExecutionQuery) All

func (eq *ExecutionQuery) All(ctx context.Context) ([]*Execution, error)

All executes the query and returns a list of Executions.

func (*ExecutionQuery) AllX

func (eq *ExecutionQuery) AllX(ctx context.Context) []*Execution

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

func (*ExecutionQuery) Clone

func (eq *ExecutionQuery) Clone() *ExecutionQuery

Clone returns a duplicate of the ExecutionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ExecutionQuery) Count

func (eq *ExecutionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ExecutionQuery) CountX

func (eq *ExecutionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ExecutionQuery) Exist

func (eq *ExecutionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ExecutionQuery) ExistX

func (eq *ExecutionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ExecutionQuery) First

func (eq *ExecutionQuery) First(ctx context.Context) (*Execution, error)

First returns the first Execution entity from the query. Returns a *NotFoundError when no Execution was found.

func (*ExecutionQuery) FirstID

func (eq *ExecutionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Execution ID from the query. Returns a *NotFoundError when no Execution ID was found.

func (*ExecutionQuery) FirstIDX

func (eq *ExecutionQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*ExecutionQuery) FirstX

func (eq *ExecutionQuery) FirstX(ctx context.Context) *Execution

FirstX is like First, but panics if an error occurs.

func (*ExecutionQuery) GroupBy

func (eq *ExecutionQuery) GroupBy(field string, fields ...string) *ExecutionGroupBy

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 {
	TenantID uuid.UUID `json:"tenant_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Execution.Query().
	GroupBy(execution.FieldTenantID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ExecutionQuery) IDs

func (eq *ExecutionQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Execution IDs.

func (*ExecutionQuery) IDsX

func (eq *ExecutionQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*ExecutionQuery) Limit

func (eq *ExecutionQuery) Limit(limit int) *ExecutionQuery

Limit the number of records to be returned by this query.

func (*ExecutionQuery) Offset

func (eq *ExecutionQuery) Offset(offset int) *ExecutionQuery

Offset to start from.

func (*ExecutionQuery) Only

func (eq *ExecutionQuery) Only(ctx context.Context) (*Execution, error)

Only returns a single Execution entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Execution entity is found. Returns a *NotFoundError when no Execution entities are found.

func (*ExecutionQuery) OnlyID

func (eq *ExecutionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Execution ID in the query. Returns a *NotSingularError when more than one Execution ID is found. Returns a *NotFoundError when no entities are found.

func (*ExecutionQuery) OnlyIDX

func (eq *ExecutionQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ExecutionQuery) OnlyX

func (eq *ExecutionQuery) OnlyX(ctx context.Context) *Execution

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

func (*ExecutionQuery) Order

Order specifies how the records should be ordered.

func (*ExecutionQuery) QueryFunction

func (eq *ExecutionQuery) QueryFunction() *FunctionQuery

QueryFunction chains the current query on the "function" edge.

func (*ExecutionQuery) QueryTenant

func (eq *ExecutionQuery) QueryTenant() *TenantQuery

QueryTenant chains the current query on the "tenant" edge.

func (*ExecutionQuery) Select

func (eq *ExecutionQuery) Select(fields ...string) *ExecutionSelect

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 {
	TenantID uuid.UUID `json:"tenant_id,omitempty"`
}

client.Execution.Query().
	Select(execution.FieldTenantID).
	Scan(ctx, &v)

func (*ExecutionQuery) Unique

func (eq *ExecutionQuery) Unique(unique bool) *ExecutionQuery

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 (*ExecutionQuery) Where

Where adds a new predicate for the ExecutionQuery builder.

func (*ExecutionQuery) WithFunction

func (eq *ExecutionQuery) WithFunction(opts ...func(*FunctionQuery)) *ExecutionQuery

WithFunction tells the query-builder to eager-load the nodes that are connected to the "function" edge. The optional arguments are used to configure the query builder of the edge.

func (*ExecutionQuery) WithTenant

func (eq *ExecutionQuery) WithTenant(opts ...func(*TenantQuery)) *ExecutionQuery

WithTenant tells the query-builder to eager-load the nodes that are connected to the "tenant" edge. The optional arguments are used to configure the query builder of the edge.

type ExecutionSelect

type ExecutionSelect struct {
	*ExecutionQuery
	// contains filtered or unexported fields
}

ExecutionSelect is the builder for selecting fields of Execution entities.

func (*ExecutionSelect) Aggregate

func (es *ExecutionSelect) Aggregate(fns ...AggregateFunc) *ExecutionSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ExecutionSelect) Bool

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

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

func (*ExecutionSelect) BoolX

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

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

func (*ExecutionSelect) Bools

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

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

func (*ExecutionSelect) BoolsX

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

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

func (*ExecutionSelect) Float64

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

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

func (*ExecutionSelect) Float64X

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

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

func (*ExecutionSelect) Float64s

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

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

func (*ExecutionSelect) Float64sX

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

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

func (*ExecutionSelect) Int

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

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

func (*ExecutionSelect) IntX

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

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

func (*ExecutionSelect) Ints

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

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

func (*ExecutionSelect) IntsX

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

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

func (*ExecutionSelect) Scan

func (es *ExecutionSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ExecutionSelect) ScanX

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

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

func (*ExecutionSelect) String

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

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

func (*ExecutionSelect) StringX

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

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

func (*ExecutionSelect) Strings

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

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

func (*ExecutionSelect) StringsX

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

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

type ExecutionUpdate

type ExecutionUpdate struct {
	// contains filtered or unexported fields
}

ExecutionUpdate is the builder for updating Execution entities.

func (*ExecutionUpdate) AddBilledDurationMs

func (eu *ExecutionUpdate) AddBilledDurationMs(i int64) *ExecutionUpdate

AddBilledDurationMs adds i to the "billed_duration_ms" field.

func (*ExecutionUpdate) AddDurationMs

func (eu *ExecutionUpdate) AddDurationMs(i int64) *ExecutionUpdate

AddDurationMs adds i to the "duration_ms" field.

func (*ExecutionUpdate) AddMemoryUsedMB

func (eu *ExecutionUpdate) AddMemoryUsedMB(i int) *ExecutionUpdate

AddMemoryUsedMB adds i to the "memory_used_mb" field.

func (*ExecutionUpdate) AddStatusCode

func (eu *ExecutionUpdate) AddStatusCode(i int) *ExecutionUpdate

AddStatusCode adds i to the "status_code" field.

func (*ExecutionUpdate) AppendLogs

func (eu *ExecutionUpdate) AppendLogs(s []string) *ExecutionUpdate

AppendLogs appends s to the "logs" field.

func (*ExecutionUpdate) ClearCompletedAt

func (eu *ExecutionUpdate) ClearCompletedAt() *ExecutionUpdate

ClearCompletedAt clears the value of the "completed_at" field.

func (*ExecutionUpdate) ClearError

func (eu *ExecutionUpdate) ClearError() *ExecutionUpdate

ClearError clears the value of the "error" field.

func (*ExecutionUpdate) ClearFunction

func (eu *ExecutionUpdate) ClearFunction() *ExecutionUpdate

ClearFunction clears the "function" edge to the Function entity.

func (*ExecutionUpdate) ClearLogs

func (eu *ExecutionUpdate) ClearLogs() *ExecutionUpdate

ClearLogs clears the value of the "logs" field.

func (*ExecutionUpdate) ClearRequestPayload

func (eu *ExecutionUpdate) ClearRequestPayload() *ExecutionUpdate

ClearRequestPayload clears the value of the "request_payload" field.

func (*ExecutionUpdate) ClearResponsePayload

func (eu *ExecutionUpdate) ClearResponsePayload() *ExecutionUpdate

ClearResponsePayload clears the value of the "response_payload" field.

func (*ExecutionUpdate) ClearTenant

func (eu *ExecutionUpdate) ClearTenant() *ExecutionUpdate

ClearTenant clears the "tenant" edge to the Tenant entity.

func (*ExecutionUpdate) ClearVMID

func (eu *ExecutionUpdate) ClearVMID() *ExecutionUpdate

ClearVMID clears the value of the "vm_id" field.

func (*ExecutionUpdate) Exec

func (eu *ExecutionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ExecutionUpdate) ExecX

func (eu *ExecutionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ExecutionUpdate) Mutation

func (eu *ExecutionUpdate) Mutation() *ExecutionMutation

Mutation returns the ExecutionMutation object of the builder.

func (*ExecutionUpdate) Save

func (eu *ExecutionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ExecutionUpdate) SaveX

func (eu *ExecutionUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ExecutionUpdate) SetBilledDurationMs

func (eu *ExecutionUpdate) SetBilledDurationMs(i int64) *ExecutionUpdate

SetBilledDurationMs sets the "billed_duration_ms" field.

func (*ExecutionUpdate) SetCompletedAt

func (eu *ExecutionUpdate) SetCompletedAt(t time.Time) *ExecutionUpdate

SetCompletedAt sets the "completed_at" field.

func (*ExecutionUpdate) SetDurationMs

func (eu *ExecutionUpdate) SetDurationMs(i int64) *ExecutionUpdate

SetDurationMs sets the "duration_ms" field.

func (*ExecutionUpdate) SetError

func (eu *ExecutionUpdate) SetError(s string) *ExecutionUpdate

SetError sets the "error" field.

func (*ExecutionUpdate) SetFunction

func (eu *ExecutionUpdate) SetFunction(f *Function) *ExecutionUpdate

SetFunction sets the "function" edge to the Function entity.

func (*ExecutionUpdate) SetFunctionID

func (eu *ExecutionUpdate) SetFunctionID(u uuid.UUID) *ExecutionUpdate

SetFunctionID sets the "function_id" field.

func (*ExecutionUpdate) SetLogs

func (eu *ExecutionUpdate) SetLogs(s []string) *ExecutionUpdate

SetLogs sets the "logs" field.

func (*ExecutionUpdate) SetMemoryUsedMB

func (eu *ExecutionUpdate) SetMemoryUsedMB(i int) *ExecutionUpdate

SetMemoryUsedMB sets the "memory_used_mb" field.

func (*ExecutionUpdate) SetNillableBilledDurationMs

func (eu *ExecutionUpdate) SetNillableBilledDurationMs(i *int64) *ExecutionUpdate

SetNillableBilledDurationMs sets the "billed_duration_ms" field if the given value is not nil.

func (*ExecutionUpdate) SetNillableCompletedAt

func (eu *ExecutionUpdate) SetNillableCompletedAt(t *time.Time) *ExecutionUpdate

SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.

func (*ExecutionUpdate) SetNillableDurationMs

func (eu *ExecutionUpdate) SetNillableDurationMs(i *int64) *ExecutionUpdate

SetNillableDurationMs sets the "duration_ms" field if the given value is not nil.

func (*ExecutionUpdate) SetNillableError

func (eu *ExecutionUpdate) SetNillableError(s *string) *ExecutionUpdate

SetNillableError sets the "error" field if the given value is not nil.

func (*ExecutionUpdate) SetNillableFunctionID

func (eu *ExecutionUpdate) SetNillableFunctionID(u *uuid.UUID) *ExecutionUpdate

SetNillableFunctionID sets the "function_id" field if the given value is not nil.

func (*ExecutionUpdate) SetNillableMemoryUsedMB

func (eu *ExecutionUpdate) SetNillableMemoryUsedMB(i *int) *ExecutionUpdate

SetNillableMemoryUsedMB sets the "memory_used_mb" field if the given value is not nil.

func (*ExecutionUpdate) SetNillableRequestID

func (eu *ExecutionUpdate) SetNillableRequestID(s *string) *ExecutionUpdate

SetNillableRequestID sets the "request_id" field if the given value is not nil.

func (*ExecutionUpdate) SetNillableStartedAt

func (eu *ExecutionUpdate) SetNillableStartedAt(t *time.Time) *ExecutionUpdate

SetNillableStartedAt sets the "started_at" field if the given value is not nil.

func (*ExecutionUpdate) SetNillableStatusCode

func (eu *ExecutionUpdate) SetNillableStatusCode(i *int) *ExecutionUpdate

SetNillableStatusCode sets the "status_code" field if the given value is not nil.

func (*ExecutionUpdate) SetNillableTenantID

func (eu *ExecutionUpdate) SetNillableTenantID(u *uuid.UUID) *ExecutionUpdate

SetNillableTenantID sets the "tenant_id" field if the given value is not nil.

func (*ExecutionUpdate) SetNillableVMID

func (eu *ExecutionUpdate) SetNillableVMID(s *string) *ExecutionUpdate

SetNillableVMID sets the "vm_id" field if the given value is not nil.

func (*ExecutionUpdate) SetRequestID

func (eu *ExecutionUpdate) SetRequestID(s string) *ExecutionUpdate

SetRequestID sets the "request_id" field.

func (*ExecutionUpdate) SetRequestPayload

func (eu *ExecutionUpdate) SetRequestPayload(m map[string]interface{}) *ExecutionUpdate

SetRequestPayload sets the "request_payload" field.

func (*ExecutionUpdate) SetResponsePayload

func (eu *ExecutionUpdate) SetResponsePayload(m map[string]interface{}) *ExecutionUpdate

SetResponsePayload sets the "response_payload" field.

func (*ExecutionUpdate) SetStartedAt

func (eu *ExecutionUpdate) SetStartedAt(t time.Time) *ExecutionUpdate

SetStartedAt sets the "started_at" field.

func (*ExecutionUpdate) SetStatusCode

func (eu *ExecutionUpdate) SetStatusCode(i int) *ExecutionUpdate

SetStatusCode sets the "status_code" field.

func (*ExecutionUpdate) SetTenant

func (eu *ExecutionUpdate) SetTenant(t *Tenant) *ExecutionUpdate

SetTenant sets the "tenant" edge to the Tenant entity.

func (*ExecutionUpdate) SetTenantID

func (eu *ExecutionUpdate) SetTenantID(u uuid.UUID) *ExecutionUpdate

SetTenantID sets the "tenant_id" field.

func (*ExecutionUpdate) SetVMID

func (eu *ExecutionUpdate) SetVMID(s string) *ExecutionUpdate

SetVMID sets the "vm_id" field.

func (*ExecutionUpdate) Where

Where appends a list predicates to the ExecutionUpdate builder.

type ExecutionUpdateOne

type ExecutionUpdateOne struct {
	// contains filtered or unexported fields
}

ExecutionUpdateOne is the builder for updating a single Execution entity.

func (*ExecutionUpdateOne) AddBilledDurationMs

func (euo *ExecutionUpdateOne) AddBilledDurationMs(i int64) *ExecutionUpdateOne

AddBilledDurationMs adds i to the "billed_duration_ms" field.

func (*ExecutionUpdateOne) AddDurationMs

func (euo *ExecutionUpdateOne) AddDurationMs(i int64) *ExecutionUpdateOne

AddDurationMs adds i to the "duration_ms" field.

func (*ExecutionUpdateOne) AddMemoryUsedMB

func (euo *ExecutionUpdateOne) AddMemoryUsedMB(i int) *ExecutionUpdateOne

AddMemoryUsedMB adds i to the "memory_used_mb" field.

func (*ExecutionUpdateOne) AddStatusCode

func (euo *ExecutionUpdateOne) AddStatusCode(i int) *ExecutionUpdateOne

AddStatusCode adds i to the "status_code" field.

func (*ExecutionUpdateOne) AppendLogs

func (euo *ExecutionUpdateOne) AppendLogs(s []string) *ExecutionUpdateOne

AppendLogs appends s to the "logs" field.

func (*ExecutionUpdateOne) ClearCompletedAt

func (euo *ExecutionUpdateOne) ClearCompletedAt() *ExecutionUpdateOne

ClearCompletedAt clears the value of the "completed_at" field.

func (*ExecutionUpdateOne) ClearError

func (euo *ExecutionUpdateOne) ClearError() *ExecutionUpdateOne

ClearError clears the value of the "error" field.

func (*ExecutionUpdateOne) ClearFunction

func (euo *ExecutionUpdateOne) ClearFunction() *ExecutionUpdateOne

ClearFunction clears the "function" edge to the Function entity.

func (*ExecutionUpdateOne) ClearLogs

func (euo *ExecutionUpdateOne) ClearLogs() *ExecutionUpdateOne

ClearLogs clears the value of the "logs" field.

func (*ExecutionUpdateOne) ClearRequestPayload

func (euo *ExecutionUpdateOne) ClearRequestPayload() *ExecutionUpdateOne

ClearRequestPayload clears the value of the "request_payload" field.

func (*ExecutionUpdateOne) ClearResponsePayload

func (euo *ExecutionUpdateOne) ClearResponsePayload() *ExecutionUpdateOne

ClearResponsePayload clears the value of the "response_payload" field.

func (*ExecutionUpdateOne) ClearTenant

func (euo *ExecutionUpdateOne) ClearTenant() *ExecutionUpdateOne

ClearTenant clears the "tenant" edge to the Tenant entity.

func (*ExecutionUpdateOne) ClearVMID

func (euo *ExecutionUpdateOne) ClearVMID() *ExecutionUpdateOne

ClearVMID clears the value of the "vm_id" field.

func (*ExecutionUpdateOne) Exec

func (euo *ExecutionUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ExecutionUpdateOne) ExecX

func (euo *ExecutionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ExecutionUpdateOne) Mutation

func (euo *ExecutionUpdateOne) Mutation() *ExecutionMutation

Mutation returns the ExecutionMutation object of the builder.

func (*ExecutionUpdateOne) Save

func (euo *ExecutionUpdateOne) Save(ctx context.Context) (*Execution, error)

Save executes the query and returns the updated Execution entity.

func (*ExecutionUpdateOne) SaveX

func (euo *ExecutionUpdateOne) SaveX(ctx context.Context) *Execution

SaveX is like Save, but panics if an error occurs.

func (*ExecutionUpdateOne) Select

func (euo *ExecutionUpdateOne) Select(field string, fields ...string) *ExecutionUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ExecutionUpdateOne) SetBilledDurationMs

func (euo *ExecutionUpdateOne) SetBilledDurationMs(i int64) *ExecutionUpdateOne

SetBilledDurationMs sets the "billed_duration_ms" field.

func (*ExecutionUpdateOne) SetCompletedAt

func (euo *ExecutionUpdateOne) SetCompletedAt(t time.Time) *ExecutionUpdateOne

SetCompletedAt sets the "completed_at" field.

func (*ExecutionUpdateOne) SetDurationMs

func (euo *ExecutionUpdateOne) SetDurationMs(i int64) *ExecutionUpdateOne

SetDurationMs sets the "duration_ms" field.

func (*ExecutionUpdateOne) SetError

func (euo *ExecutionUpdateOne) SetError(s string) *ExecutionUpdateOne

SetError sets the "error" field.

func (*ExecutionUpdateOne) SetFunction

func (euo *ExecutionUpdateOne) SetFunction(f *Function) *ExecutionUpdateOne

SetFunction sets the "function" edge to the Function entity.

func (*ExecutionUpdateOne) SetFunctionID

func (euo *ExecutionUpdateOne) SetFunctionID(u uuid.UUID) *ExecutionUpdateOne

SetFunctionID sets the "function_id" field.

func (*ExecutionUpdateOne) SetLogs

func (euo *ExecutionUpdateOne) SetLogs(s []string) *ExecutionUpdateOne

SetLogs sets the "logs" field.

func (*ExecutionUpdateOne) SetMemoryUsedMB

func (euo *ExecutionUpdateOne) SetMemoryUsedMB(i int) *ExecutionUpdateOne

SetMemoryUsedMB sets the "memory_used_mb" field.

func (*ExecutionUpdateOne) SetNillableBilledDurationMs

func (euo *ExecutionUpdateOne) SetNillableBilledDurationMs(i *int64) *ExecutionUpdateOne

SetNillableBilledDurationMs sets the "billed_duration_ms" field if the given value is not nil.

func (*ExecutionUpdateOne) SetNillableCompletedAt

func (euo *ExecutionUpdateOne) SetNillableCompletedAt(t *time.Time) *ExecutionUpdateOne

SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.

func (*ExecutionUpdateOne) SetNillableDurationMs

func (euo *ExecutionUpdateOne) SetNillableDurationMs(i *int64) *ExecutionUpdateOne

SetNillableDurationMs sets the "duration_ms" field if the given value is not nil.

func (*ExecutionUpdateOne) SetNillableError

func (euo *ExecutionUpdateOne) SetNillableError(s *string) *ExecutionUpdateOne

SetNillableError sets the "error" field if the given value is not nil.

func (*ExecutionUpdateOne) SetNillableFunctionID

func (euo *ExecutionUpdateOne) SetNillableFunctionID(u *uuid.UUID) *ExecutionUpdateOne

SetNillableFunctionID sets the "function_id" field if the given value is not nil.

func (*ExecutionUpdateOne) SetNillableMemoryUsedMB

func (euo *ExecutionUpdateOne) SetNillableMemoryUsedMB(i *int) *ExecutionUpdateOne

SetNillableMemoryUsedMB sets the "memory_used_mb" field if the given value is not nil.

func (*ExecutionUpdateOne) SetNillableRequestID

func (euo *ExecutionUpdateOne) SetNillableRequestID(s *string) *ExecutionUpdateOne

SetNillableRequestID sets the "request_id" field if the given value is not nil.

func (*ExecutionUpdateOne) SetNillableStartedAt

func (euo *ExecutionUpdateOne) SetNillableStartedAt(t *time.Time) *ExecutionUpdateOne

SetNillableStartedAt sets the "started_at" field if the given value is not nil.

func (*ExecutionUpdateOne) SetNillableStatusCode

func (euo *ExecutionUpdateOne) SetNillableStatusCode(i *int) *ExecutionUpdateOne

SetNillableStatusCode sets the "status_code" field if the given value is not nil.

func (*ExecutionUpdateOne) SetNillableTenantID

func (euo *ExecutionUpdateOne) SetNillableTenantID(u *uuid.UUID) *ExecutionUpdateOne

SetNillableTenantID sets the "tenant_id" field if the given value is not nil.

func (*ExecutionUpdateOne) SetNillableVMID

func (euo *ExecutionUpdateOne) SetNillableVMID(s *string) *ExecutionUpdateOne

SetNillableVMID sets the "vm_id" field if the given value is not nil.

func (*ExecutionUpdateOne) SetRequestID

func (euo *ExecutionUpdateOne) SetRequestID(s string) *ExecutionUpdateOne

SetRequestID sets the "request_id" field.

func (*ExecutionUpdateOne) SetRequestPayload

func (euo *ExecutionUpdateOne) SetRequestPayload(m map[string]interface{}) *ExecutionUpdateOne

SetRequestPayload sets the "request_payload" field.

func (*ExecutionUpdateOne) SetResponsePayload

func (euo *ExecutionUpdateOne) SetResponsePayload(m map[string]interface{}) *ExecutionUpdateOne

SetResponsePayload sets the "response_payload" field.

func (*ExecutionUpdateOne) SetStartedAt

func (euo *ExecutionUpdateOne) SetStartedAt(t time.Time) *ExecutionUpdateOne

SetStartedAt sets the "started_at" field.

func (*ExecutionUpdateOne) SetStatusCode

func (euo *ExecutionUpdateOne) SetStatusCode(i int) *ExecutionUpdateOne

SetStatusCode sets the "status_code" field.

func (*ExecutionUpdateOne) SetTenant

func (euo *ExecutionUpdateOne) SetTenant(t *Tenant) *ExecutionUpdateOne

SetTenant sets the "tenant" edge to the Tenant entity.

func (*ExecutionUpdateOne) SetTenantID

func (euo *ExecutionUpdateOne) SetTenantID(u uuid.UUID) *ExecutionUpdateOne

SetTenantID sets the "tenant_id" field.

func (*ExecutionUpdateOne) SetVMID

func (euo *ExecutionUpdateOne) SetVMID(s string) *ExecutionUpdateOne

SetVMID sets the "vm_id" field.

func (*ExecutionUpdateOne) Where

Where appends a list predicates to the ExecutionUpdate builder.

type Executions

type Executions []*Execution

Executions is a parsable slice of Execution.

type Function

type Function struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// TenantID holds the value of the "tenant_id" field.
	TenantID uuid.UUID `json:"tenant_id,omitempty"`
	// RuntimeID holds the value of the "runtime_id" field.
	RuntimeID uuid.UUID `json:"runtime_id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Handler holds the value of the "handler" field.
	Handler string `json:"handler,omitempty"`
	// CodePath holds the value of the "code_path" field.
	CodePath string `json:"code_path,omitempty"`
	// CodeType holds the value of the "code_type" field.
	CodeType string `json:"code_type,omitempty"`
	// CodeHash holds the value of the "code_hash" field.
	CodeHash string `json:"code_hash,omitempty"`
	// Timeout holds the value of the "timeout" field.
	Timeout int `json:"timeout,omitempty"`
	// Memory holds the value of the "memory" field.
	Memory int `json:"memory,omitempty"`
	// Environment holds the value of the "environment" field.
	Environment map[string]string `json:"environment,omitempty"`
	// Status holds the value of the "status" field.
	Status string `json:"status,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the FunctionQuery when eager-loading is set.
	Edges FunctionEdges `json:"edges"`
	// contains filtered or unexported fields
}

Function is the model entity for the Function schema.

func (*Function) QueryExecutions

func (f *Function) QueryExecutions() *ExecutionQuery

QueryExecutions queries the "executions" edge of the Function entity.

func (*Function) QueryLangRuntime

func (f *Function) QueryLangRuntime() *LangRuntimeQuery

QueryLangRuntime queries the "lang_runtime" edge of the Function entity.

func (*Function) QueryTenant

func (f *Function) QueryTenant() *TenantQuery

QueryTenant queries the "tenant" edge of the Function entity.

func (*Function) String

func (f *Function) String() string

String implements the fmt.Stringer.

func (*Function) Unwrap

func (f *Function) Unwrap() *Function

Unwrap unwraps the Function 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 (*Function) Update

func (f *Function) Update() *FunctionUpdateOne

Update returns a builder for updating this Function. Note that you need to call Function.Unwrap() before calling this method if this Function was returned from a transaction, and the transaction was committed or rolled back.

func (*Function) Value

func (f *Function) Value(name string) (ent.Value, error)

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

type FunctionClient

type FunctionClient struct {
	// contains filtered or unexported fields
}

FunctionClient is a client for the Function schema.

func NewFunctionClient

func NewFunctionClient(c config) *FunctionClient

NewFunctionClient returns a client for the Function from the given config.

func (*FunctionClient) Create

func (c *FunctionClient) Create() *FunctionCreate

Create returns a builder for creating a Function entity.

func (*FunctionClient) CreateBulk

func (c *FunctionClient) CreateBulk(builders ...*FunctionCreate) *FunctionCreateBulk

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

func (*FunctionClient) Delete

func (c *FunctionClient) Delete() *FunctionDelete

Delete returns a delete builder for Function.

func (*FunctionClient) DeleteOne

func (c *FunctionClient) DeleteOne(f *Function) *FunctionDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*FunctionClient) DeleteOneID

func (c *FunctionClient) DeleteOneID(id uuid.UUID) *FunctionDeleteOne

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

func (*FunctionClient) Get

func (c *FunctionClient) Get(ctx context.Context, id uuid.UUID) (*Function, error)

Get returns a Function entity by its id.

func (*FunctionClient) GetX

func (c *FunctionClient) GetX(ctx context.Context, id uuid.UUID) *Function

GetX is like Get, but panics if an error occurs.

func (*FunctionClient) Hooks

func (c *FunctionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*FunctionClient) Intercept

func (c *FunctionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `function.Intercept(f(g(h())))`.

func (*FunctionClient) Interceptors

func (c *FunctionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*FunctionClient) MapCreateBulk

func (c *FunctionClient) MapCreateBulk(slice any, setFunc func(*FunctionCreate, int)) *FunctionCreateBulk

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 (*FunctionClient) Query

func (c *FunctionClient) Query() *FunctionQuery

Query returns a query builder for Function.

func (*FunctionClient) QueryExecutions

func (c *FunctionClient) QueryExecutions(f *Function) *ExecutionQuery

QueryExecutions queries the executions edge of a Function.

func (*FunctionClient) QueryLangRuntime

func (c *FunctionClient) QueryLangRuntime(f *Function) *LangRuntimeQuery

QueryLangRuntime queries the lang_runtime edge of a Function.

func (*FunctionClient) QueryTenant

func (c *FunctionClient) QueryTenant(f *Function) *TenantQuery

QueryTenant queries the tenant edge of a Function.

func (*FunctionClient) Update

func (c *FunctionClient) Update() *FunctionUpdate

Update returns an update builder for Function.

func (*FunctionClient) UpdateOne

func (c *FunctionClient) UpdateOne(f *Function) *FunctionUpdateOne

UpdateOne returns an update builder for the given entity.

func (*FunctionClient) UpdateOneID

func (c *FunctionClient) UpdateOneID(id uuid.UUID) *FunctionUpdateOne

UpdateOneID returns an update builder for the given id.

func (*FunctionClient) Use

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

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `function.Hooks(f(g(h())))`.

type FunctionCreate

type FunctionCreate struct {
	// contains filtered or unexported fields
}

FunctionCreate is the builder for creating a Function entity.

func (*FunctionCreate) AddExecutionIDs

func (fc *FunctionCreate) AddExecutionIDs(ids ...uuid.UUID) *FunctionCreate

AddExecutionIDs adds the "executions" edge to the Execution entity by IDs.

func (*FunctionCreate) AddExecutions

func (fc *FunctionCreate) AddExecutions(e ...*Execution) *FunctionCreate

AddExecutions adds the "executions" edges to the Execution entity.

func (*FunctionCreate) Exec

func (fc *FunctionCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*FunctionCreate) ExecX

func (fc *FunctionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FunctionCreate) Mutation

func (fc *FunctionCreate) Mutation() *FunctionMutation

Mutation returns the FunctionMutation object of the builder.

func (*FunctionCreate) Save

func (fc *FunctionCreate) Save(ctx context.Context) (*Function, error)

Save creates the Function in the database.

func (*FunctionCreate) SaveX

func (fc *FunctionCreate) SaveX(ctx context.Context) *Function

SaveX calls Save and panics if Save returns an error.

func (*FunctionCreate) SetCodeHash

func (fc *FunctionCreate) SetCodeHash(s string) *FunctionCreate

SetCodeHash sets the "code_hash" field.

func (*FunctionCreate) SetCodePath

func (fc *FunctionCreate) SetCodePath(s string) *FunctionCreate

SetCodePath sets the "code_path" field.

func (*FunctionCreate) SetCodeType

func (fc *FunctionCreate) SetCodeType(s string) *FunctionCreate

SetCodeType sets the "code_type" field.

func (*FunctionCreate) SetCreatedAt

func (fc *FunctionCreate) SetCreatedAt(t time.Time) *FunctionCreate

SetCreatedAt sets the "created_at" field.

func (*FunctionCreate) SetEnvironment

func (fc *FunctionCreate) SetEnvironment(m map[string]string) *FunctionCreate

SetEnvironment sets the "environment" field.

func (*FunctionCreate) SetHandler

func (fc *FunctionCreate) SetHandler(s string) *FunctionCreate

SetHandler sets the "handler" field.

func (*FunctionCreate) SetID

func (fc *FunctionCreate) SetID(u uuid.UUID) *FunctionCreate

SetID sets the "id" field.

func (*FunctionCreate) SetLangRuntime

func (fc *FunctionCreate) SetLangRuntime(l *LangRuntime) *FunctionCreate

SetLangRuntime sets the "lang_runtime" edge to the LangRuntime entity.

func (*FunctionCreate) SetLangRuntimeID

func (fc *FunctionCreate) SetLangRuntimeID(id uuid.UUID) *FunctionCreate

SetLangRuntimeID sets the "lang_runtime" edge to the LangRuntime entity by ID.

func (*FunctionCreate) SetMemory

func (fc *FunctionCreate) SetMemory(i int) *FunctionCreate

SetMemory sets the "memory" field.

func (*FunctionCreate) SetName

func (fc *FunctionCreate) SetName(s string) *FunctionCreate

SetName sets the "name" field.

func (*FunctionCreate) SetNillableCodeHash

func (fc *FunctionCreate) SetNillableCodeHash(s *string) *FunctionCreate

SetNillableCodeHash sets the "code_hash" field if the given value is not nil.

func (*FunctionCreate) SetNillableCodePath

func (fc *FunctionCreate) SetNillableCodePath(s *string) *FunctionCreate

SetNillableCodePath sets the "code_path" field if the given value is not nil.

func (*FunctionCreate) SetNillableCreatedAt

func (fc *FunctionCreate) SetNillableCreatedAt(t *time.Time) *FunctionCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*FunctionCreate) SetNillableID

func (fc *FunctionCreate) SetNillableID(u *uuid.UUID) *FunctionCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*FunctionCreate) SetNillableMemory

func (fc *FunctionCreate) SetNillableMemory(i *int) *FunctionCreate

SetNillableMemory sets the "memory" field if the given value is not nil.

func (*FunctionCreate) SetNillableStatus

func (fc *FunctionCreate) SetNillableStatus(s *string) *FunctionCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*FunctionCreate) SetNillableTimeout

func (fc *FunctionCreate) SetNillableTimeout(i *int) *FunctionCreate

SetNillableTimeout sets the "timeout" field if the given value is not nil.

func (*FunctionCreate) SetNillableUpdatedAt

func (fc *FunctionCreate) SetNillableUpdatedAt(t *time.Time) *FunctionCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*FunctionCreate) SetRuntimeID

func (fc *FunctionCreate) SetRuntimeID(u uuid.UUID) *FunctionCreate

SetRuntimeID sets the "runtime_id" field.

func (*FunctionCreate) SetStatus

func (fc *FunctionCreate) SetStatus(s string) *FunctionCreate

SetStatus sets the "status" field.

func (*FunctionCreate) SetTenant

func (fc *FunctionCreate) SetTenant(t *Tenant) *FunctionCreate

SetTenant sets the "tenant" edge to the Tenant entity.

func (*FunctionCreate) SetTenantID

func (fc *FunctionCreate) SetTenantID(u uuid.UUID) *FunctionCreate

SetTenantID sets the "tenant_id" field.

func (*FunctionCreate) SetTimeout

func (fc *FunctionCreate) SetTimeout(i int) *FunctionCreate

SetTimeout sets the "timeout" field.

func (*FunctionCreate) SetUpdatedAt

func (fc *FunctionCreate) SetUpdatedAt(t time.Time) *FunctionCreate

SetUpdatedAt sets the "updated_at" field.

type FunctionCreateBulk

type FunctionCreateBulk struct {
	// contains filtered or unexported fields
}

FunctionCreateBulk is the builder for creating many Function entities in bulk.

func (*FunctionCreateBulk) Exec

func (fcb *FunctionCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*FunctionCreateBulk) ExecX

func (fcb *FunctionCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FunctionCreateBulk) Save

func (fcb *FunctionCreateBulk) Save(ctx context.Context) ([]*Function, error)

Save creates the Function entities in the database.

func (*FunctionCreateBulk) SaveX

func (fcb *FunctionCreateBulk) SaveX(ctx context.Context) []*Function

SaveX is like Save, but panics if an error occurs.

type FunctionDelete

type FunctionDelete struct {
	// contains filtered or unexported fields
}

FunctionDelete is the builder for deleting a Function entity.

func (*FunctionDelete) Exec

func (fd *FunctionDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*FunctionDelete) ExecX

func (fd *FunctionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*FunctionDelete) Where

func (fd *FunctionDelete) Where(ps ...predicate.Function) *FunctionDelete

Where appends a list predicates to the FunctionDelete builder.

type FunctionDeleteOne

type FunctionDeleteOne struct {
	// contains filtered or unexported fields
}

FunctionDeleteOne is the builder for deleting a single Function entity.

func (*FunctionDeleteOne) Exec

func (fdo *FunctionDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*FunctionDeleteOne) ExecX

func (fdo *FunctionDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FunctionDeleteOne) Where

Where appends a list predicates to the FunctionDelete builder.

type FunctionEdges

type FunctionEdges struct {
	// Tenant holds the value of the tenant edge.
	Tenant *Tenant `json:"tenant,omitempty"`
	// LangRuntime holds the value of the lang_runtime edge.
	LangRuntime *LangRuntime `json:"lang_runtime,omitempty"`
	// Executions holds the value of the executions edge.
	Executions []*Execution `json:"executions,omitempty"`
	// contains filtered or unexported fields
}

FunctionEdges holds the relations/edges for other nodes in the graph.

func (FunctionEdges) ExecutionsOrErr

func (e FunctionEdges) ExecutionsOrErr() ([]*Execution, error)

ExecutionsOrErr returns the Executions value or an error if the edge was not loaded in eager-loading.

func (FunctionEdges) LangRuntimeOrErr

func (e FunctionEdges) LangRuntimeOrErr() (*LangRuntime, error)

LangRuntimeOrErr returns the LangRuntime value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (FunctionEdges) TenantOrErr

func (e FunctionEdges) TenantOrErr() (*Tenant, error)

TenantOrErr returns the Tenant value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type FunctionGroupBy

type FunctionGroupBy struct {
	// contains filtered or unexported fields
}

FunctionGroupBy is the group-by builder for Function entities.

func (*FunctionGroupBy) Aggregate

func (fgb *FunctionGroupBy) Aggregate(fns ...AggregateFunc) *FunctionGroupBy

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

func (*FunctionGroupBy) Bool

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

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

func (*FunctionGroupBy) BoolX

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

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

func (*FunctionGroupBy) Bools

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

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

func (*FunctionGroupBy) BoolsX

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

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

func (*FunctionGroupBy) Float64

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

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

func (*FunctionGroupBy) Float64X

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

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

func (*FunctionGroupBy) Float64s

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

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

func (*FunctionGroupBy) Float64sX

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

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

func (*FunctionGroupBy) Int

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

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

func (*FunctionGroupBy) IntX

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

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

func (*FunctionGroupBy) Ints

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

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

func (*FunctionGroupBy) IntsX

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

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

func (*FunctionGroupBy) Scan

func (fgb *FunctionGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*FunctionGroupBy) ScanX

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

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

func (*FunctionGroupBy) String

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

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

func (*FunctionGroupBy) StringX

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

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

func (*FunctionGroupBy) Strings

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

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

func (*FunctionGroupBy) StringsX

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

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

type FunctionMutation

type FunctionMutation struct {
	// contains filtered or unexported fields
}

FunctionMutation represents an operation that mutates the Function nodes in the graph.

func (*FunctionMutation) AddExecutionIDs

func (m *FunctionMutation) AddExecutionIDs(ids ...uuid.UUID)

AddExecutionIDs adds the "executions" edge to the Execution entity by ids.

func (*FunctionMutation) AddField

func (m *FunctionMutation) 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 (*FunctionMutation) AddMemory

func (m *FunctionMutation) AddMemory(i int)

AddMemory adds i to the "memory" field.

func (*FunctionMutation) AddTimeout

func (m *FunctionMutation) AddTimeout(i int)

AddTimeout adds i to the "timeout" field.

func (*FunctionMutation) AddedEdges

func (m *FunctionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*FunctionMutation) AddedField

func (m *FunctionMutation) 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 (*FunctionMutation) AddedFields

func (m *FunctionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*FunctionMutation) AddedIDs

func (m *FunctionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*FunctionMutation) AddedMemory

func (m *FunctionMutation) AddedMemory() (r int, exists bool)

AddedMemory returns the value that was added to the "memory" field in this mutation.

func (*FunctionMutation) AddedTimeout

func (m *FunctionMutation) AddedTimeout() (r int, exists bool)

AddedTimeout returns the value that was added to the "timeout" field in this mutation.

func (*FunctionMutation) ClearCodeHash

func (m *FunctionMutation) ClearCodeHash()

ClearCodeHash clears the value of the "code_hash" field.

func (*FunctionMutation) ClearCodePath

func (m *FunctionMutation) ClearCodePath()

ClearCodePath clears the value of the "code_path" field.

func (*FunctionMutation) ClearEdge

func (m *FunctionMutation) 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 (*FunctionMutation) ClearEnvironment

func (m *FunctionMutation) ClearEnvironment()

ClearEnvironment clears the value of the "environment" field.

func (*FunctionMutation) ClearExecutions

func (m *FunctionMutation) ClearExecutions()

ClearExecutions clears the "executions" edge to the Execution entity.

func (*FunctionMutation) ClearField

func (m *FunctionMutation) 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 (*FunctionMutation) ClearLangRuntime

func (m *FunctionMutation) ClearLangRuntime()

ClearLangRuntime clears the "lang_runtime" edge to the LangRuntime entity.

func (*FunctionMutation) ClearTenant

func (m *FunctionMutation) ClearTenant()

ClearTenant clears the "tenant" edge to the Tenant entity.

func (*FunctionMutation) ClearedEdges

func (m *FunctionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*FunctionMutation) ClearedFields

func (m *FunctionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (FunctionMutation) Client

func (m FunctionMutation) 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 (*FunctionMutation) CodeHash

func (m *FunctionMutation) CodeHash() (r string, exists bool)

CodeHash returns the value of the "code_hash" field in the mutation.

func (*FunctionMutation) CodeHashCleared

func (m *FunctionMutation) CodeHashCleared() bool

CodeHashCleared returns if the "code_hash" field was cleared in this mutation.

func (*FunctionMutation) CodePath

func (m *FunctionMutation) CodePath() (r string, exists bool)

CodePath returns the value of the "code_path" field in the mutation.

func (*FunctionMutation) CodePathCleared

func (m *FunctionMutation) CodePathCleared() bool

CodePathCleared returns if the "code_path" field was cleared in this mutation.

func (*FunctionMutation) CodeType

func (m *FunctionMutation) CodeType() (r string, exists bool)

CodeType returns the value of the "code_type" field in the mutation.

func (*FunctionMutation) CreatedAt

func (m *FunctionMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*FunctionMutation) EdgeCleared

func (m *FunctionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*FunctionMutation) Environment

func (m *FunctionMutation) Environment() (r map[string]string, exists bool)

Environment returns the value of the "environment" field in the mutation.

func (*FunctionMutation) EnvironmentCleared

func (m *FunctionMutation) EnvironmentCleared() bool

EnvironmentCleared returns if the "environment" field was cleared in this mutation.

func (*FunctionMutation) ExecutionsCleared

func (m *FunctionMutation) ExecutionsCleared() bool

ExecutionsCleared reports if the "executions" edge to the Execution entity was cleared.

func (*FunctionMutation) ExecutionsIDs

func (m *FunctionMutation) ExecutionsIDs() (ids []uuid.UUID)

ExecutionsIDs returns the "executions" edge IDs in the mutation.

func (*FunctionMutation) Field

func (m *FunctionMutation) 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 (*FunctionMutation) FieldCleared

func (m *FunctionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*FunctionMutation) Fields

func (m *FunctionMutation) 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 (*FunctionMutation) Handler

func (m *FunctionMutation) Handler() (r string, exists bool)

Handler returns the value of the "handler" field in the mutation.

func (*FunctionMutation) ID

func (m *FunctionMutation) ID() (id uuid.UUID, 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 (*FunctionMutation) IDs

func (m *FunctionMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*FunctionMutation) LangRuntimeCleared

func (m *FunctionMutation) LangRuntimeCleared() bool

LangRuntimeCleared reports if the "lang_runtime" edge to the LangRuntime entity was cleared.

func (*FunctionMutation) LangRuntimeID

func (m *FunctionMutation) LangRuntimeID() (id uuid.UUID, exists bool)

LangRuntimeID returns the "lang_runtime" edge ID in the mutation.

func (*FunctionMutation) LangRuntimeIDs

func (m *FunctionMutation) LangRuntimeIDs() (ids []uuid.UUID)

LangRuntimeIDs returns the "lang_runtime" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use LangRuntimeID instead. It exists only for internal usage by the builders.

func (*FunctionMutation) Memory

func (m *FunctionMutation) Memory() (r int, exists bool)

Memory returns the value of the "memory" field in the mutation.

func (*FunctionMutation) Name

func (m *FunctionMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*FunctionMutation) OldCodeHash

func (m *FunctionMutation) OldCodeHash(ctx context.Context) (v string, err error)

OldCodeHash returns the old "code_hash" field's value of the Function entity. If the Function 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 (*FunctionMutation) OldCodePath

func (m *FunctionMutation) OldCodePath(ctx context.Context) (v string, err error)

OldCodePath returns the old "code_path" field's value of the Function entity. If the Function 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 (*FunctionMutation) OldCodeType

func (m *FunctionMutation) OldCodeType(ctx context.Context) (v string, err error)

OldCodeType returns the old "code_type" field's value of the Function entity. If the Function 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 (*FunctionMutation) OldCreatedAt

func (m *FunctionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Function entity. If the Function 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 (*FunctionMutation) OldEnvironment

func (m *FunctionMutation) OldEnvironment(ctx context.Context) (v map[string]string, err error)

OldEnvironment returns the old "environment" field's value of the Function entity. If the Function 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 (*FunctionMutation) OldField

func (m *FunctionMutation) 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 (*FunctionMutation) OldHandler

func (m *FunctionMutation) OldHandler(ctx context.Context) (v string, err error)

OldHandler returns the old "handler" field's value of the Function entity. If the Function 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 (*FunctionMutation) OldMemory

func (m *FunctionMutation) OldMemory(ctx context.Context) (v int, err error)

OldMemory returns the old "memory" field's value of the Function entity. If the Function 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 (*FunctionMutation) OldName

func (m *FunctionMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Function entity. If the Function 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 (*FunctionMutation) OldRuntimeID

func (m *FunctionMutation) OldRuntimeID(ctx context.Context) (v uuid.UUID, err error)

OldRuntimeID returns the old "runtime_id" field's value of the Function entity. If the Function 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 (*FunctionMutation) OldStatus

func (m *FunctionMutation) OldStatus(ctx context.Context) (v string, err error)

OldStatus returns the old "status" field's value of the Function entity. If the Function 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 (*FunctionMutation) OldTenantID

func (m *FunctionMutation) OldTenantID(ctx context.Context) (v uuid.UUID, err error)

OldTenantID returns the old "tenant_id" field's value of the Function entity. If the Function 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 (*FunctionMutation) OldTimeout

func (m *FunctionMutation) OldTimeout(ctx context.Context) (v int, err error)

OldTimeout returns the old "timeout" field's value of the Function entity. If the Function 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 (*FunctionMutation) OldUpdatedAt

func (m *FunctionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Function entity. If the Function 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 (*FunctionMutation) Op

func (m *FunctionMutation) Op() Op

Op returns the operation name.

func (*FunctionMutation) RemoveExecutionIDs

func (m *FunctionMutation) RemoveExecutionIDs(ids ...uuid.UUID)

RemoveExecutionIDs removes the "executions" edge to the Execution entity by IDs.

func (*FunctionMutation) RemovedEdges

func (m *FunctionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*FunctionMutation) RemovedExecutionsIDs

func (m *FunctionMutation) RemovedExecutionsIDs() (ids []uuid.UUID)

RemovedExecutions returns the removed IDs of the "executions" edge to the Execution entity.

func (*FunctionMutation) RemovedIDs

func (m *FunctionMutation) 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 (*FunctionMutation) ResetCodeHash

func (m *FunctionMutation) ResetCodeHash()

ResetCodeHash resets all changes to the "code_hash" field.

func (*FunctionMutation) ResetCodePath

func (m *FunctionMutation) ResetCodePath()

ResetCodePath resets all changes to the "code_path" field.

func (*FunctionMutation) ResetCodeType

func (m *FunctionMutation) ResetCodeType()

ResetCodeType resets all changes to the "code_type" field.

func (*FunctionMutation) ResetCreatedAt

func (m *FunctionMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*FunctionMutation) ResetEdge

func (m *FunctionMutation) 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 (*FunctionMutation) ResetEnvironment

func (m *FunctionMutation) ResetEnvironment()

ResetEnvironment resets all changes to the "environment" field.

func (*FunctionMutation) ResetExecutions

func (m *FunctionMutation) ResetExecutions()

ResetExecutions resets all changes to the "executions" edge.

func (*FunctionMutation) ResetField

func (m *FunctionMutation) 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 (*FunctionMutation) ResetHandler

func (m *FunctionMutation) ResetHandler()

ResetHandler resets all changes to the "handler" field.

func (*FunctionMutation) ResetLangRuntime

func (m *FunctionMutation) ResetLangRuntime()

ResetLangRuntime resets all changes to the "lang_runtime" edge.

func (*FunctionMutation) ResetMemory

func (m *FunctionMutation) ResetMemory()

ResetMemory resets all changes to the "memory" field.

func (*FunctionMutation) ResetName

func (m *FunctionMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*FunctionMutation) ResetRuntimeID

func (m *FunctionMutation) ResetRuntimeID()

ResetRuntimeID resets all changes to the "runtime_id" field.

func (*FunctionMutation) ResetStatus

func (m *FunctionMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*FunctionMutation) ResetTenant

func (m *FunctionMutation) ResetTenant()

ResetTenant resets all changes to the "tenant" edge.

func (*FunctionMutation) ResetTenantID

func (m *FunctionMutation) ResetTenantID()

ResetTenantID resets all changes to the "tenant_id" field.

func (*FunctionMutation) ResetTimeout

func (m *FunctionMutation) ResetTimeout()

ResetTimeout resets all changes to the "timeout" field.

func (*FunctionMutation) ResetUpdatedAt

func (m *FunctionMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*FunctionMutation) RuntimeID

func (m *FunctionMutation) RuntimeID() (r uuid.UUID, exists bool)

RuntimeID returns the value of the "runtime_id" field in the mutation.

func (*FunctionMutation) SetCodeHash

func (m *FunctionMutation) SetCodeHash(s string)

SetCodeHash sets the "code_hash" field.

func (*FunctionMutation) SetCodePath

func (m *FunctionMutation) SetCodePath(s string)

SetCodePath sets the "code_path" field.

func (*FunctionMutation) SetCodeType

func (m *FunctionMutation) SetCodeType(s string)

SetCodeType sets the "code_type" field.

func (*FunctionMutation) SetCreatedAt

func (m *FunctionMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*FunctionMutation) SetEnvironment

func (m *FunctionMutation) SetEnvironment(value map[string]string)

SetEnvironment sets the "environment" field.

func (*FunctionMutation) SetField

func (m *FunctionMutation) 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 (*FunctionMutation) SetHandler

func (m *FunctionMutation) SetHandler(s string)

SetHandler sets the "handler" field.

func (*FunctionMutation) SetID

func (m *FunctionMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Function entities.

func (*FunctionMutation) SetLangRuntimeID

func (m *FunctionMutation) SetLangRuntimeID(id uuid.UUID)

SetLangRuntimeID sets the "lang_runtime" edge to the LangRuntime entity by id.

func (*FunctionMutation) SetMemory

func (m *FunctionMutation) SetMemory(i int)

SetMemory sets the "memory" field.

func (*FunctionMutation) SetName

func (m *FunctionMutation) SetName(s string)

SetName sets the "name" field.

func (*FunctionMutation) SetOp

func (m *FunctionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*FunctionMutation) SetRuntimeID

func (m *FunctionMutation) SetRuntimeID(u uuid.UUID)

SetRuntimeID sets the "runtime_id" field.

func (*FunctionMutation) SetStatus

func (m *FunctionMutation) SetStatus(s string)

SetStatus sets the "status" field.

func (*FunctionMutation) SetTenantID

func (m *FunctionMutation) SetTenantID(u uuid.UUID)

SetTenantID sets the "tenant_id" field.

func (*FunctionMutation) SetTimeout

func (m *FunctionMutation) SetTimeout(i int)

SetTimeout sets the "timeout" field.

func (*FunctionMutation) SetUpdatedAt

func (m *FunctionMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*FunctionMutation) Status

func (m *FunctionMutation) Status() (r string, exists bool)

Status returns the value of the "status" field in the mutation.

func (*FunctionMutation) TenantCleared

func (m *FunctionMutation) TenantCleared() bool

TenantCleared reports if the "tenant" edge to the Tenant entity was cleared.

func (*FunctionMutation) TenantID

func (m *FunctionMutation) TenantID() (r uuid.UUID, exists bool)

TenantID returns the value of the "tenant_id" field in the mutation.

func (*FunctionMutation) TenantIDs

func (m *FunctionMutation) TenantIDs() (ids []uuid.UUID)

TenantIDs returns the "tenant" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TenantID instead. It exists only for internal usage by the builders.

func (*FunctionMutation) Timeout

func (m *FunctionMutation) Timeout() (r int, exists bool)

Timeout returns the value of the "timeout" field in the mutation.

func (FunctionMutation) Tx

func (m FunctionMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*FunctionMutation) Type

func (m *FunctionMutation) Type() string

Type returns the node type of this mutation (Function).

func (*FunctionMutation) UpdatedAt

func (m *FunctionMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*FunctionMutation) Where

func (m *FunctionMutation) Where(ps ...predicate.Function)

Where appends a list predicates to the FunctionMutation builder.

func (*FunctionMutation) WhereP

func (m *FunctionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the FunctionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type FunctionQuery

type FunctionQuery struct {
	// contains filtered or unexported fields
}

FunctionQuery is the builder for querying Function entities.

func (*FunctionQuery) Aggregate

func (fq *FunctionQuery) Aggregate(fns ...AggregateFunc) *FunctionSelect

Aggregate returns a FunctionSelect configured with the given aggregations.

func (*FunctionQuery) All

func (fq *FunctionQuery) All(ctx context.Context) ([]*Function, error)

All executes the query and returns a list of Functions.

func (*FunctionQuery) AllX

func (fq *FunctionQuery) AllX(ctx context.Context) []*Function

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

func (*FunctionQuery) Clone

func (fq *FunctionQuery) Clone() *FunctionQuery

Clone returns a duplicate of the FunctionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*FunctionQuery) Count

func (fq *FunctionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*FunctionQuery) CountX

func (fq *FunctionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*FunctionQuery) Exist

func (fq *FunctionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*FunctionQuery) ExistX

func (fq *FunctionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*FunctionQuery) First

func (fq *FunctionQuery) First(ctx context.Context) (*Function, error)

First returns the first Function entity from the query. Returns a *NotFoundError when no Function was found.

func (*FunctionQuery) FirstID

func (fq *FunctionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Function ID from the query. Returns a *NotFoundError when no Function ID was found.

func (*FunctionQuery) FirstIDX

func (fq *FunctionQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*FunctionQuery) FirstX

func (fq *FunctionQuery) FirstX(ctx context.Context) *Function

FirstX is like First, but panics if an error occurs.

func (*FunctionQuery) GroupBy

func (fq *FunctionQuery) GroupBy(field string, fields ...string) *FunctionGroupBy

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 {
	TenantID uuid.UUID `json:"tenant_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Function.Query().
	GroupBy(function.FieldTenantID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*FunctionQuery) IDs

func (fq *FunctionQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Function IDs.

func (*FunctionQuery) IDsX

func (fq *FunctionQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*FunctionQuery) Limit

func (fq *FunctionQuery) Limit(limit int) *FunctionQuery

Limit the number of records to be returned by this query.

func (*FunctionQuery) Offset

func (fq *FunctionQuery) Offset(offset int) *FunctionQuery

Offset to start from.

func (*FunctionQuery) Only

func (fq *FunctionQuery) Only(ctx context.Context) (*Function, error)

Only returns a single Function entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Function entity is found. Returns a *NotFoundError when no Function entities are found.

func (*FunctionQuery) OnlyID

func (fq *FunctionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Function ID in the query. Returns a *NotSingularError when more than one Function ID is found. Returns a *NotFoundError when no entities are found.

func (*FunctionQuery) OnlyIDX

func (fq *FunctionQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*FunctionQuery) OnlyX

func (fq *FunctionQuery) OnlyX(ctx context.Context) *Function

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

func (*FunctionQuery) Order

Order specifies how the records should be ordered.

func (*FunctionQuery) QueryExecutions

func (fq *FunctionQuery) QueryExecutions() *ExecutionQuery

QueryExecutions chains the current query on the "executions" edge.

func (*FunctionQuery) QueryLangRuntime

func (fq *FunctionQuery) QueryLangRuntime() *LangRuntimeQuery

QueryLangRuntime chains the current query on the "lang_runtime" edge.

func (*FunctionQuery) QueryTenant

func (fq *FunctionQuery) QueryTenant() *TenantQuery

QueryTenant chains the current query on the "tenant" edge.

func (*FunctionQuery) Select

func (fq *FunctionQuery) Select(fields ...string) *FunctionSelect

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 {
	TenantID uuid.UUID `json:"tenant_id,omitempty"`
}

client.Function.Query().
	Select(function.FieldTenantID).
	Scan(ctx, &v)

func (*FunctionQuery) Unique

func (fq *FunctionQuery) Unique(unique bool) *FunctionQuery

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 (*FunctionQuery) Where

func (fq *FunctionQuery) Where(ps ...predicate.Function) *FunctionQuery

Where adds a new predicate for the FunctionQuery builder.

func (*FunctionQuery) WithExecutions

func (fq *FunctionQuery) WithExecutions(opts ...func(*ExecutionQuery)) *FunctionQuery

WithExecutions tells the query-builder to eager-load the nodes that are connected to the "executions" edge. The optional arguments are used to configure the query builder of the edge.

func (*FunctionQuery) WithLangRuntime

func (fq *FunctionQuery) WithLangRuntime(opts ...func(*LangRuntimeQuery)) *FunctionQuery

WithLangRuntime tells the query-builder to eager-load the nodes that are connected to the "lang_runtime" edge. The optional arguments are used to configure the query builder of the edge.

func (*FunctionQuery) WithTenant

func (fq *FunctionQuery) WithTenant(opts ...func(*TenantQuery)) *FunctionQuery

WithTenant tells the query-builder to eager-load the nodes that are connected to the "tenant" edge. The optional arguments are used to configure the query builder of the edge.

type FunctionSelect

type FunctionSelect struct {
	*FunctionQuery
	// contains filtered or unexported fields
}

FunctionSelect is the builder for selecting fields of Function entities.

func (*FunctionSelect) Aggregate

func (fs *FunctionSelect) Aggregate(fns ...AggregateFunc) *FunctionSelect

Aggregate adds the given aggregation functions to the selector query.

func (*FunctionSelect) Bool

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

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

func (*FunctionSelect) BoolX

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

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

func (*FunctionSelect) Bools

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

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

func (*FunctionSelect) BoolsX

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

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

func (*FunctionSelect) Float64

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

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

func (*FunctionSelect) Float64X

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

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

func (*FunctionSelect) Float64s

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

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

func (*FunctionSelect) Float64sX

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

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

func (*FunctionSelect) Int

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

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

func (*FunctionSelect) IntX

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

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

func (*FunctionSelect) Ints

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

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

func (*FunctionSelect) IntsX

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

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

func (*FunctionSelect) Scan

func (fs *FunctionSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*FunctionSelect) ScanX

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

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

func (*FunctionSelect) String

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

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

func (*FunctionSelect) StringX

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

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

func (*FunctionSelect) Strings

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

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

func (*FunctionSelect) StringsX

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

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

type FunctionUpdate

type FunctionUpdate struct {
	// contains filtered or unexported fields
}

FunctionUpdate is the builder for updating Function entities.

func (*FunctionUpdate) AddExecutionIDs

func (fu *FunctionUpdate) AddExecutionIDs(ids ...uuid.UUID) *FunctionUpdate

AddExecutionIDs adds the "executions" edge to the Execution entity by IDs.

func (*FunctionUpdate) AddExecutions

func (fu *FunctionUpdate) AddExecutions(e ...*Execution) *FunctionUpdate

AddExecutions adds the "executions" edges to the Execution entity.

func (*FunctionUpdate) AddMemory

func (fu *FunctionUpdate) AddMemory(i int) *FunctionUpdate

AddMemory adds i to the "memory" field.

func (*FunctionUpdate) AddTimeout

func (fu *FunctionUpdate) AddTimeout(i int) *FunctionUpdate

AddTimeout adds i to the "timeout" field.

func (*FunctionUpdate) ClearCodeHash

func (fu *FunctionUpdate) ClearCodeHash() *FunctionUpdate

ClearCodeHash clears the value of the "code_hash" field.

func (*FunctionUpdate) ClearCodePath

func (fu *FunctionUpdate) ClearCodePath() *FunctionUpdate

ClearCodePath clears the value of the "code_path" field.

func (*FunctionUpdate) ClearEnvironment

func (fu *FunctionUpdate) ClearEnvironment() *FunctionUpdate

ClearEnvironment clears the value of the "environment" field.

func (*FunctionUpdate) ClearExecutions

func (fu *FunctionUpdate) ClearExecutions() *FunctionUpdate

ClearExecutions clears all "executions" edges to the Execution entity.

func (*FunctionUpdate) ClearLangRuntime

func (fu *FunctionUpdate) ClearLangRuntime() *FunctionUpdate

ClearLangRuntime clears the "lang_runtime" edge to the LangRuntime entity.

func (*FunctionUpdate) ClearTenant

func (fu *FunctionUpdate) ClearTenant() *FunctionUpdate

ClearTenant clears the "tenant" edge to the Tenant entity.

func (*FunctionUpdate) Exec

func (fu *FunctionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*FunctionUpdate) ExecX

func (fu *FunctionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FunctionUpdate) Mutation

func (fu *FunctionUpdate) Mutation() *FunctionMutation

Mutation returns the FunctionMutation object of the builder.

func (*FunctionUpdate) RemoveExecutionIDs

func (fu *FunctionUpdate) RemoveExecutionIDs(ids ...uuid.UUID) *FunctionUpdate

RemoveExecutionIDs removes the "executions" edge to Execution entities by IDs.

func (*FunctionUpdate) RemoveExecutions

func (fu *FunctionUpdate) RemoveExecutions(e ...*Execution) *FunctionUpdate

RemoveExecutions removes "executions" edges to Execution entities.

func (*FunctionUpdate) Save

func (fu *FunctionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*FunctionUpdate) SaveX

func (fu *FunctionUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*FunctionUpdate) SetCodeHash

func (fu *FunctionUpdate) SetCodeHash(s string) *FunctionUpdate

SetCodeHash sets the "code_hash" field.

func (*FunctionUpdate) SetCodePath

func (fu *FunctionUpdate) SetCodePath(s string) *FunctionUpdate

SetCodePath sets the "code_path" field.

func (*FunctionUpdate) SetCodeType

func (fu *FunctionUpdate) SetCodeType(s string) *FunctionUpdate

SetCodeType sets the "code_type" field.

func (*FunctionUpdate) SetEnvironment

func (fu *FunctionUpdate) SetEnvironment(m map[string]string) *FunctionUpdate

SetEnvironment sets the "environment" field.

func (*FunctionUpdate) SetHandler

func (fu *FunctionUpdate) SetHandler(s string) *FunctionUpdate

SetHandler sets the "handler" field.

func (*FunctionUpdate) SetLangRuntime

func (fu *FunctionUpdate) SetLangRuntime(l *LangRuntime) *FunctionUpdate

SetLangRuntime sets the "lang_runtime" edge to the LangRuntime entity.

func (*FunctionUpdate) SetLangRuntimeID

func (fu *FunctionUpdate) SetLangRuntimeID(id uuid.UUID) *FunctionUpdate

SetLangRuntimeID sets the "lang_runtime" edge to the LangRuntime entity by ID.

func (*FunctionUpdate) SetMemory

func (fu *FunctionUpdate) SetMemory(i int) *FunctionUpdate

SetMemory sets the "memory" field.

func (*FunctionUpdate) SetName

func (fu *FunctionUpdate) SetName(s string) *FunctionUpdate

SetName sets the "name" field.

func (*FunctionUpdate) SetNillableCodeHash

func (fu *FunctionUpdate) SetNillableCodeHash(s *string) *FunctionUpdate

SetNillableCodeHash sets the "code_hash" field if the given value is not nil.

func (*FunctionUpdate) SetNillableCodePath

func (fu *FunctionUpdate) SetNillableCodePath(s *string) *FunctionUpdate

SetNillableCodePath sets the "code_path" field if the given value is not nil.

func (*FunctionUpdate) SetNillableCodeType

func (fu *FunctionUpdate) SetNillableCodeType(s *string) *FunctionUpdate

SetNillableCodeType sets the "code_type" field if the given value is not nil.

func (*FunctionUpdate) SetNillableHandler

func (fu *FunctionUpdate) SetNillableHandler(s *string) *FunctionUpdate

SetNillableHandler sets the "handler" field if the given value is not nil.

func (*FunctionUpdate) SetNillableMemory

func (fu *FunctionUpdate) SetNillableMemory(i *int) *FunctionUpdate

SetNillableMemory sets the "memory" field if the given value is not nil.

func (*FunctionUpdate) SetNillableName

func (fu *FunctionUpdate) SetNillableName(s *string) *FunctionUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*FunctionUpdate) SetNillableRuntimeID

func (fu *FunctionUpdate) SetNillableRuntimeID(u *uuid.UUID) *FunctionUpdate

SetNillableRuntimeID sets the "runtime_id" field if the given value is not nil.

func (*FunctionUpdate) SetNillableStatus

func (fu *FunctionUpdate) SetNillableStatus(s *string) *FunctionUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*FunctionUpdate) SetNillableTenantID

func (fu *FunctionUpdate) SetNillableTenantID(u *uuid.UUID) *FunctionUpdate

SetNillableTenantID sets the "tenant_id" field if the given value is not nil.

func (*FunctionUpdate) SetNillableTimeout

func (fu *FunctionUpdate) SetNillableTimeout(i *int) *FunctionUpdate

SetNillableTimeout sets the "timeout" field if the given value is not nil.

func (*FunctionUpdate) SetRuntimeID

func (fu *FunctionUpdate) SetRuntimeID(u uuid.UUID) *FunctionUpdate

SetRuntimeID sets the "runtime_id" field.

func (*FunctionUpdate) SetStatus

func (fu *FunctionUpdate) SetStatus(s string) *FunctionUpdate

SetStatus sets the "status" field.

func (*FunctionUpdate) SetTenant

func (fu *FunctionUpdate) SetTenant(t *Tenant) *FunctionUpdate

SetTenant sets the "tenant" edge to the Tenant entity.

func (*FunctionUpdate) SetTenantID

func (fu *FunctionUpdate) SetTenantID(u uuid.UUID) *FunctionUpdate

SetTenantID sets the "tenant_id" field.

func (*FunctionUpdate) SetTimeout

func (fu *FunctionUpdate) SetTimeout(i int) *FunctionUpdate

SetTimeout sets the "timeout" field.

func (*FunctionUpdate) SetUpdatedAt

func (fu *FunctionUpdate) SetUpdatedAt(t time.Time) *FunctionUpdate

SetUpdatedAt sets the "updated_at" field.

func (*FunctionUpdate) Where

func (fu *FunctionUpdate) Where(ps ...predicate.Function) *FunctionUpdate

Where appends a list predicates to the FunctionUpdate builder.

type FunctionUpdateOne

type FunctionUpdateOne struct {
	// contains filtered or unexported fields
}

FunctionUpdateOne is the builder for updating a single Function entity.

func (*FunctionUpdateOne) AddExecutionIDs

func (fuo *FunctionUpdateOne) AddExecutionIDs(ids ...uuid.UUID) *FunctionUpdateOne

AddExecutionIDs adds the "executions" edge to the Execution entity by IDs.

func (*FunctionUpdateOne) AddExecutions

func (fuo *FunctionUpdateOne) AddExecutions(e ...*Execution) *FunctionUpdateOne

AddExecutions adds the "executions" edges to the Execution entity.

func (*FunctionUpdateOne) AddMemory

func (fuo *FunctionUpdateOne) AddMemory(i int) *FunctionUpdateOne

AddMemory adds i to the "memory" field.

func (*FunctionUpdateOne) AddTimeout

func (fuo *FunctionUpdateOne) AddTimeout(i int) *FunctionUpdateOne

AddTimeout adds i to the "timeout" field.

func (*FunctionUpdateOne) ClearCodeHash

func (fuo *FunctionUpdateOne) ClearCodeHash() *FunctionUpdateOne

ClearCodeHash clears the value of the "code_hash" field.

func (*FunctionUpdateOne) ClearCodePath

func (fuo *FunctionUpdateOne) ClearCodePath() *FunctionUpdateOne

ClearCodePath clears the value of the "code_path" field.

func (*FunctionUpdateOne) ClearEnvironment

func (fuo *FunctionUpdateOne) ClearEnvironment() *FunctionUpdateOne

ClearEnvironment clears the value of the "environment" field.

func (*FunctionUpdateOne) ClearExecutions

func (fuo *FunctionUpdateOne) ClearExecutions() *FunctionUpdateOne

ClearExecutions clears all "executions" edges to the Execution entity.

func (*FunctionUpdateOne) ClearLangRuntime

func (fuo *FunctionUpdateOne) ClearLangRuntime() *FunctionUpdateOne

ClearLangRuntime clears the "lang_runtime" edge to the LangRuntime entity.

func (*FunctionUpdateOne) ClearTenant

func (fuo *FunctionUpdateOne) ClearTenant() *FunctionUpdateOne

ClearTenant clears the "tenant" edge to the Tenant entity.

func (*FunctionUpdateOne) Exec

func (fuo *FunctionUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*FunctionUpdateOne) ExecX

func (fuo *FunctionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FunctionUpdateOne) Mutation

func (fuo *FunctionUpdateOne) Mutation() *FunctionMutation

Mutation returns the FunctionMutation object of the builder.

func (*FunctionUpdateOne) RemoveExecutionIDs

func (fuo *FunctionUpdateOne) RemoveExecutionIDs(ids ...uuid.UUID) *FunctionUpdateOne

RemoveExecutionIDs removes the "executions" edge to Execution entities by IDs.

func (*FunctionUpdateOne) RemoveExecutions

func (fuo *FunctionUpdateOne) RemoveExecutions(e ...*Execution) *FunctionUpdateOne

RemoveExecutions removes "executions" edges to Execution entities.

func (*FunctionUpdateOne) Save

func (fuo *FunctionUpdateOne) Save(ctx context.Context) (*Function, error)

Save executes the query and returns the updated Function entity.

func (*FunctionUpdateOne) SaveX

func (fuo *FunctionUpdateOne) SaveX(ctx context.Context) *Function

SaveX is like Save, but panics if an error occurs.

func (*FunctionUpdateOne) Select

func (fuo *FunctionUpdateOne) Select(field string, fields ...string) *FunctionUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*FunctionUpdateOne) SetCodeHash

func (fuo *FunctionUpdateOne) SetCodeHash(s string) *FunctionUpdateOne

SetCodeHash sets the "code_hash" field.

func (*FunctionUpdateOne) SetCodePath

func (fuo *FunctionUpdateOne) SetCodePath(s string) *FunctionUpdateOne

SetCodePath sets the "code_path" field.

func (*FunctionUpdateOne) SetCodeType

func (fuo *FunctionUpdateOne) SetCodeType(s string) *FunctionUpdateOne

SetCodeType sets the "code_type" field.

func (*FunctionUpdateOne) SetEnvironment

func (fuo *FunctionUpdateOne) SetEnvironment(m map[string]string) *FunctionUpdateOne

SetEnvironment sets the "environment" field.

func (*FunctionUpdateOne) SetHandler

func (fuo *FunctionUpdateOne) SetHandler(s string) *FunctionUpdateOne

SetHandler sets the "handler" field.

func (*FunctionUpdateOne) SetLangRuntime

func (fuo *FunctionUpdateOne) SetLangRuntime(l *LangRuntime) *FunctionUpdateOne

SetLangRuntime sets the "lang_runtime" edge to the LangRuntime entity.

func (*FunctionUpdateOne) SetLangRuntimeID

func (fuo *FunctionUpdateOne) SetLangRuntimeID(id uuid.UUID) *FunctionUpdateOne

SetLangRuntimeID sets the "lang_runtime" edge to the LangRuntime entity by ID.

func (*FunctionUpdateOne) SetMemory

func (fuo *FunctionUpdateOne) SetMemory(i int) *FunctionUpdateOne

SetMemory sets the "memory" field.

func (*FunctionUpdateOne) SetName

func (fuo *FunctionUpdateOne) SetName(s string) *FunctionUpdateOne

SetName sets the "name" field.

func (*FunctionUpdateOne) SetNillableCodeHash

func (fuo *FunctionUpdateOne) SetNillableCodeHash(s *string) *FunctionUpdateOne

SetNillableCodeHash sets the "code_hash" field if the given value is not nil.

func (*FunctionUpdateOne) SetNillableCodePath

func (fuo *FunctionUpdateOne) SetNillableCodePath(s *string) *FunctionUpdateOne

SetNillableCodePath sets the "code_path" field if the given value is not nil.

func (*FunctionUpdateOne) SetNillableCodeType

func (fuo *FunctionUpdateOne) SetNillableCodeType(s *string) *FunctionUpdateOne

SetNillableCodeType sets the "code_type" field if the given value is not nil.

func (*FunctionUpdateOne) SetNillableHandler

func (fuo *FunctionUpdateOne) SetNillableHandler(s *string) *FunctionUpdateOne

SetNillableHandler sets the "handler" field if the given value is not nil.

func (*FunctionUpdateOne) SetNillableMemory

func (fuo *FunctionUpdateOne) SetNillableMemory(i *int) *FunctionUpdateOne

SetNillableMemory sets the "memory" field if the given value is not nil.

func (*FunctionUpdateOne) SetNillableName

func (fuo *FunctionUpdateOne) SetNillableName(s *string) *FunctionUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*FunctionUpdateOne) SetNillableRuntimeID

func (fuo *FunctionUpdateOne) SetNillableRuntimeID(u *uuid.UUID) *FunctionUpdateOne

SetNillableRuntimeID sets the "runtime_id" field if the given value is not nil.

func (*FunctionUpdateOne) SetNillableStatus

func (fuo *FunctionUpdateOne) SetNillableStatus(s *string) *FunctionUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*FunctionUpdateOne) SetNillableTenantID

func (fuo *FunctionUpdateOne) SetNillableTenantID(u *uuid.UUID) *FunctionUpdateOne

SetNillableTenantID sets the "tenant_id" field if the given value is not nil.

func (*FunctionUpdateOne) SetNillableTimeout

func (fuo *FunctionUpdateOne) SetNillableTimeout(i *int) *FunctionUpdateOne

SetNillableTimeout sets the "timeout" field if the given value is not nil.

func (*FunctionUpdateOne) SetRuntimeID

func (fuo *FunctionUpdateOne) SetRuntimeID(u uuid.UUID) *FunctionUpdateOne

SetRuntimeID sets the "runtime_id" field.

func (*FunctionUpdateOne) SetStatus

func (fuo *FunctionUpdateOne) SetStatus(s string) *FunctionUpdateOne

SetStatus sets the "status" field.

func (*FunctionUpdateOne) SetTenant

func (fuo *FunctionUpdateOne) SetTenant(t *Tenant) *FunctionUpdateOne

SetTenant sets the "tenant" edge to the Tenant entity.

func (*FunctionUpdateOne) SetTenantID

func (fuo *FunctionUpdateOne) SetTenantID(u uuid.UUID) *FunctionUpdateOne

SetTenantID sets the "tenant_id" field.

func (*FunctionUpdateOne) SetTimeout

func (fuo *FunctionUpdateOne) SetTimeout(i int) *FunctionUpdateOne

SetTimeout sets the "timeout" field.

func (*FunctionUpdateOne) SetUpdatedAt

func (fuo *FunctionUpdateOne) SetUpdatedAt(t time.Time) *FunctionUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*FunctionUpdateOne) Where

Where appends a list predicates to the FunctionUpdate builder.

type Functions

type Functions []*Function

Functions is a parsable slice of Function.

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 LangRuntime

type LangRuntime struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Language holds the value of the "language" field.
	Language string `json:"language,omitempty"`
	// Version holds the value of the "version" field.
	Version string `json:"version,omitempty"`
	// Image holds the value of the "image" field.
	Image string `json:"image,omitempty"`
	// Environment holds the value of the "environment" field.
	Environment map[string]string `json:"environment,omitempty"`
	// IsCustom holds the value of the "is_custom" field.
	IsCustom bool `json:"is_custom,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the LangRuntimeQuery when eager-loading is set.
	Edges LangRuntimeEdges `json:"edges"`
	// contains filtered or unexported fields
}

LangRuntime is the model entity for the LangRuntime schema.

func (*LangRuntime) QueryFunctions

func (lr *LangRuntime) QueryFunctions() *FunctionQuery

QueryFunctions queries the "functions" edge of the LangRuntime entity.

func (*LangRuntime) String

func (lr *LangRuntime) String() string

String implements the fmt.Stringer.

func (*LangRuntime) Unwrap

func (lr *LangRuntime) Unwrap() *LangRuntime

Unwrap unwraps the LangRuntime 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 (*LangRuntime) Update

func (lr *LangRuntime) Update() *LangRuntimeUpdateOne

Update returns a builder for updating this LangRuntime. Note that you need to call LangRuntime.Unwrap() before calling this method if this LangRuntime was returned from a transaction, and the transaction was committed or rolled back.

func (*LangRuntime) Value

func (lr *LangRuntime) Value(name string) (ent.Value, error)

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

type LangRuntimeClient

type LangRuntimeClient struct {
	// contains filtered or unexported fields
}

LangRuntimeClient is a client for the LangRuntime schema.

func NewLangRuntimeClient

func NewLangRuntimeClient(c config) *LangRuntimeClient

NewLangRuntimeClient returns a client for the LangRuntime from the given config.

func (*LangRuntimeClient) Create

func (c *LangRuntimeClient) Create() *LangRuntimeCreate

Create returns a builder for creating a LangRuntime entity.

func (*LangRuntimeClient) CreateBulk

func (c *LangRuntimeClient) CreateBulk(builders ...*LangRuntimeCreate) *LangRuntimeCreateBulk

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

func (*LangRuntimeClient) Delete

func (c *LangRuntimeClient) Delete() *LangRuntimeDelete

Delete returns a delete builder for LangRuntime.

func (*LangRuntimeClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*LangRuntimeClient) DeleteOneID

func (c *LangRuntimeClient) DeleteOneID(id uuid.UUID) *LangRuntimeDeleteOne

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

func (*LangRuntimeClient) Get

Get returns a LangRuntime entity by its id.

func (*LangRuntimeClient) GetX

GetX is like Get, but panics if an error occurs.

func (*LangRuntimeClient) Hooks

func (c *LangRuntimeClient) Hooks() []Hook

Hooks returns the client hooks.

func (*LangRuntimeClient) Intercept

func (c *LangRuntimeClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `langruntime.Intercept(f(g(h())))`.

func (*LangRuntimeClient) Interceptors

func (c *LangRuntimeClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*LangRuntimeClient) MapCreateBulk

func (c *LangRuntimeClient) MapCreateBulk(slice any, setFunc func(*LangRuntimeCreate, int)) *LangRuntimeCreateBulk

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 (*LangRuntimeClient) Query

func (c *LangRuntimeClient) Query() *LangRuntimeQuery

Query returns a query builder for LangRuntime.

func (*LangRuntimeClient) QueryFunctions

func (c *LangRuntimeClient) QueryFunctions(lr *LangRuntime) *FunctionQuery

QueryFunctions queries the functions edge of a LangRuntime.

func (*LangRuntimeClient) Update

func (c *LangRuntimeClient) Update() *LangRuntimeUpdate

Update returns an update builder for LangRuntime.

func (*LangRuntimeClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*LangRuntimeClient) UpdateOneID

func (c *LangRuntimeClient) UpdateOneID(id uuid.UUID) *LangRuntimeUpdateOne

UpdateOneID returns an update builder for the given id.

func (*LangRuntimeClient) Use

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

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `langruntime.Hooks(f(g(h())))`.

type LangRuntimeCreate

type LangRuntimeCreate struct {
	// contains filtered or unexported fields
}

LangRuntimeCreate is the builder for creating a LangRuntime entity.

func (*LangRuntimeCreate) AddFunctionIDs

func (lrc *LangRuntimeCreate) AddFunctionIDs(ids ...uuid.UUID) *LangRuntimeCreate

AddFunctionIDs adds the "functions" edge to the Function entity by IDs.

func (*LangRuntimeCreate) AddFunctions

func (lrc *LangRuntimeCreate) AddFunctions(f ...*Function) *LangRuntimeCreate

AddFunctions adds the "functions" edges to the Function entity.

func (*LangRuntimeCreate) Exec

func (lrc *LangRuntimeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*LangRuntimeCreate) ExecX

func (lrc *LangRuntimeCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*LangRuntimeCreate) Mutation

func (lrc *LangRuntimeCreate) Mutation() *LangRuntimeMutation

Mutation returns the LangRuntimeMutation object of the builder.

func (*LangRuntimeCreate) Save

func (lrc *LangRuntimeCreate) Save(ctx context.Context) (*LangRuntime, error)

Save creates the LangRuntime in the database.

func (*LangRuntimeCreate) SaveX

func (lrc *LangRuntimeCreate) SaveX(ctx context.Context) *LangRuntime

SaveX calls Save and panics if Save returns an error.

func (*LangRuntimeCreate) SetCreatedAt

func (lrc *LangRuntimeCreate) SetCreatedAt(t time.Time) *LangRuntimeCreate

SetCreatedAt sets the "created_at" field.

func (*LangRuntimeCreate) SetEnvironment

func (lrc *LangRuntimeCreate) SetEnvironment(m map[string]string) *LangRuntimeCreate

SetEnvironment sets the "environment" field.

func (*LangRuntimeCreate) SetID

SetID sets the "id" field.

func (*LangRuntimeCreate) SetImage

func (lrc *LangRuntimeCreate) SetImage(s string) *LangRuntimeCreate

SetImage sets the "image" field.

func (*LangRuntimeCreate) SetIsCustom

func (lrc *LangRuntimeCreate) SetIsCustom(b bool) *LangRuntimeCreate

SetIsCustom sets the "is_custom" field.

func (*LangRuntimeCreate) SetLanguage

func (lrc *LangRuntimeCreate) SetLanguage(s string) *LangRuntimeCreate

SetLanguage sets the "language" field.

func (*LangRuntimeCreate) SetName

func (lrc *LangRuntimeCreate) SetName(s string) *LangRuntimeCreate

SetName sets the "name" field.

func (*LangRuntimeCreate) SetNillableCreatedAt

func (lrc *LangRuntimeCreate) SetNillableCreatedAt(t *time.Time) *LangRuntimeCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*LangRuntimeCreate) SetNillableID

func (lrc *LangRuntimeCreate) SetNillableID(u *uuid.UUID) *LangRuntimeCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*LangRuntimeCreate) SetNillableIsCustom

func (lrc *LangRuntimeCreate) SetNillableIsCustom(b *bool) *LangRuntimeCreate

SetNillableIsCustom sets the "is_custom" field if the given value is not nil.

func (*LangRuntimeCreate) SetNillableUpdatedAt

func (lrc *LangRuntimeCreate) SetNillableUpdatedAt(t *time.Time) *LangRuntimeCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*LangRuntimeCreate) SetUpdatedAt

func (lrc *LangRuntimeCreate) SetUpdatedAt(t time.Time) *LangRuntimeCreate

SetUpdatedAt sets the "updated_at" field.

func (*LangRuntimeCreate) SetVersion

func (lrc *LangRuntimeCreate) SetVersion(s string) *LangRuntimeCreate

SetVersion sets the "version" field.

type LangRuntimeCreateBulk

type LangRuntimeCreateBulk struct {
	// contains filtered or unexported fields
}

LangRuntimeCreateBulk is the builder for creating many LangRuntime entities in bulk.

func (*LangRuntimeCreateBulk) Exec

func (lrcb *LangRuntimeCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*LangRuntimeCreateBulk) ExecX

func (lrcb *LangRuntimeCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*LangRuntimeCreateBulk) Save

func (lrcb *LangRuntimeCreateBulk) Save(ctx context.Context) ([]*LangRuntime, error)

Save creates the LangRuntime entities in the database.

func (*LangRuntimeCreateBulk) SaveX

func (lrcb *LangRuntimeCreateBulk) SaveX(ctx context.Context) []*LangRuntime

SaveX is like Save, but panics if an error occurs.

type LangRuntimeDelete

type LangRuntimeDelete struct {
	// contains filtered or unexported fields
}

LangRuntimeDelete is the builder for deleting a LangRuntime entity.

func (*LangRuntimeDelete) Exec

func (lrd *LangRuntimeDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*LangRuntimeDelete) ExecX

func (lrd *LangRuntimeDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*LangRuntimeDelete) Where

Where appends a list predicates to the LangRuntimeDelete builder.

type LangRuntimeDeleteOne

type LangRuntimeDeleteOne struct {
	// contains filtered or unexported fields
}

LangRuntimeDeleteOne is the builder for deleting a single LangRuntime entity.

func (*LangRuntimeDeleteOne) Exec

func (lrdo *LangRuntimeDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*LangRuntimeDeleteOne) ExecX

func (lrdo *LangRuntimeDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*LangRuntimeDeleteOne) Where

Where appends a list predicates to the LangRuntimeDelete builder.

type LangRuntimeEdges

type LangRuntimeEdges struct {
	// Functions holds the value of the functions edge.
	Functions []*Function `json:"functions,omitempty"`
	// contains filtered or unexported fields
}

LangRuntimeEdges holds the relations/edges for other nodes in the graph.

func (LangRuntimeEdges) FunctionsOrErr

func (e LangRuntimeEdges) FunctionsOrErr() ([]*Function, error)

FunctionsOrErr returns the Functions value or an error if the edge was not loaded in eager-loading.

type LangRuntimeGroupBy

type LangRuntimeGroupBy struct {
	// contains filtered or unexported fields
}

LangRuntimeGroupBy is the group-by builder for LangRuntime entities.

func (*LangRuntimeGroupBy) Aggregate

func (lrgb *LangRuntimeGroupBy) Aggregate(fns ...AggregateFunc) *LangRuntimeGroupBy

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

func (*LangRuntimeGroupBy) Bool

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

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

func (*LangRuntimeGroupBy) BoolX

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

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

func (*LangRuntimeGroupBy) Bools

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

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

func (*LangRuntimeGroupBy) BoolsX

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

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

func (*LangRuntimeGroupBy) Float64

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

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

func (*LangRuntimeGroupBy) Float64X

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

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

func (*LangRuntimeGroupBy) Float64s

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

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

func (*LangRuntimeGroupBy) Float64sX

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

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

func (*LangRuntimeGroupBy) Int

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

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

func (*LangRuntimeGroupBy) IntX

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

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

func (*LangRuntimeGroupBy) Ints

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

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

func (*LangRuntimeGroupBy) IntsX

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

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

func (*LangRuntimeGroupBy) Scan

func (lrgb *LangRuntimeGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*LangRuntimeGroupBy) ScanX

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

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

func (*LangRuntimeGroupBy) String

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

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

func (*LangRuntimeGroupBy) StringX

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

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

func (*LangRuntimeGroupBy) Strings

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

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

func (*LangRuntimeGroupBy) StringsX

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

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

type LangRuntimeMutation

type LangRuntimeMutation struct {
	// contains filtered or unexported fields
}

LangRuntimeMutation represents an operation that mutates the LangRuntime nodes in the graph.

func (*LangRuntimeMutation) AddField

func (m *LangRuntimeMutation) 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 (*LangRuntimeMutation) AddFunctionIDs

func (m *LangRuntimeMutation) AddFunctionIDs(ids ...uuid.UUID)

AddFunctionIDs adds the "functions" edge to the Function entity by ids.

func (*LangRuntimeMutation) AddedEdges

func (m *LangRuntimeMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*LangRuntimeMutation) AddedField

func (m *LangRuntimeMutation) 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 (*LangRuntimeMutation) AddedFields

func (m *LangRuntimeMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*LangRuntimeMutation) AddedIDs

func (m *LangRuntimeMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*LangRuntimeMutation) ClearEdge

func (m *LangRuntimeMutation) 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 (*LangRuntimeMutation) ClearEnvironment

func (m *LangRuntimeMutation) ClearEnvironment()

ClearEnvironment clears the value of the "environment" field.

func (*LangRuntimeMutation) ClearField

func (m *LangRuntimeMutation) 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 (*LangRuntimeMutation) ClearFunctions

func (m *LangRuntimeMutation) ClearFunctions()

ClearFunctions clears the "functions" edge to the Function entity.

func (*LangRuntimeMutation) ClearedEdges

func (m *LangRuntimeMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*LangRuntimeMutation) ClearedFields

func (m *LangRuntimeMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (LangRuntimeMutation) Client

func (m LangRuntimeMutation) 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 (*LangRuntimeMutation) CreatedAt

func (m *LangRuntimeMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*LangRuntimeMutation) EdgeCleared

func (m *LangRuntimeMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*LangRuntimeMutation) Environment

func (m *LangRuntimeMutation) Environment() (r map[string]string, exists bool)

Environment returns the value of the "environment" field in the mutation.

func (*LangRuntimeMutation) EnvironmentCleared

func (m *LangRuntimeMutation) EnvironmentCleared() bool

EnvironmentCleared returns if the "environment" field was cleared in this mutation.

func (*LangRuntimeMutation) Field

func (m *LangRuntimeMutation) 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 (*LangRuntimeMutation) FieldCleared

func (m *LangRuntimeMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*LangRuntimeMutation) Fields

func (m *LangRuntimeMutation) 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 (*LangRuntimeMutation) FunctionsCleared

func (m *LangRuntimeMutation) FunctionsCleared() bool

FunctionsCleared reports if the "functions" edge to the Function entity was cleared.

func (*LangRuntimeMutation) FunctionsIDs

func (m *LangRuntimeMutation) FunctionsIDs() (ids []uuid.UUID)

FunctionsIDs returns the "functions" edge IDs in the mutation.

func (*LangRuntimeMutation) ID

func (m *LangRuntimeMutation) ID() (id uuid.UUID, 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 (*LangRuntimeMutation) IDs

func (m *LangRuntimeMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*LangRuntimeMutation) Image

func (m *LangRuntimeMutation) Image() (r string, exists bool)

Image returns the value of the "image" field in the mutation.

func (*LangRuntimeMutation) IsCustom

func (m *LangRuntimeMutation) IsCustom() (r bool, exists bool)

IsCustom returns the value of the "is_custom" field in the mutation.

func (*LangRuntimeMutation) Language

func (m *LangRuntimeMutation) Language() (r string, exists bool)

Language returns the value of the "language" field in the mutation.

func (*LangRuntimeMutation) Name

func (m *LangRuntimeMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*LangRuntimeMutation) OldCreatedAt

func (m *LangRuntimeMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the LangRuntime entity. If the LangRuntime 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 (*LangRuntimeMutation) OldEnvironment

func (m *LangRuntimeMutation) OldEnvironment(ctx context.Context) (v map[string]string, err error)

OldEnvironment returns the old "environment" field's value of the LangRuntime entity. If the LangRuntime 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 (*LangRuntimeMutation) OldField

func (m *LangRuntimeMutation) 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 (*LangRuntimeMutation) OldImage

func (m *LangRuntimeMutation) OldImage(ctx context.Context) (v string, err error)

OldImage returns the old "image" field's value of the LangRuntime entity. If the LangRuntime 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 (*LangRuntimeMutation) OldIsCustom

func (m *LangRuntimeMutation) OldIsCustom(ctx context.Context) (v bool, err error)

OldIsCustom returns the old "is_custom" field's value of the LangRuntime entity. If the LangRuntime 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 (*LangRuntimeMutation) OldLanguage

func (m *LangRuntimeMutation) OldLanguage(ctx context.Context) (v string, err error)

OldLanguage returns the old "language" field's value of the LangRuntime entity. If the LangRuntime 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 (*LangRuntimeMutation) OldName

func (m *LangRuntimeMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the LangRuntime entity. If the LangRuntime 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 (*LangRuntimeMutation) OldUpdatedAt

func (m *LangRuntimeMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the LangRuntime entity. If the LangRuntime 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 (*LangRuntimeMutation) OldVersion

func (m *LangRuntimeMutation) OldVersion(ctx context.Context) (v string, err error)

OldVersion returns the old "version" field's value of the LangRuntime entity. If the LangRuntime 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 (*LangRuntimeMutation) Op

func (m *LangRuntimeMutation) Op() Op

Op returns the operation name.

func (*LangRuntimeMutation) RemoveFunctionIDs

func (m *LangRuntimeMutation) RemoveFunctionIDs(ids ...uuid.UUID)

RemoveFunctionIDs removes the "functions" edge to the Function entity by IDs.

func (*LangRuntimeMutation) RemovedEdges

func (m *LangRuntimeMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*LangRuntimeMutation) RemovedFunctionsIDs

func (m *LangRuntimeMutation) RemovedFunctionsIDs() (ids []uuid.UUID)

RemovedFunctions returns the removed IDs of the "functions" edge to the Function entity.

func (*LangRuntimeMutation) RemovedIDs

func (m *LangRuntimeMutation) 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 (*LangRuntimeMutation) ResetCreatedAt

func (m *LangRuntimeMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*LangRuntimeMutation) ResetEdge

func (m *LangRuntimeMutation) 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 (*LangRuntimeMutation) ResetEnvironment

func (m *LangRuntimeMutation) ResetEnvironment()

ResetEnvironment resets all changes to the "environment" field.

func (*LangRuntimeMutation) ResetField

func (m *LangRuntimeMutation) 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 (*LangRuntimeMutation) ResetFunctions

func (m *LangRuntimeMutation) ResetFunctions()

ResetFunctions resets all changes to the "functions" edge.

func (*LangRuntimeMutation) ResetImage

func (m *LangRuntimeMutation) ResetImage()

ResetImage resets all changes to the "image" field.

func (*LangRuntimeMutation) ResetIsCustom

func (m *LangRuntimeMutation) ResetIsCustom()

ResetIsCustom resets all changes to the "is_custom" field.

func (*LangRuntimeMutation) ResetLanguage

func (m *LangRuntimeMutation) ResetLanguage()

ResetLanguage resets all changes to the "language" field.

func (*LangRuntimeMutation) ResetName

func (m *LangRuntimeMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*LangRuntimeMutation) ResetUpdatedAt

func (m *LangRuntimeMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*LangRuntimeMutation) ResetVersion

func (m *LangRuntimeMutation) ResetVersion()

ResetVersion resets all changes to the "version" field.

func (*LangRuntimeMutation) SetCreatedAt

func (m *LangRuntimeMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*LangRuntimeMutation) SetEnvironment

func (m *LangRuntimeMutation) SetEnvironment(value map[string]string)

SetEnvironment sets the "environment" field.

func (*LangRuntimeMutation) SetField

func (m *LangRuntimeMutation) 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 (*LangRuntimeMutation) SetID

func (m *LangRuntimeMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of LangRuntime entities.

func (*LangRuntimeMutation) SetImage

func (m *LangRuntimeMutation) SetImage(s string)

SetImage sets the "image" field.

func (*LangRuntimeMutation) SetIsCustom

func (m *LangRuntimeMutation) SetIsCustom(b bool)

SetIsCustom sets the "is_custom" field.

func (*LangRuntimeMutation) SetLanguage

func (m *LangRuntimeMutation) SetLanguage(s string)

SetLanguage sets the "language" field.

func (*LangRuntimeMutation) SetName

func (m *LangRuntimeMutation) SetName(s string)

SetName sets the "name" field.

func (*LangRuntimeMutation) SetOp

func (m *LangRuntimeMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*LangRuntimeMutation) SetUpdatedAt

func (m *LangRuntimeMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*LangRuntimeMutation) SetVersion

func (m *LangRuntimeMutation) SetVersion(s string)

SetVersion sets the "version" field.

func (LangRuntimeMutation) Tx

func (m LangRuntimeMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*LangRuntimeMutation) Type

func (m *LangRuntimeMutation) Type() string

Type returns the node type of this mutation (LangRuntime).

func (*LangRuntimeMutation) UpdatedAt

func (m *LangRuntimeMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*LangRuntimeMutation) Version

func (m *LangRuntimeMutation) Version() (r string, exists bool)

Version returns the value of the "version" field in the mutation.

func (*LangRuntimeMutation) Where

func (m *LangRuntimeMutation) Where(ps ...predicate.LangRuntime)

Where appends a list predicates to the LangRuntimeMutation builder.

func (*LangRuntimeMutation) WhereP

func (m *LangRuntimeMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the LangRuntimeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type LangRuntimeQuery

type LangRuntimeQuery struct {
	// contains filtered or unexported fields
}

LangRuntimeQuery is the builder for querying LangRuntime entities.

func (*LangRuntimeQuery) Aggregate

func (lrq *LangRuntimeQuery) Aggregate(fns ...AggregateFunc) *LangRuntimeSelect

Aggregate returns a LangRuntimeSelect configured with the given aggregations.

func (*LangRuntimeQuery) All

func (lrq *LangRuntimeQuery) All(ctx context.Context) ([]*LangRuntime, error)

All executes the query and returns a list of LangRuntimes.

func (*LangRuntimeQuery) AllX

func (lrq *LangRuntimeQuery) AllX(ctx context.Context) []*LangRuntime

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

func (*LangRuntimeQuery) Clone

func (lrq *LangRuntimeQuery) Clone() *LangRuntimeQuery

Clone returns a duplicate of the LangRuntimeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*LangRuntimeQuery) Count

func (lrq *LangRuntimeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*LangRuntimeQuery) CountX

func (lrq *LangRuntimeQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*LangRuntimeQuery) Exist

func (lrq *LangRuntimeQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*LangRuntimeQuery) ExistX

func (lrq *LangRuntimeQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*LangRuntimeQuery) First

func (lrq *LangRuntimeQuery) First(ctx context.Context) (*LangRuntime, error)

First returns the first LangRuntime entity from the query. Returns a *NotFoundError when no LangRuntime was found.

func (*LangRuntimeQuery) FirstID

func (lrq *LangRuntimeQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first LangRuntime ID from the query. Returns a *NotFoundError when no LangRuntime ID was found.

func (*LangRuntimeQuery) FirstIDX

func (lrq *LangRuntimeQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*LangRuntimeQuery) FirstX

func (lrq *LangRuntimeQuery) FirstX(ctx context.Context) *LangRuntime

FirstX is like First, but panics if an error occurs.

func (*LangRuntimeQuery) GroupBy

func (lrq *LangRuntimeQuery) GroupBy(field string, fields ...string) *LangRuntimeGroupBy

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.LangRuntime.Query().
	GroupBy(langruntime.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*LangRuntimeQuery) IDs

func (lrq *LangRuntimeQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of LangRuntime IDs.

func (*LangRuntimeQuery) IDsX

func (lrq *LangRuntimeQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*LangRuntimeQuery) Limit

func (lrq *LangRuntimeQuery) Limit(limit int) *LangRuntimeQuery

Limit the number of records to be returned by this query.

func (*LangRuntimeQuery) Offset

func (lrq *LangRuntimeQuery) Offset(offset int) *LangRuntimeQuery

Offset to start from.

func (*LangRuntimeQuery) Only

func (lrq *LangRuntimeQuery) Only(ctx context.Context) (*LangRuntime, error)

Only returns a single LangRuntime entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one LangRuntime entity is found. Returns a *NotFoundError when no LangRuntime entities are found.

func (*LangRuntimeQuery) OnlyID

func (lrq *LangRuntimeQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only LangRuntime ID in the query. Returns a *NotSingularError when more than one LangRuntime ID is found. Returns a *NotFoundError when no entities are found.

func (*LangRuntimeQuery) OnlyIDX

func (lrq *LangRuntimeQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*LangRuntimeQuery) OnlyX

func (lrq *LangRuntimeQuery) OnlyX(ctx context.Context) *LangRuntime

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

func (*LangRuntimeQuery) Order

Order specifies how the records should be ordered.

func (*LangRuntimeQuery) QueryFunctions

func (lrq *LangRuntimeQuery) QueryFunctions() *FunctionQuery

QueryFunctions chains the current query on the "functions" edge.

func (*LangRuntimeQuery) Select

func (lrq *LangRuntimeQuery) Select(fields ...string) *LangRuntimeSelect

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.LangRuntime.Query().
	Select(langruntime.FieldName).
	Scan(ctx, &v)

func (*LangRuntimeQuery) Unique

func (lrq *LangRuntimeQuery) Unique(unique bool) *LangRuntimeQuery

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 (*LangRuntimeQuery) Where

Where adds a new predicate for the LangRuntimeQuery builder.

func (*LangRuntimeQuery) WithFunctions

func (lrq *LangRuntimeQuery) WithFunctions(opts ...func(*FunctionQuery)) *LangRuntimeQuery

WithFunctions tells the query-builder to eager-load the nodes that are connected to the "functions" edge. The optional arguments are used to configure the query builder of the edge.

type LangRuntimeSelect

type LangRuntimeSelect struct {
	*LangRuntimeQuery
	// contains filtered or unexported fields
}

LangRuntimeSelect is the builder for selecting fields of LangRuntime entities.

func (*LangRuntimeSelect) Aggregate

func (lrs *LangRuntimeSelect) Aggregate(fns ...AggregateFunc) *LangRuntimeSelect

Aggregate adds the given aggregation functions to the selector query.

func (*LangRuntimeSelect) Bool

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

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

func (*LangRuntimeSelect) BoolX

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

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

func (*LangRuntimeSelect) Bools

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

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

func (*LangRuntimeSelect) BoolsX

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

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

func (*LangRuntimeSelect) Float64

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

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

func (*LangRuntimeSelect) Float64X

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

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

func (*LangRuntimeSelect) Float64s

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

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

func (*LangRuntimeSelect) Float64sX

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

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

func (*LangRuntimeSelect) Int

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

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

func (*LangRuntimeSelect) IntX

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

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

func (*LangRuntimeSelect) Ints

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

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

func (*LangRuntimeSelect) IntsX

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

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

func (*LangRuntimeSelect) Scan

func (lrs *LangRuntimeSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*LangRuntimeSelect) ScanX

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

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

func (*LangRuntimeSelect) String

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

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

func (*LangRuntimeSelect) StringX

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

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

func (*LangRuntimeSelect) Strings

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

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

func (*LangRuntimeSelect) StringsX

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

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

type LangRuntimeUpdate

type LangRuntimeUpdate struct {
	// contains filtered or unexported fields
}

LangRuntimeUpdate is the builder for updating LangRuntime entities.

func (*LangRuntimeUpdate) AddFunctionIDs

func (lru *LangRuntimeUpdate) AddFunctionIDs(ids ...uuid.UUID) *LangRuntimeUpdate

AddFunctionIDs adds the "functions" edge to the Function entity by IDs.

func (*LangRuntimeUpdate) AddFunctions

func (lru *LangRuntimeUpdate) AddFunctions(f ...*Function) *LangRuntimeUpdate

AddFunctions adds the "functions" edges to the Function entity.

func (*LangRuntimeUpdate) ClearEnvironment

func (lru *LangRuntimeUpdate) ClearEnvironment() *LangRuntimeUpdate

ClearEnvironment clears the value of the "environment" field.

func (*LangRuntimeUpdate) ClearFunctions

func (lru *LangRuntimeUpdate) ClearFunctions() *LangRuntimeUpdate

ClearFunctions clears all "functions" edges to the Function entity.

func (*LangRuntimeUpdate) Exec

func (lru *LangRuntimeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*LangRuntimeUpdate) ExecX

func (lru *LangRuntimeUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*LangRuntimeUpdate) Mutation

func (lru *LangRuntimeUpdate) Mutation() *LangRuntimeMutation

Mutation returns the LangRuntimeMutation object of the builder.

func (*LangRuntimeUpdate) RemoveFunctionIDs

func (lru *LangRuntimeUpdate) RemoveFunctionIDs(ids ...uuid.UUID) *LangRuntimeUpdate

RemoveFunctionIDs removes the "functions" edge to Function entities by IDs.

func (*LangRuntimeUpdate) RemoveFunctions

func (lru *LangRuntimeUpdate) RemoveFunctions(f ...*Function) *LangRuntimeUpdate

RemoveFunctions removes "functions" edges to Function entities.

func (*LangRuntimeUpdate) Save

func (lru *LangRuntimeUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*LangRuntimeUpdate) SaveX

func (lru *LangRuntimeUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*LangRuntimeUpdate) SetEnvironment

func (lru *LangRuntimeUpdate) SetEnvironment(m map[string]string) *LangRuntimeUpdate

SetEnvironment sets the "environment" field.

func (*LangRuntimeUpdate) SetImage

func (lru *LangRuntimeUpdate) SetImage(s string) *LangRuntimeUpdate

SetImage sets the "image" field.

func (*LangRuntimeUpdate) SetIsCustom

func (lru *LangRuntimeUpdate) SetIsCustom(b bool) *LangRuntimeUpdate

SetIsCustom sets the "is_custom" field.

func (*LangRuntimeUpdate) SetLanguage

func (lru *LangRuntimeUpdate) SetLanguage(s string) *LangRuntimeUpdate

SetLanguage sets the "language" field.

func (*LangRuntimeUpdate) SetName

func (lru *LangRuntimeUpdate) SetName(s string) *LangRuntimeUpdate

SetName sets the "name" field.

func (*LangRuntimeUpdate) SetNillableImage

func (lru *LangRuntimeUpdate) SetNillableImage(s *string) *LangRuntimeUpdate

SetNillableImage sets the "image" field if the given value is not nil.

func (*LangRuntimeUpdate) SetNillableIsCustom

func (lru *LangRuntimeUpdate) SetNillableIsCustom(b *bool) *LangRuntimeUpdate

SetNillableIsCustom sets the "is_custom" field if the given value is not nil.

func (*LangRuntimeUpdate) SetNillableLanguage

func (lru *LangRuntimeUpdate) SetNillableLanguage(s *string) *LangRuntimeUpdate

SetNillableLanguage sets the "language" field if the given value is not nil.

func (*LangRuntimeUpdate) SetNillableName

func (lru *LangRuntimeUpdate) SetNillableName(s *string) *LangRuntimeUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*LangRuntimeUpdate) SetNillableVersion

func (lru *LangRuntimeUpdate) SetNillableVersion(s *string) *LangRuntimeUpdate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*LangRuntimeUpdate) SetUpdatedAt

func (lru *LangRuntimeUpdate) SetUpdatedAt(t time.Time) *LangRuntimeUpdate

SetUpdatedAt sets the "updated_at" field.

func (*LangRuntimeUpdate) SetVersion

func (lru *LangRuntimeUpdate) SetVersion(s string) *LangRuntimeUpdate

SetVersion sets the "version" field.

func (*LangRuntimeUpdate) Where

Where appends a list predicates to the LangRuntimeUpdate builder.

type LangRuntimeUpdateOne

type LangRuntimeUpdateOne struct {
	// contains filtered or unexported fields
}

LangRuntimeUpdateOne is the builder for updating a single LangRuntime entity.

func (*LangRuntimeUpdateOne) AddFunctionIDs

func (lruo *LangRuntimeUpdateOne) AddFunctionIDs(ids ...uuid.UUID) *LangRuntimeUpdateOne

AddFunctionIDs adds the "functions" edge to the Function entity by IDs.

func (*LangRuntimeUpdateOne) AddFunctions

func (lruo *LangRuntimeUpdateOne) AddFunctions(f ...*Function) *LangRuntimeUpdateOne

AddFunctions adds the "functions" edges to the Function entity.

func (*LangRuntimeUpdateOne) ClearEnvironment

func (lruo *LangRuntimeUpdateOne) ClearEnvironment() *LangRuntimeUpdateOne

ClearEnvironment clears the value of the "environment" field.

func (*LangRuntimeUpdateOne) ClearFunctions

func (lruo *LangRuntimeUpdateOne) ClearFunctions() *LangRuntimeUpdateOne

ClearFunctions clears all "functions" edges to the Function entity.

func (*LangRuntimeUpdateOne) Exec

func (lruo *LangRuntimeUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*LangRuntimeUpdateOne) ExecX

func (lruo *LangRuntimeUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*LangRuntimeUpdateOne) Mutation

func (lruo *LangRuntimeUpdateOne) Mutation() *LangRuntimeMutation

Mutation returns the LangRuntimeMutation object of the builder.

func (*LangRuntimeUpdateOne) RemoveFunctionIDs

func (lruo *LangRuntimeUpdateOne) RemoveFunctionIDs(ids ...uuid.UUID) *LangRuntimeUpdateOne

RemoveFunctionIDs removes the "functions" edge to Function entities by IDs.

func (*LangRuntimeUpdateOne) RemoveFunctions

func (lruo *LangRuntimeUpdateOne) RemoveFunctions(f ...*Function) *LangRuntimeUpdateOne

RemoveFunctions removes "functions" edges to Function entities.

func (*LangRuntimeUpdateOne) Save

Save executes the query and returns the updated LangRuntime entity.

func (*LangRuntimeUpdateOne) SaveX

func (lruo *LangRuntimeUpdateOne) SaveX(ctx context.Context) *LangRuntime

SaveX is like Save, but panics if an error occurs.

func (*LangRuntimeUpdateOne) Select

func (lruo *LangRuntimeUpdateOne) Select(field string, fields ...string) *LangRuntimeUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*LangRuntimeUpdateOne) SetEnvironment

func (lruo *LangRuntimeUpdateOne) SetEnvironment(m map[string]string) *LangRuntimeUpdateOne

SetEnvironment sets the "environment" field.

func (*LangRuntimeUpdateOne) SetImage

SetImage sets the "image" field.

func (*LangRuntimeUpdateOne) SetIsCustom

func (lruo *LangRuntimeUpdateOne) SetIsCustom(b bool) *LangRuntimeUpdateOne

SetIsCustom sets the "is_custom" field.

func (*LangRuntimeUpdateOne) SetLanguage

func (lruo *LangRuntimeUpdateOne) SetLanguage(s string) *LangRuntimeUpdateOne

SetLanguage sets the "language" field.

func (*LangRuntimeUpdateOne) SetName

SetName sets the "name" field.

func (*LangRuntimeUpdateOne) SetNillableImage

func (lruo *LangRuntimeUpdateOne) SetNillableImage(s *string) *LangRuntimeUpdateOne

SetNillableImage sets the "image" field if the given value is not nil.

func (*LangRuntimeUpdateOne) SetNillableIsCustom

func (lruo *LangRuntimeUpdateOne) SetNillableIsCustom(b *bool) *LangRuntimeUpdateOne

SetNillableIsCustom sets the "is_custom" field if the given value is not nil.

func (*LangRuntimeUpdateOne) SetNillableLanguage

func (lruo *LangRuntimeUpdateOne) SetNillableLanguage(s *string) *LangRuntimeUpdateOne

SetNillableLanguage sets the "language" field if the given value is not nil.

func (*LangRuntimeUpdateOne) SetNillableName

func (lruo *LangRuntimeUpdateOne) SetNillableName(s *string) *LangRuntimeUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*LangRuntimeUpdateOne) SetNillableVersion

func (lruo *LangRuntimeUpdateOne) SetNillableVersion(s *string) *LangRuntimeUpdateOne

SetNillableVersion sets the "version" field if the given value is not nil.

func (*LangRuntimeUpdateOne) SetUpdatedAt

func (lruo *LangRuntimeUpdateOne) SetUpdatedAt(t time.Time) *LangRuntimeUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*LangRuntimeUpdateOne) SetVersion

func (lruo *LangRuntimeUpdateOne) SetVersion(s string) *LangRuntimeUpdateOne

SetVersion sets the "version" field.

func (*LangRuntimeUpdateOne) Where

Where appends a list predicates to the LangRuntimeUpdate builder.

type LangRuntimes

type LangRuntimes []*LangRuntime

LangRuntimes is a parsable slice of LangRuntime.

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 Tenant

type Tenant struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Namespace holds the value of the "namespace" field.
	Namespace string `json:"namespace,omitempty"`
	// MaxFunctions holds the value of the "max_functions" field.
	MaxFunctions int `json:"max_functions,omitempty"`
	// MaxConcurrent holds the value of the "max_concurrent" field.
	MaxConcurrent int `json:"max_concurrent,omitempty"`
	// MaxMemoryMB holds the value of the "max_memory_mb" field.
	MaxMemoryMB int `json:"max_memory_mb,omitempty"`
	// MaxStorageMB holds the value of the "max_storage_mb" field.
	MaxStorageMB int `json:"max_storage_mb,omitempty"`
	// Metadata holds the value of the "metadata" field.
	Metadata map[string]string `json:"metadata,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TenantQuery when eager-loading is set.
	Edges TenantEdges `json:"edges"`
	// contains filtered or unexported fields
}

Tenant is the model entity for the Tenant schema.

func (*Tenant) QueryExecutions

func (t *Tenant) QueryExecutions() *ExecutionQuery

QueryExecutions queries the "executions" edge of the Tenant entity.

func (*Tenant) QueryFunctions

func (t *Tenant) QueryFunctions() *FunctionQuery

QueryFunctions queries the "functions" edge of the Tenant entity.

func (*Tenant) String

func (t *Tenant) String() string

String implements the fmt.Stringer.

func (*Tenant) Unwrap

func (t *Tenant) Unwrap() *Tenant

Unwrap unwraps the Tenant 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 (*Tenant) Update

func (t *Tenant) Update() *TenantUpdateOne

Update returns a builder for updating this Tenant. Note that you need to call Tenant.Unwrap() before calling this method if this Tenant was returned from a transaction, and the transaction was committed or rolled back.

func (*Tenant) Value

func (t *Tenant) Value(name string) (ent.Value, error)

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

type TenantClient

type TenantClient struct {
	// contains filtered or unexported fields
}

TenantClient is a client for the Tenant schema.

func NewTenantClient

func NewTenantClient(c config) *TenantClient

NewTenantClient returns a client for the Tenant from the given config.

func (*TenantClient) Create

func (c *TenantClient) Create() *TenantCreate

Create returns a builder for creating a Tenant entity.

func (*TenantClient) CreateBulk

func (c *TenantClient) CreateBulk(builders ...*TenantCreate) *TenantCreateBulk

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

func (*TenantClient) Delete

func (c *TenantClient) Delete() *TenantDelete

Delete returns a delete builder for Tenant.

func (*TenantClient) DeleteOne

func (c *TenantClient) DeleteOne(t *Tenant) *TenantDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TenantClient) DeleteOneID

func (c *TenantClient) DeleteOneID(id uuid.UUID) *TenantDeleteOne

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

func (*TenantClient) Get

func (c *TenantClient) Get(ctx context.Context, id uuid.UUID) (*Tenant, error)

Get returns a Tenant entity by its id.

func (*TenantClient) GetX

func (c *TenantClient) GetX(ctx context.Context, id uuid.UUID) *Tenant

GetX is like Get, but panics if an error occurs.

func (*TenantClient) Hooks

func (c *TenantClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TenantClient) Intercept

func (c *TenantClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tenant.Intercept(f(g(h())))`.

func (*TenantClient) Interceptors

func (c *TenantClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*TenantClient) MapCreateBulk

func (c *TenantClient) MapCreateBulk(slice any, setFunc func(*TenantCreate, int)) *TenantCreateBulk

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 (*TenantClient) Query

func (c *TenantClient) Query() *TenantQuery

Query returns a query builder for Tenant.

func (*TenantClient) QueryExecutions

func (c *TenantClient) QueryExecutions(t *Tenant) *ExecutionQuery

QueryExecutions queries the executions edge of a Tenant.

func (*TenantClient) QueryFunctions

func (c *TenantClient) QueryFunctions(t *Tenant) *FunctionQuery

QueryFunctions queries the functions edge of a Tenant.

func (*TenantClient) Update

func (c *TenantClient) Update() *TenantUpdate

Update returns an update builder for Tenant.

func (*TenantClient) UpdateOne

func (c *TenantClient) UpdateOne(t *Tenant) *TenantUpdateOne

UpdateOne returns an update builder for the given entity.

func (*TenantClient) UpdateOneID

func (c *TenantClient) UpdateOneID(id uuid.UUID) *TenantUpdateOne

UpdateOneID returns an update builder for the given id.

func (*TenantClient) Use

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

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tenant.Hooks(f(g(h())))`.

type TenantCreate

type TenantCreate struct {
	// contains filtered or unexported fields
}

TenantCreate is the builder for creating a Tenant entity.

func (*TenantCreate) AddExecutionIDs

func (tc *TenantCreate) AddExecutionIDs(ids ...uuid.UUID) *TenantCreate

AddExecutionIDs adds the "executions" edge to the Execution entity by IDs.

func (*TenantCreate) AddExecutions

func (tc *TenantCreate) AddExecutions(e ...*Execution) *TenantCreate

AddExecutions adds the "executions" edges to the Execution entity.

func (*TenantCreate) AddFunctionIDs

func (tc *TenantCreate) AddFunctionIDs(ids ...uuid.UUID) *TenantCreate

AddFunctionIDs adds the "functions" edge to the Function entity by IDs.

func (*TenantCreate) AddFunctions

func (tc *TenantCreate) AddFunctions(f ...*Function) *TenantCreate

AddFunctions adds the "functions" edges to the Function entity.

func (*TenantCreate) Exec

func (tc *TenantCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TenantCreate) ExecX

func (tc *TenantCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TenantCreate) Mutation

func (tc *TenantCreate) Mutation() *TenantMutation

Mutation returns the TenantMutation object of the builder.

func (*TenantCreate) Save

func (tc *TenantCreate) Save(ctx context.Context) (*Tenant, error)

Save creates the Tenant in the database.

func (*TenantCreate) SaveX

func (tc *TenantCreate) SaveX(ctx context.Context) *Tenant

SaveX calls Save and panics if Save returns an error.

func (*TenantCreate) SetCreatedAt

func (tc *TenantCreate) SetCreatedAt(t time.Time) *TenantCreate

SetCreatedAt sets the "created_at" field.

func (*TenantCreate) SetID

func (tc *TenantCreate) SetID(u uuid.UUID) *TenantCreate

SetID sets the "id" field.

func (*TenantCreate) SetMaxConcurrent

func (tc *TenantCreate) SetMaxConcurrent(i int) *TenantCreate

SetMaxConcurrent sets the "max_concurrent" field.

func (*TenantCreate) SetMaxFunctions

func (tc *TenantCreate) SetMaxFunctions(i int) *TenantCreate

SetMaxFunctions sets the "max_functions" field.

func (*TenantCreate) SetMaxMemoryMB

func (tc *TenantCreate) SetMaxMemoryMB(i int) *TenantCreate

SetMaxMemoryMB sets the "max_memory_mb" field.

func (*TenantCreate) SetMaxStorageMB

func (tc *TenantCreate) SetMaxStorageMB(i int) *TenantCreate

SetMaxStorageMB sets the "max_storage_mb" field.

func (*TenantCreate) SetMetadata

func (tc *TenantCreate) SetMetadata(m map[string]string) *TenantCreate

SetMetadata sets the "metadata" field.

func (*TenantCreate) SetName

func (tc *TenantCreate) SetName(s string) *TenantCreate

SetName sets the "name" field.

func (*TenantCreate) SetNamespace

func (tc *TenantCreate) SetNamespace(s string) *TenantCreate

SetNamespace sets the "namespace" field.

func (*TenantCreate) SetNillableCreatedAt

func (tc *TenantCreate) SetNillableCreatedAt(t *time.Time) *TenantCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*TenantCreate) SetNillableID

func (tc *TenantCreate) SetNillableID(u *uuid.UUID) *TenantCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*TenantCreate) SetNillableMaxConcurrent

func (tc *TenantCreate) SetNillableMaxConcurrent(i *int) *TenantCreate

SetNillableMaxConcurrent sets the "max_concurrent" field if the given value is not nil.

func (*TenantCreate) SetNillableMaxFunctions

func (tc *TenantCreate) SetNillableMaxFunctions(i *int) *TenantCreate

SetNillableMaxFunctions sets the "max_functions" field if the given value is not nil.

func (*TenantCreate) SetNillableMaxMemoryMB

func (tc *TenantCreate) SetNillableMaxMemoryMB(i *int) *TenantCreate

SetNillableMaxMemoryMB sets the "max_memory_mb" field if the given value is not nil.

func (*TenantCreate) SetNillableMaxStorageMB

func (tc *TenantCreate) SetNillableMaxStorageMB(i *int) *TenantCreate

SetNillableMaxStorageMB sets the "max_storage_mb" field if the given value is not nil.

func (*TenantCreate) SetNillableUpdatedAt

func (tc *TenantCreate) SetNillableUpdatedAt(t *time.Time) *TenantCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*TenantCreate) SetUpdatedAt

func (tc *TenantCreate) SetUpdatedAt(t time.Time) *TenantCreate

SetUpdatedAt sets the "updated_at" field.

type TenantCreateBulk

type TenantCreateBulk struct {
	// contains filtered or unexported fields
}

TenantCreateBulk is the builder for creating many Tenant entities in bulk.

func (*TenantCreateBulk) Exec

func (tcb *TenantCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TenantCreateBulk) ExecX

func (tcb *TenantCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TenantCreateBulk) Save

func (tcb *TenantCreateBulk) Save(ctx context.Context) ([]*Tenant, error)

Save creates the Tenant entities in the database.

func (*TenantCreateBulk) SaveX

func (tcb *TenantCreateBulk) SaveX(ctx context.Context) []*Tenant

SaveX is like Save, but panics if an error occurs.

type TenantDelete

type TenantDelete struct {
	// contains filtered or unexported fields
}

TenantDelete is the builder for deleting a Tenant entity.

func (*TenantDelete) Exec

func (td *TenantDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TenantDelete) ExecX

func (td *TenantDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TenantDelete) Where

func (td *TenantDelete) Where(ps ...predicate.Tenant) *TenantDelete

Where appends a list predicates to the TenantDelete builder.

type TenantDeleteOne

type TenantDeleteOne struct {
	// contains filtered or unexported fields
}

TenantDeleteOne is the builder for deleting a single Tenant entity.

func (*TenantDeleteOne) Exec

func (tdo *TenantDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TenantDeleteOne) ExecX

func (tdo *TenantDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TenantDeleteOne) Where

func (tdo *TenantDeleteOne) Where(ps ...predicate.Tenant) *TenantDeleteOne

Where appends a list predicates to the TenantDelete builder.

type TenantEdges

type TenantEdges struct {
	// Functions holds the value of the functions edge.
	Functions []*Function `json:"functions,omitempty"`
	// Executions holds the value of the executions edge.
	Executions []*Execution `json:"executions,omitempty"`
	// contains filtered or unexported fields
}

TenantEdges holds the relations/edges for other nodes in the graph.

func (TenantEdges) ExecutionsOrErr

func (e TenantEdges) ExecutionsOrErr() ([]*Execution, error)

ExecutionsOrErr returns the Executions value or an error if the edge was not loaded in eager-loading.

func (TenantEdges) FunctionsOrErr

func (e TenantEdges) FunctionsOrErr() ([]*Function, error)

FunctionsOrErr returns the Functions value or an error if the edge was not loaded in eager-loading.

type TenantGroupBy

type TenantGroupBy struct {
	// contains filtered or unexported fields
}

TenantGroupBy is the group-by builder for Tenant entities.

func (*TenantGroupBy) Aggregate

func (tgb *TenantGroupBy) Aggregate(fns ...AggregateFunc) *TenantGroupBy

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

func (*TenantGroupBy) Bool

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

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

func (*TenantGroupBy) BoolX

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

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

func (*TenantGroupBy) Bools

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

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

func (*TenantGroupBy) BoolsX

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

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

func (*TenantGroupBy) Float64

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

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

func (*TenantGroupBy) Float64X

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

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

func (*TenantGroupBy) Float64s

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

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

func (*TenantGroupBy) Float64sX

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

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

func (*TenantGroupBy) Int

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

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

func (*TenantGroupBy) IntX

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

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

func (*TenantGroupBy) Ints

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

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

func (*TenantGroupBy) IntsX

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

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

func (*TenantGroupBy) Scan

func (tgb *TenantGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TenantGroupBy) ScanX

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

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

func (*TenantGroupBy) String

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

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

func (*TenantGroupBy) StringX

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

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

func (*TenantGroupBy) Strings

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

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

func (*TenantGroupBy) StringsX

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

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

type TenantMutation

type TenantMutation struct {
	// contains filtered or unexported fields
}

TenantMutation represents an operation that mutates the Tenant nodes in the graph.

func (*TenantMutation) AddExecutionIDs

func (m *TenantMutation) AddExecutionIDs(ids ...uuid.UUID)

AddExecutionIDs adds the "executions" edge to the Execution entity by ids.

func (*TenantMutation) AddField

func (m *TenantMutation) 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 (*TenantMutation) AddFunctionIDs

func (m *TenantMutation) AddFunctionIDs(ids ...uuid.UUID)

AddFunctionIDs adds the "functions" edge to the Function entity by ids.

func (*TenantMutation) AddMaxConcurrent

func (m *TenantMutation) AddMaxConcurrent(i int)

AddMaxConcurrent adds i to the "max_concurrent" field.

func (*TenantMutation) AddMaxFunctions

func (m *TenantMutation) AddMaxFunctions(i int)

AddMaxFunctions adds i to the "max_functions" field.

func (*TenantMutation) AddMaxMemoryMB

func (m *TenantMutation) AddMaxMemoryMB(i int)

AddMaxMemoryMB adds i to the "max_memory_mb" field.

func (*TenantMutation) AddMaxStorageMB

func (m *TenantMutation) AddMaxStorageMB(i int)

AddMaxStorageMB adds i to the "max_storage_mb" field.

func (*TenantMutation) AddedEdges

func (m *TenantMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TenantMutation) AddedField

func (m *TenantMutation) 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 (*TenantMutation) AddedFields

func (m *TenantMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TenantMutation) AddedIDs

func (m *TenantMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TenantMutation) AddedMaxConcurrent

func (m *TenantMutation) AddedMaxConcurrent() (r int, exists bool)

AddedMaxConcurrent returns the value that was added to the "max_concurrent" field in this mutation.

func (*TenantMutation) AddedMaxFunctions

func (m *TenantMutation) AddedMaxFunctions() (r int, exists bool)

AddedMaxFunctions returns the value that was added to the "max_functions" field in this mutation.

func (*TenantMutation) AddedMaxMemoryMB

func (m *TenantMutation) AddedMaxMemoryMB() (r int, exists bool)

AddedMaxMemoryMB returns the value that was added to the "max_memory_mb" field in this mutation.

func (*TenantMutation) AddedMaxStorageMB

func (m *TenantMutation) AddedMaxStorageMB() (r int, exists bool)

AddedMaxStorageMB returns the value that was added to the "max_storage_mb" field in this mutation.

func (*TenantMutation) ClearEdge

func (m *TenantMutation) 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 (*TenantMutation) ClearExecutions

func (m *TenantMutation) ClearExecutions()

ClearExecutions clears the "executions" edge to the Execution entity.

func (*TenantMutation) ClearField

func (m *TenantMutation) 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 (*TenantMutation) ClearFunctions

func (m *TenantMutation) ClearFunctions()

ClearFunctions clears the "functions" edge to the Function entity.

func (*TenantMutation) ClearMetadata

func (m *TenantMutation) ClearMetadata()

ClearMetadata clears the value of the "metadata" field.

func (*TenantMutation) ClearedEdges

func (m *TenantMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TenantMutation) ClearedFields

func (m *TenantMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TenantMutation) Client

func (m TenantMutation) 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 (*TenantMutation) CreatedAt

func (m *TenantMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*TenantMutation) EdgeCleared

func (m *TenantMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TenantMutation) ExecutionsCleared

func (m *TenantMutation) ExecutionsCleared() bool

ExecutionsCleared reports if the "executions" edge to the Execution entity was cleared.

func (*TenantMutation) ExecutionsIDs

func (m *TenantMutation) ExecutionsIDs() (ids []uuid.UUID)

ExecutionsIDs returns the "executions" edge IDs in the mutation.

func (*TenantMutation) Field

func (m *TenantMutation) 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 (*TenantMutation) FieldCleared

func (m *TenantMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TenantMutation) Fields

func (m *TenantMutation) 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 (*TenantMutation) FunctionsCleared

func (m *TenantMutation) FunctionsCleared() bool

FunctionsCleared reports if the "functions" edge to the Function entity was cleared.

func (*TenantMutation) FunctionsIDs

func (m *TenantMutation) FunctionsIDs() (ids []uuid.UUID)

FunctionsIDs returns the "functions" edge IDs in the mutation.

func (*TenantMutation) ID

func (m *TenantMutation) ID() (id uuid.UUID, 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 (*TenantMutation) IDs

func (m *TenantMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*TenantMutation) MaxConcurrent

func (m *TenantMutation) MaxConcurrent() (r int, exists bool)

MaxConcurrent returns the value of the "max_concurrent" field in the mutation.

func (*TenantMutation) MaxFunctions

func (m *TenantMutation) MaxFunctions() (r int, exists bool)

MaxFunctions returns the value of the "max_functions" field in the mutation.

func (*TenantMutation) MaxMemoryMB

func (m *TenantMutation) MaxMemoryMB() (r int, exists bool)

MaxMemoryMB returns the value of the "max_memory_mb" field in the mutation.

func (*TenantMutation) MaxStorageMB

func (m *TenantMutation) MaxStorageMB() (r int, exists bool)

MaxStorageMB returns the value of the "max_storage_mb" field in the mutation.

func (*TenantMutation) Metadata

func (m *TenantMutation) Metadata() (r map[string]string, exists bool)

Metadata returns the value of the "metadata" field in the mutation.

func (*TenantMutation) MetadataCleared

func (m *TenantMutation) MetadataCleared() bool

MetadataCleared returns if the "metadata" field was cleared in this mutation.

func (*TenantMutation) Name

func (m *TenantMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*TenantMutation) Namespace

func (m *TenantMutation) Namespace() (r string, exists bool)

Namespace returns the value of the "namespace" field in the mutation.

func (*TenantMutation) OldCreatedAt

func (m *TenantMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Tenant entity. If the Tenant 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 (*TenantMutation) OldField

func (m *TenantMutation) 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 (*TenantMutation) OldMaxConcurrent

func (m *TenantMutation) OldMaxConcurrent(ctx context.Context) (v int, err error)

OldMaxConcurrent returns the old "max_concurrent" field's value of the Tenant entity. If the Tenant 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 (*TenantMutation) OldMaxFunctions

func (m *TenantMutation) OldMaxFunctions(ctx context.Context) (v int, err error)

OldMaxFunctions returns the old "max_functions" field's value of the Tenant entity. If the Tenant 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 (*TenantMutation) OldMaxMemoryMB

func (m *TenantMutation) OldMaxMemoryMB(ctx context.Context) (v int, err error)

OldMaxMemoryMB returns the old "max_memory_mb" field's value of the Tenant entity. If the Tenant 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 (*TenantMutation) OldMaxStorageMB

func (m *TenantMutation) OldMaxStorageMB(ctx context.Context) (v int, err error)

OldMaxStorageMB returns the old "max_storage_mb" field's value of the Tenant entity. If the Tenant 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 (*TenantMutation) OldMetadata

func (m *TenantMutation) OldMetadata(ctx context.Context) (v map[string]string, err error)

OldMetadata returns the old "metadata" field's value of the Tenant entity. If the Tenant 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 (*TenantMutation) OldName

func (m *TenantMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Tenant entity. If the Tenant 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 (*TenantMutation) OldNamespace

func (m *TenantMutation) OldNamespace(ctx context.Context) (v string, err error)

OldNamespace returns the old "namespace" field's value of the Tenant entity. If the Tenant 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 (*TenantMutation) OldUpdatedAt

func (m *TenantMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Tenant entity. If the Tenant 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 (*TenantMutation) Op

func (m *TenantMutation) Op() Op

Op returns the operation name.

func (*TenantMutation) RemoveExecutionIDs

func (m *TenantMutation) RemoveExecutionIDs(ids ...uuid.UUID)

RemoveExecutionIDs removes the "executions" edge to the Execution entity by IDs.

func (*TenantMutation) RemoveFunctionIDs

func (m *TenantMutation) RemoveFunctionIDs(ids ...uuid.UUID)

RemoveFunctionIDs removes the "functions" edge to the Function entity by IDs.

func (*TenantMutation) RemovedEdges

func (m *TenantMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TenantMutation) RemovedExecutionsIDs

func (m *TenantMutation) RemovedExecutionsIDs() (ids []uuid.UUID)

RemovedExecutions returns the removed IDs of the "executions" edge to the Execution entity.

func (*TenantMutation) RemovedFunctionsIDs

func (m *TenantMutation) RemovedFunctionsIDs() (ids []uuid.UUID)

RemovedFunctions returns the removed IDs of the "functions" edge to the Function entity.

func (*TenantMutation) RemovedIDs

func (m *TenantMutation) 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 (*TenantMutation) ResetCreatedAt

func (m *TenantMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*TenantMutation) ResetEdge

func (m *TenantMutation) 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 (*TenantMutation) ResetExecutions

func (m *TenantMutation) ResetExecutions()

ResetExecutions resets all changes to the "executions" edge.

func (*TenantMutation) ResetField

func (m *TenantMutation) 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 (*TenantMutation) ResetFunctions

func (m *TenantMutation) ResetFunctions()

ResetFunctions resets all changes to the "functions" edge.

func (*TenantMutation) ResetMaxConcurrent

func (m *TenantMutation) ResetMaxConcurrent()

ResetMaxConcurrent resets all changes to the "max_concurrent" field.

func (*TenantMutation) ResetMaxFunctions

func (m *TenantMutation) ResetMaxFunctions()

ResetMaxFunctions resets all changes to the "max_functions" field.

func (*TenantMutation) ResetMaxMemoryMB

func (m *TenantMutation) ResetMaxMemoryMB()

ResetMaxMemoryMB resets all changes to the "max_memory_mb" field.

func (*TenantMutation) ResetMaxStorageMB

func (m *TenantMutation) ResetMaxStorageMB()

ResetMaxStorageMB resets all changes to the "max_storage_mb" field.

func (*TenantMutation) ResetMetadata

func (m *TenantMutation) ResetMetadata()

ResetMetadata resets all changes to the "metadata" field.

func (*TenantMutation) ResetName

func (m *TenantMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*TenantMutation) ResetNamespace

func (m *TenantMutation) ResetNamespace()

ResetNamespace resets all changes to the "namespace" field.

func (*TenantMutation) ResetUpdatedAt

func (m *TenantMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*TenantMutation) SetCreatedAt

func (m *TenantMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*TenantMutation) SetField

func (m *TenantMutation) 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 (*TenantMutation) SetID

func (m *TenantMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Tenant entities.

func (*TenantMutation) SetMaxConcurrent

func (m *TenantMutation) SetMaxConcurrent(i int)

SetMaxConcurrent sets the "max_concurrent" field.

func (*TenantMutation) SetMaxFunctions

func (m *TenantMutation) SetMaxFunctions(i int)

SetMaxFunctions sets the "max_functions" field.

func (*TenantMutation) SetMaxMemoryMB

func (m *TenantMutation) SetMaxMemoryMB(i int)

SetMaxMemoryMB sets the "max_memory_mb" field.

func (*TenantMutation) SetMaxStorageMB

func (m *TenantMutation) SetMaxStorageMB(i int)

SetMaxStorageMB sets the "max_storage_mb" field.

func (*TenantMutation) SetMetadata

func (m *TenantMutation) SetMetadata(value map[string]string)

SetMetadata sets the "metadata" field.

func (*TenantMutation) SetName

func (m *TenantMutation) SetName(s string)

SetName sets the "name" field.

func (*TenantMutation) SetNamespace

func (m *TenantMutation) SetNamespace(s string)

SetNamespace sets the "namespace" field.

func (*TenantMutation) SetOp

func (m *TenantMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*TenantMutation) SetUpdatedAt

func (m *TenantMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (TenantMutation) Tx

func (m TenantMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TenantMutation) Type

func (m *TenantMutation) Type() string

Type returns the node type of this mutation (Tenant).

func (*TenantMutation) UpdatedAt

func (m *TenantMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*TenantMutation) Where

func (m *TenantMutation) Where(ps ...predicate.Tenant)

Where appends a list predicates to the TenantMutation builder.

func (*TenantMutation) WhereP

func (m *TenantMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TenantMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type TenantQuery

type TenantQuery struct {
	// contains filtered or unexported fields
}

TenantQuery is the builder for querying Tenant entities.

func (*TenantQuery) Aggregate

func (tq *TenantQuery) Aggregate(fns ...AggregateFunc) *TenantSelect

Aggregate returns a TenantSelect configured with the given aggregations.

func (*TenantQuery) All

func (tq *TenantQuery) All(ctx context.Context) ([]*Tenant, error)

All executes the query and returns a list of Tenants.

func (*TenantQuery) AllX

func (tq *TenantQuery) AllX(ctx context.Context) []*Tenant

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

func (*TenantQuery) Clone

func (tq *TenantQuery) Clone() *TenantQuery

Clone returns a duplicate of the TenantQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TenantQuery) Count

func (tq *TenantQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TenantQuery) CountX

func (tq *TenantQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TenantQuery) Exist

func (tq *TenantQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TenantQuery) ExistX

func (tq *TenantQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TenantQuery) First

func (tq *TenantQuery) First(ctx context.Context) (*Tenant, error)

First returns the first Tenant entity from the query. Returns a *NotFoundError when no Tenant was found.

func (*TenantQuery) FirstID

func (tq *TenantQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Tenant ID from the query. Returns a *NotFoundError when no Tenant ID was found.

func (*TenantQuery) FirstIDX

func (tq *TenantQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*TenantQuery) FirstX

func (tq *TenantQuery) FirstX(ctx context.Context) *Tenant

FirstX is like First, but panics if an error occurs.

func (*TenantQuery) GroupBy

func (tq *TenantQuery) GroupBy(field string, fields ...string) *TenantGroupBy

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.Tenant.Query().
	GroupBy(tenant.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TenantQuery) IDs

func (tq *TenantQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Tenant IDs.

func (*TenantQuery) IDsX

func (tq *TenantQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*TenantQuery) Limit

func (tq *TenantQuery) Limit(limit int) *TenantQuery

Limit the number of records to be returned by this query.

func (*TenantQuery) Offset

func (tq *TenantQuery) Offset(offset int) *TenantQuery

Offset to start from.

func (*TenantQuery) Only

func (tq *TenantQuery) Only(ctx context.Context) (*Tenant, error)

Only returns a single Tenant entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Tenant entity is found. Returns a *NotFoundError when no Tenant entities are found.

func (*TenantQuery) OnlyID

func (tq *TenantQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Tenant ID in the query. Returns a *NotSingularError when more than one Tenant ID is found. Returns a *NotFoundError when no entities are found.

func (*TenantQuery) OnlyIDX

func (tq *TenantQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TenantQuery) OnlyX

func (tq *TenantQuery) OnlyX(ctx context.Context) *Tenant

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

func (*TenantQuery) Order

func (tq *TenantQuery) Order(o ...tenant.OrderOption) *TenantQuery

Order specifies how the records should be ordered.

func (*TenantQuery) QueryExecutions

func (tq *TenantQuery) QueryExecutions() *ExecutionQuery

QueryExecutions chains the current query on the "executions" edge.

func (*TenantQuery) QueryFunctions

func (tq *TenantQuery) QueryFunctions() *FunctionQuery

QueryFunctions chains the current query on the "functions" edge.

func (*TenantQuery) Select

func (tq *TenantQuery) Select(fields ...string) *TenantSelect

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.Tenant.Query().
	Select(tenant.FieldName).
	Scan(ctx, &v)

func (*TenantQuery) Unique

func (tq *TenantQuery) Unique(unique bool) *TenantQuery

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 (*TenantQuery) Where

func (tq *TenantQuery) Where(ps ...predicate.Tenant) *TenantQuery

Where adds a new predicate for the TenantQuery builder.

func (*TenantQuery) WithExecutions

func (tq *TenantQuery) WithExecutions(opts ...func(*ExecutionQuery)) *TenantQuery

WithExecutions tells the query-builder to eager-load the nodes that are connected to the "executions" edge. The optional arguments are used to configure the query builder of the edge.

func (*TenantQuery) WithFunctions

func (tq *TenantQuery) WithFunctions(opts ...func(*FunctionQuery)) *TenantQuery

WithFunctions tells the query-builder to eager-load the nodes that are connected to the "functions" edge. The optional arguments are used to configure the query builder of the edge.

type TenantSelect

type TenantSelect struct {
	*TenantQuery
	// contains filtered or unexported fields
}

TenantSelect is the builder for selecting fields of Tenant entities.

func (*TenantSelect) Aggregate

func (ts *TenantSelect) Aggregate(fns ...AggregateFunc) *TenantSelect

Aggregate adds the given aggregation functions to the selector query.

func (*TenantSelect) Bool

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

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

func (*TenantSelect) BoolX

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

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

func (*TenantSelect) Bools

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

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

func (*TenantSelect) BoolsX

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

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

func (*TenantSelect) Float64

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

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

func (*TenantSelect) Float64X

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

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

func (*TenantSelect) Float64s

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

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

func (*TenantSelect) Float64sX

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

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

func (*TenantSelect) Int

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

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

func (*TenantSelect) IntX

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

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

func (*TenantSelect) Ints

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

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

func (*TenantSelect) IntsX

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

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

func (*TenantSelect) Scan

func (ts *TenantSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TenantSelect) ScanX

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

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

func (*TenantSelect) String

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

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

func (*TenantSelect) StringX

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

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

func (*TenantSelect) Strings

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

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

func (*TenantSelect) StringsX

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

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

type TenantUpdate

type TenantUpdate struct {
	// contains filtered or unexported fields
}

TenantUpdate is the builder for updating Tenant entities.

func (*TenantUpdate) AddExecutionIDs

func (tu *TenantUpdate) AddExecutionIDs(ids ...uuid.UUID) *TenantUpdate

AddExecutionIDs adds the "executions" edge to the Execution entity by IDs.

func (*TenantUpdate) AddExecutions

func (tu *TenantUpdate) AddExecutions(e ...*Execution) *TenantUpdate

AddExecutions adds the "executions" edges to the Execution entity.

func (*TenantUpdate) AddFunctionIDs

func (tu *TenantUpdate) AddFunctionIDs(ids ...uuid.UUID) *TenantUpdate

AddFunctionIDs adds the "functions" edge to the Function entity by IDs.

func (*TenantUpdate) AddFunctions

func (tu *TenantUpdate) AddFunctions(f ...*Function) *TenantUpdate

AddFunctions adds the "functions" edges to the Function entity.

func (*TenantUpdate) AddMaxConcurrent

func (tu *TenantUpdate) AddMaxConcurrent(i int) *TenantUpdate

AddMaxConcurrent adds i to the "max_concurrent" field.

func (*TenantUpdate) AddMaxFunctions

func (tu *TenantUpdate) AddMaxFunctions(i int) *TenantUpdate

AddMaxFunctions adds i to the "max_functions" field.

func (*TenantUpdate) AddMaxMemoryMB

func (tu *TenantUpdate) AddMaxMemoryMB(i int) *TenantUpdate

AddMaxMemoryMB adds i to the "max_memory_mb" field.

func (*TenantUpdate) AddMaxStorageMB

func (tu *TenantUpdate) AddMaxStorageMB(i int) *TenantUpdate

AddMaxStorageMB adds i to the "max_storage_mb" field.

func (*TenantUpdate) ClearExecutions

func (tu *TenantUpdate) ClearExecutions() *TenantUpdate

ClearExecutions clears all "executions" edges to the Execution entity.

func (*TenantUpdate) ClearFunctions

func (tu *TenantUpdate) ClearFunctions() *TenantUpdate

ClearFunctions clears all "functions" edges to the Function entity.

func (*TenantUpdate) ClearMetadata

func (tu *TenantUpdate) ClearMetadata() *TenantUpdate

ClearMetadata clears the value of the "metadata" field.

func (*TenantUpdate) Exec

func (tu *TenantUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TenantUpdate) ExecX

func (tu *TenantUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TenantUpdate) Mutation

func (tu *TenantUpdate) Mutation() *TenantMutation

Mutation returns the TenantMutation object of the builder.

func (*TenantUpdate) RemoveExecutionIDs

func (tu *TenantUpdate) RemoveExecutionIDs(ids ...uuid.UUID) *TenantUpdate

RemoveExecutionIDs removes the "executions" edge to Execution entities by IDs.

func (*TenantUpdate) RemoveExecutions

func (tu *TenantUpdate) RemoveExecutions(e ...*Execution) *TenantUpdate

RemoveExecutions removes "executions" edges to Execution entities.

func (*TenantUpdate) RemoveFunctionIDs

func (tu *TenantUpdate) RemoveFunctionIDs(ids ...uuid.UUID) *TenantUpdate

RemoveFunctionIDs removes the "functions" edge to Function entities by IDs.

func (*TenantUpdate) RemoveFunctions

func (tu *TenantUpdate) RemoveFunctions(f ...*Function) *TenantUpdate

RemoveFunctions removes "functions" edges to Function entities.

func (*TenantUpdate) Save

func (tu *TenantUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TenantUpdate) SaveX

func (tu *TenantUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TenantUpdate) SetMaxConcurrent

func (tu *TenantUpdate) SetMaxConcurrent(i int) *TenantUpdate

SetMaxConcurrent sets the "max_concurrent" field.

func (*TenantUpdate) SetMaxFunctions

func (tu *TenantUpdate) SetMaxFunctions(i int) *TenantUpdate

SetMaxFunctions sets the "max_functions" field.

func (*TenantUpdate) SetMaxMemoryMB

func (tu *TenantUpdate) SetMaxMemoryMB(i int) *TenantUpdate

SetMaxMemoryMB sets the "max_memory_mb" field.

func (*TenantUpdate) SetMaxStorageMB

func (tu *TenantUpdate) SetMaxStorageMB(i int) *TenantUpdate

SetMaxStorageMB sets the "max_storage_mb" field.

func (*TenantUpdate) SetMetadata

func (tu *TenantUpdate) SetMetadata(m map[string]string) *TenantUpdate

SetMetadata sets the "metadata" field.

func (*TenantUpdate) SetName

func (tu *TenantUpdate) SetName(s string) *TenantUpdate

SetName sets the "name" field.

func (*TenantUpdate) SetNamespace

func (tu *TenantUpdate) SetNamespace(s string) *TenantUpdate

SetNamespace sets the "namespace" field.

func (*TenantUpdate) SetNillableMaxConcurrent

func (tu *TenantUpdate) SetNillableMaxConcurrent(i *int) *TenantUpdate

SetNillableMaxConcurrent sets the "max_concurrent" field if the given value is not nil.

func (*TenantUpdate) SetNillableMaxFunctions

func (tu *TenantUpdate) SetNillableMaxFunctions(i *int) *TenantUpdate

SetNillableMaxFunctions sets the "max_functions" field if the given value is not nil.

func (*TenantUpdate) SetNillableMaxMemoryMB

func (tu *TenantUpdate) SetNillableMaxMemoryMB(i *int) *TenantUpdate

SetNillableMaxMemoryMB sets the "max_memory_mb" field if the given value is not nil.

func (*TenantUpdate) SetNillableMaxStorageMB

func (tu *TenantUpdate) SetNillableMaxStorageMB(i *int) *TenantUpdate

SetNillableMaxStorageMB sets the "max_storage_mb" field if the given value is not nil.

func (*TenantUpdate) SetNillableName

func (tu *TenantUpdate) SetNillableName(s *string) *TenantUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*TenantUpdate) SetNillableNamespace

func (tu *TenantUpdate) SetNillableNamespace(s *string) *TenantUpdate

SetNillableNamespace sets the "namespace" field if the given value is not nil.

func (*TenantUpdate) SetUpdatedAt

func (tu *TenantUpdate) SetUpdatedAt(t time.Time) *TenantUpdate

SetUpdatedAt sets the "updated_at" field.

func (*TenantUpdate) Where

func (tu *TenantUpdate) Where(ps ...predicate.Tenant) *TenantUpdate

Where appends a list predicates to the TenantUpdate builder.

type TenantUpdateOne

type TenantUpdateOne struct {
	// contains filtered or unexported fields
}

TenantUpdateOne is the builder for updating a single Tenant entity.

func (*TenantUpdateOne) AddExecutionIDs

func (tuo *TenantUpdateOne) AddExecutionIDs(ids ...uuid.UUID) *TenantUpdateOne

AddExecutionIDs adds the "executions" edge to the Execution entity by IDs.

func (*TenantUpdateOne) AddExecutions

func (tuo *TenantUpdateOne) AddExecutions(e ...*Execution) *TenantUpdateOne

AddExecutions adds the "executions" edges to the Execution entity.

func (*TenantUpdateOne) AddFunctionIDs

func (tuo *TenantUpdateOne) AddFunctionIDs(ids ...uuid.UUID) *TenantUpdateOne

AddFunctionIDs adds the "functions" edge to the Function entity by IDs.

func (*TenantUpdateOne) AddFunctions

func (tuo *TenantUpdateOne) AddFunctions(f ...*Function) *TenantUpdateOne

AddFunctions adds the "functions" edges to the Function entity.

func (*TenantUpdateOne) AddMaxConcurrent

func (tuo *TenantUpdateOne) AddMaxConcurrent(i int) *TenantUpdateOne

AddMaxConcurrent adds i to the "max_concurrent" field.

func (*TenantUpdateOne) AddMaxFunctions

func (tuo *TenantUpdateOne) AddMaxFunctions(i int) *TenantUpdateOne

AddMaxFunctions adds i to the "max_functions" field.

func (*TenantUpdateOne) AddMaxMemoryMB

func (tuo *TenantUpdateOne) AddMaxMemoryMB(i int) *TenantUpdateOne

AddMaxMemoryMB adds i to the "max_memory_mb" field.

func (*TenantUpdateOne) AddMaxStorageMB

func (tuo *TenantUpdateOne) AddMaxStorageMB(i int) *TenantUpdateOne

AddMaxStorageMB adds i to the "max_storage_mb" field.

func (*TenantUpdateOne) ClearExecutions

func (tuo *TenantUpdateOne) ClearExecutions() *TenantUpdateOne

ClearExecutions clears all "executions" edges to the Execution entity.

func (*TenantUpdateOne) ClearFunctions

func (tuo *TenantUpdateOne) ClearFunctions() *TenantUpdateOne

ClearFunctions clears all "functions" edges to the Function entity.

func (*TenantUpdateOne) ClearMetadata

func (tuo *TenantUpdateOne) ClearMetadata() *TenantUpdateOne

ClearMetadata clears the value of the "metadata" field.

func (*TenantUpdateOne) Exec

func (tuo *TenantUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TenantUpdateOne) ExecX

func (tuo *TenantUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TenantUpdateOne) Mutation

func (tuo *TenantUpdateOne) Mutation() *TenantMutation

Mutation returns the TenantMutation object of the builder.

func (*TenantUpdateOne) RemoveExecutionIDs

func (tuo *TenantUpdateOne) RemoveExecutionIDs(ids ...uuid.UUID) *TenantUpdateOne

RemoveExecutionIDs removes the "executions" edge to Execution entities by IDs.

func (*TenantUpdateOne) RemoveExecutions

func (tuo *TenantUpdateOne) RemoveExecutions(e ...*Execution) *TenantUpdateOne

RemoveExecutions removes "executions" edges to Execution entities.

func (*TenantUpdateOne) RemoveFunctionIDs

func (tuo *TenantUpdateOne) RemoveFunctionIDs(ids ...uuid.UUID) *TenantUpdateOne

RemoveFunctionIDs removes the "functions" edge to Function entities by IDs.

func (*TenantUpdateOne) RemoveFunctions

func (tuo *TenantUpdateOne) RemoveFunctions(f ...*Function) *TenantUpdateOne

RemoveFunctions removes "functions" edges to Function entities.

func (*TenantUpdateOne) Save

func (tuo *TenantUpdateOne) Save(ctx context.Context) (*Tenant, error)

Save executes the query and returns the updated Tenant entity.

func (*TenantUpdateOne) SaveX

func (tuo *TenantUpdateOne) SaveX(ctx context.Context) *Tenant

SaveX is like Save, but panics if an error occurs.

func (*TenantUpdateOne) Select

func (tuo *TenantUpdateOne) Select(field string, fields ...string) *TenantUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TenantUpdateOne) SetMaxConcurrent

func (tuo *TenantUpdateOne) SetMaxConcurrent(i int) *TenantUpdateOne

SetMaxConcurrent sets the "max_concurrent" field.

func (*TenantUpdateOne) SetMaxFunctions

func (tuo *TenantUpdateOne) SetMaxFunctions(i int) *TenantUpdateOne

SetMaxFunctions sets the "max_functions" field.

func (*TenantUpdateOne) SetMaxMemoryMB

func (tuo *TenantUpdateOne) SetMaxMemoryMB(i int) *TenantUpdateOne

SetMaxMemoryMB sets the "max_memory_mb" field.

func (*TenantUpdateOne) SetMaxStorageMB

func (tuo *TenantUpdateOne) SetMaxStorageMB(i int) *TenantUpdateOne

SetMaxStorageMB sets the "max_storage_mb" field.

func (*TenantUpdateOne) SetMetadata

func (tuo *TenantUpdateOne) SetMetadata(m map[string]string) *TenantUpdateOne

SetMetadata sets the "metadata" field.

func (*TenantUpdateOne) SetName

func (tuo *TenantUpdateOne) SetName(s string) *TenantUpdateOne

SetName sets the "name" field.

func (*TenantUpdateOne) SetNamespace

func (tuo *TenantUpdateOne) SetNamespace(s string) *TenantUpdateOne

SetNamespace sets the "namespace" field.

func (*TenantUpdateOne) SetNillableMaxConcurrent

func (tuo *TenantUpdateOne) SetNillableMaxConcurrent(i *int) *TenantUpdateOne

SetNillableMaxConcurrent sets the "max_concurrent" field if the given value is not nil.

func (*TenantUpdateOne) SetNillableMaxFunctions

func (tuo *TenantUpdateOne) SetNillableMaxFunctions(i *int) *TenantUpdateOne

SetNillableMaxFunctions sets the "max_functions" field if the given value is not nil.

func (*TenantUpdateOne) SetNillableMaxMemoryMB

func (tuo *TenantUpdateOne) SetNillableMaxMemoryMB(i *int) *TenantUpdateOne

SetNillableMaxMemoryMB sets the "max_memory_mb" field if the given value is not nil.

func (*TenantUpdateOne) SetNillableMaxStorageMB

func (tuo *TenantUpdateOne) SetNillableMaxStorageMB(i *int) *TenantUpdateOne

SetNillableMaxStorageMB sets the "max_storage_mb" field if the given value is not nil.

func (*TenantUpdateOne) SetNillableName

func (tuo *TenantUpdateOne) SetNillableName(s *string) *TenantUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*TenantUpdateOne) SetNillableNamespace

func (tuo *TenantUpdateOne) SetNillableNamespace(s *string) *TenantUpdateOne

SetNillableNamespace sets the "namespace" field if the given value is not nil.

func (*TenantUpdateOne) SetUpdatedAt

func (tuo *TenantUpdateOne) SetUpdatedAt(t time.Time) *TenantUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*TenantUpdateOne) Where

func (tuo *TenantUpdateOne) Where(ps ...predicate.Tenant) *TenantUpdateOne

Where appends a list predicates to the TenantUpdate builder.

type Tenants

type Tenants []*Tenant

Tenants is a parsable slice of Tenant.

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 {

	// Execution is the client for interacting with the Execution builders.
	Execution *ExecutionClient
	// Function is the client for interacting with the Function builders.
	Function *FunctionClient
	// LangRuntime is the client for interacting with the LangRuntime builders.
	LangRuntime *LangRuntimeClient
	// Tenant is the client for interacting with the Tenant builders.
	Tenant *TenantClient
	// 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