Documentation
¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type ProblemCaseRun
- type ProblemCaseRunClient
- func (c *ProblemCaseRunClient) Create() *ProblemCaseRunCreate
- func (c *ProblemCaseRunClient) CreateBulk(builders ...*ProblemCaseRunCreate) *ProblemCaseRunCreateBulk
- func (c *ProblemCaseRunClient) Delete() *ProblemCaseRunDelete
- func (c *ProblemCaseRunClient) DeleteOne(pcr *ProblemCaseRun) *ProblemCaseRunDeleteOne
- func (c *ProblemCaseRunClient) DeleteOneID(id int) *ProblemCaseRunDeleteOne
- func (c *ProblemCaseRunClient) Get(ctx context.Context, id int) (*ProblemCaseRun, error)
- func (c *ProblemCaseRunClient) GetX(ctx context.Context, id int) *ProblemCaseRun
- func (c *ProblemCaseRunClient) Hooks() []Hook
- func (c *ProblemCaseRunClient) Intercept(interceptors ...Interceptor)
- func (c *ProblemCaseRunClient) Interceptors() []Interceptor
- func (c *ProblemCaseRunClient) MapCreateBulk(slice any, setFunc func(*ProblemCaseRunCreate, int)) *ProblemCaseRunCreateBulk
- func (c *ProblemCaseRunClient) Query() *ProblemCaseRunQuery
- func (c *ProblemCaseRunClient) Update() *ProblemCaseRunUpdate
- func (c *ProblemCaseRunClient) UpdateOne(pcr *ProblemCaseRun) *ProblemCaseRunUpdateOne
- func (c *ProblemCaseRunClient) UpdateOneID(id int) *ProblemCaseRunUpdateOne
- func (c *ProblemCaseRunClient) Use(hooks ...Hook)
- type ProblemCaseRunCreate
- func (pcrc *ProblemCaseRunCreate) Exec(ctx context.Context) error
- func (pcrc *ProblemCaseRunCreate) ExecX(ctx context.Context)
- func (pcrc *ProblemCaseRunCreate) Mutation() *ProblemCaseRunMutation
- func (pcrc *ProblemCaseRunCreate) Save(ctx context.Context) (*ProblemCaseRun, error)
- func (pcrc *ProblemCaseRunCreate) SaveX(ctx context.Context) *ProblemCaseRun
- func (pcrc *ProblemCaseRunCreate) SetBranch(s string) *ProblemCaseRunCreate
- func (pcrc *ProblemCaseRunCreate) SetBuildURL(s string) *ProblemCaseRunCreate
- func (pcrc *ProblemCaseRunCreate) SetCaseName(s string) *ProblemCaseRunCreate
- func (pcrc *ProblemCaseRunCreate) SetFlaky(b bool) *ProblemCaseRunCreate
- func (pcrc *ProblemCaseRunCreate) SetNillableFlaky(b *bool) *ProblemCaseRunCreate
- func (pcrc *ProblemCaseRunCreate) SetReason(s string) *ProblemCaseRunCreate
- func (pcrc *ProblemCaseRunCreate) SetRepo(s string) *ProblemCaseRunCreate
- func (pcrc *ProblemCaseRunCreate) SetReportTime(t time.Time) *ProblemCaseRunCreate
- func (pcrc *ProblemCaseRunCreate) SetSuiteName(s string) *ProblemCaseRunCreate
- func (pcrc *ProblemCaseRunCreate) SetTimecostMs(i int) *ProblemCaseRunCreate
- type ProblemCaseRunCreateBulk
- func (pcrcb *ProblemCaseRunCreateBulk) Exec(ctx context.Context) error
- func (pcrcb *ProblemCaseRunCreateBulk) ExecX(ctx context.Context)
- func (pcrcb *ProblemCaseRunCreateBulk) Save(ctx context.Context) ([]*ProblemCaseRun, error)
- func (pcrcb *ProblemCaseRunCreateBulk) SaveX(ctx context.Context) []*ProblemCaseRun
- type ProblemCaseRunDelete
- type ProblemCaseRunDeleteOne
- type ProblemCaseRunGroupBy
- func (pcrgb *ProblemCaseRunGroupBy) Aggregate(fns ...AggregateFunc) *ProblemCaseRunGroupBy
- func (s *ProblemCaseRunGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProblemCaseRunGroupBy) BoolX(ctx context.Context) bool
- func (s *ProblemCaseRunGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ProblemCaseRunGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ProblemCaseRunGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProblemCaseRunGroupBy) Float64X(ctx context.Context) float64
- func (s *ProblemCaseRunGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProblemCaseRunGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ProblemCaseRunGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ProblemCaseRunGroupBy) IntX(ctx context.Context) int
- func (s *ProblemCaseRunGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ProblemCaseRunGroupBy) IntsX(ctx context.Context) []int
- func (pcrgb *ProblemCaseRunGroupBy) Scan(ctx context.Context, v any) error
- func (s *ProblemCaseRunGroupBy) ScanX(ctx context.Context, v any)
- func (s *ProblemCaseRunGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ProblemCaseRunGroupBy) StringX(ctx context.Context) string
- func (s *ProblemCaseRunGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ProblemCaseRunGroupBy) StringsX(ctx context.Context) []string
- type ProblemCaseRunMutation
- func (m *ProblemCaseRunMutation) AddField(name string, value ent.Value) error
- func (m *ProblemCaseRunMutation) AddTimecostMs(i int)
- func (m *ProblemCaseRunMutation) AddedEdges() []string
- func (m *ProblemCaseRunMutation) AddedField(name string) (ent.Value, bool)
- func (m *ProblemCaseRunMutation) AddedFields() []string
- func (m *ProblemCaseRunMutation) AddedIDs(name string) []ent.Value
- func (m *ProblemCaseRunMutation) AddedTimecostMs() (r int, exists bool)
- func (m *ProblemCaseRunMutation) Branch() (r string, exists bool)
- func (m *ProblemCaseRunMutation) BuildURL() (r string, exists bool)
- func (m *ProblemCaseRunMutation) CaseName() (r string, exists bool)
- func (m *ProblemCaseRunMutation) ClearEdge(name string) error
- func (m *ProblemCaseRunMutation) ClearField(name string) error
- func (m *ProblemCaseRunMutation) ClearedEdges() []string
- func (m *ProblemCaseRunMutation) ClearedFields() []string
- func (m ProblemCaseRunMutation) Client() *Client
- func (m *ProblemCaseRunMutation) EdgeCleared(name string) bool
- func (m *ProblemCaseRunMutation) Field(name string) (ent.Value, bool)
- func (m *ProblemCaseRunMutation) FieldCleared(name string) bool
- func (m *ProblemCaseRunMutation) Fields() []string
- func (m *ProblemCaseRunMutation) Flaky() (r bool, exists bool)
- func (m *ProblemCaseRunMutation) ID() (id int, exists bool)
- func (m *ProblemCaseRunMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ProblemCaseRunMutation) OldBranch(ctx context.Context) (v string, err error)
- func (m *ProblemCaseRunMutation) OldBuildURL(ctx context.Context) (v string, err error)
- func (m *ProblemCaseRunMutation) OldCaseName(ctx context.Context) (v string, err error)
- func (m *ProblemCaseRunMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ProblemCaseRunMutation) OldFlaky(ctx context.Context) (v bool, err error)
- func (m *ProblemCaseRunMutation) OldReason(ctx context.Context) (v string, err error)
- func (m *ProblemCaseRunMutation) OldRepo(ctx context.Context) (v string, err error)
- func (m *ProblemCaseRunMutation) OldReportTime(ctx context.Context) (v time.Time, err error)
- func (m *ProblemCaseRunMutation) OldSuiteName(ctx context.Context) (v string, err error)
- func (m *ProblemCaseRunMutation) OldTimecostMs(ctx context.Context) (v int, err error)
- func (m *ProblemCaseRunMutation) Op() Op
- func (m *ProblemCaseRunMutation) Reason() (r string, exists bool)
- func (m *ProblemCaseRunMutation) RemovedEdges() []string
- func (m *ProblemCaseRunMutation) RemovedIDs(name string) []ent.Value
- func (m *ProblemCaseRunMutation) Repo() (r string, exists bool)
- func (m *ProblemCaseRunMutation) ReportTime() (r time.Time, exists bool)
- func (m *ProblemCaseRunMutation) ResetBranch()
- func (m *ProblemCaseRunMutation) ResetBuildURL()
- func (m *ProblemCaseRunMutation) ResetCaseName()
- func (m *ProblemCaseRunMutation) ResetEdge(name string) error
- func (m *ProblemCaseRunMutation) ResetField(name string) error
- func (m *ProblemCaseRunMutation) ResetFlaky()
- func (m *ProblemCaseRunMutation) ResetReason()
- func (m *ProblemCaseRunMutation) ResetRepo()
- func (m *ProblemCaseRunMutation) ResetReportTime()
- func (m *ProblemCaseRunMutation) ResetSuiteName()
- func (m *ProblemCaseRunMutation) ResetTimecostMs()
- func (m *ProblemCaseRunMutation) SetBranch(s string)
- func (m *ProblemCaseRunMutation) SetBuildURL(s string)
- func (m *ProblemCaseRunMutation) SetCaseName(s string)
- func (m *ProblemCaseRunMutation) SetField(name string, value ent.Value) error
- func (m *ProblemCaseRunMutation) SetFlaky(b bool)
- func (m *ProblemCaseRunMutation) SetOp(op Op)
- func (m *ProblemCaseRunMutation) SetReason(s string)
- func (m *ProblemCaseRunMutation) SetRepo(s string)
- func (m *ProblemCaseRunMutation) SetReportTime(t time.Time)
- func (m *ProblemCaseRunMutation) SetSuiteName(s string)
- func (m *ProblemCaseRunMutation) SetTimecostMs(i int)
- func (m *ProblemCaseRunMutation) SuiteName() (r string, exists bool)
- func (m *ProblemCaseRunMutation) TimecostMs() (r int, exists bool)
- func (m ProblemCaseRunMutation) Tx() (*Tx, error)
- func (m *ProblemCaseRunMutation) Type() string
- func (m *ProblemCaseRunMutation) Where(ps ...predicate.ProblemCaseRun)
- func (m *ProblemCaseRunMutation) WhereP(ps ...func(*sql.Selector))
- type ProblemCaseRunQuery
- func (pcrq *ProblemCaseRunQuery) Aggregate(fns ...AggregateFunc) *ProblemCaseRunSelect
- func (pcrq *ProblemCaseRunQuery) All(ctx context.Context) ([]*ProblemCaseRun, error)
- func (pcrq *ProblemCaseRunQuery) AllX(ctx context.Context) []*ProblemCaseRun
- func (pcrq *ProblemCaseRunQuery) Clone() *ProblemCaseRunQuery
- func (pcrq *ProblemCaseRunQuery) Count(ctx context.Context) (int, error)
- func (pcrq *ProblemCaseRunQuery) CountX(ctx context.Context) int
- func (pcrq *ProblemCaseRunQuery) Exist(ctx context.Context) (bool, error)
- func (pcrq *ProblemCaseRunQuery) ExistX(ctx context.Context) bool
- func (pcrq *ProblemCaseRunQuery) First(ctx context.Context) (*ProblemCaseRun, error)
- func (pcrq *ProblemCaseRunQuery) FirstID(ctx context.Context) (id int, err error)
- func (pcrq *ProblemCaseRunQuery) FirstIDX(ctx context.Context) int
- func (pcrq *ProblemCaseRunQuery) FirstX(ctx context.Context) *ProblemCaseRun
- func (pcrq *ProblemCaseRunQuery) GroupBy(field string, fields ...string) *ProblemCaseRunGroupBy
- func (pcrq *ProblemCaseRunQuery) IDs(ctx context.Context) (ids []int, err error)
- func (pcrq *ProblemCaseRunQuery) IDsX(ctx context.Context) []int
- func (pcrq *ProblemCaseRunQuery) Limit(limit int) *ProblemCaseRunQuery
- func (pcrq *ProblemCaseRunQuery) Offset(offset int) *ProblemCaseRunQuery
- func (pcrq *ProblemCaseRunQuery) Only(ctx context.Context) (*ProblemCaseRun, error)
- func (pcrq *ProblemCaseRunQuery) OnlyID(ctx context.Context) (id int, err error)
- func (pcrq *ProblemCaseRunQuery) OnlyIDX(ctx context.Context) int
- func (pcrq *ProblemCaseRunQuery) OnlyX(ctx context.Context) *ProblemCaseRun
- func (pcrq *ProblemCaseRunQuery) Order(o ...problemcaserun.OrderOption) *ProblemCaseRunQuery
- func (pcrq *ProblemCaseRunQuery) Select(fields ...string) *ProblemCaseRunSelect
- func (pcrq *ProblemCaseRunQuery) Unique(unique bool) *ProblemCaseRunQuery
- func (pcrq *ProblemCaseRunQuery) Where(ps ...predicate.ProblemCaseRun) *ProblemCaseRunQuery
- type ProblemCaseRunSelect
- func (pcrs *ProblemCaseRunSelect) Aggregate(fns ...AggregateFunc) *ProblemCaseRunSelect
- func (s *ProblemCaseRunSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProblemCaseRunSelect) BoolX(ctx context.Context) bool
- func (s *ProblemCaseRunSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ProblemCaseRunSelect) BoolsX(ctx context.Context) []bool
- func (s *ProblemCaseRunSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProblemCaseRunSelect) Float64X(ctx context.Context) float64
- func (s *ProblemCaseRunSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProblemCaseRunSelect) Float64sX(ctx context.Context) []float64
- func (s *ProblemCaseRunSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ProblemCaseRunSelect) IntX(ctx context.Context) int
- func (s *ProblemCaseRunSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ProblemCaseRunSelect) IntsX(ctx context.Context) []int
- func (pcrs *ProblemCaseRunSelect) Scan(ctx context.Context, v any) error
- func (s *ProblemCaseRunSelect) ScanX(ctx context.Context, v any)
- func (s *ProblemCaseRunSelect) String(ctx context.Context) (_ string, err error)
- func (s *ProblemCaseRunSelect) StringX(ctx context.Context) string
- func (s *ProblemCaseRunSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ProblemCaseRunSelect) StringsX(ctx context.Context) []string
- type ProblemCaseRunUpdate
- func (pcru *ProblemCaseRunUpdate) AddTimecostMs(i int) *ProblemCaseRunUpdate
- func (pcru *ProblemCaseRunUpdate) Exec(ctx context.Context) error
- func (pcru *ProblemCaseRunUpdate) ExecX(ctx context.Context)
- func (pcru *ProblemCaseRunUpdate) Mutation() *ProblemCaseRunMutation
- func (pcru *ProblemCaseRunUpdate) Save(ctx context.Context) (int, error)
- func (pcru *ProblemCaseRunUpdate) SaveX(ctx context.Context) int
- func (pcru *ProblemCaseRunUpdate) SetBranch(s string) *ProblemCaseRunUpdate
- func (pcru *ProblemCaseRunUpdate) SetBuildURL(s string) *ProblemCaseRunUpdate
- func (pcru *ProblemCaseRunUpdate) SetCaseName(s string) *ProblemCaseRunUpdate
- func (pcru *ProblemCaseRunUpdate) SetFlaky(b bool) *ProblemCaseRunUpdate
- func (pcru *ProblemCaseRunUpdate) SetNillableBranch(s *string) *ProblemCaseRunUpdate
- func (pcru *ProblemCaseRunUpdate) SetNillableBuildURL(s *string) *ProblemCaseRunUpdate
- func (pcru *ProblemCaseRunUpdate) SetNillableCaseName(s *string) *ProblemCaseRunUpdate
- func (pcru *ProblemCaseRunUpdate) SetNillableFlaky(b *bool) *ProblemCaseRunUpdate
- func (pcru *ProblemCaseRunUpdate) SetNillableReason(s *string) *ProblemCaseRunUpdate
- func (pcru *ProblemCaseRunUpdate) SetNillableRepo(s *string) *ProblemCaseRunUpdate
- func (pcru *ProblemCaseRunUpdate) SetNillableReportTime(t *time.Time) *ProblemCaseRunUpdate
- func (pcru *ProblemCaseRunUpdate) SetNillableSuiteName(s *string) *ProblemCaseRunUpdate
- func (pcru *ProblemCaseRunUpdate) SetNillableTimecostMs(i *int) *ProblemCaseRunUpdate
- func (pcru *ProblemCaseRunUpdate) SetReason(s string) *ProblemCaseRunUpdate
- func (pcru *ProblemCaseRunUpdate) SetRepo(s string) *ProblemCaseRunUpdate
- func (pcru *ProblemCaseRunUpdate) SetReportTime(t time.Time) *ProblemCaseRunUpdate
- func (pcru *ProblemCaseRunUpdate) SetSuiteName(s string) *ProblemCaseRunUpdate
- func (pcru *ProblemCaseRunUpdate) SetTimecostMs(i int) *ProblemCaseRunUpdate
- func (pcru *ProblemCaseRunUpdate) Where(ps ...predicate.ProblemCaseRun) *ProblemCaseRunUpdate
- type ProblemCaseRunUpdateOne
- func (pcruo *ProblemCaseRunUpdateOne) AddTimecostMs(i int) *ProblemCaseRunUpdateOne
- func (pcruo *ProblemCaseRunUpdateOne) Exec(ctx context.Context) error
- func (pcruo *ProblemCaseRunUpdateOne) ExecX(ctx context.Context)
- func (pcruo *ProblemCaseRunUpdateOne) Mutation() *ProblemCaseRunMutation
- func (pcruo *ProblemCaseRunUpdateOne) Save(ctx context.Context) (*ProblemCaseRun, error)
- func (pcruo *ProblemCaseRunUpdateOne) SaveX(ctx context.Context) *ProblemCaseRun
- func (pcruo *ProblemCaseRunUpdateOne) Select(field string, fields ...string) *ProblemCaseRunUpdateOne
- func (pcruo *ProblemCaseRunUpdateOne) SetBranch(s string) *ProblemCaseRunUpdateOne
- func (pcruo *ProblemCaseRunUpdateOne) SetBuildURL(s string) *ProblemCaseRunUpdateOne
- func (pcruo *ProblemCaseRunUpdateOne) SetCaseName(s string) *ProblemCaseRunUpdateOne
- func (pcruo *ProblemCaseRunUpdateOne) SetFlaky(b bool) *ProblemCaseRunUpdateOne
- func (pcruo *ProblemCaseRunUpdateOne) SetNillableBranch(s *string) *ProblemCaseRunUpdateOne
- func (pcruo *ProblemCaseRunUpdateOne) SetNillableBuildURL(s *string) *ProblemCaseRunUpdateOne
- func (pcruo *ProblemCaseRunUpdateOne) SetNillableCaseName(s *string) *ProblemCaseRunUpdateOne
- func (pcruo *ProblemCaseRunUpdateOne) SetNillableFlaky(b *bool) *ProblemCaseRunUpdateOne
- func (pcruo *ProblemCaseRunUpdateOne) SetNillableReason(s *string) *ProblemCaseRunUpdateOne
- func (pcruo *ProblemCaseRunUpdateOne) SetNillableRepo(s *string) *ProblemCaseRunUpdateOne
- func (pcruo *ProblemCaseRunUpdateOne) SetNillableReportTime(t *time.Time) *ProblemCaseRunUpdateOne
- func (pcruo *ProblemCaseRunUpdateOne) SetNillableSuiteName(s *string) *ProblemCaseRunUpdateOne
- func (pcruo *ProblemCaseRunUpdateOne) SetNillableTimecostMs(i *int) *ProblemCaseRunUpdateOne
- func (pcruo *ProblemCaseRunUpdateOne) SetReason(s string) *ProblemCaseRunUpdateOne
- func (pcruo *ProblemCaseRunUpdateOne) SetRepo(s string) *ProblemCaseRunUpdateOne
- func (pcruo *ProblemCaseRunUpdateOne) SetReportTime(t time.Time) *ProblemCaseRunUpdateOne
- func (pcruo *ProblemCaseRunUpdateOne) SetSuiteName(s string) *ProblemCaseRunUpdateOne
- func (pcruo *ProblemCaseRunUpdateOne) SetTimecostMs(i int) *ProblemCaseRunUpdateOne
- func (pcruo *ProblemCaseRunUpdateOne) Where(ps ...predicate.ProblemCaseRun) *ProblemCaseRunUpdateOne
- type ProblemCaseRuns
- 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. TypeProblemCaseRun = "ProblemCaseRun" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // ProblemCaseRun is the client for interacting with the ProblemCaseRun builders. ProblemCaseRun *ProblemCaseRunClient // 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(). ProblemCaseRun. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type ProblemCaseRun ¶
type ProblemCaseRun struct { // ID of the ent. ID int `json:"id,omitempty"` // repo full name Repo string `json:"repo,omitempty"` // base branch Branch string `json:"branch,omitempty"` // suite name, target name in bazel. SuiteName string `json:"suite_name,omitempty"` // case name, may be TextXxx.TestYyy format. CaseName string `json:"case_name,omitempty"` // is it a flay run? Flaky bool `json:"flaky,omitempty"` // timecost(milliseconds) of the test case run TimecostMs int `json:"timecost_ms,omitempty"` // report unit timestamp ReportTime time.Time `json:"report_time,omitempty"` // CI build url BuildURL string `json:"build_url,omitempty"` // failure reason Reason string `json:"reason,omitempty"` // contains filtered or unexported fields }
ProblemCaseRun is the model entity for the ProblemCaseRun schema.
func (*ProblemCaseRun) String ¶
func (pcr *ProblemCaseRun) String() string
String implements the fmt.Stringer.
func (*ProblemCaseRun) Unwrap ¶
func (pcr *ProblemCaseRun) Unwrap() *ProblemCaseRun
Unwrap unwraps the ProblemCaseRun 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 (*ProblemCaseRun) Update ¶
func (pcr *ProblemCaseRun) Update() *ProblemCaseRunUpdateOne
Update returns a builder for updating this ProblemCaseRun. Note that you need to call ProblemCaseRun.Unwrap() before calling this method if this ProblemCaseRun was returned from a transaction, and the transaction was committed or rolled back.
type ProblemCaseRunClient ¶
type ProblemCaseRunClient struct {
// contains filtered or unexported fields
}
ProblemCaseRunClient is a client for the ProblemCaseRun schema.
func NewProblemCaseRunClient ¶
func NewProblemCaseRunClient(c config) *ProblemCaseRunClient
NewProblemCaseRunClient returns a client for the ProblemCaseRun from the given config.
func (*ProblemCaseRunClient) Create ¶
func (c *ProblemCaseRunClient) Create() *ProblemCaseRunCreate
Create returns a builder for creating a ProblemCaseRun entity.
func (*ProblemCaseRunClient) CreateBulk ¶
func (c *ProblemCaseRunClient) CreateBulk(builders ...*ProblemCaseRunCreate) *ProblemCaseRunCreateBulk
CreateBulk returns a builder for creating a bulk of ProblemCaseRun entities.
func (*ProblemCaseRunClient) Delete ¶
func (c *ProblemCaseRunClient) Delete() *ProblemCaseRunDelete
Delete returns a delete builder for ProblemCaseRun.
func (*ProblemCaseRunClient) DeleteOne ¶
func (c *ProblemCaseRunClient) DeleteOne(pcr *ProblemCaseRun) *ProblemCaseRunDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ProblemCaseRunClient) DeleteOneID ¶
func (c *ProblemCaseRunClient) DeleteOneID(id int) *ProblemCaseRunDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ProblemCaseRunClient) Get ¶
func (c *ProblemCaseRunClient) Get(ctx context.Context, id int) (*ProblemCaseRun, error)
Get returns a ProblemCaseRun entity by its id.
func (*ProblemCaseRunClient) GetX ¶
func (c *ProblemCaseRunClient) GetX(ctx context.Context, id int) *ProblemCaseRun
GetX is like Get, but panics if an error occurs.
func (*ProblemCaseRunClient) Hooks ¶
func (c *ProblemCaseRunClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ProblemCaseRunClient) Intercept ¶
func (c *ProblemCaseRunClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `problemcaserun.Intercept(f(g(h())))`.
func (*ProblemCaseRunClient) Interceptors ¶
func (c *ProblemCaseRunClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ProblemCaseRunClient) MapCreateBulk ¶
func (c *ProblemCaseRunClient) MapCreateBulk(slice any, setFunc func(*ProblemCaseRunCreate, int)) *ProblemCaseRunCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ProblemCaseRunClient) Query ¶
func (c *ProblemCaseRunClient) Query() *ProblemCaseRunQuery
Query returns a query builder for ProblemCaseRun.
func (*ProblemCaseRunClient) Update ¶
func (c *ProblemCaseRunClient) Update() *ProblemCaseRunUpdate
Update returns an update builder for ProblemCaseRun.
func (*ProblemCaseRunClient) UpdateOne ¶
func (c *ProblemCaseRunClient) UpdateOne(pcr *ProblemCaseRun) *ProblemCaseRunUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ProblemCaseRunClient) UpdateOneID ¶
func (c *ProblemCaseRunClient) UpdateOneID(id int) *ProblemCaseRunUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ProblemCaseRunClient) Use ¶
func (c *ProblemCaseRunClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `problemcaserun.Hooks(f(g(h())))`.
type ProblemCaseRunCreate ¶
type ProblemCaseRunCreate struct {
// contains filtered or unexported fields
}
ProblemCaseRunCreate is the builder for creating a ProblemCaseRun entity.
func (*ProblemCaseRunCreate) Exec ¶
func (pcrc *ProblemCaseRunCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProblemCaseRunCreate) ExecX ¶
func (pcrc *ProblemCaseRunCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProblemCaseRunCreate) Mutation ¶
func (pcrc *ProblemCaseRunCreate) Mutation() *ProblemCaseRunMutation
Mutation returns the ProblemCaseRunMutation object of the builder.
func (*ProblemCaseRunCreate) Save ¶
func (pcrc *ProblemCaseRunCreate) Save(ctx context.Context) (*ProblemCaseRun, error)
Save creates the ProblemCaseRun in the database.
func (*ProblemCaseRunCreate) SaveX ¶
func (pcrc *ProblemCaseRunCreate) SaveX(ctx context.Context) *ProblemCaseRun
SaveX calls Save and panics if Save returns an error.
func (*ProblemCaseRunCreate) SetBranch ¶
func (pcrc *ProblemCaseRunCreate) SetBranch(s string) *ProblemCaseRunCreate
SetBranch sets the "branch" field.
func (*ProblemCaseRunCreate) SetBuildURL ¶
func (pcrc *ProblemCaseRunCreate) SetBuildURL(s string) *ProblemCaseRunCreate
SetBuildURL sets the "build_url" field.
func (*ProblemCaseRunCreate) SetCaseName ¶
func (pcrc *ProblemCaseRunCreate) SetCaseName(s string) *ProblemCaseRunCreate
SetCaseName sets the "case_name" field.
func (*ProblemCaseRunCreate) SetFlaky ¶
func (pcrc *ProblemCaseRunCreate) SetFlaky(b bool) *ProblemCaseRunCreate
SetFlaky sets the "flaky" field.
func (*ProblemCaseRunCreate) SetNillableFlaky ¶
func (pcrc *ProblemCaseRunCreate) SetNillableFlaky(b *bool) *ProblemCaseRunCreate
SetNillableFlaky sets the "flaky" field if the given value is not nil.
func (*ProblemCaseRunCreate) SetReason ¶
func (pcrc *ProblemCaseRunCreate) SetReason(s string) *ProblemCaseRunCreate
SetReason sets the "reason" field.
func (*ProblemCaseRunCreate) SetRepo ¶
func (pcrc *ProblemCaseRunCreate) SetRepo(s string) *ProblemCaseRunCreate
SetRepo sets the "repo" field.
func (*ProblemCaseRunCreate) SetReportTime ¶
func (pcrc *ProblemCaseRunCreate) SetReportTime(t time.Time) *ProblemCaseRunCreate
SetReportTime sets the "report_time" field.
func (*ProblemCaseRunCreate) SetSuiteName ¶
func (pcrc *ProblemCaseRunCreate) SetSuiteName(s string) *ProblemCaseRunCreate
SetSuiteName sets the "suite_name" field.
func (*ProblemCaseRunCreate) SetTimecostMs ¶
func (pcrc *ProblemCaseRunCreate) SetTimecostMs(i int) *ProblemCaseRunCreate
SetTimecostMs sets the "timecost_ms" field.
type ProblemCaseRunCreateBulk ¶
type ProblemCaseRunCreateBulk struct {
// contains filtered or unexported fields
}
ProblemCaseRunCreateBulk is the builder for creating many ProblemCaseRun entities in bulk.
func (*ProblemCaseRunCreateBulk) Exec ¶
func (pcrcb *ProblemCaseRunCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProblemCaseRunCreateBulk) ExecX ¶
func (pcrcb *ProblemCaseRunCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProblemCaseRunCreateBulk) Save ¶
func (pcrcb *ProblemCaseRunCreateBulk) Save(ctx context.Context) ([]*ProblemCaseRun, error)
Save creates the ProblemCaseRun entities in the database.
func (*ProblemCaseRunCreateBulk) SaveX ¶
func (pcrcb *ProblemCaseRunCreateBulk) SaveX(ctx context.Context) []*ProblemCaseRun
SaveX is like Save, but panics if an error occurs.
type ProblemCaseRunDelete ¶
type ProblemCaseRunDelete struct {
// contains filtered or unexported fields
}
ProblemCaseRunDelete is the builder for deleting a ProblemCaseRun entity.
func (*ProblemCaseRunDelete) Exec ¶
func (pcrd *ProblemCaseRunDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ProblemCaseRunDelete) ExecX ¶
func (pcrd *ProblemCaseRunDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ProblemCaseRunDelete) Where ¶
func (pcrd *ProblemCaseRunDelete) Where(ps ...predicate.ProblemCaseRun) *ProblemCaseRunDelete
Where appends a list predicates to the ProblemCaseRunDelete builder.
type ProblemCaseRunDeleteOne ¶
type ProblemCaseRunDeleteOne struct {
// contains filtered or unexported fields
}
ProblemCaseRunDeleteOne is the builder for deleting a single ProblemCaseRun entity.
func (*ProblemCaseRunDeleteOne) Exec ¶
func (pcrdo *ProblemCaseRunDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ProblemCaseRunDeleteOne) ExecX ¶
func (pcrdo *ProblemCaseRunDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProblemCaseRunDeleteOne) Where ¶
func (pcrdo *ProblemCaseRunDeleteOne) Where(ps ...predicate.ProblemCaseRun) *ProblemCaseRunDeleteOne
Where appends a list predicates to the ProblemCaseRunDelete builder.
type ProblemCaseRunGroupBy ¶
type ProblemCaseRunGroupBy struct {
// contains filtered or unexported fields
}
ProblemCaseRunGroupBy is the group-by builder for ProblemCaseRun entities.
func (*ProblemCaseRunGroupBy) Aggregate ¶
func (pcrgb *ProblemCaseRunGroupBy) Aggregate(fns ...AggregateFunc) *ProblemCaseRunGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ProblemCaseRunGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProblemCaseRunGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProblemCaseRunGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProblemCaseRunGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProblemCaseRunGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ProblemCaseRunGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProblemCaseRunGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProblemCaseRunGroupBy) Scan ¶
func (pcrgb *ProblemCaseRunGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProblemCaseRunGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProblemCaseRunMutation ¶
type ProblemCaseRunMutation struct {
// contains filtered or unexported fields
}
ProblemCaseRunMutation represents an operation that mutates the ProblemCaseRun nodes in the graph.
func (*ProblemCaseRunMutation) AddField ¶
func (m *ProblemCaseRunMutation) 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 (*ProblemCaseRunMutation) AddTimecostMs ¶
func (m *ProblemCaseRunMutation) AddTimecostMs(i int)
AddTimecostMs adds i to the "timecost_ms" field.
func (*ProblemCaseRunMutation) AddedEdges ¶
func (m *ProblemCaseRunMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ProblemCaseRunMutation) AddedField ¶
func (m *ProblemCaseRunMutation) 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 (*ProblemCaseRunMutation) AddedFields ¶
func (m *ProblemCaseRunMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ProblemCaseRunMutation) AddedIDs ¶
func (m *ProblemCaseRunMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ProblemCaseRunMutation) AddedTimecostMs ¶
func (m *ProblemCaseRunMutation) AddedTimecostMs() (r int, exists bool)
AddedTimecostMs returns the value that was added to the "timecost_ms" field in this mutation.
func (*ProblemCaseRunMutation) Branch ¶
func (m *ProblemCaseRunMutation) Branch() (r string, exists bool)
Branch returns the value of the "branch" field in the mutation.
func (*ProblemCaseRunMutation) BuildURL ¶
func (m *ProblemCaseRunMutation) BuildURL() (r string, exists bool)
BuildURL returns the value of the "build_url" field in the mutation.
func (*ProblemCaseRunMutation) CaseName ¶
func (m *ProblemCaseRunMutation) CaseName() (r string, exists bool)
CaseName returns the value of the "case_name" field in the mutation.
func (*ProblemCaseRunMutation) ClearEdge ¶
func (m *ProblemCaseRunMutation) 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 (*ProblemCaseRunMutation) ClearField ¶
func (m *ProblemCaseRunMutation) 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 (*ProblemCaseRunMutation) ClearedEdges ¶
func (m *ProblemCaseRunMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ProblemCaseRunMutation) ClearedFields ¶
func (m *ProblemCaseRunMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ProblemCaseRunMutation) Client ¶
func (m ProblemCaseRunMutation) 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 (*ProblemCaseRunMutation) EdgeCleared ¶
func (m *ProblemCaseRunMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ProblemCaseRunMutation) Field ¶
func (m *ProblemCaseRunMutation) 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 (*ProblemCaseRunMutation) FieldCleared ¶
func (m *ProblemCaseRunMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ProblemCaseRunMutation) Fields ¶
func (m *ProblemCaseRunMutation) 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 (*ProblemCaseRunMutation) Flaky ¶
func (m *ProblemCaseRunMutation) Flaky() (r bool, exists bool)
Flaky returns the value of the "flaky" field in the mutation.
func (*ProblemCaseRunMutation) ID ¶
func (m *ProblemCaseRunMutation) 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 (*ProblemCaseRunMutation) IDs ¶
func (m *ProblemCaseRunMutation) 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 (*ProblemCaseRunMutation) OldBranch ¶
func (m *ProblemCaseRunMutation) OldBranch(ctx context.Context) (v string, err error)
OldBranch returns the old "branch" field's value of the ProblemCaseRun entity. If the ProblemCaseRun 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 (*ProblemCaseRunMutation) OldBuildURL ¶
func (m *ProblemCaseRunMutation) OldBuildURL(ctx context.Context) (v string, err error)
OldBuildURL returns the old "build_url" field's value of the ProblemCaseRun entity. If the ProblemCaseRun 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 (*ProblemCaseRunMutation) OldCaseName ¶
func (m *ProblemCaseRunMutation) OldCaseName(ctx context.Context) (v string, err error)
OldCaseName returns the old "case_name" field's value of the ProblemCaseRun entity. If the ProblemCaseRun 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 (*ProblemCaseRunMutation) 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 (*ProblemCaseRunMutation) OldFlaky ¶
func (m *ProblemCaseRunMutation) OldFlaky(ctx context.Context) (v bool, err error)
OldFlaky returns the old "flaky" field's value of the ProblemCaseRun entity. If the ProblemCaseRun 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 (*ProblemCaseRunMutation) OldReason ¶
func (m *ProblemCaseRunMutation) OldReason(ctx context.Context) (v string, err error)
OldReason returns the old "reason" field's value of the ProblemCaseRun entity. If the ProblemCaseRun 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 (*ProblemCaseRunMutation) OldRepo ¶
func (m *ProblemCaseRunMutation) OldRepo(ctx context.Context) (v string, err error)
OldRepo returns the old "repo" field's value of the ProblemCaseRun entity. If the ProblemCaseRun 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 (*ProblemCaseRunMutation) OldReportTime ¶
OldReportTime returns the old "report_time" field's value of the ProblemCaseRun entity. If the ProblemCaseRun 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 (*ProblemCaseRunMutation) OldSuiteName ¶
func (m *ProblemCaseRunMutation) OldSuiteName(ctx context.Context) (v string, err error)
OldSuiteName returns the old "suite_name" field's value of the ProblemCaseRun entity. If the ProblemCaseRun 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 (*ProblemCaseRunMutation) OldTimecostMs ¶
func (m *ProblemCaseRunMutation) OldTimecostMs(ctx context.Context) (v int, err error)
OldTimecostMs returns the old "timecost_ms" field's value of the ProblemCaseRun entity. If the ProblemCaseRun 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 (*ProblemCaseRunMutation) Op ¶
func (m *ProblemCaseRunMutation) Op() Op
Op returns the operation name.
func (*ProblemCaseRunMutation) Reason ¶
func (m *ProblemCaseRunMutation) Reason() (r string, exists bool)
Reason returns the value of the "reason" field in the mutation.
func (*ProblemCaseRunMutation) RemovedEdges ¶
func (m *ProblemCaseRunMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ProblemCaseRunMutation) RemovedIDs ¶
func (m *ProblemCaseRunMutation) 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 (*ProblemCaseRunMutation) Repo ¶
func (m *ProblemCaseRunMutation) Repo() (r string, exists bool)
Repo returns the value of the "repo" field in the mutation.
func (*ProblemCaseRunMutation) ReportTime ¶
func (m *ProblemCaseRunMutation) ReportTime() (r time.Time, exists bool)
ReportTime returns the value of the "report_time" field in the mutation.
func (*ProblemCaseRunMutation) ResetBranch ¶
func (m *ProblemCaseRunMutation) ResetBranch()
ResetBranch resets all changes to the "branch" field.
func (*ProblemCaseRunMutation) ResetBuildURL ¶
func (m *ProblemCaseRunMutation) ResetBuildURL()
ResetBuildURL resets all changes to the "build_url" field.
func (*ProblemCaseRunMutation) ResetCaseName ¶
func (m *ProblemCaseRunMutation) ResetCaseName()
ResetCaseName resets all changes to the "case_name" field.
func (*ProblemCaseRunMutation) ResetEdge ¶
func (m *ProblemCaseRunMutation) 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 (*ProblemCaseRunMutation) ResetField ¶
func (m *ProblemCaseRunMutation) 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 (*ProblemCaseRunMutation) ResetFlaky ¶
func (m *ProblemCaseRunMutation) ResetFlaky()
ResetFlaky resets all changes to the "flaky" field.
func (*ProblemCaseRunMutation) ResetReason ¶
func (m *ProblemCaseRunMutation) ResetReason()
ResetReason resets all changes to the "reason" field.
func (*ProblemCaseRunMutation) ResetRepo ¶
func (m *ProblemCaseRunMutation) ResetRepo()
ResetRepo resets all changes to the "repo" field.
func (*ProblemCaseRunMutation) ResetReportTime ¶
func (m *ProblemCaseRunMutation) ResetReportTime()
ResetReportTime resets all changes to the "report_time" field.
func (*ProblemCaseRunMutation) ResetSuiteName ¶
func (m *ProblemCaseRunMutation) ResetSuiteName()
ResetSuiteName resets all changes to the "suite_name" field.
func (*ProblemCaseRunMutation) ResetTimecostMs ¶
func (m *ProblemCaseRunMutation) ResetTimecostMs()
ResetTimecostMs resets all changes to the "timecost_ms" field.
func (*ProblemCaseRunMutation) SetBranch ¶
func (m *ProblemCaseRunMutation) SetBranch(s string)
SetBranch sets the "branch" field.
func (*ProblemCaseRunMutation) SetBuildURL ¶
func (m *ProblemCaseRunMutation) SetBuildURL(s string)
SetBuildURL sets the "build_url" field.
func (*ProblemCaseRunMutation) SetCaseName ¶
func (m *ProblemCaseRunMutation) SetCaseName(s string)
SetCaseName sets the "case_name" field.
func (*ProblemCaseRunMutation) SetField ¶
func (m *ProblemCaseRunMutation) 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 (*ProblemCaseRunMutation) SetFlaky ¶
func (m *ProblemCaseRunMutation) SetFlaky(b bool)
SetFlaky sets the "flaky" field.
func (*ProblemCaseRunMutation) SetOp ¶
func (m *ProblemCaseRunMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ProblemCaseRunMutation) SetReason ¶
func (m *ProblemCaseRunMutation) SetReason(s string)
SetReason sets the "reason" field.
func (*ProblemCaseRunMutation) SetRepo ¶
func (m *ProblemCaseRunMutation) SetRepo(s string)
SetRepo sets the "repo" field.
func (*ProblemCaseRunMutation) SetReportTime ¶
func (m *ProblemCaseRunMutation) SetReportTime(t time.Time)
SetReportTime sets the "report_time" field.
func (*ProblemCaseRunMutation) SetSuiteName ¶
func (m *ProblemCaseRunMutation) SetSuiteName(s string)
SetSuiteName sets the "suite_name" field.
func (*ProblemCaseRunMutation) SetTimecostMs ¶
func (m *ProblemCaseRunMutation) SetTimecostMs(i int)
SetTimecostMs sets the "timecost_ms" field.
func (*ProblemCaseRunMutation) SuiteName ¶
func (m *ProblemCaseRunMutation) SuiteName() (r string, exists bool)
SuiteName returns the value of the "suite_name" field in the mutation.
func (*ProblemCaseRunMutation) TimecostMs ¶
func (m *ProblemCaseRunMutation) TimecostMs() (r int, exists bool)
TimecostMs returns the value of the "timecost_ms" field in the mutation.
func (ProblemCaseRunMutation) Tx ¶
func (m ProblemCaseRunMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ProblemCaseRunMutation) Type ¶
func (m *ProblemCaseRunMutation) Type() string
Type returns the node type of this mutation (ProblemCaseRun).
func (*ProblemCaseRunMutation) Where ¶
func (m *ProblemCaseRunMutation) Where(ps ...predicate.ProblemCaseRun)
Where appends a list predicates to the ProblemCaseRunMutation builder.
func (*ProblemCaseRunMutation) WhereP ¶
func (m *ProblemCaseRunMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ProblemCaseRunMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ProblemCaseRunQuery ¶
type ProblemCaseRunQuery struct {
// contains filtered or unexported fields
}
ProblemCaseRunQuery is the builder for querying ProblemCaseRun entities.
func (*ProblemCaseRunQuery) Aggregate ¶
func (pcrq *ProblemCaseRunQuery) Aggregate(fns ...AggregateFunc) *ProblemCaseRunSelect
Aggregate returns a ProblemCaseRunSelect configured with the given aggregations.
func (*ProblemCaseRunQuery) All ¶
func (pcrq *ProblemCaseRunQuery) All(ctx context.Context) ([]*ProblemCaseRun, error)
All executes the query and returns a list of ProblemCaseRuns.
func (*ProblemCaseRunQuery) AllX ¶
func (pcrq *ProblemCaseRunQuery) AllX(ctx context.Context) []*ProblemCaseRun
AllX is like All, but panics if an error occurs.
func (*ProblemCaseRunQuery) Clone ¶
func (pcrq *ProblemCaseRunQuery) Clone() *ProblemCaseRunQuery
Clone returns a duplicate of the ProblemCaseRunQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ProblemCaseRunQuery) Count ¶
func (pcrq *ProblemCaseRunQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ProblemCaseRunQuery) CountX ¶
func (pcrq *ProblemCaseRunQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ProblemCaseRunQuery) Exist ¶
func (pcrq *ProblemCaseRunQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ProblemCaseRunQuery) ExistX ¶
func (pcrq *ProblemCaseRunQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ProblemCaseRunQuery) First ¶
func (pcrq *ProblemCaseRunQuery) First(ctx context.Context) (*ProblemCaseRun, error)
First returns the first ProblemCaseRun entity from the query. Returns a *NotFoundError when no ProblemCaseRun was found.
func (*ProblemCaseRunQuery) FirstID ¶
func (pcrq *ProblemCaseRunQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first ProblemCaseRun ID from the query. Returns a *NotFoundError when no ProblemCaseRun ID was found.
func (*ProblemCaseRunQuery) FirstIDX ¶
func (pcrq *ProblemCaseRunQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ProblemCaseRunQuery) FirstX ¶
func (pcrq *ProblemCaseRunQuery) FirstX(ctx context.Context) *ProblemCaseRun
FirstX is like First, but panics if an error occurs.
func (*ProblemCaseRunQuery) GroupBy ¶
func (pcrq *ProblemCaseRunQuery) GroupBy(field string, fields ...string) *ProblemCaseRunGroupBy
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 { Repo string `json:"repo,omitempty"` Count int `json:"count,omitempty"` } client.ProblemCaseRun.Query(). GroupBy(problemcaserun.FieldRepo). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ProblemCaseRunQuery) IDs ¶
func (pcrq *ProblemCaseRunQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of ProblemCaseRun IDs.
func (*ProblemCaseRunQuery) IDsX ¶
func (pcrq *ProblemCaseRunQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ProblemCaseRunQuery) Limit ¶
func (pcrq *ProblemCaseRunQuery) Limit(limit int) *ProblemCaseRunQuery
Limit the number of records to be returned by this query.
func (*ProblemCaseRunQuery) Offset ¶
func (pcrq *ProblemCaseRunQuery) Offset(offset int) *ProblemCaseRunQuery
Offset to start from.
func (*ProblemCaseRunQuery) Only ¶
func (pcrq *ProblemCaseRunQuery) Only(ctx context.Context) (*ProblemCaseRun, error)
Only returns a single ProblemCaseRun entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ProblemCaseRun entity is found. Returns a *NotFoundError when no ProblemCaseRun entities are found.
func (*ProblemCaseRunQuery) OnlyID ¶
func (pcrq *ProblemCaseRunQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only ProblemCaseRun ID in the query. Returns a *NotSingularError when more than one ProblemCaseRun ID is found. Returns a *NotFoundError when no entities are found.
func (*ProblemCaseRunQuery) OnlyIDX ¶
func (pcrq *ProblemCaseRunQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ProblemCaseRunQuery) OnlyX ¶
func (pcrq *ProblemCaseRunQuery) OnlyX(ctx context.Context) *ProblemCaseRun
OnlyX is like Only, but panics if an error occurs.
func (*ProblemCaseRunQuery) Order ¶
func (pcrq *ProblemCaseRunQuery) Order(o ...problemcaserun.OrderOption) *ProblemCaseRunQuery
Order specifies how the records should be ordered.
func (*ProblemCaseRunQuery) Select ¶
func (pcrq *ProblemCaseRunQuery) Select(fields ...string) *ProblemCaseRunSelect
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 { Repo string `json:"repo,omitempty"` } client.ProblemCaseRun.Query(). Select(problemcaserun.FieldRepo). Scan(ctx, &v)
func (*ProblemCaseRunQuery) Unique ¶
func (pcrq *ProblemCaseRunQuery) Unique(unique bool) *ProblemCaseRunQuery
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 (*ProblemCaseRunQuery) Where ¶
func (pcrq *ProblemCaseRunQuery) Where(ps ...predicate.ProblemCaseRun) *ProblemCaseRunQuery
Where adds a new predicate for the ProblemCaseRunQuery builder.
type ProblemCaseRunSelect ¶
type ProblemCaseRunSelect struct { *ProblemCaseRunQuery // contains filtered or unexported fields }
ProblemCaseRunSelect is the builder for selecting fields of ProblemCaseRun entities.
func (*ProblemCaseRunSelect) Aggregate ¶
func (pcrs *ProblemCaseRunSelect) Aggregate(fns ...AggregateFunc) *ProblemCaseRunSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ProblemCaseRunSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProblemCaseRunSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProblemCaseRunSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProblemCaseRunSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProblemCaseRunSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProblemCaseRunSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProblemCaseRunSelect) Scan ¶
func (pcrs *ProblemCaseRunSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProblemCaseRunSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProblemCaseRunUpdate ¶
type ProblemCaseRunUpdate struct {
// contains filtered or unexported fields
}
ProblemCaseRunUpdate is the builder for updating ProblemCaseRun entities.
func (*ProblemCaseRunUpdate) AddTimecostMs ¶
func (pcru *ProblemCaseRunUpdate) AddTimecostMs(i int) *ProblemCaseRunUpdate
AddTimecostMs adds i to the "timecost_ms" field.
func (*ProblemCaseRunUpdate) Exec ¶
func (pcru *ProblemCaseRunUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProblemCaseRunUpdate) ExecX ¶
func (pcru *ProblemCaseRunUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProblemCaseRunUpdate) Mutation ¶
func (pcru *ProblemCaseRunUpdate) Mutation() *ProblemCaseRunMutation
Mutation returns the ProblemCaseRunMutation object of the builder.
func (*ProblemCaseRunUpdate) Save ¶
func (pcru *ProblemCaseRunUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ProblemCaseRunUpdate) SaveX ¶
func (pcru *ProblemCaseRunUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ProblemCaseRunUpdate) SetBranch ¶
func (pcru *ProblemCaseRunUpdate) SetBranch(s string) *ProblemCaseRunUpdate
SetBranch sets the "branch" field.
func (*ProblemCaseRunUpdate) SetBuildURL ¶
func (pcru *ProblemCaseRunUpdate) SetBuildURL(s string) *ProblemCaseRunUpdate
SetBuildURL sets the "build_url" field.
func (*ProblemCaseRunUpdate) SetCaseName ¶
func (pcru *ProblemCaseRunUpdate) SetCaseName(s string) *ProblemCaseRunUpdate
SetCaseName sets the "case_name" field.
func (*ProblemCaseRunUpdate) SetFlaky ¶
func (pcru *ProblemCaseRunUpdate) SetFlaky(b bool) *ProblemCaseRunUpdate
SetFlaky sets the "flaky" field.
func (*ProblemCaseRunUpdate) SetNillableBranch ¶
func (pcru *ProblemCaseRunUpdate) SetNillableBranch(s *string) *ProblemCaseRunUpdate
SetNillableBranch sets the "branch" field if the given value is not nil.
func (*ProblemCaseRunUpdate) SetNillableBuildURL ¶
func (pcru *ProblemCaseRunUpdate) SetNillableBuildURL(s *string) *ProblemCaseRunUpdate
SetNillableBuildURL sets the "build_url" field if the given value is not nil.
func (*ProblemCaseRunUpdate) SetNillableCaseName ¶
func (pcru *ProblemCaseRunUpdate) SetNillableCaseName(s *string) *ProblemCaseRunUpdate
SetNillableCaseName sets the "case_name" field if the given value is not nil.
func (*ProblemCaseRunUpdate) SetNillableFlaky ¶
func (pcru *ProblemCaseRunUpdate) SetNillableFlaky(b *bool) *ProblemCaseRunUpdate
SetNillableFlaky sets the "flaky" field if the given value is not nil.
func (*ProblemCaseRunUpdate) SetNillableReason ¶
func (pcru *ProblemCaseRunUpdate) SetNillableReason(s *string) *ProblemCaseRunUpdate
SetNillableReason sets the "reason" field if the given value is not nil.
func (*ProblemCaseRunUpdate) SetNillableRepo ¶
func (pcru *ProblemCaseRunUpdate) SetNillableRepo(s *string) *ProblemCaseRunUpdate
SetNillableRepo sets the "repo" field if the given value is not nil.
func (*ProblemCaseRunUpdate) SetNillableReportTime ¶
func (pcru *ProblemCaseRunUpdate) SetNillableReportTime(t *time.Time) *ProblemCaseRunUpdate
SetNillableReportTime sets the "report_time" field if the given value is not nil.
func (*ProblemCaseRunUpdate) SetNillableSuiteName ¶
func (pcru *ProblemCaseRunUpdate) SetNillableSuiteName(s *string) *ProblemCaseRunUpdate
SetNillableSuiteName sets the "suite_name" field if the given value is not nil.
func (*ProblemCaseRunUpdate) SetNillableTimecostMs ¶
func (pcru *ProblemCaseRunUpdate) SetNillableTimecostMs(i *int) *ProblemCaseRunUpdate
SetNillableTimecostMs sets the "timecost_ms" field if the given value is not nil.
func (*ProblemCaseRunUpdate) SetReason ¶
func (pcru *ProblemCaseRunUpdate) SetReason(s string) *ProblemCaseRunUpdate
SetReason sets the "reason" field.
func (*ProblemCaseRunUpdate) SetRepo ¶
func (pcru *ProblemCaseRunUpdate) SetRepo(s string) *ProblemCaseRunUpdate
SetRepo sets the "repo" field.
func (*ProblemCaseRunUpdate) SetReportTime ¶
func (pcru *ProblemCaseRunUpdate) SetReportTime(t time.Time) *ProblemCaseRunUpdate
SetReportTime sets the "report_time" field.
func (*ProblemCaseRunUpdate) SetSuiteName ¶
func (pcru *ProblemCaseRunUpdate) SetSuiteName(s string) *ProblemCaseRunUpdate
SetSuiteName sets the "suite_name" field.
func (*ProblemCaseRunUpdate) SetTimecostMs ¶
func (pcru *ProblemCaseRunUpdate) SetTimecostMs(i int) *ProblemCaseRunUpdate
SetTimecostMs sets the "timecost_ms" field.
func (*ProblemCaseRunUpdate) Where ¶
func (pcru *ProblemCaseRunUpdate) Where(ps ...predicate.ProblemCaseRun) *ProblemCaseRunUpdate
Where appends a list predicates to the ProblemCaseRunUpdate builder.
type ProblemCaseRunUpdateOne ¶
type ProblemCaseRunUpdateOne struct {
// contains filtered or unexported fields
}
ProblemCaseRunUpdateOne is the builder for updating a single ProblemCaseRun entity.
func (*ProblemCaseRunUpdateOne) AddTimecostMs ¶
func (pcruo *ProblemCaseRunUpdateOne) AddTimecostMs(i int) *ProblemCaseRunUpdateOne
AddTimecostMs adds i to the "timecost_ms" field.
func (*ProblemCaseRunUpdateOne) Exec ¶
func (pcruo *ProblemCaseRunUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ProblemCaseRunUpdateOne) ExecX ¶
func (pcruo *ProblemCaseRunUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProblemCaseRunUpdateOne) Mutation ¶
func (pcruo *ProblemCaseRunUpdateOne) Mutation() *ProblemCaseRunMutation
Mutation returns the ProblemCaseRunMutation object of the builder.
func (*ProblemCaseRunUpdateOne) Save ¶
func (pcruo *ProblemCaseRunUpdateOne) Save(ctx context.Context) (*ProblemCaseRun, error)
Save executes the query and returns the updated ProblemCaseRun entity.
func (*ProblemCaseRunUpdateOne) SaveX ¶
func (pcruo *ProblemCaseRunUpdateOne) SaveX(ctx context.Context) *ProblemCaseRun
SaveX is like Save, but panics if an error occurs.
func (*ProblemCaseRunUpdateOne) Select ¶
func (pcruo *ProblemCaseRunUpdateOne) Select(field string, fields ...string) *ProblemCaseRunUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ProblemCaseRunUpdateOne) SetBranch ¶
func (pcruo *ProblemCaseRunUpdateOne) SetBranch(s string) *ProblemCaseRunUpdateOne
SetBranch sets the "branch" field.
func (*ProblemCaseRunUpdateOne) SetBuildURL ¶
func (pcruo *ProblemCaseRunUpdateOne) SetBuildURL(s string) *ProblemCaseRunUpdateOne
SetBuildURL sets the "build_url" field.
func (*ProblemCaseRunUpdateOne) SetCaseName ¶
func (pcruo *ProblemCaseRunUpdateOne) SetCaseName(s string) *ProblemCaseRunUpdateOne
SetCaseName sets the "case_name" field.
func (*ProblemCaseRunUpdateOne) SetFlaky ¶
func (pcruo *ProblemCaseRunUpdateOne) SetFlaky(b bool) *ProblemCaseRunUpdateOne
SetFlaky sets the "flaky" field.
func (*ProblemCaseRunUpdateOne) SetNillableBranch ¶
func (pcruo *ProblemCaseRunUpdateOne) SetNillableBranch(s *string) *ProblemCaseRunUpdateOne
SetNillableBranch sets the "branch" field if the given value is not nil.
func (*ProblemCaseRunUpdateOne) SetNillableBuildURL ¶
func (pcruo *ProblemCaseRunUpdateOne) SetNillableBuildURL(s *string) *ProblemCaseRunUpdateOne
SetNillableBuildURL sets the "build_url" field if the given value is not nil.
func (*ProblemCaseRunUpdateOne) SetNillableCaseName ¶
func (pcruo *ProblemCaseRunUpdateOne) SetNillableCaseName(s *string) *ProblemCaseRunUpdateOne
SetNillableCaseName sets the "case_name" field if the given value is not nil.
func (*ProblemCaseRunUpdateOne) SetNillableFlaky ¶
func (pcruo *ProblemCaseRunUpdateOne) SetNillableFlaky(b *bool) *ProblemCaseRunUpdateOne
SetNillableFlaky sets the "flaky" field if the given value is not nil.
func (*ProblemCaseRunUpdateOne) SetNillableReason ¶
func (pcruo *ProblemCaseRunUpdateOne) SetNillableReason(s *string) *ProblemCaseRunUpdateOne
SetNillableReason sets the "reason" field if the given value is not nil.
func (*ProblemCaseRunUpdateOne) SetNillableRepo ¶
func (pcruo *ProblemCaseRunUpdateOne) SetNillableRepo(s *string) *ProblemCaseRunUpdateOne
SetNillableRepo sets the "repo" field if the given value is not nil.
func (*ProblemCaseRunUpdateOne) SetNillableReportTime ¶
func (pcruo *ProblemCaseRunUpdateOne) SetNillableReportTime(t *time.Time) *ProblemCaseRunUpdateOne
SetNillableReportTime sets the "report_time" field if the given value is not nil.
func (*ProblemCaseRunUpdateOne) SetNillableSuiteName ¶
func (pcruo *ProblemCaseRunUpdateOne) SetNillableSuiteName(s *string) *ProblemCaseRunUpdateOne
SetNillableSuiteName sets the "suite_name" field if the given value is not nil.
func (*ProblemCaseRunUpdateOne) SetNillableTimecostMs ¶
func (pcruo *ProblemCaseRunUpdateOne) SetNillableTimecostMs(i *int) *ProblemCaseRunUpdateOne
SetNillableTimecostMs sets the "timecost_ms" field if the given value is not nil.
func (*ProblemCaseRunUpdateOne) SetReason ¶
func (pcruo *ProblemCaseRunUpdateOne) SetReason(s string) *ProblemCaseRunUpdateOne
SetReason sets the "reason" field.
func (*ProblemCaseRunUpdateOne) SetRepo ¶
func (pcruo *ProblemCaseRunUpdateOne) SetRepo(s string) *ProblemCaseRunUpdateOne
SetRepo sets the "repo" field.
func (*ProblemCaseRunUpdateOne) SetReportTime ¶
func (pcruo *ProblemCaseRunUpdateOne) SetReportTime(t time.Time) *ProblemCaseRunUpdateOne
SetReportTime sets the "report_time" field.
func (*ProblemCaseRunUpdateOne) SetSuiteName ¶
func (pcruo *ProblemCaseRunUpdateOne) SetSuiteName(s string) *ProblemCaseRunUpdateOne
SetSuiteName sets the "suite_name" field.
func (*ProblemCaseRunUpdateOne) SetTimecostMs ¶
func (pcruo *ProblemCaseRunUpdateOne) SetTimecostMs(i int) *ProblemCaseRunUpdateOne
SetTimecostMs sets the "timecost_ms" field.
func (*ProblemCaseRunUpdateOne) Where ¶
func (pcruo *ProblemCaseRunUpdateOne) Where(ps ...predicate.ProblemCaseRun) *ProblemCaseRunUpdateOne
Where appends a list predicates to the ProblemCaseRunUpdate builder.
type ProblemCaseRuns ¶
type ProblemCaseRuns []*ProblemCaseRun
ProblemCaseRuns is a parsable slice of ProblemCaseRun.
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 { // ProblemCaseRun is the client for interacting with the ProblemCaseRun builders. ProblemCaseRun *ProblemCaseRunClient // 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.