ent

package
v0.0.0-...-56b00f8 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2023 License: MIT Imports: 26 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.
	TypeBench       = "Bench"
	TypeBenchResult = "BenchResult"
)

Variables

View Source
var DefaultBenchOrder = &BenchOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &BenchOrderField{
		field: bench.FieldID,
		toCursor: func(b *Bench) Cursor {
			return Cursor{ID: b.ID}
		},
	},
}

DefaultBenchOrder is the default ordering of Bench.

View Source
var DefaultBenchResultOrder = &BenchResultOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &BenchResultOrderField{
		field: benchresult.FieldID,
		toCursor: func(br *BenchResult) Cursor {
			return Cursor{ID: br.ID}
		},
	},
}

DefaultBenchResultOrder is the default ordering of BenchResult.

View Source
var ErrEmptyBenchResultWhereInput = errors.New("ent: empty predicate BenchResultWhereInput")

ErrEmptyBenchResultWhereInput is returned in case the BenchResultWhereInput is empty.

View Source
var ErrEmptyBenchWhereInput = errors.New("ent: empty predicate BenchWhereInput")

ErrEmptyBenchWhereInput is returned in case the BenchWhereInput is empty.

Functions

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.

func OpenTxFromContext

func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)

OpenTxFromContext open transactions from client stored in context.

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 Bench

