Documentation ¶
Index ¶
- Constants
- Variables
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)
- type AggregateFunc
- type Bench
- func (b *Bench) BenchResult(ctx context.Context) (result []*BenchResult, err error)
- func (n *Bench) IsNode()
- func (b *Bench) NamedBenchResult(name string) ([]*BenchResult, error)
- func (b *Bench) QueryBenchResult() *BenchResultQuery
- func (b *Bench) String() string
- func (b *Bench) ToEdge(order *BenchOrder) *BenchEdge
- func (b *Bench) Unwrap() *Bench
- func (b *Bench) Update() *BenchUpdateOne
- type BenchClient
- func (c *BenchClient) Create() *BenchCreate
- func (c *BenchClient) CreateBulk(builders ...*BenchCreate) *BenchCreateBulk
- func (c *BenchClient) Delete() *BenchDelete
- func (c *BenchClient) DeleteOne(b *Bench) *BenchDeleteOne
- func (c *BenchClient) DeleteOneID(id int) *BenchDeleteOne
- func (c *BenchClient) Get(ctx context.Context, id int) (*Bench, error)
- func (c *BenchClient) GetX(ctx context.Context, id int) *Bench
- func (c *BenchClient) Hooks() []Hook
- func (c *BenchClient) Intercept(interceptors ...Interceptor)
- func (c *BenchClient) Interceptors() []Interceptor
- func (c *BenchClient) Query() *BenchQuery
- func (c *BenchClient) QueryBenchResult(b *Bench) *BenchResultQuery
- func (c *BenchClient) Update() *BenchUpdate
- func (c *BenchClient) UpdateOne(b *Bench) *BenchUpdateOne
- func (c *BenchClient) UpdateOneID(id int) *BenchUpdateOne
- func (c *BenchClient) Use(hooks ...Hook)
- type BenchConnection
- type BenchCreate
- func (bc *BenchCreate) AddBenchResult(b ...*BenchResult) *BenchCreate
- func (bc *BenchCreate) AddBenchResultIDs(ids ...int) *BenchCreate
- func (bc *BenchCreate) Exec(ctx context.Context) error
- func (bc *BenchCreate) ExecX(ctx context.Context)
- func (bc *BenchCreate) Mutation() *BenchMutation
- func (bc *BenchCreate) Save(ctx context.Context) (*Bench, error)
- func (bc *BenchCreate) SaveX(ctx context.Context) *Bench
- func (bc *BenchCreate) SetArch(s string) *BenchCreate
- func (bc *BenchCreate) SetCPU(s string) *BenchCreate
- func (c *BenchCreate) SetInput(i CreateBenchInput) *BenchCreate
- func (bc *BenchCreate) SetOs(s string) *BenchCreate
- func (bc *BenchCreate) SetPackage(s string) *BenchCreate
- func (bc *BenchCreate) SetPass(b bool) *BenchCreate
- type BenchCreateBulk
- type BenchDelete
- type BenchDeleteOne
- type BenchEdge
- type BenchEdges
- type BenchGroupBy
- func (bgb *BenchGroupBy) Aggregate(fns ...AggregateFunc) *BenchGroupBy
- func (s *BenchGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *BenchGroupBy) BoolX(ctx context.Context) bool
- func (s *BenchGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *BenchGroupBy) BoolsX(ctx context.Context) []bool
- func (s *BenchGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *BenchGroupBy) Float64X(ctx context.Context) float64
- func (s *BenchGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *BenchGroupBy) Float64sX(ctx context.Context) []float64
- func (s *BenchGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *BenchGroupBy) IntX(ctx context.Context) int
- func (s *BenchGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *BenchGroupBy) IntsX(ctx context.Context) []int
- func (bgb *BenchGroupBy) Scan(ctx context.Context, v any) error
- func (s *BenchGroupBy) ScanX(ctx context.Context, v any)
- func (s *BenchGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *BenchGroupBy) StringX(ctx context.Context) string
- func (s *BenchGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *BenchGroupBy) StringsX(ctx context.Context) []string
- type BenchMutation
- func (m *BenchMutation) AddBenchResultIDs(ids ...int)
- func (m *BenchMutation) AddField(name string, value ent.Value) error
- func (m *BenchMutation) AddedEdges() []string
- func (m *BenchMutation) AddedField(name string) (ent.Value, bool)
- func (m *BenchMutation) AddedFields() []string
- func (m *BenchMutation) AddedIDs(name string) []ent.Value
- func (m *BenchMutation) Arch() (r string, exists bool)
- func (m *BenchMutation) BenchResultCleared() bool
- func (m *BenchMutation) BenchResultIDs() (ids []int)
- func (m *BenchMutation) CPU() (r string, exists bool)
- func (m *BenchMutation) ClearBenchResult()
- func (m *BenchMutation) ClearEdge(name string) error
- func (m *BenchMutation) ClearField(name string) error
- func (m *BenchMutation) ClearedEdges() []string
- func (m *BenchMutation) ClearedFields() []string
- func (m BenchMutation) Client() *Client
- func (m *BenchMutation) EdgeCleared(name string) bool
- func (m *BenchMutation) Field(name string) (ent.Value, bool)
- func (m *BenchMutation) FieldCleared(name string) bool
- func (m *BenchMutation) Fields() []string
- func (m *BenchMutation) ID() (id int, exists bool)
- func (m *BenchMutation) IDs(ctx context.Context) ([]int, error)
- func (m *BenchMutation) OldArch(ctx context.Context) (v string, err error)
- func (m *BenchMutation) OldCPU(ctx context.Context) (v string, err error)
- func (m *BenchMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *BenchMutation) OldOs(ctx context.Context) (v string, err error)
- func (m *BenchMutation) OldPackage(ctx context.Context) (v string, err error)
- func (m *BenchMutation) OldPass(ctx context.Context) (v bool, err error)
- func (m *BenchMutation) Op() Op
- func (m *BenchMutation) Os() (r string, exists bool)
- func (m *BenchMutation) Package() (r string, exists bool)
- func (m *BenchMutation) Pass() (r bool, exists bool)
- func (m *BenchMutation) RemoveBenchResultIDs(ids ...int)
- func (m *BenchMutation) RemovedBenchResultIDs() (ids []int)
- func (m *BenchMutation) RemovedEdges() []string
- func (m *BenchMutation) RemovedIDs(name string) []ent.Value
- func (m *BenchMutation) ResetArch()
- func (m *BenchMutation) ResetBenchResult()
- func (m *BenchMutation) ResetCPU()
- func (m *BenchMutation) ResetEdge(name string) error
- func (m *BenchMutation) ResetField(name string) error
- func (m *BenchMutation) ResetOs()
- func (m *BenchMutation) ResetPackage()
- func (m *BenchMutation) ResetPass()
- func (m *BenchMutation) SetArch(s string)
- func (m *BenchMutation) SetCPU(s string)
- func (m *BenchMutation) SetField(name string, value ent.Value) error
- func (m *BenchMutation) SetOp(op Op)
- func (m *BenchMutation) SetOs(s string)
- func (m *BenchMutation) SetPackage(s string)
- func (m *BenchMutation) SetPass(b bool)
- func (m BenchMutation) Tx() (*Tx, error)
- func (m *BenchMutation) Type() string
- func (m *BenchMutation) Where(ps ...predicate.Bench)
- func (m *BenchMutation) WhereP(ps ...func(*sql.Selector))
- type BenchOrder
- type BenchOrderField
- type BenchPaginateOption
- type BenchQuery
- func (bq *BenchQuery) Aggregate(fns ...AggregateFunc) *BenchSelect
- func (bq *BenchQuery) All(ctx context.Context) ([]*Bench, error)
- func (bq *BenchQuery) AllX(ctx context.Context) []*Bench
- func (bq *BenchQuery) Clone() *BenchQuery
- func (b *BenchQuery) CollectFields(ctx context.Context, satisfies ...string) (*BenchQuery, error)
- func (bq *BenchQuery) Count(ctx context.Context) (int, error)
- func (bq *BenchQuery) CountX(ctx context.Context) int
- func (bq *BenchQuery) Exist(ctx context.Context) (bool, error)
- func (bq *BenchQuery) ExistX(ctx context.Context) bool
- func (bq *BenchQuery) First(ctx context.Context) (*Bench, error)
- func (bq *BenchQuery) FirstID(ctx context.Context) (id int, err error)
- func (bq *BenchQuery) FirstIDX(ctx context.Context) int
- func (bq *BenchQuery) FirstX(ctx context.Context) *Bench
- func (bq *BenchQuery) GroupBy(field string, fields ...string) *BenchGroupBy
- func (bq *BenchQuery) IDs(ctx context.Context) (ids []int, err error)
- func (bq *BenchQuery) IDsX(ctx context.Context) []int
- func (bq *BenchQuery) Limit(limit int) *BenchQuery
- func (bq *BenchQuery) Offset(offset int) *BenchQuery
- func (bq *BenchQuery) Only(ctx context.Context) (*Bench, error)
- func (bq *BenchQuery) OnlyID(ctx context.Context) (id int, err error)
- func (bq *BenchQuery) OnlyIDX(ctx context.Context) int
- func (bq *BenchQuery) OnlyX(ctx context.Context) *Bench
- func (bq *BenchQuery) Order(o ...OrderFunc) *BenchQuery
- func (b *BenchQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*BenchConnection, error)
- func (bq *BenchQuery) QueryBenchResult() *BenchResultQuery
- func (bq *BenchQuery) Select(fields ...string) *BenchSelect
- func (bq *BenchQuery) Unique(unique bool) *BenchQuery
- func (bq *BenchQuery) Where(ps ...predicate.Bench) *BenchQuery
- func (bq *BenchQuery) WithBenchResult(opts ...func(*BenchResultQuery)) *BenchQuery
- func (bq *BenchQuery) WithNamedBenchResult(name string, opts ...func(*BenchResultQuery)) *BenchQuery
- type BenchResult
- type BenchResultClient
- func (c *BenchResultClient) Create() *BenchResultCreate
- func (c *BenchResultClient) CreateBulk(builders ...*BenchResultCreate) *BenchResultCreateBulk
- func (c *BenchResultClient) Delete() *BenchResultDelete
- func (c *BenchResultClient) DeleteOne(br *BenchResult) *BenchResultDeleteOne
- func (c *BenchResultClient) DeleteOneID(id int) *BenchResultDeleteOne
- func (c *BenchResultClient) Get(ctx context.Context, id int) (*BenchResult, error)
- func (c *BenchResultClient) GetX(ctx context.Context, id int) *BenchResult
- func (c *BenchResultClient) Hooks() []Hook
- func (c *BenchResultClient) Intercept(interceptors ...Interceptor)
- func (c *BenchResultClient) Interceptors() []Interceptor
- func (c *BenchResultClient) Query() *BenchResultQuery
- func (c *BenchResultClient) Update() *BenchResultUpdate
- func (c *BenchResultClient) UpdateOne(br *BenchResult) *BenchResultUpdateOne
- func (c *BenchResultClient) UpdateOneID(id int) *BenchResultUpdateOne
- func (c *BenchResultClient) Use(hooks ...Hook)
- type BenchResultConnection
- type BenchResultCreate
- func (brc *BenchResultCreate) Exec(ctx context.Context) error
- func (brc *BenchResultCreate) ExecX(ctx context.Context)
- func (brc *BenchResultCreate) Mutation() *BenchResultMutation
- func (brc *BenchResultCreate) Save(ctx context.Context) (*BenchResult, error)
- func (brc *BenchResultCreate) SaveX(ctx context.Context) *BenchResult
- func (brc *BenchResultCreate) SetAllocedBytesPerOp(i int64) *BenchResultCreate
- func (brc *BenchResultCreate) SetAllocsPerOp(i int64) *BenchResultCreate
- func (c *BenchResultCreate) SetInput(i CreateBenchResultInput) *BenchResultCreate
- func (brc *BenchResultCreate) SetMBPerS(f float64) *BenchResultCreate
- func (brc *BenchResultCreate) SetMeasured(i int64) *BenchResultCreate
- func (brc *BenchResultCreate) SetN(i int64) *BenchResultCreate
- func (brc *BenchResultCreate) SetName(s string) *BenchResultCreate
- func (brc *BenchResultCreate) SetNsPerOp(f float64) *BenchResultCreate
- func (brc *BenchResultCreate) SetOrd(i int64) *BenchResultCreate
- type BenchResultCreateBulk
- type BenchResultDelete
- type BenchResultDeleteOne
- type BenchResultEdge
- type BenchResultGroupBy
- func (brgb *BenchResultGroupBy) Aggregate(fns ...AggregateFunc) *BenchResultGroupBy
- func (s *BenchResultGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *BenchResultGroupBy) BoolX(ctx context.Context) bool
- func (s *BenchResultGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *BenchResultGroupBy) BoolsX(ctx context.Context) []bool
- func (s *BenchResultGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *BenchResultGroupBy) Float64X(ctx context.Context) float64
- func (s *BenchResultGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *BenchResultGroupBy) Float64sX(ctx context.Context) []float64
- func (s *BenchResultGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *BenchResultGroupBy) IntX(ctx context.Context) int
- func (s *BenchResultGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *BenchResultGroupBy) IntsX(ctx context.Context) []int
- func (brgb *BenchResultGroupBy) Scan(ctx context.Context, v any) error
- func (s *BenchResultGroupBy) ScanX(ctx context.Context, v any)
- func (s *BenchResultGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *BenchResultGroupBy) StringX(ctx context.Context) string
- func (s *BenchResultGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *BenchResultGroupBy) StringsX(ctx context.Context) []string
- type BenchResultMutation
- func (m *BenchResultMutation) AddAllocedBytesPerOp(i int64)
- func (m *BenchResultMutation) AddAllocsPerOp(i int64)
- func (m *BenchResultMutation) AddField(name string, value ent.Value) error
- func (m *BenchResultMutation) AddMBPerS(f float64)
- func (m *BenchResultMutation) AddMeasured(i int64)
- func (m *BenchResultMutation) AddN(i int64)
- func (m *BenchResultMutation) AddNsPerOp(f float64)
- func (m *BenchResultMutation) AddOrd(i int64)
- func (m *BenchResultMutation) AddedAllocedBytesPerOp() (r int64, exists bool)
- func (m *BenchResultMutation) AddedAllocsPerOp() (r int64, exists bool)
- func (m *BenchResultMutation) AddedEdges() []string
- func (m *BenchResultMutation) AddedField(name string) (ent.Value, bool)
- func (m *BenchResultMutation) AddedFields() []string
- func (m *BenchResultMutation) AddedIDs(name string) []ent.Value
- func (m *BenchResultMutation) AddedMBPerS() (r float64, exists bool)
- func (m *BenchResultMutation) AddedMeasured() (r int64, exists bool)
- func (m *BenchResultMutation) AddedN() (r int64, exists bool)
- func (m *BenchResultMutation) AddedNsPerOp() (r float64, exists bool)
- func (m *BenchResultMutation) AddedOrd() (r int64, exists bool)
- func (m *BenchResultMutation) AllocedBytesPerOp() (r int64, exists bool)
- func (m *BenchResultMutation) AllocsPerOp() (r int64, exists bool)
- func (m *BenchResultMutation) ClearEdge(name string) error
- func (m *BenchResultMutation) ClearField(name string) error
- func (m *BenchResultMutation) ClearedEdges() []string
- func (m *BenchResultMutation) ClearedFields() []string
- func (m BenchResultMutation) Client() *Client
- func (m *BenchResultMutation) EdgeCleared(name string) bool
- func (m *BenchResultMutation) Field(name string) (ent.Value, bool)
- func (m *BenchResultMutation) FieldCleared(name string) bool
- func (m *BenchResultMutation) Fields() []string
- func (m *BenchResultMutation) ID() (id int, exists bool)
- func (m *BenchResultMutation) IDs(ctx context.Context) ([]int, error)
- func (m *BenchResultMutation) MBPerS() (r float64, exists bool)
- func (m *BenchResultMutation) Measured() (r int64, exists bool)
- func (m *BenchResultMutation) N() (r int64, exists bool)
- func (m *BenchResultMutation) Name() (r string, exists bool)
- func (m *BenchResultMutation) NsPerOp() (r float64, exists bool)
- func (m *BenchResultMutation) OldAllocedBytesPerOp(ctx context.Context) (v int64, err error)
- func (m *BenchResultMutation) OldAllocsPerOp(ctx context.Context) (v int64, err error)
- func (m *BenchResultMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *BenchResultMutation) OldMBPerS(ctx context.Context) (v float64, err error)
- func (m *BenchResultMutation) OldMeasured(ctx context.Context) (v int64, err error)
- func (m *BenchResultMutation) OldN(ctx context.Context) (v int64, err error)
- func (m *BenchResultMutation) OldName(ctx context.Context) (v string, err error)
- func (m *BenchResultMutation) OldNsPerOp(ctx context.Context) (v float64, err error)
- func (m *BenchResultMutation) OldOrd(ctx context.Context) (v int64, err error)
- func (m *BenchResultMutation) Op() Op
- func (m *BenchResultMutation) Ord() (r int64, exists bool)
- func (m *BenchResultMutation) RemovedEdges() []string
- func (m *BenchResultMutation) RemovedIDs(name string) []ent.Value
- func (m *BenchResultMutation) ResetAllocedBytesPerOp()
- func (m *BenchResultMutation) ResetAllocsPerOp()
- func (m *BenchResultMutation) ResetEdge(name string) error
- func (m *BenchResultMutation) ResetField(name string) error
- func (m *BenchResultMutation) ResetMBPerS()
- func (m *BenchResultMutation) ResetMeasured()
- func (m *BenchResultMutation) ResetN()
- func (m *BenchResultMutation) ResetName()
- func (m *BenchResultMutation) ResetNsPerOp()
- func (m *BenchResultMutation) ResetOrd()
- func (m *BenchResultMutation) SetAllocedBytesPerOp(i int64)
- func (m *BenchResultMutation) SetAllocsPerOp(i int64)
- func (m *BenchResultMutation) SetField(name string, value ent.Value) error
- func (m *BenchResultMutation) SetMBPerS(f float64)
- func (m *BenchResultMutation) SetMeasured(i int64)
- func (m *BenchResultMutation) SetN(i int64)
- func (m *BenchResultMutation) SetName(s string)
- func (m *BenchResultMutation) SetNsPerOp(f float64)
- func (m *BenchResultMutation) SetOp(op Op)
- func (m *BenchResultMutation) SetOrd(i int64)
- func (m BenchResultMutation) Tx() (*Tx, error)
- func (m *BenchResultMutation) Type() string
- func (m *BenchResultMutation) Where(ps ...predicate.BenchResult)
- func (m *BenchResultMutation) WhereP(ps ...func(*sql.Selector))
- type BenchResultOrder
- type BenchResultOrderField
- type BenchResultPaginateOption
- type BenchResultQuery
- func (brq *BenchResultQuery) Aggregate(fns ...AggregateFunc) *BenchResultSelect
- func (brq *BenchResultQuery) All(ctx context.Context) ([]*BenchResult, error)
- func (brq *BenchResultQuery) AllX(ctx context.Context) []*BenchResult
- func (brq *BenchResultQuery) Clone() *BenchResultQuery
- func (br *BenchResultQuery) CollectFields(ctx context.Context, satisfies ...string) (*BenchResultQuery, error)
- func (brq *BenchResultQuery) Count(ctx context.Context) (int, error)
- func (brq *BenchResultQuery) CountX(ctx context.Context) int
- func (brq *BenchResultQuery) Exist(ctx context.Context) (bool, error)
- func (brq *BenchResultQuery) ExistX(ctx context.Context) bool
- func (brq *BenchResultQuery) First(ctx context.Context) (*BenchResult, error)
- func (brq *BenchResultQuery) FirstID(ctx context.Context) (id int, err error)
- func (brq *BenchResultQuery) FirstIDX(ctx context.Context) int
- func (brq *BenchResultQuery) FirstX(ctx context.Context) *BenchResult
- func (brq *BenchResultQuery) GroupBy(field string, fields ...string) *BenchResultGroupBy
- func (brq *BenchResultQuery) IDs(ctx context.Context) (ids []int, err error)
- func (brq *BenchResultQuery) IDsX(ctx context.Context) []int
- func (brq *BenchResultQuery) Limit(limit int) *BenchResultQuery
- func (brq *BenchResultQuery) Offset(offset int) *BenchResultQuery
- func (brq *BenchResultQuery) Only(ctx context.Context) (*BenchResult, error)
- func (brq *BenchResultQuery) OnlyID(ctx context.Context) (id int, err error)
- func (brq *BenchResultQuery) OnlyIDX(ctx context.Context) int
- func (brq *BenchResultQuery) OnlyX(ctx context.Context) *BenchResult
- func (brq *BenchResultQuery) Order(o ...OrderFunc) *BenchResultQuery
- func (br *BenchResultQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*BenchResultConnection, error)
- func (brq *BenchResultQuery) Select(fields ...string) *BenchResultSelect
- func (brq *BenchResultQuery) Unique(unique bool) *BenchResultQuery
- func (brq *BenchResultQuery) Where(ps ...predicate.BenchResult) *BenchResultQuery
- type BenchResultSelect
- func (brs *BenchResultSelect) Aggregate(fns ...AggregateFunc) *BenchResultSelect
- func (s *BenchResultSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *BenchResultSelect) BoolX(ctx context.Context) bool
- func (s *BenchResultSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *BenchResultSelect) BoolsX(ctx context.Context) []bool
- func (s *BenchResultSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *BenchResultSelect) Float64X(ctx context.Context) float64
- func (s *BenchResultSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *BenchResultSelect) Float64sX(ctx context.Context) []float64
- func (s *BenchResultSelect) Int(ctx context.Context) (_ int, err error)
- func (s *BenchResultSelect) IntX(ctx context.Context) int
- func (s *BenchResultSelect) Ints(ctx context.Context) ([]int, error)
- func (s *BenchResultSelect) IntsX(ctx context.Context) []int
- func (brs *BenchResultSelect) Scan(ctx context.Context, v any) error
- func (s *BenchResultSelect) ScanX(ctx context.Context, v any)
- func (s *BenchResultSelect) String(ctx context.Context) (_ string, err error)
- func (s *BenchResultSelect) StringX(ctx context.Context) string
- func (s *BenchResultSelect) Strings(ctx context.Context) ([]string, error)
- func (s *BenchResultSelect) StringsX(ctx context.Context) []string
- type BenchResultUpdate
- func (bru *BenchResultUpdate) AddAllocedBytesPerOp(i int64) *BenchResultUpdate
- func (bru *BenchResultUpdate) AddAllocsPerOp(i int64) *BenchResultUpdate
- func (bru *BenchResultUpdate) AddMBPerS(f float64) *BenchResultUpdate
- func (bru *BenchResultUpdate) AddMeasured(i int64) *BenchResultUpdate
- func (bru *BenchResultUpdate) AddN(i int64) *BenchResultUpdate
- func (bru *BenchResultUpdate) AddNsPerOp(f float64) *BenchResultUpdate
- func (bru *BenchResultUpdate) AddOrd(i int64) *BenchResultUpdate
- func (bru *BenchResultUpdate) Exec(ctx context.Context) error
- func (bru *BenchResultUpdate) ExecX(ctx context.Context)
- func (bru *BenchResultUpdate) Mutation() *BenchResultMutation
- func (bru *BenchResultUpdate) Save(ctx context.Context) (int, error)
- func (bru *BenchResultUpdate) SaveX(ctx context.Context) int
- func (bru *BenchResultUpdate) SetAllocedBytesPerOp(i int64) *BenchResultUpdate
- func (bru *BenchResultUpdate) SetAllocsPerOp(i int64) *BenchResultUpdate
- func (bru *BenchResultUpdate) SetMBPerS(f float64) *BenchResultUpdate
- func (bru *BenchResultUpdate) SetMeasured(i int64) *BenchResultUpdate
- func (bru *BenchResultUpdate) SetN(i int64) *BenchResultUpdate
- func (bru *BenchResultUpdate) SetName(s string) *BenchResultUpdate
- func (bru *BenchResultUpdate) SetNsPerOp(f float64) *BenchResultUpdate
- func (bru *BenchResultUpdate) SetOrd(i int64) *BenchResultUpdate
- func (bru *BenchResultUpdate) Where(ps ...predicate.BenchResult) *BenchResultUpdate
- type BenchResultUpdateOne
- func (bruo *BenchResultUpdateOne) AddAllocedBytesPerOp(i int64) *BenchResultUpdateOne
- func (bruo *BenchResultUpdateOne) AddAllocsPerOp(i int64) *BenchResultUpdateOne
- func (bruo *BenchResultUpdateOne) AddMBPerS(f float64) *BenchResultUpdateOne
- func (bruo *BenchResultUpdateOne) AddMeasured(i int64) *BenchResultUpdateOne
- func (bruo *BenchResultUpdateOne) AddN(i int64) *BenchResultUpdateOne
- func (bruo *BenchResultUpdateOne) AddNsPerOp(f float64) *BenchResultUpdateOne
- func (bruo *BenchResultUpdateOne) AddOrd(i int64) *BenchResultUpdateOne
- func (bruo *BenchResultUpdateOne) Exec(ctx context.Context) error
- func (bruo *BenchResultUpdateOne) ExecX(ctx context.Context)
- func (bruo *BenchResultUpdateOne) Mutation() *BenchResultMutation
- func (bruo *BenchResultUpdateOne) Save(ctx context.Context) (*BenchResult, error)
- func (bruo *BenchResultUpdateOne) SaveX(ctx context.Context) *BenchResult
- func (bruo *BenchResultUpdateOne) Select(field string, fields ...string) *BenchResultUpdateOne
- func (bruo *BenchResultUpdateOne) SetAllocedBytesPerOp(i int64) *BenchResultUpdateOne
- func (bruo *BenchResultUpdateOne) SetAllocsPerOp(i int64) *BenchResultUpdateOne
- func (bruo *BenchResultUpdateOne) SetMBPerS(f float64) *BenchResultUpdateOne
- func (bruo *BenchResultUpdateOne) SetMeasured(i int64) *BenchResultUpdateOne
- func (bruo *BenchResultUpdateOne) SetN(i int64) *BenchResultUpdateOne
- func (bruo *BenchResultUpdateOne) SetName(s string) *BenchResultUpdateOne
- func (bruo *BenchResultUpdateOne) SetNsPerOp(f float64) *BenchResultUpdateOne
- func (bruo *BenchResultUpdateOne) SetOrd(i int64) *BenchResultUpdateOne
- func (bruo *BenchResultUpdateOne) Where(ps ...predicate.BenchResult) *BenchResultUpdateOne
- type BenchResultWhereInput
- type BenchResults
- type BenchSelect
- func (bs *BenchSelect) Aggregate(fns ...AggregateFunc) *BenchSelect
- func (s *BenchSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *BenchSelect) BoolX(ctx context.Context) bool
- func (s *BenchSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *BenchSelect) BoolsX(ctx context.Context) []bool
- func (s *BenchSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *BenchSelect) Float64X(ctx context.Context) float64
- func (s *BenchSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *BenchSelect) Float64sX(ctx context.Context) []float64
- func (s *BenchSelect) Int(ctx context.Context) (_ int, err error)
- func (s *BenchSelect) IntX(ctx context.Context) int
- func (s *BenchSelect) Ints(ctx context.Context) ([]int, error)
- func (s *BenchSelect) IntsX(ctx context.Context) []int
- func (bs *BenchSelect) Scan(ctx context.Context, v any) error
- func (s *BenchSelect) ScanX(ctx context.Context, v any)
- func (s *BenchSelect) String(ctx context.Context) (_ string, err error)
- func (s *BenchSelect) StringX(ctx context.Context) string
- func (s *BenchSelect) Strings(ctx context.Context) ([]string, error)
- func (s *BenchSelect) StringsX(ctx context.Context) []string
- type BenchUpdate
- func (bu *BenchUpdate) AddBenchResult(b ...*BenchResult) *BenchUpdate
- func (bu *BenchUpdate) AddBenchResultIDs(ids ...int) *BenchUpdate
- func (bu *BenchUpdate) ClearBenchResult() *BenchUpdate
- func (bu *BenchUpdate) Exec(ctx context.Context) error
- func (bu *BenchUpdate) ExecX(ctx context.Context)
- func (bu *BenchUpdate) Mutation() *BenchMutation
- func (bu *BenchUpdate) RemoveBenchResult(b ...*BenchResult) *BenchUpdate
- func (bu *BenchUpdate) RemoveBenchResultIDs(ids ...int) *BenchUpdate
- func (bu *BenchUpdate) Save(ctx context.Context) (int, error)
- func (bu *BenchUpdate) SaveX(ctx context.Context) int
- func (bu *BenchUpdate) SetArch(s string) *BenchUpdate
- func (bu *BenchUpdate) SetCPU(s string) *BenchUpdate
- func (bu *BenchUpdate) SetOs(s string) *BenchUpdate
- func (bu *BenchUpdate) SetPackage(s string) *BenchUpdate
- func (bu *BenchUpdate) SetPass(b bool) *BenchUpdate
- func (bu *BenchUpdate) Where(ps ...predicate.Bench) *BenchUpdate
- type BenchUpdateOne
- func (buo *BenchUpdateOne) AddBenchResult(b ...*BenchResult) *BenchUpdateOne
- func (buo *BenchUpdateOne) AddBenchResultIDs(ids ...int) *BenchUpdateOne
- func (buo *BenchUpdateOne) ClearBenchResult() *BenchUpdateOne
- func (buo *BenchUpdateOne) Exec(ctx context.Context) error
- func (buo *BenchUpdateOne) ExecX(ctx context.Context)
- func (buo *BenchUpdateOne) Mutation() *BenchMutation
- func (buo *BenchUpdateOne) RemoveBenchResult(b ...*BenchResult) *BenchUpdateOne
- func (buo *BenchUpdateOne) RemoveBenchResultIDs(ids ...int) *BenchUpdateOne
- func (buo *BenchUpdateOne) Save(ctx context.Context) (*Bench, error)
- func (buo *BenchUpdateOne) SaveX(ctx context.Context) *Bench
- func (buo *BenchUpdateOne) Select(field string, fields ...string) *BenchUpdateOne
- func (buo *BenchUpdateOne) SetArch(s string) *BenchUpdateOne
- func (buo *BenchUpdateOne) SetCPU(s string) *BenchUpdateOne
- func (buo *BenchUpdateOne) SetOs(s string) *BenchUpdateOne
- func (buo *BenchUpdateOne) SetPackage(s string) *BenchUpdateOne
- func (buo *BenchUpdateOne) SetPass(b bool) *BenchUpdateOne
- func (buo *BenchUpdateOne) Where(ps ...predicate.Bench) *BenchUpdateOne
- type BenchWhereInput
- type Benches
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Noder(ctx context.Context, id int, opts ...NodeOption) (_ Noder, err error)
- func (c *Client) Noders(ctx context.Context, ids []int, opts ...NodeOption) ([]Noder, error)
- func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type CreateBenchInput
- type CreateBenchResultInput
- type Cursor
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NodeOption
- type Noder
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderDirection
- type OrderFunc
- type PageInfo
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeBench = "Bench" TypeBenchResult = "BenchResult" )
Variables ¶
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.
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.
var ErrEmptyBenchResultWhereInput = errors.New("ent: empty predicate BenchResultWhereInput")
ErrEmptyBenchResultWhereInput is returned in case the BenchResultWhereInput is empty.
var ErrEmptyBenchWhereInput = errors.New("ent: empty predicate BenchWhereInput")
ErrEmptyBenchWhereInput is returned in case the BenchWhereInput is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
func NewTxContext ¶
NewTxContext returns a new context with the given Tx attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type 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) ToEdge ¶
func (b *Bench) ToEdge(order *BenchOrder) *BenchEdge
ToEdge converts Bench into BenchEdge.
func (*Bench) Unwrap ¶
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) GetX ¶
func (c *BenchClient) GetX(ctx context.Context, id int) *Bench
GetX is like Get, but panics if an error occurs.
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.
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 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 ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BenchGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BenchGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BenchGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BenchGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BenchGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
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) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
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 ¶
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) 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) 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 ¶
func (c *BenchResultClient) DeleteOne(br *BenchResult) *BenchResultDeleteOne
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 ¶
func (c *BenchResultClient) UpdateOne(br *BenchResult) *BenchResultUpdateOne
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 ¶
func (c *BenchResultCreate) SetInput(i CreateBenchResultInput) *BenchResultCreate
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 ¶
func (brc *BenchResultCreate) SetN(i int64) *BenchResultCreate
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 ¶
func (brd *BenchResultDelete) Where(ps ...predicate.BenchResult) *BenchResultDelete
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 ¶
func (brdo *BenchResultDeleteOne) Where(ps ...predicate.BenchResult) *BenchResultDeleteOne
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 ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BenchResultGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BenchResultGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BenchResultGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BenchResultGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BenchResultGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
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) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
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 ¶
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 ¶
func (brq *BenchResultQuery) Where(ps ...predicate.BenchResult) *BenchResultQuery
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 ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BenchResultSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BenchResultSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BenchResultSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BenchResultSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BenchResultSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
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) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
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 ¶
func (bru *BenchResultUpdate) AddN(i int64) *BenchResultUpdate
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 ¶
func (bru *BenchResultUpdate) SetN(i int64) *BenchResultUpdate
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 ¶
func (bru *BenchResultUpdate) Where(ps ...predicate.BenchResult) *BenchResultUpdate
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 ¶
func (bruo *BenchResultUpdateOne) AddMBPerS(f float64) *BenchResultUpdateOne
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 ¶
func (bruo *BenchResultUpdateOne) AddN(i int64) *BenchResultUpdateOne
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 ¶
func (bruo *BenchResultUpdateOne) AddOrd(i int64) *BenchResultUpdateOne
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 ¶
func (bruo *BenchResultUpdateOne) Save(ctx context.Context) (*BenchResult, error)
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 ¶
func (bruo *BenchResultUpdateOne) SetMBPerS(f float64) *BenchResultUpdateOne
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 ¶
func (bruo *BenchResultUpdateOne) SetN(i int64) *BenchResultUpdateOne
SetN sets the "n" field.
func (*BenchResultUpdateOne) SetName ¶
func (bruo *BenchResultUpdateOne) SetName(s string) *BenchResultUpdateOne
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 ¶
func (bruo *BenchResultUpdateOne) SetOrd(i int64) *BenchResultUpdateOne
SetOrd sets the "ord" field.
func (*BenchResultUpdateOne) Where ¶
func (bruo *BenchResultUpdateOne) Where(ps ...predicate.BenchResult) *BenchResultUpdateOne
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 ¶
func (i *BenchResultWhereInput) Filter(q *BenchResultQuery) (*BenchResultQuery, error)
Filter applies the BenchResultWhereInput filter on the BenchResultQuery builder.
func (*BenchResultWhereInput) P ¶
func (i *BenchResultWhereInput) P() (predicate.BenchResult, error)
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 ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BenchSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BenchSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BenchSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BenchSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BenchSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
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) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
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.
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 ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). 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) Noder ¶
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) OpenTx ¶
OpenTx opens a transaction and returns a transactional context along with the created transaction.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type 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 ¶
func (i *CreateBenchResultInput) Mutate(m *BenchResultMutation)
Mutate applies the CreateBenchResultInput on the BenchResultMutation builder.
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 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 ¶
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 NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // 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 ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- bench.go
- bench_create.go
- bench_delete.go
- bench_query.go
- bench_update.go
- benchresult.go
- benchresult_create.go
- benchresult_delete.go
- benchresult_query.go
- benchresult_update.go
- client.go
- ent.go
- gql_collection.go
- gql_edge.go
- gql_mutation_input.go
- gql_node.go
- gql_pagination.go
- gql_transaction.go
- gql_where_input.go
- mutation.go
- runtime.go
- tx.go