type Bench struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Os holds the value of the "os" field.
	Os string `json:"os,omitempty"`
	// Arch holds the value of the "arch" field.
	Arch string `json:"arch,omitempty"`
	// CPU holds the value of the "cpu" field.
	CPU string `json:"cpu,omitempty"`
	// Package holds the value of the "package" field.
	Package string `json:"package,omitempty"`
	// Pass holds the value of the "pass" field.
	Pass bool `json:"pass,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the BenchQuery when eager-loading is set.
	Edges BenchEdges `json:"edges"`
	// contains filtered or unexported fields
}

Bench is the model entity for the Bench schema.

func (*Bench) BenchResult

func (b *Bench) BenchResult(ctx context.Context) (result []*BenchResult, err error)

func (*Bench) IsNode

func (n *Bench) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Bench) NamedBenchResult

func (b *Bench) NamedBenchResult(name string) ([]*BenchResult, error)

NamedBenchResult returns the BenchResult named value or an error if the edge was not loaded in eager-loading with this name.

func (*Bench) QueryBenchResult

func (b *Bench) QueryBenchResult() *BenchResultQuery

QueryBenchResult queries the "bench_result" edge of the Bench entity.

func (*Bench) String

func (b *Bench) String() string

String implements the fmt.Stringer.

func (*Bench) ToEdge

func (b *Bench) ToEdge(order *BenchOrder) *BenchEdge

ToEdge converts Bench into BenchEdge.

func (*Bench) Unwrap

func (b *Bench) Unwrap() *Bench

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

func (b *Bench) Update() *BenchUpdateOne

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

type BenchClient

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

BenchClient is a client for the Bench schema.

func NewBenchClient

func NewBenchClient(c config) *BenchClient

NewBenchClient returns a client for the Bench from the given config.

func (*BenchClient) Create

func (c *BenchClient) Create() *BenchCreate

Create returns a builder for creating a Bench entity.

func (*BenchClient) CreateBulk

func (c *BenchClient) CreateBulk(builders ...*BenchCreate) *BenchCreateBulk

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

func (*BenchClient) Delete

func (c *BenchClient) Delete() *BenchDelete

Delete returns a delete builder for Bench.

func (*BenchClient) DeleteOne

func (c *BenchClient) DeleteOne(b *Bench) *BenchDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*BenchClient) DeleteOneID

func (c *BenchClient) DeleteOneID(id int) *BenchDeleteOne

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

func (*BenchClient) Get

func (c *BenchClient) Get(ctx context.Context, id int) (*Bench, error)

Get returns a Bench entity by its id.

func (*BenchClient) GetX

func (c *BenchClient) GetX(ctx context.Context, id int) *Bench

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

func (*BenchClient) Hooks

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

Hooks returns the client hooks.

func (*BenchClient) Intercept

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

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

func (*BenchClient) Interceptors

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

Interceptors returns the client interceptors.

func (*BenchClient) Query

func (c *BenchClient) Query() *BenchQuery

Query returns a query builder for Bench.

func (*BenchClient) QueryBenchResult

func (c *BenchClient) QueryBenchResult(b *Bench) *BenchResultQuery

QueryBenchResult queries the bench_result edge of a Bench.

func (*BenchClient) Update

func (c *BenchClient) Update() *BenchUpdate

Update returns an update builder for Bench.

func (*BenchClient) UpdateOne

func (c *BenchClient) UpdateOne(b *Bench) *BenchUpdateOne

UpdateOne returns an update builder for the given entity.

func (*BenchClient) UpdateOneID

func (c *BenchClient) UpdateOneID(id int) *BenchUpdateOne

UpdateOneID returns an update builder for the given id.

func (*BenchClient) Use

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

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

type BenchConnection

type BenchConnection struct {
	Edges      []*BenchEdge `json:"edges"`
	PageInfo   PageInfo     `json:"pageInfo"`
	TotalCount int          `json:"totalCount"`
}

BenchConnection is the connection containing edges to Bench.

type BenchCreate

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

BenchCreate is the builder for creating a Bench entity.

func (*BenchCreate) AddBenchResult

func (bc *BenchCreate) AddBenchResult(b ...*BenchResult) *BenchCreate

AddBenchResult adds the "bench_result" edges to the BenchResult entity.

func (*BenchCreate) AddBenchResultIDs

func (bc *BenchCreate) AddBenchResultIDs(ids ...int) *BenchCreate

AddBenchResultIDs adds the "bench_result" edge to the BenchResult entity by IDs.

func (*BenchCreate) Exec

func (bc *BenchCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*BenchCreate) ExecX

func (bc *BenchCreate) ExecX(ctx context.Context)

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

func (*BenchCreate) Mutation

func (bc *BenchCreate) Mutation() *BenchMutation

Mutation returns the BenchMutation object of the builder.

func (*BenchCreate) Save

func (bc *BenchCreate) Save(ctx context.Context) (*Bench, error)

Save creates the Bench in the database.

func (*BenchCreate) SaveX

func (bc *BenchCreate) SaveX(ctx context.Context) *Bench

SaveX calls Save and panics if Save returns an error.

func (*BenchCreate) SetArch

func (bc *BenchCreate) SetArch(s string) *BenchCreate

SetArch sets the "arch" field.

func (*BenchCreate) SetCPU

func (bc *BenchCreate) SetCPU(s string) *BenchCreate

SetCPU sets the "cpu" field.

func (*BenchCreate) SetInput

func (c *BenchCreate) SetInput(i CreateBenchInput) *BenchCreate

SetInput applies the change-set in the CreateBenchInput on the BenchCreate builder.

func (*BenchCreate) SetOs

func (bc *BenchCreate) SetOs(s string) *BenchCreate

SetOs sets the "os" field.

func (*BenchCreate) SetPackage

func (bc *BenchCreate) SetPackage(s string) *BenchCreate

SetPackage sets the "package" field.

func (*BenchCreate) SetPass

func (bc *BenchCreate) SetPass(b bool) *BenchCreate

SetPass sets the "pass" field.

type BenchCreateBulk

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

BenchCreateBulk is the builder for creating many Bench entities in bulk.

func (*BenchCreateBulk) Exec

func (bcb *BenchCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*BenchCreateBulk) ExecX

func (bcb *BenchCreateBulk) ExecX(ctx context.Context)

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

func (*BenchCreateBulk) Save

func (bcb *BenchCreateBulk) Save(ctx context.Context) ([]*Bench, error)

Save creates the Bench entities in the database.

func (*BenchCreateBulk) SaveX

func (bcb *BenchCreateBulk) SaveX(ctx context.Context) []*Bench

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

type BenchDelete

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

BenchDelete is the builder for deleting a Bench entity.

func (*BenchDelete) Exec

func (bd *BenchDelete) Exec(ctx context.Context) (int, error)

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

func (*BenchDelete) ExecX

func (bd *BenchDelete) ExecX(ctx context.Context) int

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

func (*BenchDelete) Where

func (bd *BenchDelete) Where(ps ...predicate.Bench) *BenchDelete

Where appends a list predicates to the BenchDelete builder.

type BenchDeleteOne

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

BenchDeleteOne is the builder for deleting a single Bench entity.

func (*BenchDeleteOne) Exec

func (bdo *BenchDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*BenchDeleteOne) ExecX

func (bdo *BenchDeleteOne) ExecX(ctx context.Context)

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

func (*BenchDeleteOne) Where

func (bdo *BenchDeleteOne) Where(ps ...predicate.Bench) *BenchDeleteOne

Where appends a list predicates to the BenchDelete builder.

type BenchEdge

type BenchEdge struct {
	Node   *Bench `json:"node"`
	Cursor Cursor `json:"cursor"`
}

BenchEdge is the edge representation of Bench.

type BenchEdges

type BenchEdges struct {
	// BenchResult holds the value of the bench_result edge.
	BenchResult []*BenchResult `json:"bench_result,omitempty"`
	// contains filtered or unexported fields
}

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

func (BenchEdges) BenchResultOrErr

func (e BenchEdges) BenchResultOrErr() ([]*BenchResult, error)

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

type BenchGroupBy

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

BenchGroupBy is the group-by builder for Bench entities.

func (*BenchGroupBy) Aggregate

func (bgb *BenchGroupBy) Aggregate(fns ...AggregateFunc) *BenchGroupBy

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

func (*BenchGroupBy) Bool

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

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

func (*BenchGroupBy) BoolX

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

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

func (*BenchGroupBy) Bools

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

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

func (*BenchGroupBy) BoolsX

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

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

func (*BenchGroupBy) Float64

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

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

func (*BenchGroupBy) Float64X

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

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

func (*BenchGroupBy) Float64s

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

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

func (*BenchGroupBy) Float64sX

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

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

func (*BenchGroupBy) Int

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

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

func (*BenchGroupBy) IntX

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

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

func (*BenchGroupBy) Ints

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

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

func (*BenchGroupBy) IntsX

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

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

func (*BenchGroupBy) Scan

func (bgb *BenchGroupBy) Scan(ctx context.Context, v any) error

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

func (*BenchGroupBy) ScanX

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

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

func (*BenchGroupBy) String

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

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

func (*BenchGroupBy) StringX

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

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

func (*BenchGroupBy) Strings

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

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

func (*BenchGroupBy) StringsX

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

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

type BenchMutation

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

BenchMutation represents an operation that mutates the Bench nodes in the graph.

func (*BenchMutation) AddBenchResultIDs

func (m *BenchMutation) AddBenchResultIDs(ids ...int)

AddBenchResultIDs adds the "bench_result" edge to the BenchResult entity by ids.

func (*BenchMutation) AddField

func (m *BenchMutation) 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 (*BenchMutation) AddedEdges

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

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

func (*BenchMutation) AddedField

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

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

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

func (*BenchMutation) AddedIDs

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

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

func (*BenchMutation) Arch

func (m *BenchMutation) Arch() (r string, exists bool)

Arch returns the value of the "arch" field in the mutation.

func (*BenchMutation) BenchResultCleared

func (m *BenchMutation) BenchResultCleared() bool

BenchResultCleared reports if the "bench_result" edge to the BenchResult entity was cleared.

func (*BenchMutation) BenchResultIDs

func (m *BenchMutation) BenchResultIDs() (ids []int)

BenchResultIDs returns the "bench_result" edge IDs in the mutation.

func (*BenchMutation) CPU

func (m *BenchMutation) CPU() (r string, exists bool)

CPU returns the value of the "cpu" field in the mutation.

func (*BenchMutation) ClearBenchResult

func (m *BenchMutation) ClearBenchResult()

ClearBenchResult clears the "bench_result" edge to the BenchResult entity.

func (*BenchMutation) ClearEdge

func (m *BenchMutation) 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 (*BenchMutation) ClearField

func (m *BenchMutation) 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 (*BenchMutation) ClearedEdges

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

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

func (*BenchMutation) ClearedFields

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

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

func (BenchMutation) Client

func (m BenchMutation) 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 (*BenchMutation) EdgeCleared

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

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

func (*BenchMutation) Field

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

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

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

func (*BenchMutation) Fields

func (m *BenchMutation) 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 (*BenchMutation) ID

func (m *BenchMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*BenchMutation) IDs

func (m *BenchMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*BenchMutation) OldArch

func (m *BenchMutation) OldArch(ctx context.Context) (v string, err error)

OldArch returns the old "arch" field's value of the Bench entity. If the Bench 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 (*BenchMutation) OldCPU

func (m *BenchMutation) OldCPU(ctx context.Context) (v string, err error)

OldCPU returns the old "cpu" field's value of the Bench entity. If the Bench 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 (*BenchMutation) OldField

func (m *BenchMutation) 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 (*BenchMutation) OldOs

func (m *BenchMutation) OldOs(ctx context.Context) (v string, err error)

OldOs returns the old "os" field's value of the Bench entity. If the Bench 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 (*BenchMutation) OldPackage

func (m *BenchMutation) OldPackage(ctx context.Context) (v string, err error)

OldPackage returns the old "package" field's value of the Bench entity. If the Bench 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 (*BenchMutation) OldPass

func (m *BenchMutation) OldPass(ctx context.Context) (v bool, err error)

OldPass returns the old "pass" field's value of the Bench entity. If the Bench 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 (*BenchMutation) Op

func (m *BenchMutation) Op() Op

Op returns the operation name.

func (*BenchMutation) Os

func (m *BenchMutation) Os() (r string, exists bool)

Os returns the value of the "os" field in the mutation.

func (*BenchMutation) Package

func (m *BenchMutation) Package() (r string, exists bool)

Package returns the value of the "package" field in the mutation.

func (*BenchMutation) Pass

func (m *BenchMutation) Pass() (r bool, exists bool)

Pass returns the value of the "pass" field in the mutation.

func (*BenchMutation) RemoveBenchResultIDs

func (m *BenchMutation) RemoveBenchResultIDs(ids ...int)

RemoveBenchResultIDs removes the "bench_result" edge to the BenchResult entity by IDs.

func (*BenchMutation) RemovedBenchResultIDs

func (m *BenchMutation) RemovedBenchResultIDs() (ids []int)

RemovedBenchResult returns the removed IDs of the "bench_result" edge to the BenchResult entity.

func (*BenchMutation) RemovedEdges

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

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

func (*BenchMutation) RemovedIDs

func (m *BenchMutation) 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 (*BenchMutation) ResetArch

func (m *BenchMutation) ResetArch()

ResetArch resets all changes to the "arch" field.

func (*BenchMutation) ResetBenchResult

func (m *BenchMutation) ResetBenchResult()

ResetBenchResult resets all changes to the "bench_result" edge.

func (*BenchMutation) ResetCPU

func (m *BenchMutation) ResetCPU()

ResetCPU resets all changes to the "cpu" field.

func (*BenchMutation) ResetEdge

func (m *BenchMutation) 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 (*BenchMutation) ResetField

func (m *BenchMutation) 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 (*BenchMutation) ResetOs

func (m *BenchMutation) ResetOs()

ResetOs resets all changes to the "os" field.

func (*BenchMutation) ResetPackage

func (m *BenchMutation) ResetPackage()

ResetPackage resets all changes to the "package" field.

func (*BenchMutation) ResetPass

func (m *BenchMutation) ResetPass()

ResetPass resets all changes to the "pass" field.

func (*BenchMutation) SetArch

func (m *BenchMutation) SetArch(s string)

SetArch sets the "arch" field.

func (*BenchMutation) SetCPU

func (m *BenchMutation) SetCPU(s string)

SetCPU sets the "cpu" field.

func (*BenchMutation) SetField

func (m *BenchMutation) 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 (*BenchMutation) SetOp

func (m *BenchMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*BenchMutation) SetOs

func (m *BenchMutation) SetOs(s string)

SetOs sets the "os" field.

func (*BenchMutation) SetPackage

func (m *BenchMutation) SetPackage(s string)

SetPackage sets the "package" field.

func (*BenchMutation) SetPass

func (m *BenchMutation) SetPass(b bool)

SetPass sets the "pass" field.

func (BenchMutation) Tx

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

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

func (*BenchMutation) Type

func (m *BenchMutation) Type() string

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

func (*BenchMutation) Where

func (m *BenchMutation) Where(ps ...predicate.Bench)

Where appends a list predicates to the BenchMutation builder.

func (*BenchMutation) WhereP

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

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

type BenchOrder

type BenchOrder struct {
	Direction OrderDirection   `json:"direction"`
	Field     *BenchOrderField `json:"field"`
}

BenchOrder defines the ordering of Bench.

type BenchOrderField

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

BenchOrderField defines the ordering field of Bench.

type BenchPaginateOption

type BenchPaginateOption func(*benchPager) error

BenchPaginateOption enables pagination customization.

func WithBenchFilter

func WithBenchFilter(filter func(*BenchQuery) (*BenchQuery, error)) BenchPaginateOption

WithBenchFilter configures pagination filter.

func WithBenchOrder

func WithBenchOrder(order *BenchOrder) BenchPaginateOption

WithBenchOrder configures pagination ordering.

type BenchQuery

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

BenchQuery is the builder for querying Bench entities.

func (*BenchQuery) Aggregate

func (bq *BenchQuery) Aggregate(fns ...AggregateFunc) *BenchSelect

Aggregate returns a BenchSelect configured with the given aggregations.

func (*BenchQuery) All

func (bq *BenchQuery) All(ctx context.Context) ([]*Bench, error)

All executes the query and returns a list of Benches.

func (*BenchQuery) AllX

func (bq *BenchQuery) AllX(ctx context.Context) []*Bench

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

func (*BenchQuery) Clone

func (bq *BenchQuery) Clone() *BenchQuery

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

func (*BenchQuery) CollectFields

func (b *BenchQuery) CollectFields(ctx context.Context, satisfies ...string) (*BenchQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*BenchQuery) Count

func (bq *BenchQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*BenchQuery) CountX

func (bq *BenchQuery) CountX(ctx context.Context) int

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

func (*BenchQuery) Exist

func (bq *BenchQuery) Exist(ctx context.Context) (bool, error)

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

func (*BenchQuery) ExistX

func (bq *BenchQuery) ExistX(ctx context.Context) bool

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

func (*BenchQuery) First

func (bq *BenchQuery) First(ctx context.Context) (*Bench, error)

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

func (*BenchQuery) FirstID

func (bq *BenchQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*BenchQuery) FirstIDX

func (bq *BenchQuery) FirstIDX(ctx context.Context) int

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

func (*BenchQuery) FirstX

func (bq *BenchQuery) FirstX(ctx context.Context) *Bench

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

func (*BenchQuery) GroupBy

func (bq *BenchQuery) GroupBy(field string, fields ...string) *BenchGroupBy

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 {
	Os string `json:"os,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Bench.Query().
	GroupBy(bench.FieldOs).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*BenchQuery) IDs

func (bq *BenchQuery) IDs(ctx context.Context) (ids []int, err error)

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

func (*BenchQuery) IDsX

func (bq *BenchQuery) IDsX(ctx context.Context) []int

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

func (*BenchQuery) Limit

func (bq *BenchQuery) Limit(limit int) *BenchQuery

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

func (*BenchQuery) Offset

func (bq *BenchQuery) Offset(offset int) *BenchQuery

Offset to start from.

func (*BenchQuery) Only

func (bq *BenchQuery) Only(ctx context.Context) (*Bench, error)

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

func (*BenchQuery) OnlyID

func (bq *BenchQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*BenchQuery) OnlyIDX

func (bq *BenchQuery) OnlyIDX(ctx context.Context) int

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

func (*BenchQuery) OnlyX

func (bq *BenchQuery) OnlyX(ctx context.Context) *Bench

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

func (*BenchQuery) Order

func (bq *BenchQuery) Order(o ...OrderFunc) *BenchQuery

Order specifies how the records should be ordered.

func (*BenchQuery) Paginate

func (b *BenchQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...BenchPaginateOption,
) (*BenchConnection, error)

Paginate executes the query and returns a relay based cursor connection to Bench.

func (*BenchQuery) QueryBenchResult

func (bq *BenchQuery) QueryBenchResult() *BenchResultQuery

QueryBenchResult chains the current query on the "bench_result" edge.

func (*BenchQuery) Select

func (bq *BenchQuery) Select(fields ...string) *BenchSelect

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 {
	Os string `json:"os,omitempty"`
}

client.Bench.Query().
	Select(bench.FieldOs).
	Scan(ctx, &v)

func (*BenchQuery) Unique

func (bq *BenchQuery) Unique(unique bool) *BenchQuery

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

func (bq *BenchQuery) Where(ps ...predicate.Bench) *BenchQuery

Where adds a new predicate for the BenchQuery builder.

func (*BenchQuery) WithBenchResult

func (bq *BenchQuery) WithBenchResult(opts ...func(*BenchResultQuery)) *BenchQuery

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

func (*BenchQuery) WithNamedBenchResult

func (bq *BenchQuery) WithNamedBenchResult(name string, opts ...func(*BenchResultQuery)) *BenchQuery

WithNamedBenchResult tells the query-builder to eager-load the nodes that are connected to the "bench_result" edge with the given name. The optional arguments are used to configure the query builder of the edge.

type BenchResult

type BenchResult struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// N holds the value of the "n" field.
	N int64 `json:"n,omitempty"`
	// NsPerOp holds the value of the "ns_per_op" field.
	NsPerOp float64 `json:"ns_per_op,omitempty"`
	// AllocedBytesPerOp holds the value of the "alloced_bytes_per_op" field.
	AllocedBytesPerOp int64 `json:"alloced_bytes_per_op,omitempty"`
	// AllocsPerOp holds the value of the "allocs_per_op" field.
	AllocsPerOp int64 `json:"allocs_per_op,omitempty"`
	// MBPerS holds the value of the "mb_per_s" field.
	MBPerS float64 `json:"mb_per_s,omitempty"`
	// Measured holds the value of the "measured" field.
	Measured int64 `json:"measured,omitempty"`
	// Ord holds the value of the "ord" field.
	Ord int64 `json:"ord,omitempty"`
	// contains filtered or unexported fields
}

BenchResult is the model entity for the BenchResult schema.

func (*BenchResult) IsNode

func (n *BenchResult) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*BenchResult) String

func (br *BenchResult) String() string

String implements the fmt.Stringer.

func (*BenchResult) ToEdge

func (br *BenchResult) ToEdge(order *BenchResultOrder) *BenchResultEdge

ToEdge converts BenchResult into BenchResultEdge.

func (*BenchResult) Unwrap

func (br *BenchResult) Unwrap() *BenchResult

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

func (br *BenchResult) Update() *BenchResultUpdateOne

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

type BenchResultClient

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

BenchResultClient is a client for the BenchResult schema.

func NewBenchResultClient

func NewBenchResultClient(c config) *BenchResultClient

NewBenchResultClient returns a client for the BenchResult from the given config.

func (*BenchResultClient) Create

func (c *BenchResultClient) Create() *BenchResultCreate

Create returns a builder for creating a BenchResult entity.

func (*BenchResultClient) CreateBulk

func (c *BenchResultClient) CreateBulk(builders ...*BenchResultCreate) *BenchResultCreateBulk

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

func (*BenchResultClient) Delete

func (c *BenchResultClient) Delete() *BenchResultDelete

Delete returns a delete builder for BenchResult.

func (*BenchResultClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*BenchResultClient) DeleteOneID

func (c *BenchResultClient) DeleteOneID(id int) *BenchResultDeleteOne

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

func (*BenchResultClient) Get

func (c *BenchResultClient) Get(ctx context.Context, id int) (*BenchResult, error)

Get returns a BenchResult entity by its id.

func (*BenchResultClient) GetX

func (c *BenchResultClient) GetX(ctx context.Context, id int) *BenchResult

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

func (*BenchResultClient) Hooks

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

Hooks returns the client hooks.

func (*BenchResultClient) Intercept

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

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

func (*BenchResultClient) Interceptors

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

Interceptors returns the client interceptors.

func (*BenchResultClient) Query

func (c *BenchResultClient) Query() *BenchResultQuery

Query returns a query builder for BenchResult.

func (*BenchResultClient) Update

func (c *BenchResultClient) Update() *BenchResultUpdate

Update returns an update builder for BenchResult.

func (*BenchResultClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*BenchResultClient) UpdateOneID

func (c *BenchResultClient) UpdateOneID(id int) *BenchResultUpdateOne

UpdateOneID returns an update builder for the given id.

func (*BenchResultClient) Use

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

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

type BenchResultConnection

type BenchResultConnection struct {
	Edges      []*BenchResultEdge `json:"edges"`
	PageInfo   PageInfo           `json:"pageInfo"`
	TotalCount int                `json:"totalCount"`
}

BenchResultConnection is the connection containing edges to BenchResult.

type BenchResultCreate

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

BenchResultCreate is the builder for creating a BenchResult entity.

func (*BenchResultCreate) Exec

func (brc *BenchResultCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*BenchResultCreate) ExecX

func (brc *BenchResultCreate) ExecX(ctx context.Context)

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

func (*BenchResultCreate) Mutation

func (brc *BenchResultCreate) Mutation() *BenchResultMutation

Mutation returns the BenchResultMutation object of the builder.

func (*BenchResultCreate) Save

func (brc *BenchResultCreate) Save(ctx context.Context) (*BenchResult, error)

Save creates the BenchResult in the database.

func (*BenchResultCreate) SaveX

func (brc *BenchResultCreate) SaveX(ctx context.Context) *BenchResult

SaveX calls Save and panics if Save returns an error.

func (*BenchResultCreate) SetAllocedBytesPerOp

func (brc *BenchResultCreate) SetAllocedBytesPerOp(i int64) *BenchResultCreate

SetAllocedBytesPerOp sets the "alloced_bytes_per_op" field.

func (*BenchResultCreate) SetAllocsPerOp

func (brc *BenchResultCreate) SetAllocsPerOp(i int64) *BenchResultCreate

SetAllocsPerOp sets the "allocs_per_op" field.

func (*BenchResultCreate) SetInput

SetInput applies the change-set in the CreateBenchResultInput on the BenchResultCreate builder.

func (*BenchResultCreate) SetMBPerS

func (brc *BenchResultCreate) SetMBPerS(f float64) *BenchResultCreate

SetMBPerS sets the "mb_per_s" field.

func (*BenchResultCreate) SetMeasured

func (brc *BenchResultCreate) SetMeasured(i int64) *BenchResultCreate

SetMeasured sets the "measured" field.

func (*BenchResultCreate) SetN

SetN sets the "n" field.

func (*BenchResultCreate) SetName

func (brc *BenchResultCreate) SetName(s string) *BenchResultCreate

SetName sets the "name" field.

func (*BenchResultCreate) SetNsPerOp

func (brc *BenchResultCreate) SetNsPerOp(f float64) *BenchResultCreate

SetNsPerOp sets the "ns_per_op" field.

func (*BenchResultCreate) SetOrd

func (brc *BenchResultCreate) SetOrd(i int64) *BenchResultCreate

SetOrd sets the "ord" field.

type BenchResultCreateBulk

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

BenchResultCreateBulk is the builder for creating many BenchResult entities in bulk.

func (*BenchResultCreateBulk) Exec

func (brcb *BenchResultCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*BenchResultCreateBulk) ExecX

func (brcb *BenchResultCreateBulk) ExecX(ctx context.Context)

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

func (*BenchResultCreateBulk) Save

func (brcb *BenchResultCreateBulk) Save(ctx context.Context) ([]*BenchResult, error)

Save creates the BenchResult entities in the database.

func (*BenchResultCreateBulk) SaveX

func (brcb *BenchResultCreateBulk) SaveX(ctx context.Context) []*BenchResult

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

type BenchResultDelete

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

BenchResultDelete is the builder for deleting a BenchResult entity.

func (*BenchResultDelete) Exec

func (brd *BenchResultDelete) Exec(ctx context.Context) (int, error)

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

func (*BenchResultDelete) ExecX

func (brd *BenchResultDelete) ExecX(ctx context.Context) int

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

func (*BenchResultDelete) Where

Where appends a list predicates to the BenchResultDelete builder.

type BenchResultDeleteOne

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

BenchResultDeleteOne is the builder for deleting a single BenchResult entity.

func (*BenchResultDeleteOne) Exec

func (brdo *BenchResultDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*BenchResultDeleteOne) ExecX

func (brdo *BenchResultDeleteOne) ExecX(ctx context.Context)

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

func (*BenchResultDeleteOne) Where

Where appends a list predicates to the BenchResultDelete builder.

type BenchResultEdge

type BenchResultEdge struct {
	Node   *BenchResult `json:"node"`
	Cursor Cursor       `json:"cursor"`
}

BenchResultEdge is the edge representation of BenchResult.

type BenchResultGroupBy

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

BenchResultGroupBy is the group-by builder for BenchResult entities.

func (*BenchResultGroupBy) Aggregate

func (brgb *BenchResultGroupBy) Aggregate(fns ...AggregateFunc) *BenchResultGroupBy

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

func (*BenchResultGroupBy) Bool

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

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

func (*BenchResultGroupBy) BoolX

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

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

func (*BenchResultGroupBy) Bools

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

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

func (*BenchResultGroupBy) BoolsX

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

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

func (*BenchResultGroupBy) Float64

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

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

func (*BenchResultGroupBy) Float64X

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

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

func (*BenchResultGroupBy) Float64s

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

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

func (*BenchResultGroupBy) Float64sX

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

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

func (*BenchResultGroupBy) Int

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

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

func (*BenchResultGroupBy) IntX

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

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

func (*BenchResultGroupBy) Ints

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

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

func (*BenchResultGroupBy) IntsX

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

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

func (*BenchResultGroupBy) Scan

func (brgb *BenchResultGroupBy) Scan(ctx context.Context, v any) error

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

func (*BenchResultGroupBy) ScanX

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

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

func (*BenchResultGroupBy) String

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

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

func (*BenchResultGroupBy) StringX

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

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

func (*BenchResultGroupBy) Strings

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

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

func (*BenchResultGroupBy) StringsX

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

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

type BenchResultMutation

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

BenchResultMutation represents an operation that mutates the BenchResult nodes in the graph.

func (*BenchResultMutation) AddAllocedBytesPerOp

func (m *BenchResultMutation) AddAllocedBytesPerOp(i int64)

AddAllocedBytesPerOp adds i to the "alloced_bytes_per_op" field.

func (*BenchResultMutation) AddAllocsPerOp

func (m *BenchResultMutation) AddAllocsPerOp(i int64)

AddAllocsPerOp adds i to the "allocs_per_op" field.

func (*BenchResultMutation) AddField

func (m *BenchResultMutation) 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 (*BenchResultMutation) AddMBPerS

func (m *BenchResultMutation) AddMBPerS(f float64)

AddMBPerS adds f to the "mb_per_s" field.

func (*BenchResultMutation) AddMeasured

func (m *BenchResultMutation) AddMeasured(i int64)

AddMeasured adds i to the "measured" field.

func (*BenchResultMutation) AddN

func (m *BenchResultMutation) AddN(i int64)

AddN adds i to the "n" field.

func (*BenchResultMutation) AddNsPerOp

func (m *BenchResultMutation) AddNsPerOp(f float64)

AddNsPerOp adds f to the "ns_per_op" field.

func (*BenchResultMutation) AddOrd

func (m *BenchResultMutation) AddOrd(i int64)

AddOrd adds i to the "ord" field.

func (*BenchResultMutation) AddedAllocedBytesPerOp

func (m *BenchResultMutation) AddedAllocedBytesPerOp() (r int64, exists bool)

AddedAllocedBytesPerOp returns the value that was added to the "alloced_bytes_per_op" field in this mutation.

func (*BenchResultMutation) AddedAllocsPerOp

func (m *BenchResultMutation) AddedAllocsPerOp() (r int64, exists bool)

AddedAllocsPerOp returns the value that was added to the "allocs_per_op" field in this mutation.

func (*BenchResultMutation) AddedEdges

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

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

func (*BenchResultMutation) AddedField

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

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

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

func (*BenchResultMutation) AddedIDs

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

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

func (*BenchResultMutation) AddedMBPerS

func (m *BenchResultMutation) AddedMBPerS() (r float64, exists bool)

AddedMBPerS returns the value that was added to the "mb_per_s" field in this mutation.

func (*BenchResultMutation) AddedMeasured

func (m *BenchResultMutation) AddedMeasured() (r int64, exists bool)

AddedMeasured returns the value that was added to the "measured" field in this mutation.

func (*BenchResultMutation) AddedN

func (m *BenchResultMutation) AddedN() (r int64, exists bool)

AddedN returns the value that was added to the "n" field in this mutation.

func (*BenchResultMutation) AddedNsPerOp

func (m *BenchResultMutation) AddedNsPerOp() (r float64, exists bool)

AddedNsPerOp returns the value that was added to the "ns_per_op" field in this mutation.

func (*BenchResultMutation) AddedOrd

func (m *BenchResultMutation) AddedOrd() (r int64, exists bool)

AddedOrd returns the value that was added to the "ord" field in this mutation.

func (*BenchResultMutation) AllocedBytesPerOp

func (m *BenchResultMutation) AllocedBytesPerOp() (r int64, exists bool)

AllocedBytesPerOp returns the value of the "alloced_bytes_per_op" field in the mutation.

func (*BenchResultMutation) AllocsPerOp

func (m *BenchResultMutation) AllocsPerOp() (r int64, exists bool)

AllocsPerOp returns the value of the "allocs_per_op" field in the mutation.

func (*BenchResultMutation) ClearEdge

func (m *BenchResultMutation) 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 (*BenchResultMutation) ClearField

func (m *BenchResultMutation) 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 (*BenchResultMutation) ClearedEdges

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

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

func (*BenchResultMutation) ClearedFields

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

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

func (BenchResultMutation) Client

func (m BenchResultMutation) 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 (*BenchResultMutation) EdgeCleared

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

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

func (*BenchResultMutation) Field

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

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

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

func (*BenchResultMutation) Fields

func (m *BenchResultMutation) 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 (*BenchResultMutation) ID

func (m *BenchResultMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*BenchResultMutation) IDs

func (m *BenchResultMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*BenchResultMutation) MBPerS

func (m *BenchResultMutation) MBPerS() (r float64, exists bool)

MBPerS returns the value of the "mb_per_s" field in the mutation.

func (*BenchResultMutation) Measured

func (m *BenchResultMutation) Measured() (r int64, exists bool)

Measured returns the value of the "measured" field in the mutation.

func (*BenchResultMutation) N

func (m *BenchResultMutation) N() (r int64, exists bool)

N returns the value of the "n" field in the mutation.

func (*BenchResultMutation) Name

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

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

func (*BenchResultMutation) NsPerOp

func (m *BenchResultMutation) NsPerOp() (r float64, exists bool)

NsPerOp returns the value of the "ns_per_op" field in the mutation.

func (*BenchResultMutation) OldAllocedBytesPerOp

func (m *BenchResultMutation) OldAllocedBytesPerOp(ctx context.Context) (v int64, err error)

OldAllocedBytesPerOp returns the old "alloced_bytes_per_op" field's value of the BenchResult entity. If the BenchResult 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 (*BenchResultMutation) OldAllocsPerOp

func (m *BenchResultMutation) OldAllocsPerOp(ctx context.Context) (v int64, err error)

OldAllocsPerOp returns the old "allocs_per_op" field's value of the BenchResult entity. If the BenchResult 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 (*BenchResultMutation) OldField

func (m *BenchResultMutation) 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 (*BenchResultMutation) OldMBPerS

func (m *BenchResultMutation) OldMBPerS(ctx context.Context) (v float64, err error)

OldMBPerS returns the old "mb_per_s" field's value of the BenchResult entity. If the BenchResult 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 (*BenchResultMutation) OldMeasured

func (m *BenchResultMutation) OldMeasured(ctx context.Context) (v int64, err error)

OldMeasured returns the old "measured" field's value of the BenchResult entity. If the BenchResult 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 (*BenchResultMutation) OldN

func (m *BenchResultMutation) OldN(ctx context.Context) (v int64, err error)

OldN returns the old "n" field's value of the BenchResult entity. If the BenchResult 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 (*BenchResultMutation) OldName

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

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

func (m *BenchResultMutation) OldNsPerOp(ctx context.Context) (v float64, err error)

OldNsPerOp returns the old "ns_per_op" field's value of the BenchResult entity. If the BenchResult 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 (*BenchResultMutation) OldOrd

func (m *BenchResultMutation) OldOrd(ctx context.Context) (v int64, err error)

OldOrd returns the old "ord" field's value of the BenchResult entity. If the BenchResult 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 (*BenchResultMutation) Op

func (m *BenchResultMutation) Op() Op

Op returns the operation name.

func (*BenchResultMutation) Ord

func (m *BenchResultMutation) Ord() (r int64, exists bool)

Ord returns the value of the "ord" field in the mutation.

func (*BenchResultMutation) RemovedEdges

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

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

func (*BenchResultMutation) RemovedIDs

func (m *BenchResultMutation) 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 (*BenchResultMutation) ResetAllocedBytesPerOp

func (m *BenchResultMutation) ResetAllocedBytesPerOp()

ResetAllocedBytesPerOp resets all changes to the "alloced_bytes_per_op" field.

func (*BenchResultMutation) ResetAllocsPerOp

func (m *BenchResultMutation) ResetAllocsPerOp()

ResetAllocsPerOp resets all changes to the "allocs_per_op" field.

func (*BenchResultMutation) ResetEdge

func (m *BenchResultMutation) 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 (*BenchResultMutation) ResetField

func (m *BenchResultMutation) 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 (*BenchResultMutation) ResetMBPerS

func (m *BenchResultMutation) ResetMBPerS()

ResetMBPerS resets all changes to the "mb_per_s" field.

func (*BenchResultMutation) ResetMeasured

func (m *BenchResultMutation) ResetMeasured()

ResetMeasured resets all changes to the "measured" field.

func (*BenchResultMutation) ResetN

func (m *BenchResultMutation) ResetN()

ResetN resets all changes to the "n" field.

func (*BenchResultMutation) ResetName

func (m *BenchResultMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*BenchResultMutation) ResetNsPerOp

func (m *BenchResultMutation) ResetNsPerOp()

ResetNsPerOp resets all changes to the "ns_per_op" field.

func (*BenchResultMutation) ResetOrd

func (m *BenchResultMutation) ResetOrd()

ResetOrd resets all changes to the "ord" field.

func (*BenchResultMutation) SetAllocedBytesPerOp

func (m *BenchResultMutation) SetAllocedBytesPerOp(i int64)

SetAllocedBytesPerOp sets the "alloced_bytes_per_op" field.

func (*BenchResultMutation) SetAllocsPerOp

func (m *BenchResultMutation) SetAllocsPerOp(i int64)

SetAllocsPerOp sets the "allocs_per_op" field.

func (*BenchResultMutation) SetField

func (m *BenchResultMutation) 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 (*BenchResultMutation) SetMBPerS

func (m *BenchResultMutation) SetMBPerS(f float64)

SetMBPerS sets the "mb_per_s" field.

func (*BenchResultMutation) SetMeasured

func (m *BenchResultMutation) SetMeasured(i int64)

SetMeasured sets the "measured" field.

func (*BenchResultMutation) SetN

func (m *BenchResultMutation) SetN(i int64)

SetN sets the "n" field.

func (*BenchResultMutation) SetName

func (m *BenchResultMutation) SetName(s string)

SetName sets the "name" field.

func (*BenchResultMutation) SetNsPerOp

func (m *BenchResultMutation) SetNsPerOp(f float64)

SetNsPerOp sets the "ns_per_op" field.

func (*BenchResultMutation) SetOp

func (m *BenchResultMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*BenchResultMutation) SetOrd

func (m *BenchResultMutation) SetOrd(i int64)

SetOrd sets the "ord" field.

func (BenchResultMutation) Tx

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

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

func (*BenchResultMutation) Type

func (m *BenchResultMutation) Type() string

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

func (*BenchResultMutation) Where

func (m *BenchResultMutation) Where(ps ...predicate.BenchResult)

Where appends a list predicates to the BenchResultMutation builder.

func (*BenchResultMutation) WhereP

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

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

type BenchResultOrder

type BenchResultOrder struct {
	Direction OrderDirection         `json:"direction"`
	Field     *BenchResultOrderField `json:"field"`
}

BenchResultOrder defines the ordering of BenchResult.

type BenchResultOrderField

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

BenchResultOrderField defines the ordering field of BenchResult.

type BenchResultPaginateOption

type BenchResultPaginateOption func(*benchresultPager) error

BenchResultPaginateOption enables pagination customization.

func WithBenchResultFilter

func WithBenchResultFilter(filter func(*BenchResultQuery) (*BenchResultQuery, error)) BenchResultPaginateOption

WithBenchResultFilter configures pagination filter.

func WithBenchResultOrder

func WithBenchResultOrder(order *BenchResultOrder) BenchResultPaginateOption

WithBenchResultOrder configures pagination ordering.

type BenchResultQuery

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

BenchResultQuery is the builder for querying BenchResult entities.

func (*BenchResultQuery) Aggregate

func (brq *BenchResultQuery) Aggregate(fns ...AggregateFunc) *BenchResultSelect

Aggregate returns a BenchResultSelect configured with the given aggregations.

func (*BenchResultQuery) All

func (brq *BenchResultQuery) All(ctx context.Context) ([]*BenchResult, error)

All executes the query and returns a list of BenchResults.

func (*BenchResultQuery) AllX

func (brq *BenchResultQuery) AllX(ctx context.Context) []*BenchResult

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

func (*BenchResultQuery) Clone

func (brq *BenchResultQuery) Clone() *BenchResultQuery

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

func (*BenchResultQuery) CollectFields

func (br *BenchResultQuery) CollectFields(ctx context.Context, satisfies ...string) (*BenchResultQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*BenchResultQuery) Count

func (brq *BenchResultQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*BenchResultQuery) CountX

func (brq *BenchResultQuery) CountX(ctx context.Context) int

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

func (*BenchResultQuery) Exist

func (brq *BenchResultQuery) Exist(ctx context.Context) (bool, error)

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

func (*BenchResultQuery) ExistX

func (brq *BenchResultQuery) ExistX(ctx context.Context) bool

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

func (*BenchResultQuery) First

func (brq *BenchResultQuery) First(ctx context.Context) (*BenchResult, error)

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

func (*BenchResultQuery) FirstID

func (brq *BenchResultQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*BenchResultQuery) FirstIDX

func (brq *BenchResultQuery) FirstIDX(ctx context.Context) int

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

func (*BenchResultQuery) FirstX

func (brq *BenchResultQuery) FirstX(ctx context.Context) *BenchResult

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

func (*BenchResultQuery) GroupBy

func (brq *BenchResultQuery) GroupBy(field string, fields ...string) *BenchResultGroupBy

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.BenchResult.Query().
	GroupBy(benchresult.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*BenchResultQuery) IDs

func (brq *BenchResultQuery) IDs(ctx context.Context) (ids []int, err error)

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

func (*BenchResultQuery) IDsX

func (brq *BenchResultQuery) IDsX(ctx context.Context) []int

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

func (*BenchResultQuery) Limit

func (brq *BenchResultQuery) Limit(limit int) *BenchResultQuery

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

func (*BenchResultQuery) Offset

func (brq *BenchResultQuery) Offset(offset int) *BenchResultQuery

Offset to start from.

func (*BenchResultQuery) Only

func (brq *BenchResultQuery) Only(ctx context.Context) (*BenchResult, error)

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

func (*BenchResultQuery) OnlyID

func (brq *BenchResultQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*BenchResultQuery) OnlyIDX

func (brq *BenchResultQuery) OnlyIDX(ctx context.Context) int

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

func (*BenchResultQuery) OnlyX

func (brq *BenchResultQuery) OnlyX(ctx context.Context) *BenchResult

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

func (*BenchResultQuery) Order

func (brq *BenchResultQuery) Order(o ...OrderFunc) *BenchResultQuery

Order specifies how the records should be ordered.

func (*BenchResultQuery) Paginate

func (br *BenchResultQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...BenchResultPaginateOption,
) (*BenchResultConnection, error)

Paginate executes the query and returns a relay based cursor connection to BenchResult.

func (*BenchResultQuery) Select

func (brq *BenchResultQuery) Select(fields ...string) *BenchResultSelect

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.BenchResult.Query().
	Select(benchresult.FieldName).
	Scan(ctx, &v)

func (*BenchResultQuery) Unique

func (brq *BenchResultQuery) Unique(unique bool) *BenchResultQuery

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

Where adds a new predicate for the BenchResultQuery builder.

type BenchResultSelect

type BenchResultSelect struct {
	*BenchResultQuery
	// contains filtered or unexported fields
}

BenchResultSelect is the builder for selecting fields of BenchResult entities.

func (*BenchResultSelect) Aggregate

func (brs *BenchResultSelect) Aggregate(fns ...AggregateFunc) *BenchResultSelect

Aggregate adds the given aggregation functions to the selector query.

func (*BenchResultSelect) Bool

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

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

func (*BenchResultSelect) BoolX

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

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

func (*BenchResultSelect) Bools

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

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

func (*BenchResultSelect) BoolsX

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

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

func (*BenchResultSelect) Float64

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

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

func (*BenchResultSelect) Float64X

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

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

func (*BenchResultSelect) Float64s

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

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

func (*BenchResultSelect) Float64sX

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

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

func (*BenchResultSelect) Int

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

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

func (*BenchResultSelect) IntX

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

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

func (*BenchResultSelect) Ints

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

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

func (*BenchResultSelect) IntsX

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

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

func (*BenchResultSelect) Scan

func (brs *BenchResultSelect) Scan(ctx context.Context, v any) error

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

func (*BenchResultSelect) ScanX

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

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

func (*BenchResultSelect) String

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

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

func (*BenchResultSelect) StringX

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

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

func (*BenchResultSelect) Strings

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

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

func (*BenchResultSelect) StringsX

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

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

type BenchResultUpdate

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

BenchResultUpdate is the builder for updating BenchResult entities.

func (*BenchResultUpdate) AddAllocedBytesPerOp

func (bru *BenchResultUpdate) AddAllocedBytesPerOp(i int64) *BenchResultUpdate

AddAllocedBytesPerOp adds i to the "alloced_bytes_per_op" field.

func (*BenchResultUpdate) AddAllocsPerOp

func (bru *BenchResultUpdate) AddAllocsPerOp(i int64) *BenchResultUpdate

AddAllocsPerOp adds i to the "allocs_per_op" field.

func (*BenchResultUpdate) AddMBPerS

func (bru *BenchResultUpdate) AddMBPerS(f float64) *BenchResultUpdate

AddMBPerS adds f to the "mb_per_s" field.

func (*BenchResultUpdate) AddMeasured

func (bru *BenchResultUpdate) AddMeasured(i int64) *BenchResultUpdate

AddMeasured adds i to the "measured" field.

func (*BenchResultUpdate) AddN

AddN adds i to the "n" field.

func (*BenchResultUpdate) AddNsPerOp

func (bru *BenchResultUpdate) AddNsPerOp(f float64) *BenchResultUpdate

AddNsPerOp adds f to the "ns_per_op" field.

func (*BenchResultUpdate) AddOrd

func (bru *BenchResultUpdate) AddOrd(i int64) *BenchResultUpdate

AddOrd adds i to the "ord" field.

func (*BenchResultUpdate) Exec

func (bru *BenchResultUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*BenchResultUpdate) ExecX

func (bru *BenchResultUpdate) ExecX(ctx context.Context)

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

func (*BenchResultUpdate) Mutation

func (bru *BenchResultUpdate) Mutation() *BenchResultMutation

Mutation returns the BenchResultMutation object of the builder.

func (*BenchResultUpdate) Save

func (bru *BenchResultUpdate) Save(ctx context.Context) (int, error)

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

func (*BenchResultUpdate) SaveX

func (bru *BenchResultUpdate) SaveX(ctx context.Context) int

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

func (*BenchResultUpdate) SetAllocedBytesPerOp

func (bru *BenchResultUpdate) SetAllocedBytesPerOp(i int64) *BenchResultUpdate

SetAllocedBytesPerOp sets the "alloced_bytes_per_op" field.

func (*BenchResultUpdate) SetAllocsPerOp

func (bru *BenchResultUpdate) SetAllocsPerOp(i int64) *BenchResultUpdate

SetAllocsPerOp sets the "allocs_per_op" field.

func (*BenchResultUpdate) SetMBPerS

func (bru *BenchResultUpdate) SetMBPerS(f float64) *BenchResultUpdate

SetMBPerS sets the "mb_per_s" field.

func (*BenchResultUpdate) SetMeasured

func (bru *BenchResultUpdate) SetMeasured(i int64) *BenchResultUpdate

SetMeasured sets the "measured" field.

func (*BenchResultUpdate) SetN

SetN sets the "n" field.

func (*BenchResultUpdate) SetName

func (bru *BenchResultUpdate) SetName(s string) *BenchResultUpdate

SetName sets the "name" field.

func (*BenchResultUpdate) SetNsPerOp

func (bru *BenchResultUpdate) SetNsPerOp(f float64) *BenchResultUpdate

SetNsPerOp sets the "ns_per_op" field.

func (*BenchResultUpdate) SetOrd

func (bru *BenchResultUpdate) SetOrd(i int64) *BenchResultUpdate

SetOrd sets the "ord" field.

func (*BenchResultUpdate) Where

Where appends a list predicates to the BenchResultUpdate builder.

type BenchResultUpdateOne

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

BenchResultUpdateOne is the builder for updating a single BenchResult entity.

func (*BenchResultUpdateOne) AddAllocedBytesPerOp

func (bruo *BenchResultUpdateOne) AddAllocedBytesPerOp(i int64) *BenchResultUpdateOne

AddAllocedBytesPerOp adds i to the "alloced_bytes_per_op" field.

func (*BenchResultUpdateOne) AddAllocsPerOp

func (bruo *BenchResultUpdateOne) AddAllocsPerOp(i int64) *BenchResultUpdateOne

AddAllocsPerOp adds i to the "allocs_per_op" field.

func (*BenchResultUpdateOne) AddMBPerS

AddMBPerS adds f to the "mb_per_s" field.

func (*BenchResultUpdateOne) AddMeasured

func (bruo *BenchResultUpdateOne) AddMeasured(i int64) *BenchResultUpdateOne

AddMeasured adds i to the "measured" field.

func (*BenchResultUpdateOne) AddN

AddN adds i to the "n" field.

func (*BenchResultUpdateOne) AddNsPerOp

func (bruo *BenchResultUpdateOne) AddNsPerOp(f float64) *BenchResultUpdateOne

AddNsPerOp adds f to the "ns_per_op" field.

func (*BenchResultUpdateOne) AddOrd

AddOrd adds i to the "ord" field.

func (*BenchResultUpdateOne) Exec

func (bruo *BenchResultUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*BenchResultUpdateOne) ExecX

func (bruo *BenchResultUpdateOne) ExecX(ctx context.Context)

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

func (*BenchResultUpdateOne) Mutation

func (bruo *BenchResultUpdateOne) Mutation() *BenchResultMutation

Mutation returns the BenchResultMutation object of the builder.

func (*BenchResultUpdateOne) Save

Save executes the query and returns the updated BenchResult entity.

func (*BenchResultUpdateOne) SaveX

func (bruo *BenchResultUpdateOne) SaveX(ctx context.Context) *BenchResult

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

func (*BenchResultUpdateOne) Select

func (bruo *BenchResultUpdateOne) Select(field string, fields ...string) *BenchResultUpdateOne

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

func (*BenchResultUpdateOne) SetAllocedBytesPerOp

func (bruo *BenchResultUpdateOne) SetAllocedBytesPerOp(i int64) *BenchResultUpdateOne

SetAllocedBytesPerOp sets the "alloced_bytes_per_op" field.

func (*BenchResultUpdateOne) SetAllocsPerOp

func (bruo *BenchResultUpdateOne) SetAllocsPerOp(i int64) *BenchResultUpdateOne

SetAllocsPerOp sets the "allocs_per_op" field.

func (*BenchResultUpdateOne) SetMBPerS

SetMBPerS sets the "mb_per_s" field.

func (*BenchResultUpdateOne) SetMeasured

func (bruo *BenchResultUpdateOne) SetMeasured(i int64) *BenchResultUpdateOne

SetMeasured sets the "measured" field.

func (*BenchResultUpdateOne) SetN

SetN sets the "n" field.

func (*BenchResultUpdateOne) SetName

SetName sets the "name" field.

func (*BenchResultUpdateOne) SetNsPerOp

func (bruo *BenchResultUpdateOne) SetNsPerOp(f float64) *BenchResultUpdateOne

SetNsPerOp sets the "ns_per_op" field.

func (*BenchResultUpdateOne) SetOrd

SetOrd sets the "ord" field.

func (*BenchResultUpdateOne) Where

Where appends a list predicates to the BenchResultUpdate builder.

type BenchResultWhereInput

type BenchResultWhereInput struct {
	Predicates []predicate.BenchResult  `json:"-"`
	Not        *BenchResultWhereInput   `json:"not,omitempty"`
	Or         []*BenchResultWhereInput `json:"or,omitempty"`
	And        []*BenchResultWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "n" field predicates.
	N      *int64  `json:"n,omitempty"`
	NNEQ   *int64  `json:"nNEQ,omitempty"`
	NIn    []int64 `json:"nIn,omitempty"`
	NNotIn []int64 `json:"nNotIn,omitempty"`
	NGT    *int64  `json:"nGT,omitempty"`
	NGTE   *int64  `json:"nGTE,omitempty"`
	NLT    *int64  `json:"nLT,omitempty"`
	NLTE   *int64  `json:"nLTE,omitempty"`

	// "ns_per_op" field predicates.
	NsPerOp      *float64  `json:"nsPerOp,omitempty"`
	NsPerOpNEQ   *float64  `json:"nsPerOpNEQ,omitempty"`
	NsPerOpIn    []float64 `json:"nsPerOpIn,omitempty"`
	NsPerOpNotIn []float64 `json:"nsPerOpNotIn,omitempty"`
	NsPerOpGT    *float64  `json:"nsPerOpGT,omitempty"`
	NsPerOpGTE   *float64  `json:"nsPerOpGTE,omitempty"`
	NsPerOpLT    *float64  `json:"nsPerOpLT,omitempty"`
	NsPerOpLTE   *float64  `json:"nsPerOpLTE,omitempty"`

	// "alloced_bytes_per_op" field predicates.
	AllocedBytesPerOp      *int64  `json:"allocedBytesPerOp,omitempty"`
	AllocedBytesPerOpNEQ   *int64  `json:"allocedBytesPerOpNEQ,omitempty"`
	AllocedBytesPerOpIn    []int64 `json:"allocedBytesPerOpIn,omitempty"`
	AllocedBytesPerOpNotIn []int64 `json:"allocedBytesPerOpNotIn,omitempty"`
	AllocedBytesPerOpGT    *int64  `json:"allocedBytesPerOpGT,omitempty"`
	AllocedBytesPerOpGTE   *int64  `json:"allocedBytesPerOpGTE,omitempty"`
	AllocedBytesPerOpLT    *int64  `json:"allocedBytesPerOpLT,omitempty"`
	AllocedBytesPerOpLTE   *int64  `json:"allocedBytesPerOpLTE,omitempty"`

	// "allocs_per_op" field predicates.
	AllocsPerOp      *int64  `json:"allocsPerOp,omitempty"`
	AllocsPerOpNEQ   *int64  `json:"allocsPerOpNEQ,omitempty"`
	AllocsPerOpIn    []int64 `json:"allocsPerOpIn,omitempty"`
	AllocsPerOpNotIn []int64 `json:"allocsPerOpNotIn,omitempty"`
	AllocsPerOpGT    *int64  `json:"allocsPerOpGT,omitempty"`
	AllocsPerOpGTE   *int64  `json:"allocsPerOpGTE,omitempty"`
	AllocsPerOpLT    *int64  `json:"allocsPerOpLT,omitempty"`
	AllocsPerOpLTE   *int64  `json:"allocsPerOpLTE,omitempty"`

	// "mb_per_s" field predicates.
	MBPerS      *float64  `json:"mbPerS,omitempty"`
	MBPerSNEQ   *float64  `json:"mbPerSNEQ,omitempty"`
	MBPerSIn    []float64 `json:"mbPerSIn,omitempty"`
	MBPerSNotIn []float64 `json:"mbPerSNotIn,omitempty"`
	MBPerSGT    *float64  `json:"mbPerSGT,omitempty"`
	MBPerSGTE   *float64  `json:"mbPerSGTE,omitempty"`
	MBPerSLT    *float64  `json:"mbPerSLT,omitempty"`
	MBPerSLTE   *float64  `json:"mbPerSLTE,omitempty"`

	// "measured" field predicates.
	Measured      *int64  `json:"measured,omitempty"`
	MeasuredNEQ   *int64  `json:"measuredNEQ,omitempty"`
	MeasuredIn    []int64 `json:"measuredIn,omitempty"`
	MeasuredNotIn []int64 `json:"measuredNotIn,omitempty"`
	MeasuredGT    *int64  `json:"measuredGT,omitempty"`
	MeasuredGTE   *int64  `json:"measuredGTE,omitempty"`
	MeasuredLT    *int64  `json:"measuredLT,omitempty"`
	MeasuredLTE   *int64  `json:"measuredLTE,omitempty"`

	// "ord" field predicates.
	Ord      *int64  `json:"ord,omitempty"`
	OrdNEQ   *int64  `json:"ordNEQ,omitempty"`
	OrdIn    []int64 `json:"ordIn,omitempty"`
	OrdNotIn []int64 `json:"ordNotIn,omitempty"`
	OrdGT    *int64  `json:"ordGT,omitempty"`
	OrdGTE   *int64  `json:"ordGTE,omitempty"`
	OrdLT    *int64  `json:"ordLT,omitempty"`
	OrdLTE   *int64  `json:"ordLTE,omitempty"`
}

BenchResultWhereInput represents a where input for filtering BenchResult queries.

func (*BenchResultWhereInput) AddPredicates

func (i *BenchResultWhereInput) AddPredicates(predicates ...predicate.BenchResult)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*BenchResultWhereInput) Filter

Filter applies the BenchResultWhereInput filter on the BenchResultQuery builder.

func (*BenchResultWhereInput) P

P returns a predicate for filtering benchresults. An error is returned if the input is empty or invalid.

type BenchResults

type BenchResults []*BenchResult

BenchResults is a parsable slice of BenchResult.

type BenchSelect

type BenchSelect struct {
	*BenchQuery
	// contains filtered or unexported fields
}

BenchSelect is the builder for selecting fields of Bench entities.

func (*BenchSelect) Aggregate

func (bs *BenchSelect) Aggregate(fns ...AggregateFunc) *BenchSelect

Aggregate adds the given aggregation functions to the selector query.

func (*BenchSelect) Bool

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

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

func (*BenchSelect) BoolX

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

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

func (*BenchSelect) Bools

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

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

func (*BenchSelect) BoolsX

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

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

func (*BenchSelect) Float64

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

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

func (*BenchSelect) Float64X

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

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

func (*BenchSelect) Float64s

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

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

func (*BenchSelect) Float64sX

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

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

func (*BenchSelect) Int

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

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

func (*BenchSelect) IntX

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

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

func (*BenchSelect) Ints

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

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

func (*BenchSelect) IntsX

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

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

func (*BenchSelect) Scan

func (bs *BenchSelect) Scan(ctx context.Context, v any) error

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

func (*BenchSelect) ScanX

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

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

func (*BenchSelect) String

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

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

func (*BenchSelect) StringX

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

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

func (*BenchSelect) Strings

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

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

func (*BenchSelect) StringsX

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

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

type BenchUpdate

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

BenchUpdate is the builder for updating Bench entities.

func (*BenchUpdate) AddBenchResult

func (bu *BenchUpdate) AddBenchResult(b ...*BenchResult) *BenchUpdate

AddBenchResult adds the "bench_result" edges to the BenchResult entity.

func (*BenchUpdate) AddBenchResultIDs

func (bu *BenchUpdate) AddBenchResultIDs(ids ...int) *BenchUpdate

AddBenchResultIDs adds the "bench_result" edge to the BenchResult entity by IDs.

func (*BenchUpdate) ClearBenchResult

func (bu *BenchUpdate) ClearBenchResult() *BenchUpdate

ClearBenchResult clears all "bench_result" edges to the BenchResult entity.

func (*BenchUpdate) Exec

func (bu *BenchUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*BenchUpdate) ExecX

func (bu *BenchUpdate) ExecX(ctx context.Context)

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

func (*BenchUpdate) Mutation

func (bu *BenchUpdate) Mutation() *BenchMutation

Mutation returns the BenchMutation object of the builder.

func (*BenchUpdate) RemoveBenchResult

func (bu *BenchUpdate) RemoveBenchResult(b ...*BenchResult) *BenchUpdate

RemoveBenchResult removes "bench_result" edges to BenchResult entities.

func (*BenchUpdate) RemoveBenchResultIDs

func (bu *BenchUpdate) RemoveBenchResultIDs(ids ...int) *BenchUpdate

RemoveBenchResultIDs removes the "bench_result" edge to BenchResult entities by IDs.

func (*BenchUpdate) Save

func (bu *BenchUpdate) Save(ctx context.Context) (int, error)

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

func (*BenchUpdate) SaveX

func (bu *BenchUpdate) SaveX(ctx context.Context) int

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

func (*BenchUpdate) SetArch

func (bu *BenchUpdate) SetArch(s string) *BenchUpdate

SetArch sets the "arch" field.

func (*BenchUpdate) SetCPU

func (bu *BenchUpdate) SetCPU(s string) *BenchUpdate

SetCPU sets the "cpu" field.

func (*BenchUpdate) SetOs

func (bu *BenchUpdate) SetOs(s string) *BenchUpdate

SetOs sets the "os" field.

func (*BenchUpdate) SetPackage

func (bu *BenchUpdate) SetPackage(s string) *BenchUpdate

SetPackage sets the "package" field.

func (*BenchUpdate) SetPass

func (bu *BenchUpdate) SetPass(b bool) *BenchUpdate

SetPass sets the "pass" field.

func (*BenchUpdate) Where

func (bu *BenchUpdate) Where(ps ...predicate.Bench) *BenchUpdate

Where appends a list predicates to the BenchUpdate builder.

type BenchUpdateOne

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

BenchUpdateOne is the builder for updating a single Bench entity.

func (*BenchUpdateOne) AddBenchResult

func (buo *BenchUpdateOne) AddBenchResult(b ...*BenchResult) *BenchUpdateOne

AddBenchResult adds the "bench_result" edges to the BenchResult entity.

func (*BenchUpdateOne) AddBenchResultIDs

func (buo *BenchUpdateOne) AddBenchResultIDs(ids ...int) *BenchUpdateOne

AddBenchResultIDs adds the "bench_result" edge to the BenchResult entity by IDs.

func (*BenchUpdateOne) ClearBenchResult

func (buo *BenchUpdateOne) ClearBenchResult() *BenchUpdateOne

ClearBenchResult clears all "bench_result" edges to the BenchResult entity.

func (*BenchUpdateOne) Exec

func (buo *BenchUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*BenchUpdateOne) ExecX

func (buo *BenchUpdateOne) ExecX(ctx context.Context)

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

func (*BenchUpdateOne) Mutation

func (buo *BenchUpdateOne) Mutation() *BenchMutation

Mutation returns the BenchMutation object of the builder.

func (*BenchUpdateOne) RemoveBenchResult

func (buo *BenchUpdateOne) RemoveBenchResult(b ...*BenchResult) *BenchUpdateOne

RemoveBenchResult removes "bench_result" edges to BenchResult entities.

func (*BenchUpdateOne) RemoveBenchResultIDs

func (buo *BenchUpdateOne) RemoveBenchResultIDs(ids ...int) *BenchUpdateOne

RemoveBenchResultIDs removes the "bench_result" edge to BenchResult entities by IDs.

func (*BenchUpdateOne) Save

func (buo *BenchUpdateOne) Save(ctx context.Context) (*Bench, error)

Save executes the query and returns the updated Bench entity.

func (*BenchUpdateOne) SaveX

func (buo *BenchUpdateOne) SaveX(ctx context.Context) *Bench

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

func (*BenchUpdateOne) Select

func (buo *BenchUpdateOne) Select(field string, fields ...string) *BenchUpdateOne

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

func (*BenchUpdateOne) SetArch

func (buo *BenchUpdateOne) SetArch(s string) *BenchUpdateOne

SetArch sets the "arch" field.

func (*BenchUpdateOne) SetCPU

func (buo *BenchUpdateOne) SetCPU(s string) *BenchUpdateOne

SetCPU sets the "cpu" field.

func (*BenchUpdateOne) SetOs

func (buo *BenchUpdateOne) SetOs(s string) *BenchUpdateOne

SetOs sets the "os" field.

func (*BenchUpdateOne) SetPackage

func (buo *BenchUpdateOne) SetPackage(s string) *BenchUpdateOne

SetPackage sets the "package" field.

func (*BenchUpdateOne) SetPass

func (buo *BenchUpdateOne) SetPass(b bool) *BenchUpdateOne

SetPass sets the "pass" field.

func (*BenchUpdateOne) Where

func (buo *BenchUpdateOne) Where(ps ...predicate.Bench) *BenchUpdateOne

Where appends a list predicates to the BenchUpdate builder.

type BenchWhereInput

type BenchWhereInput struct {
	Predicates []predicate.Bench  `json:"-"`
	Not        *BenchWhereInput   `json:"not,omitempty"`
	Or         []*BenchWhereInput `json:"or,omitempty"`
	And        []*BenchWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "os" field predicates.
	Os             *string  `json:"os,omitempty"`
	OsNEQ          *string  `json:"osNEQ,omitempty"`
	OsIn           []string `json:"osIn,omitempty"`
	OsNotIn        []string `json:"osNotIn,omitempty"`
	OsGT           *string  `json:"osGT,omitempty"`
	OsGTE          *string  `json:"osGTE,omitempty"`
	OsLT           *string  `json:"osLT,omitempty"`
	OsLTE          *string  `json:"osLTE,omitempty"`
	OsContains     *string  `json:"osContains,omitempty"`
	OsHasPrefix    *string  `json:"osHasPrefix,omitempty"`
	OsHasSuffix    *string  `json:"osHasSuffix,omitempty"`
	OsEqualFold    *string  `json:"osEqualFold,omitempty"`
	OsContainsFold *string  `json:"osContainsFold,omitempty"`

	// "arch" field predicates.
	Arch             *string  `json:"arch,omitempty"`
	ArchNEQ          *string  `json:"archNEQ,omitempty"`
	ArchIn           []string `json:"archIn,omitempty"`
	ArchNotIn        []string `json:"archNotIn,omitempty"`
	ArchGT           *string  `json:"archGT,omitempty"`
	ArchGTE          *string  `json:"archGTE,omitempty"`
	ArchLT           *string  `json:"archLT,omitempty"`
	ArchLTE          *string  `json:"archLTE,omitempty"`
	ArchContains     *string  `json:"archContains,omitempty"`
	ArchHasPrefix    *string  `json:"archHasPrefix,omitempty"`
	ArchHasSuffix    *string  `json:"archHasSuffix,omitempty"`
	ArchEqualFold    *string  `json:"archEqualFold,omitempty"`
	ArchContainsFold *string  `json:"archContainsFold,omitempty"`

	// "cpu" field predicates.
	CPU             *string  `json:"cpu,omitempty"`
	CPUNEQ          *string  `json:"cpuNEQ,omitempty"`
	CPUIn           []string `json:"cpuIn,omitempty"`
	CPUNotIn        []string `json:"cpuNotIn,omitempty"`
	CPUGT           *string  `json:"cpuGT,omitempty"`
	CPUGTE          *string  `json:"cpuGTE,omitempty"`
	CPULT           *string  `json:"cpuLT,omitempty"`
	CPULTE          *string  `json:"cpuLTE,omitempty"`
	CPUContains     *string  `json:"cpuContains,omitempty"`
	CPUHasPrefix    *string  `json:"cpuHasPrefix,omitempty"`
	CPUHasSuffix    *string  `json:"cpuHasSuffix,omitempty"`
	CPUEqualFold    *string  `json:"cpuEqualFold,omitempty"`
	CPUContainsFold *string  `json:"cpuContainsFold,omitempty"`

	// "package" field predicates.
	Package             *string  `json:"package,omitempty"`
	PackageNEQ          *string  `json:"packageNEQ,omitempty"`
	PackageIn           []string `json:"packageIn,omitempty"`
	PackageNotIn        []string `json:"packageNotIn,omitempty"`
	PackageGT           *string  `json:"packageGT,omitempty"`
	PackageGTE          *string  `json:"packageGTE,omitempty"`
	PackageLT           *string  `json:"packageLT,omitempty"`
	PackageLTE          *string  `json:"packageLTE,omitempty"`
	PackageContains     *string  `json:"packageContains,omitempty"`
	PackageHasPrefix    *string  `json:"packageHasPrefix,omitempty"`
	PackageHasSuffix    *string  `json:"packageHasSuffix,omitempty"`
	PackageEqualFold    *string  `json:"packageEqualFold,omitempty"`
	PackageContainsFold *string  `json:"packageContainsFold,omitempty"`

	// "pass" field predicates.
	Pass    *bool `json:"pass,omitempty"`
	PassNEQ *bool `json:"passNEQ,omitempty"`

	// "bench_result" edge predicates.
	HasBenchResult     *bool                    `json:"hasBenchResult,omitempty"`
	HasBenchResultWith []*BenchResultWhereInput `json:"hasBenchResultWith,omitempty"`
}

BenchWhereInput represents a where input for filtering Bench queries.

func (*BenchWhereInput) AddPredicates

func (i *BenchWhereInput) AddPredicates(predicates ...predicate.Bench)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*BenchWhereInput) Filter

func (i *BenchWhereInput) Filter(q *BenchQuery) (*BenchQuery, error)

Filter applies the BenchWhereInput filter on the BenchQuery builder.

func (*BenchWhereInput) P

P returns a predicate for filtering benches. An error is returned if the input is empty or invalid.

type Benches

type Benches []*Bench

Benches is a parsable slice of Bench.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Bench is the client for interacting with the Bench builders.
	Bench *BenchClient
	// BenchResult is the client for interacting with the BenchResult builders.
	BenchResult *BenchResultClient
	// 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().
	Bench.
	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) Noder

func (c *Client) Noder(ctx context.Context, id int, opts ...NodeOption) (_ Noder, err error)

Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.

c.Noder(ctx, id)
c.Noder(ctx, id, ent.WithNodeType(typeResolver))

func (*Client) Noders

func (c *Client) Noders(ctx context.Context, ids []int, opts ...NodeOption) ([]Noder, error)

func (*Client) OpenTx

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

OpenTx opens a transaction and returns a transactional context along with the created transaction.

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 CreateBenchInput

type CreateBenchInput struct {
	Os             string
	Arch           string
	CPU            string
	Package        string
	Pass           bool
	BenchResultIDs []int
}

CreateBenchInput represents a mutation input for creating benches.

func (*CreateBenchInput) Mutate

func (i *CreateBenchInput) Mutate(m *BenchMutation)

Mutate applies the CreateBenchInput on the BenchMutation builder.

type CreateBenchResultInput

type CreateBenchResultInput struct {
	Name              string
	N                 int64
	NsPerOp           float64
	AllocedBytesPerOp int64
	AllocsPerOp       int64
	MBPerS            float64
	Measured          int64
	Ord               int64
}

CreateBenchResultInput represents a mutation input for creating benchresults.

func (*CreateBenchResultInput) Mutate

Mutate applies the CreateBenchResultInput on the BenchResultMutation builder.

type Cursor

type Cursor = entgql.Cursor[int]

Common entgql types.

type Hook

type Hook = ent.Hook

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

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

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

type Interceptor

type Interceptor = ent.Interceptor

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

type MutateFunc

type MutateFunc = ent.MutateFunc

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

type Mutation

type Mutation = ent.Mutation

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

type Mutator

type Mutator = ent.Mutator

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

type NodeOption

type NodeOption func(*nodeOptions)

NodeOption allows configuring the Noder execution using functional options.

func WithFixedNodeType

func WithFixedNodeType(t string) NodeOption

WithFixedNodeType sets the Type of the node to a fixed value.

func WithNodeType

func WithNodeType(f func(context.Context, int) (string, error)) NodeOption

WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.

type Noder

type Noder interface {
	IsNode()
}

Noder wraps the basic Node method.

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 OrderDirection

type OrderDirection = entgql.OrderDirection

Common entgql types.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector.

func Asc

func Asc(fields ...string) OrderFunc

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) OrderFunc

Desc applies the given fields in DESC order.

type PageInfo

type PageInfo = entgql.PageInfo[int]

Common entgql types.

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 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 {

	// Bench is the client for interacting with the Bench builders.
	Bench *BenchClient
	// BenchResult is the client for interacting with the BenchResult builders.
	BenchResult *BenchResultClient
	// 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