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) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, 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 Histories
- type History
- func (c *History) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *History) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (h *History) QueryJob() *JobQuery
- func (h *History) String() string
- func (h *History) Unwrap() *History
- func (h *History) Update() *HistoryUpdateOne
- func (h *History) Value(name string) (ent.Value, error)
- type HistoryClient
- func (c *HistoryClient) Create() *HistoryCreate
- func (c *HistoryClient) CreateBulk(builders ...*HistoryCreate) *HistoryCreateBulk
- func (c *HistoryClient) Delete() *HistoryDelete
- func (c *HistoryClient) DeleteOne(h *History) *HistoryDeleteOne
- func (c *HistoryClient) DeleteOneID(id int) *HistoryDeleteOne
- func (c *HistoryClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *HistoryClient) Get(ctx context.Context, id int) (*History, error)
- func (c *HistoryClient) GetX(ctx context.Context, id int) *History
- func (c *HistoryClient) Hooks() []Hook
- func (c *HistoryClient) Intercept(interceptors ...Interceptor)
- func (c *HistoryClient) Interceptors() []Interceptor
- func (c *HistoryClient) MapCreateBulk(slice any, setFunc func(*HistoryCreate, int)) *HistoryCreateBulk
- func (c *HistoryClient) Query() *HistoryQuery
- func (c *HistoryClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *HistoryClient) QueryJob(h *History) *JobQuery
- func (c *HistoryClient) Update() *HistoryUpdate
- func (c *HistoryClient) UpdateOne(h *History) *HistoryUpdateOne
- func (c *HistoryClient) UpdateOneID(id int) *HistoryUpdateOne
- func (c *HistoryClient) Use(hooks ...Hook)
- type HistoryCreate
- func (hc *HistoryCreate) Exec(ctx context.Context) error
- func (c *HistoryCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (hc *HistoryCreate) ExecX(ctx context.Context)
- func (hc *HistoryCreate) Mutation() *HistoryMutation
- func (c *HistoryCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (hc *HistoryCreate) Save(ctx context.Context) (*History, error)
- func (hc *HistoryCreate) SaveX(ctx context.Context) *History
- func (hc *HistoryCreate) SetDefinition(m map[string]interface{}) *HistoryCreate
- func (hc *HistoryCreate) SetJob(j *Job) *HistoryCreate
- func (hc *HistoryCreate) SetJobID(id string) *HistoryCreate
- func (hc *HistoryCreate) SetMtime(t time.Time) *HistoryCreate
- func (hc *HistoryCreate) SetNillableJobID(id *string) *HistoryCreate
- func (hc *HistoryCreate) SetNillableStatus(ms *model.JobStatus) *HistoryCreate
- func (hc *HistoryCreate) SetStatus(ms model.JobStatus) *HistoryCreate
- type HistoryCreateBulk
- func (hcb *HistoryCreateBulk) Exec(ctx context.Context) error
- func (c *HistoryCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (hcb *HistoryCreateBulk) ExecX(ctx context.Context)
- func (c *HistoryCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (hcb *HistoryCreateBulk) Save(ctx context.Context) ([]*History, error)
- func (hcb *HistoryCreateBulk) SaveX(ctx context.Context) []*History
- type HistoryDelete
- func (hd *HistoryDelete) Exec(ctx context.Context) (int, error)
- func (c *HistoryDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (hd *HistoryDelete) ExecX(ctx context.Context) int
- func (c *HistoryDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (hd *HistoryDelete) Where(ps ...predicate.History) *HistoryDelete
- type HistoryDeleteOne
- type HistoryEdges
- type HistoryGroupBy
- func (hgb *HistoryGroupBy) Aggregate(fns ...AggregateFunc) *HistoryGroupBy
- func (s *HistoryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *HistoryGroupBy) BoolX(ctx context.Context) bool
- func (s *HistoryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *HistoryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *HistoryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *HistoryGroupBy) Float64X(ctx context.Context) float64
- func (s *HistoryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *HistoryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *HistoryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *HistoryGroupBy) IntX(ctx context.Context) int
- func (s *HistoryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *HistoryGroupBy) IntsX(ctx context.Context) []int
- func (hgb *HistoryGroupBy) Scan(ctx context.Context, v any) error
- func (s *HistoryGroupBy) ScanX(ctx context.Context, v any)
- func (s *HistoryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *HistoryGroupBy) StringX(ctx context.Context) string
- func (s *HistoryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *HistoryGroupBy) StringsX(ctx context.Context) []string
- type HistoryMutation
- func (m *HistoryMutation) AddField(name string, value ent.Value) error
- func (m *HistoryMutation) AddedEdges() []string
- func (m *HistoryMutation) AddedField(name string) (ent.Value, bool)
- func (m *HistoryMutation) AddedFields() []string
- func (m *HistoryMutation) AddedIDs(name string) []ent.Value
- func (m *HistoryMutation) ClearDefinition()
- func (m *HistoryMutation) ClearEdge(name string) error
- func (m *HistoryMutation) ClearField(name string) error
- func (m *HistoryMutation) ClearJob()
- func (m *HistoryMutation) ClearStatus()
- func (m *HistoryMutation) ClearedEdges() []string
- func (m *HistoryMutation) ClearedFields() []string
- func (m HistoryMutation) Client() *Client
- func (m *HistoryMutation) Definition() (r map[string]interface{}, exists bool)
- func (m *HistoryMutation) DefinitionCleared() bool
- func (m *HistoryMutation) EdgeCleared(name string) bool
- func (c *HistoryMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *HistoryMutation) Field(name string) (ent.Value, bool)
- func (m *HistoryMutation) FieldCleared(name string) bool
- func (m *HistoryMutation) Fields() []string
- func (m *HistoryMutation) ID() (id int, exists bool)
- func (m *HistoryMutation) IDs(ctx context.Context) ([]int, error)
- func (m *HistoryMutation) JobCleared() bool
- func (m *HistoryMutation) JobID() (id string, exists bool)
- func (m *HistoryMutation) JobIDs() (ids []string)
- func (m *HistoryMutation) Mtime() (r time.Time, exists bool)
- func (m *HistoryMutation) OldDefinition(ctx context.Context) (v map[string]interface{}, err error)
- func (m *HistoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *HistoryMutation) OldMtime(ctx context.Context) (v time.Time, err error)
- func (m *HistoryMutation) OldStatus(ctx context.Context) (v model.JobStatus, err error)
- func (m *HistoryMutation) Op() Op
- func (c *HistoryMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *HistoryMutation) RemovedEdges() []string
- func (m *HistoryMutation) RemovedIDs(name string) []ent.Value
- func (m *HistoryMutation) ResetDefinition()
- func (m *HistoryMutation) ResetEdge(name string) error
- func (m *HistoryMutation) ResetField(name string) error
- func (m *HistoryMutation) ResetJob()
- func (m *HistoryMutation) ResetMtime()
- func (m *HistoryMutation) ResetStatus()
- func (m *HistoryMutation) SetDefinition(value map[string]interface{})
- func (m *HistoryMutation) SetField(name string, value ent.Value) error
- func (m *HistoryMutation) SetJobID(id string)
- func (m *HistoryMutation) SetMtime(t time.Time)
- func (m *HistoryMutation) SetOp(op Op)
- func (m *HistoryMutation) SetStatus(ms model.JobStatus)
- func (m *HistoryMutation) Status() (r model.JobStatus, exists bool)
- func (m *HistoryMutation) StatusCleared() bool
- func (m HistoryMutation) Tx() (*Tx, error)
- func (m *HistoryMutation) Type() string
- func (m *HistoryMutation) Where(ps ...predicate.History)
- func (m *HistoryMutation) WhereP(ps ...func(*sql.Selector))
- type HistoryQuery
- func (hq *HistoryQuery) Aggregate(fns ...AggregateFunc) *HistorySelect
- func (hq *HistoryQuery) All(ctx context.Context) ([]*History, error)
- func (hq *HistoryQuery) AllX(ctx context.Context) []*History
- func (hq *HistoryQuery) Clone() *HistoryQuery
- func (hq *HistoryQuery) Count(ctx context.Context) (int, error)
- func (hq *HistoryQuery) CountX(ctx context.Context) int
- func (c *HistoryQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (hq *HistoryQuery) Exist(ctx context.Context) (bool, error)
- func (hq *HistoryQuery) ExistX(ctx context.Context) bool
- func (hq *HistoryQuery) First(ctx context.Context) (*History, error)
- func (hq *HistoryQuery) FirstID(ctx context.Context) (id int, err error)
- func (hq *HistoryQuery) FirstIDX(ctx context.Context) int
- func (hq *HistoryQuery) FirstX(ctx context.Context) *History
- func (hq *HistoryQuery) GroupBy(field string, fields ...string) *HistoryGroupBy
- func (hq *HistoryQuery) IDs(ctx context.Context) (ids []int, err error)
- func (hq *HistoryQuery) IDsX(ctx context.Context) []int
- func (hq *HistoryQuery) Limit(limit int) *HistoryQuery
- func (hq *HistoryQuery) Offset(offset int) *HistoryQuery
- func (hq *HistoryQuery) Only(ctx context.Context) (*History, error)
- func (hq *HistoryQuery) OnlyID(ctx context.Context) (id int, err error)
- func (hq *HistoryQuery) OnlyIDX(ctx context.Context) int
- func (hq *HistoryQuery) OnlyX(ctx context.Context) *History
- func (hq *HistoryQuery) Order(o ...history.OrderOption) *HistoryQuery
- func (c *HistoryQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (hq *HistoryQuery) QueryJob() *JobQuery
- func (hq *HistoryQuery) Select(fields ...string) *HistorySelect
- func (hq *HistoryQuery) Unique(unique bool) *HistoryQuery
- func (hq *HistoryQuery) Where(ps ...predicate.History) *HistoryQuery
- func (hq *HistoryQuery) WithJob(opts ...func(*JobQuery)) *HistoryQuery
- type HistorySelect
- func (hs *HistorySelect) Aggregate(fns ...AggregateFunc) *HistorySelect
- func (s *HistorySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *HistorySelect) BoolX(ctx context.Context) bool
- func (s *HistorySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *HistorySelect) BoolsX(ctx context.Context) []bool
- func (c HistorySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *HistorySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *HistorySelect) Float64X(ctx context.Context) float64
- func (s *HistorySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *HistorySelect) Float64sX(ctx context.Context) []float64
- func (s *HistorySelect) Int(ctx context.Context) (_ int, err error)
- func (s *HistorySelect) IntX(ctx context.Context) int
- func (s *HistorySelect) Ints(ctx context.Context) ([]int, error)
- func (s *HistorySelect) IntsX(ctx context.Context) []int
- func (c HistorySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (hs *HistorySelect) Scan(ctx context.Context, v any) error
- func (s *HistorySelect) ScanX(ctx context.Context, v any)
- func (s *HistorySelect) String(ctx context.Context) (_ string, err error)
- func (s *HistorySelect) StringX(ctx context.Context) string
- func (s *HistorySelect) Strings(ctx context.Context) ([]string, error)
- func (s *HistorySelect) StringsX(ctx context.Context) []string
- type HistoryUpdate
- func (hu *HistoryUpdate) ClearDefinition() *HistoryUpdate
- func (hu *HistoryUpdate) ClearJob() *HistoryUpdate
- func (hu *HistoryUpdate) ClearStatus() *HistoryUpdate
- func (hu *HistoryUpdate) Exec(ctx context.Context) error
- func (c *HistoryUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (hu *HistoryUpdate) ExecX(ctx context.Context)
- func (hu *HistoryUpdate) Mutation() *HistoryMutation
- func (c *HistoryUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (hu *HistoryUpdate) Save(ctx context.Context) (int, error)
- func (hu *HistoryUpdate) SaveX(ctx context.Context) int
- func (hu *HistoryUpdate) SetDefinition(m map[string]interface{}) *HistoryUpdate
- func (hu *HistoryUpdate) SetJob(j *Job) *HistoryUpdate
- func (hu *HistoryUpdate) SetJobID(id string) *HistoryUpdate
- func (hu *HistoryUpdate) SetMtime(t time.Time) *HistoryUpdate
- func (hu *HistoryUpdate) SetNillableJobID(id *string) *HistoryUpdate
- func (hu *HistoryUpdate) SetNillableMtime(t *time.Time) *HistoryUpdate
- func (hu *HistoryUpdate) SetNillableStatus(ms *model.JobStatus) *HistoryUpdate
- func (hu *HistoryUpdate) SetStatus(ms model.JobStatus) *HistoryUpdate
- func (hu *HistoryUpdate) Where(ps ...predicate.History) *HistoryUpdate
- type HistoryUpdateOne
- func (huo *HistoryUpdateOne) ClearDefinition() *HistoryUpdateOne
- func (huo *HistoryUpdateOne) ClearJob() *HistoryUpdateOne
- func (huo *HistoryUpdateOne) ClearStatus() *HistoryUpdateOne
- func (huo *HistoryUpdateOne) Exec(ctx context.Context) error
- func (c *HistoryUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (huo *HistoryUpdateOne) ExecX(ctx context.Context)
- func (huo *HistoryUpdateOne) Mutation() *HistoryMutation
- func (c *HistoryUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (huo *HistoryUpdateOne) Save(ctx context.Context) (*History, error)
- func (huo *HistoryUpdateOne) SaveX(ctx context.Context) *History
- func (huo *HistoryUpdateOne) Select(field string, fields ...string) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) SetDefinition(m map[string]interface{}) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) SetJob(j *Job) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) SetJobID(id string) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) SetMtime(t time.Time) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) SetNillableJobID(id *string) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) SetNillableMtime(t *time.Time) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) SetNillableStatus(ms *model.JobStatus) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) SetStatus(ms model.JobStatus) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) Where(ps ...predicate.History) *HistoryUpdateOne
- type Hook
- type InterceptFunc
- type Interceptor
- type Job
- func (c *Job) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Job) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (j *Job) QueryHistory() *HistoryQuery
- func (j *Job) QueryTags() *TagQuery
- func (j *Job) QueryWorkflow() *WorkflowQuery
- func (j *Job) String() string
- func (j *Job) Unwrap() *Job
- func (j *Job) Update() *JobUpdateOne
- func (j *Job) Value(name string) (ent.Value, error)
- type JobClient
- func (c *JobClient) Create() *JobCreate
- func (c *JobClient) CreateBulk(builders ...*JobCreate) *JobCreateBulk
- func (c *JobClient) Delete() *JobDelete
- func (c *JobClient) DeleteOne(j *Job) *JobDeleteOne
- func (c *JobClient) DeleteOneID(id string) *JobDeleteOne
- func (c *JobClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *JobClient) Get(ctx context.Context, id string) (*Job, error)
- func (c *JobClient) GetX(ctx context.Context, id string) *Job
- func (c *JobClient) Hooks() []Hook
- func (c *JobClient) Intercept(interceptors ...Interceptor)
- func (c *JobClient) Interceptors() []Interceptor
- func (c *JobClient) MapCreateBulk(slice any, setFunc func(*JobCreate, int)) *JobCreateBulk
- func (c *JobClient) Query() *JobQuery
- func (c *JobClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *JobClient) QueryHistory(j *Job) *HistoryQuery
- func (c *JobClient) QueryTags(j *Job) *TagQuery
- func (c *JobClient) QueryWorkflow(j *Job) *WorkflowQuery
- func (c *JobClient) Update() *JobUpdate
- func (c *JobClient) UpdateOne(j *Job) *JobUpdateOne
- func (c *JobClient) UpdateOneID(id string) *JobUpdateOne
- func (c *JobClient) Use(hooks ...Hook)
- type JobCreate
- func (jc *JobCreate) AddHistory(h ...*History) *JobCreate
- func (jc *JobCreate) AddHistoryIDs(ids ...int) *JobCreate
- func (jc *JobCreate) AddTagIDs(ids ...int) *JobCreate
- func (jc *JobCreate) AddTags(t ...*Tag) *JobCreate
- func (jc *JobCreate) Exec(ctx context.Context) error
- func (c *JobCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (jc *JobCreate) ExecX(ctx context.Context)
- func (jc *JobCreate) Mutation() *JobMutation
- func (c *JobCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (jc *JobCreate) Save(ctx context.Context) (*Job, error)
- func (jc *JobCreate) SaveX(ctx context.Context) *Job
- func (jc *JobCreate) SetClientID(s string) *JobCreate
- func (jc *JobCreate) SetDefinition(m map[string]interface{}) *JobCreate
- func (jc *JobCreate) SetGroup(s string) *JobCreate
- func (jc *JobCreate) SetID(s string) *JobCreate
- func (jc *JobCreate) SetMtime(t time.Time) *JobCreate
- func (jc *JobCreate) SetNillableGroup(s *string) *JobCreate
- func (jc *JobCreate) SetNillableID(s *string) *JobCreate
- func (jc *JobCreate) SetNillableMtime(t *time.Time) *JobCreate
- func (jc *JobCreate) SetNillableStime(t *time.Time) *JobCreate
- func (jc *JobCreate) SetNillableWorkflowID(id *int) *JobCreate
- func (jc *JobCreate) SetStatus(ms model.JobStatus) *JobCreate
- func (jc *JobCreate) SetStime(t time.Time) *JobCreate
- func (jc *JobCreate) SetWorkflow(w *Workflow) *JobCreate
- func (jc *JobCreate) SetWorkflowID(id int) *JobCreate
- type JobCreateBulk
- func (jcb *JobCreateBulk) Exec(ctx context.Context) error
- func (c *JobCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (jcb *JobCreateBulk) ExecX(ctx context.Context)
- func (c *JobCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (jcb *JobCreateBulk) Save(ctx context.Context) ([]*Job, error)
- func (jcb *JobCreateBulk) SaveX(ctx context.Context) []*Job
- type JobDelete
- func (jd *JobDelete) Exec(ctx context.Context) (int, error)
- func (c *JobDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (jd *JobDelete) ExecX(ctx context.Context) int
- func (c *JobDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (jd *JobDelete) Where(ps ...predicate.Job) *JobDelete
- type JobDeleteOne
- type JobEdges
- type JobGroupBy
- func (jgb *JobGroupBy) Aggregate(fns ...AggregateFunc) *JobGroupBy
- func (s *JobGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *JobGroupBy) BoolX(ctx context.Context) bool
- func (s *JobGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *JobGroupBy) BoolsX(ctx context.Context) []bool
- func (s *JobGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *JobGroupBy) Float64X(ctx context.Context) float64
- func (s *JobGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *JobGroupBy) Float64sX(ctx context.Context) []float64
- func (s *JobGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *JobGroupBy) IntX(ctx context.Context) int
- func (s *JobGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *JobGroupBy) IntsX(ctx context.Context) []int
- func (jgb *JobGroupBy) Scan(ctx context.Context, v any) error
- func (s *JobGroupBy) ScanX(ctx context.Context, v any)
- func (s *JobGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *JobGroupBy) StringX(ctx context.Context) string
- func (s *JobGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *JobGroupBy) StringsX(ctx context.Context) []string
- type JobMutation
- func (m *JobMutation) AddField(name string, value ent.Value) error
- func (m *JobMutation) AddHistoryIDs(ids ...int)
- func (m *JobMutation) AddTagIDs(ids ...int)
- func (m *JobMutation) AddedEdges() []string
- func (m *JobMutation) AddedField(name string) (ent.Value, bool)
- func (m *JobMutation) AddedFields() []string
- func (m *JobMutation) AddedIDs(name string) []ent.Value
- func (m *JobMutation) ClearDefinition()
- func (m *JobMutation) ClearEdge(name string) error
- func (m *JobMutation) ClearField(name string) error
- func (m *JobMutation) ClearGroup()
- func (m *JobMutation) ClearHistory()
- func (m *JobMutation) ClearTags()
- func (m *JobMutation) ClearWorkflow()
- func (m *JobMutation) ClearedEdges() []string
- func (m *JobMutation) ClearedFields() []string
- func (m JobMutation) Client() *Client
- func (m *JobMutation) ClientID() (r string, exists bool)
- func (m *JobMutation) Definition() (r map[string]interface{}, exists bool)
- func (m *JobMutation) DefinitionCleared() bool
- func (m *JobMutation) EdgeCleared(name string) bool
- func (c *JobMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *JobMutation) Field(name string) (ent.Value, bool)
- func (m *JobMutation) FieldCleared(name string) bool
- func (m *JobMutation) Fields() []string
- func (m *JobMutation) Group() (r string, exists bool)
- func (m *JobMutation) GroupCleared() bool
- func (m *JobMutation) HistoryCleared() bool
- func (m *JobMutation) HistoryIDs() (ids []int)
- func (m *JobMutation) ID() (id string, exists bool)
- func (m *JobMutation) IDs(ctx context.Context) ([]string, error)
- func (m *JobMutation) Mtime() (r time.Time, exists bool)
- func (m *JobMutation) OldClientID(ctx context.Context) (v string, err error)
- func (m *JobMutation) OldDefinition(ctx context.Context) (v map[string]interface{}, err error)
- func (m *JobMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *JobMutation) OldGroup(ctx context.Context) (v string, err error)
- func (m *JobMutation) OldMtime(ctx context.Context) (v time.Time, err error)
- func (m *JobMutation) OldStatus(ctx context.Context) (v model.JobStatus, err error)
- func (m *JobMutation) OldStime(ctx context.Context) (v time.Time, err error)
- func (m *JobMutation) Op() Op
- func (c *JobMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *JobMutation) RemoveHistoryIDs(ids ...int)
- func (m *JobMutation) RemoveTagIDs(ids ...int)
- func (m *JobMutation) RemovedEdges() []string
- func (m *JobMutation) RemovedHistoryIDs() (ids []int)
- func (m *JobMutation) RemovedIDs(name string) []ent.Value
- func (m *JobMutation) RemovedTagsIDs() (ids []int)
- func (m *JobMutation) ResetClientID()
- func (m *JobMutation) ResetDefinition()
- func (m *JobMutation) ResetEdge(name string) error
- func (m *JobMutation) ResetField(name string) error
- func (m *JobMutation) ResetGroup()
- func (m *JobMutation) ResetHistory()
- func (m *JobMutation) ResetMtime()
- func (m *JobMutation) ResetStatus()
- func (m *JobMutation) ResetStime()
- func (m *JobMutation) ResetTags()
- func (m *JobMutation) ResetWorkflow()
- func (m *JobMutation) SetClientID(s string)
- func (m *JobMutation) SetDefinition(value map[string]interface{})
- func (m *JobMutation) SetField(name string, value ent.Value) error
- func (m *JobMutation) SetGroup(s string)
- func (m *JobMutation) SetID(id string)
- func (m *JobMutation) SetMtime(t time.Time)
- func (m *JobMutation) SetOp(op Op)
- func (m *JobMutation) SetStatus(ms model.JobStatus)
- func (m *JobMutation) SetStime(t time.Time)
- func (m *JobMutation) SetWorkflowID(id int)
- func (m *JobMutation) Status() (r model.JobStatus, exists bool)
- func (m *JobMutation) Stime() (r time.Time, exists bool)
- func (m *JobMutation) TagsCleared() bool
- func (m *JobMutation) TagsIDs() (ids []int)
- func (m JobMutation) Tx() (*Tx, error)
- func (m *JobMutation) Type() string
- func (m *JobMutation) Where(ps ...predicate.Job)
- func (m *JobMutation) WhereP(ps ...func(*sql.Selector))
- func (m *JobMutation) WorkflowCleared() bool
- func (m *JobMutation) WorkflowID() (id int, exists bool)
- func (m *JobMutation) WorkflowIDs() (ids []int)
- type JobQuery
- func (jq *JobQuery) Aggregate(fns ...AggregateFunc) *JobSelect
- func (jq *JobQuery) All(ctx context.Context) ([]*Job, error)
- func (jq *JobQuery) AllX(ctx context.Context) []*Job
- func (jq *JobQuery) Clone() *JobQuery
- func (jq *JobQuery) Count(ctx context.Context) (int, error)
- func (jq *JobQuery) CountX(ctx context.Context) int
- func (c *JobQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (jq *JobQuery) Exist(ctx context.Context) (bool, error)
- func (jq *JobQuery) ExistX(ctx context.Context) bool
- func (jq *JobQuery) First(ctx context.Context) (*Job, error)
- func (jq *JobQuery) FirstID(ctx context.Context) (id string, err error)
- func (jq *JobQuery) FirstIDX(ctx context.Context) string
- func (jq *JobQuery) FirstX(ctx context.Context) *Job
- func (jq *JobQuery) GroupBy(field string, fields ...string) *JobGroupBy
- func (jq *JobQuery) IDs(ctx context.Context) (ids []string, err error)
- func (jq *JobQuery) IDsX(ctx context.Context) []string
- func (jq *JobQuery) Limit(limit int) *JobQuery
- func (jq *JobQuery) Offset(offset int) *JobQuery
- func (jq *JobQuery) Only(ctx context.Context) (*Job, error)
- func (jq *JobQuery) OnlyID(ctx context.Context) (id string, err error)
- func (jq *JobQuery) OnlyIDX(ctx context.Context) string
- func (jq *JobQuery) OnlyX(ctx context.Context) *Job
- func (jq *JobQuery) Order(o ...job.OrderOption) *JobQuery
- func (c *JobQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (jq *JobQuery) QueryHistory() *HistoryQuery
- func (jq *JobQuery) QueryTags() *TagQuery
- func (jq *JobQuery) QueryWorkflow() *WorkflowQuery
- func (jq *JobQuery) Select(fields ...string) *JobSelect
- func (jq *JobQuery) Unique(unique bool) *JobQuery
- func (jq *JobQuery) Where(ps ...predicate.Job) *JobQuery
- func (jq *JobQuery) WithHistory(opts ...func(*HistoryQuery)) *JobQuery
- func (jq *JobQuery) WithTags(opts ...func(*TagQuery)) *JobQuery
- func (jq *JobQuery) WithWorkflow(opts ...func(*WorkflowQuery)) *JobQuery
- type JobSelect
- func (js *JobSelect) Aggregate(fns ...AggregateFunc) *JobSelect
- func (s *JobSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *JobSelect) BoolX(ctx context.Context) bool
- func (s *JobSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *JobSelect) BoolsX(ctx context.Context) []bool
- func (c JobSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *JobSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *JobSelect) Float64X(ctx context.Context) float64
- func (s *JobSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *JobSelect) Float64sX(ctx context.Context) []float64
- func (s *JobSelect) Int(ctx context.Context) (_ int, err error)
- func (s *JobSelect) IntX(ctx context.Context) int
- func (s *JobSelect) Ints(ctx context.Context) ([]int, error)
- func (s *JobSelect) IntsX(ctx context.Context) []int
- func (c JobSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (js *JobSelect) Scan(ctx context.Context, v any) error
- func (s *JobSelect) ScanX(ctx context.Context, v any)
- func (s *JobSelect) String(ctx context.Context) (_ string, err error)
- func (s *JobSelect) StringX(ctx context.Context) string
- func (s *JobSelect) Strings(ctx context.Context) ([]string, error)
- func (s *JobSelect) StringsX(ctx context.Context) []string
- type JobUpdate
- func (ju *JobUpdate) AddHistory(h ...*History) *JobUpdate
- func (ju *JobUpdate) AddHistoryIDs(ids ...int) *JobUpdate
- func (ju *JobUpdate) AddTagIDs(ids ...int) *JobUpdate
- func (ju *JobUpdate) AddTags(t ...*Tag) *JobUpdate
- func (ju *JobUpdate) ClearDefinition() *JobUpdate
- func (ju *JobUpdate) ClearGroup() *JobUpdate
- func (ju *JobUpdate) ClearHistory() *JobUpdate
- func (ju *JobUpdate) ClearTags() *JobUpdate
- func (ju *JobUpdate) ClearWorkflow() *JobUpdate
- func (ju *JobUpdate) Exec(ctx context.Context) error
- func (c *JobUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ju *JobUpdate) ExecX(ctx context.Context)
- func (ju *JobUpdate) Mutation() *JobMutation
- func (c *JobUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ju *JobUpdate) RemoveHistory(h ...*History) *JobUpdate
- func (ju *JobUpdate) RemoveHistoryIDs(ids ...int) *JobUpdate
- func (ju *JobUpdate) RemoveTagIDs(ids ...int) *JobUpdate
- func (ju *JobUpdate) RemoveTags(t ...*Tag) *JobUpdate
- func (ju *JobUpdate) Save(ctx context.Context) (int, error)
- func (ju *JobUpdate) SaveX(ctx context.Context) int
- func (ju *JobUpdate) SetClientID(s string) *JobUpdate
- func (ju *JobUpdate) SetDefinition(m map[string]interface{}) *JobUpdate
- func (ju *JobUpdate) SetGroup(s string) *JobUpdate
- func (ju *JobUpdate) SetMtime(t time.Time) *JobUpdate
- func (ju *JobUpdate) SetNillableClientID(s *string) *JobUpdate
- func (ju *JobUpdate) SetNillableGroup(s *string) *JobUpdate
- func (ju *JobUpdate) SetNillableStatus(ms *model.JobStatus) *JobUpdate
- func (ju *JobUpdate) SetNillableStime(t *time.Time) *JobUpdate
- func (ju *JobUpdate) SetNillableWorkflowID(id *int) *JobUpdate
- func (ju *JobUpdate) SetStatus(ms model.JobStatus) *JobUpdate
- func (ju *JobUpdate) SetStime(t time.Time) *JobUpdate
- func (ju *JobUpdate) SetWorkflow(w *Workflow) *JobUpdate
- func (ju *JobUpdate) SetWorkflowID(id int) *JobUpdate
- func (ju *JobUpdate) Where(ps ...predicate.Job) *JobUpdate
- type JobUpdateOne
- func (juo *JobUpdateOne) AddHistory(h ...*History) *JobUpdateOne
- func (juo *JobUpdateOne) AddHistoryIDs(ids ...int) *JobUpdateOne
- func (juo *JobUpdateOne) AddTagIDs(ids ...int) *JobUpdateOne
- func (juo *JobUpdateOne) AddTags(t ...*Tag) *JobUpdateOne
- func (juo *JobUpdateOne) ClearDefinition() *JobUpdateOne
- func (juo *JobUpdateOne) ClearGroup() *JobUpdateOne
- func (juo *JobUpdateOne) ClearHistory() *JobUpdateOne
- func (juo *JobUpdateOne) ClearTags() *JobUpdateOne
- func (juo *JobUpdateOne) ClearWorkflow() *JobUpdateOne
- func (juo *JobUpdateOne) Exec(ctx context.Context) error
- func (c *JobUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (juo *JobUpdateOne) ExecX(ctx context.Context)
- func (juo *JobUpdateOne) Mutation() *JobMutation
- func (c *JobUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (juo *JobUpdateOne) RemoveHistory(h ...*History) *JobUpdateOne
- func (juo *JobUpdateOne) RemoveHistoryIDs(ids ...int) *JobUpdateOne
- func (juo *JobUpdateOne) RemoveTagIDs(ids ...int) *JobUpdateOne
- func (juo *JobUpdateOne) RemoveTags(t ...*Tag) *JobUpdateOne
- func (juo *JobUpdateOne) Save(ctx context.Context) (*Job, error)
- func (juo *JobUpdateOne) SaveX(ctx context.Context) *Job
- func (juo *JobUpdateOne) Select(field string, fields ...string) *JobUpdateOne
- func (juo *JobUpdateOne) SetClientID(s string) *JobUpdateOne
- func (juo *JobUpdateOne) SetDefinition(m map[string]interface{}) *JobUpdateOne
- func (juo *JobUpdateOne) SetGroup(s string) *JobUpdateOne
- func (juo *JobUpdateOne) SetMtime(t time.Time) *JobUpdateOne
- func (juo *JobUpdateOne) SetNillableClientID(s *string) *JobUpdateOne
- func (juo *JobUpdateOne) SetNillableGroup(s *string) *JobUpdateOne
- func (juo *JobUpdateOne) SetNillableStatus(ms *model.JobStatus) *JobUpdateOne
- func (juo *JobUpdateOne) SetNillableStime(t *time.Time) *JobUpdateOne
- func (juo *JobUpdateOne) SetNillableWorkflowID(id *int) *JobUpdateOne
- func (juo *JobUpdateOne) SetStatus(ms model.JobStatus) *JobUpdateOne
- func (juo *JobUpdateOne) SetStime(t time.Time) *JobUpdateOne
- func (juo *JobUpdateOne) SetWorkflow(w *Workflow) *JobUpdateOne
- func (juo *JobUpdateOne) SetWorkflowID(id int) *JobUpdateOne
- func (juo *JobUpdateOne) Where(ps ...predicate.Job) *JobUpdateOne
- type Jobs
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Tag
- func (c *Tag) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Tag) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (t *Tag) QueryJobs() *JobQuery
- func (t *Tag) String() string
- func (t *Tag) Unwrap() *Tag
- func (t *Tag) Update() *TagUpdateOne
- func (t *Tag) Value(name string) (ent.Value, error)
- type TagClient
- func (c *TagClient) Create() *TagCreate
- func (c *TagClient) CreateBulk(builders ...*TagCreate) *TagCreateBulk
- func (c *TagClient) Delete() *TagDelete
- func (c *TagClient) DeleteOne(t *Tag) *TagDeleteOne
- func (c *TagClient) DeleteOneID(id int) *TagDeleteOne
- func (c *TagClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *TagClient) Get(ctx context.Context, id int) (*Tag, error)
- func (c *TagClient) GetX(ctx context.Context, id int) *Tag
- func (c *TagClient) Hooks() []Hook
- func (c *TagClient) Intercept(interceptors ...Interceptor)
- func (c *TagClient) Interceptors() []Interceptor
- func (c *TagClient) MapCreateBulk(slice any, setFunc func(*TagCreate, int)) *TagCreateBulk
- func (c *TagClient) Query() *TagQuery
- func (c *TagClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *TagClient) QueryJobs(t *Tag) *JobQuery
- func (c *TagClient) Update() *TagUpdate
- func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne
- func (c *TagClient) UpdateOneID(id int) *TagUpdateOne
- func (c *TagClient) Use(hooks ...Hook)
- type TagCreate
- func (tc *TagCreate) AddJobIDs(ids ...string) *TagCreate
- func (tc *TagCreate) AddJobs(j ...*Job) *TagCreate
- func (tc *TagCreate) Exec(ctx context.Context) error
- func (c *TagCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tc *TagCreate) ExecX(ctx context.Context)
- func (tc *TagCreate) Mutation() *TagMutation
- func (c *TagCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tc *TagCreate) Save(ctx context.Context) (*Tag, error)
- func (tc *TagCreate) SaveX(ctx context.Context) *Tag
- func (tc *TagCreate) SetName(s string) *TagCreate
- type TagCreateBulk
- func (tcb *TagCreateBulk) Exec(ctx context.Context) error
- func (c *TagCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tcb *TagCreateBulk) ExecX(ctx context.Context)
- func (c *TagCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tcb *TagCreateBulk) Save(ctx context.Context) ([]*Tag, error)
- func (tcb *TagCreateBulk) SaveX(ctx context.Context) []*Tag
- type TagDelete
- func (td *TagDelete) Exec(ctx context.Context) (int, error)
- func (c *TagDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (td *TagDelete) ExecX(ctx context.Context) int
- func (c *TagDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (td *TagDelete) Where(ps ...predicate.Tag) *TagDelete
- type TagDeleteOne
- type TagEdges
- type TagGroupBy
- func (tgb *TagGroupBy) Aggregate(fns ...AggregateFunc) *TagGroupBy
- func (s *TagGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TagGroupBy) BoolX(ctx context.Context) bool
- func (s *TagGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TagGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TagGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TagGroupBy) Float64X(ctx context.Context) float64
- func (s *TagGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TagGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TagGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TagGroupBy) IntX(ctx context.Context) int
- func (s *TagGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TagGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TagGroupBy) Scan(ctx context.Context, v any) error
- func (s *TagGroupBy) ScanX(ctx context.Context, v any)
- func (s *TagGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TagGroupBy) StringX(ctx context.Context) string
- func (s *TagGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TagGroupBy) StringsX(ctx context.Context) []string
- type TagMutation
- func (m *TagMutation) AddField(name string, value ent.Value) error
- func (m *TagMutation) AddJobIDs(ids ...string)
- func (m *TagMutation) AddedEdges() []string
- func (m *TagMutation) AddedField(name string) (ent.Value, bool)
- func (m *TagMutation) AddedFields() []string
- func (m *TagMutation) AddedIDs(name string) []ent.Value
- func (m *TagMutation) ClearEdge(name string) error
- func (m *TagMutation) ClearField(name string) error
- func (m *TagMutation) ClearJobs()
- func (m *TagMutation) ClearedEdges() []string
- func (m *TagMutation) ClearedFields() []string
- func (m TagMutation) Client() *Client
- func (m *TagMutation) EdgeCleared(name string) bool
- func (c *TagMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *TagMutation) Field(name string) (ent.Value, bool)
- func (m *TagMutation) FieldCleared(name string) bool
- func (m *TagMutation) Fields() []string
- func (m *TagMutation) ID() (id int, exists bool)
- func (m *TagMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TagMutation) JobsCleared() bool
- func (m *TagMutation) JobsIDs() (ids []string)
- func (m *TagMutation) Name() (r string, exists bool)
- func (m *TagMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TagMutation) OldName(ctx context.Context) (v string, err error)
- func (m *TagMutation) Op() Op
- func (c *TagMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *TagMutation) RemoveJobIDs(ids ...string)
- func (m *TagMutation) RemovedEdges() []string
- func (m *TagMutation) RemovedIDs(name string) []ent.Value
- func (m *TagMutation) RemovedJobsIDs() (ids []string)
- func (m *TagMutation) ResetEdge(name string) error
- func (m *TagMutation) ResetField(name string) error
- func (m *TagMutation) ResetJobs()
- func (m *TagMutation) ResetName()
- func (m *TagMutation) SetField(name string, value ent.Value) error
- func (m *TagMutation) SetName(s string)
- func (m *TagMutation) SetOp(op Op)
- func (m TagMutation) Tx() (*Tx, error)
- func (m *TagMutation) Type() string
- func (m *TagMutation) Where(ps ...predicate.Tag)
- func (m *TagMutation) WhereP(ps ...func(*sql.Selector))
- type TagQuery
- func (tq *TagQuery) Aggregate(fns ...AggregateFunc) *TagSelect
- func (tq *TagQuery) All(ctx context.Context) ([]*Tag, error)
- func (tq *TagQuery) AllX(ctx context.Context) []*Tag
- func (tq *TagQuery) Clone() *TagQuery
- func (tq *TagQuery) Count(ctx context.Context) (int, error)
- func (tq *TagQuery) CountX(ctx context.Context) int
- func (c *TagQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tq *TagQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TagQuery) ExistX(ctx context.Context) bool
- func (tq *TagQuery) First(ctx context.Context) (*Tag, error)
- func (tq *TagQuery) FirstID(ctx context.Context) (id int, err error)
- func (tq *TagQuery) FirstIDX(ctx context.Context) int
- func (tq *TagQuery) FirstX(ctx context.Context) *Tag
- func (tq *TagQuery) GroupBy(field string, fields ...string) *TagGroupBy
- func (tq *TagQuery) IDs(ctx context.Context) (ids []int, err error)
- func (tq *TagQuery) IDsX(ctx context.Context) []int
- func (tq *TagQuery) Limit(limit int) *TagQuery
- func (tq *TagQuery) Offset(offset int) *TagQuery
- func (tq *TagQuery) Only(ctx context.Context) (*Tag, error)
- func (tq *TagQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tq *TagQuery) OnlyIDX(ctx context.Context) int
- func (tq *TagQuery) OnlyX(ctx context.Context) *Tag
- func (tq *TagQuery) Order(o ...tag.OrderOption) *TagQuery
- func (c *TagQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tq *TagQuery) QueryJobs() *JobQuery
- func (tq *TagQuery) Select(fields ...string) *TagSelect
- func (tq *TagQuery) Unique(unique bool) *TagQuery
- func (tq *TagQuery) Where(ps ...predicate.Tag) *TagQuery
- func (tq *TagQuery) WithJobs(opts ...func(*JobQuery)) *TagQuery
- type TagSelect
- func (ts *TagSelect) Aggregate(fns ...AggregateFunc) *TagSelect
- func (s *TagSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TagSelect) BoolX(ctx context.Context) bool
- func (s *TagSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TagSelect) BoolsX(ctx context.Context) []bool
- func (c TagSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *TagSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TagSelect) Float64X(ctx context.Context) float64
- func (s *TagSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TagSelect) Float64sX(ctx context.Context) []float64
- func (s *TagSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TagSelect) IntX(ctx context.Context) int
- func (s *TagSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TagSelect) IntsX(ctx context.Context) []int
- func (c TagSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ts *TagSelect) Scan(ctx context.Context, v any) error
- func (s *TagSelect) ScanX(ctx context.Context, v any)
- func (s *TagSelect) String(ctx context.Context) (_ string, err error)
- func (s *TagSelect) StringX(ctx context.Context) string
- func (s *TagSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TagSelect) StringsX(ctx context.Context) []string
- type TagUpdate
- func (tu *TagUpdate) AddJobIDs(ids ...string) *TagUpdate
- func (tu *TagUpdate) AddJobs(j ...*Job) *TagUpdate
- func (tu *TagUpdate) ClearJobs() *TagUpdate
- func (tu *TagUpdate) Exec(ctx context.Context) error
- func (c *TagUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tu *TagUpdate) ExecX(ctx context.Context)
- func (tu *TagUpdate) Mutation() *TagMutation
- func (c *TagUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tu *TagUpdate) RemoveJobIDs(ids ...string) *TagUpdate
- func (tu *TagUpdate) RemoveJobs(j ...*Job) *TagUpdate
- func (tu *TagUpdate) Save(ctx context.Context) (int, error)
- func (tu *TagUpdate) SaveX(ctx context.Context) int
- func (tu *TagUpdate) SetName(s string) *TagUpdate
- func (tu *TagUpdate) SetNillableName(s *string) *TagUpdate
- func (tu *TagUpdate) Where(ps ...predicate.Tag) *TagUpdate
- type TagUpdateOne
- func (tuo *TagUpdateOne) AddJobIDs(ids ...string) *TagUpdateOne
- func (tuo *TagUpdateOne) AddJobs(j ...*Job) *TagUpdateOne
- func (tuo *TagUpdateOne) ClearJobs() *TagUpdateOne
- func (tuo *TagUpdateOne) Exec(ctx context.Context) error
- func (c *TagUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tuo *TagUpdateOne) ExecX(ctx context.Context)
- func (tuo *TagUpdateOne) Mutation() *TagMutation
- func (c *TagUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tuo *TagUpdateOne) RemoveJobIDs(ids ...string) *TagUpdateOne
- func (tuo *TagUpdateOne) RemoveJobs(j ...*Job) *TagUpdateOne
- func (tuo *TagUpdateOne) Save(ctx context.Context) (*Tag, error)
- func (tuo *TagUpdateOne) SaveX(ctx context.Context) *Tag
- func (tuo *TagUpdateOne) Select(field string, fields ...string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetName(s string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetNillableName(s *string) *TagUpdateOne
- func (tuo *TagUpdateOne) Where(ps ...predicate.Tag) *TagUpdateOne
- type Tags
- type TraverseFunc
- type Traverser
- type Tx
- func (tx *Tx) Client() *Client
- func (tx *Tx) Commit() error
- func (c *Tx) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tx *Tx) OnCommit(f CommitHook)
- func (tx *Tx) OnRollback(f RollbackHook)
- func (c *Tx) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tx *Tx) Rollback() error
- type ValidationError
- type Value
- type Workflow
- func (c *Workflow) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Workflow) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (w *Workflow) QueryJobs() *JobQuery
- func (w *Workflow) String() string
- func (w *Workflow) Unwrap() *Workflow
- func (w *Workflow) Update() *WorkflowUpdateOne
- func (w *Workflow) Value(name string) (ent.Value, error)
- type WorkflowClient
- func (c *WorkflowClient) Create() *WorkflowCreate
- func (c *WorkflowClient) CreateBulk(builders ...*WorkflowCreate) *WorkflowCreateBulk
- func (c *WorkflowClient) Delete() *WorkflowDelete
- func (c *WorkflowClient) DeleteOne(w *Workflow) *WorkflowDeleteOne
- func (c *WorkflowClient) DeleteOneID(id int) *WorkflowDeleteOne
- func (c *WorkflowClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *WorkflowClient) Get(ctx context.Context, id int) (*Workflow, error)
- func (c *WorkflowClient) GetX(ctx context.Context, id int) *Workflow
- func (c *WorkflowClient) Hooks() []Hook
- func (c *WorkflowClient) Intercept(interceptors ...Interceptor)
- func (c *WorkflowClient) Interceptors() []Interceptor
- func (c *WorkflowClient) MapCreateBulk(slice any, setFunc func(*WorkflowCreate, int)) *WorkflowCreateBulk
- func (c *WorkflowClient) Query() *WorkflowQuery
- func (c *WorkflowClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *WorkflowClient) QueryJobs(w *Workflow) *JobQuery
- func (c *WorkflowClient) Update() *WorkflowUpdate
- func (c *WorkflowClient) UpdateOne(w *Workflow) *WorkflowUpdateOne
- func (c *WorkflowClient) UpdateOneID(id int) *WorkflowUpdateOne
- func (c *WorkflowClient) Use(hooks ...Hook)
- type WorkflowCreate
- func (wc *WorkflowCreate) AddJobIDs(ids ...string) *WorkflowCreate
- func (wc *WorkflowCreate) AddJobs(j ...*Job) *WorkflowCreate
- func (wc *WorkflowCreate) Exec(ctx context.Context) error
- func (c *WorkflowCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (wc *WorkflowCreate) ExecX(ctx context.Context)
- func (wc *WorkflowCreate) Mutation() *WorkflowMutation
- func (c *WorkflowCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (wc *WorkflowCreate) Save(ctx context.Context) (*Workflow, error)
- func (wc *WorkflowCreate) SaveX(ctx context.Context) *Workflow
- func (wc *WorkflowCreate) SetDescription(s string) *WorkflowCreate
- func (wc *WorkflowCreate) SetGroups(m []*model.Group) *WorkflowCreate
- func (wc *WorkflowCreate) SetName(s string) *WorkflowCreate
- func (wc *WorkflowCreate) SetNillableDescription(s *string) *WorkflowCreate
- func (wc *WorkflowCreate) SetStates(m []*model.State) *WorkflowCreate
- func (wc *WorkflowCreate) SetTransitions(m []*model.Transition) *WorkflowCreate
- type WorkflowCreateBulk
- func (wcb *WorkflowCreateBulk) Exec(ctx context.Context) error
- func (c *WorkflowCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (wcb *WorkflowCreateBulk) ExecX(ctx context.Context)
- func (c *WorkflowCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (wcb *WorkflowCreateBulk) Save(ctx context.Context) ([]*Workflow, error)
- func (wcb *WorkflowCreateBulk) SaveX(ctx context.Context) []*Workflow
- type WorkflowDelete
- func (wd *WorkflowDelete) Exec(ctx context.Context) (int, error)
- func (c *WorkflowDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (wd *WorkflowDelete) ExecX(ctx context.Context) int
- func (c *WorkflowDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (wd *WorkflowDelete) Where(ps ...predicate.Workflow) *WorkflowDelete
- type WorkflowDeleteOne
- type WorkflowEdges
- type WorkflowGroupBy
- func (wgb *WorkflowGroupBy) Aggregate(fns ...AggregateFunc) *WorkflowGroupBy
- func (s *WorkflowGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *WorkflowGroupBy) BoolX(ctx context.Context) bool
- func (s *WorkflowGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *WorkflowGroupBy) BoolsX(ctx context.Context) []bool
- func (s *WorkflowGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *WorkflowGroupBy) Float64X(ctx context.Context) float64
- func (s *WorkflowGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *WorkflowGroupBy) Float64sX(ctx context.Context) []float64
- func (s *WorkflowGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *WorkflowGroupBy) IntX(ctx context.Context) int
- func (s *WorkflowGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *WorkflowGroupBy) IntsX(ctx context.Context) []int
- func (wgb *WorkflowGroupBy) Scan(ctx context.Context, v any) error
- func (s *WorkflowGroupBy) ScanX(ctx context.Context, v any)
- func (s *WorkflowGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *WorkflowGroupBy) StringX(ctx context.Context) string
- func (s *WorkflowGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *WorkflowGroupBy) StringsX(ctx context.Context) []string
- type WorkflowMutation
- func (m *WorkflowMutation) AddField(name string, value ent.Value) error
- func (m *WorkflowMutation) AddJobIDs(ids ...string)
- func (m *WorkflowMutation) AddedEdges() []string
- func (m *WorkflowMutation) AddedField(name string) (ent.Value, bool)
- func (m *WorkflowMutation) AddedFields() []string
- func (m *WorkflowMutation) AddedIDs(name string) []ent.Value
- func (m *WorkflowMutation) AppendGroups(value []*model.Group)
- func (m *WorkflowMutation) AppendStates(value []*model.State)
- func (m *WorkflowMutation) AppendTransitions(value []*model.Transition)
- func (m *WorkflowMutation) AppendedGroups() ([]*model.Group, bool)
- func (m *WorkflowMutation) AppendedStates() ([]*model.State, bool)
- func (m *WorkflowMutation) AppendedTransitions() ([]*model.Transition, bool)
- func (m *WorkflowMutation) ClearDescription()
- func (m *WorkflowMutation) ClearEdge(name string) error
- func (m *WorkflowMutation) ClearField(name string) error
- func (m *WorkflowMutation) ClearJobs()
- func (m *WorkflowMutation) ClearedEdges() []string
- func (m *WorkflowMutation) ClearedFields() []string
- func (m WorkflowMutation) Client() *Client
- func (m *WorkflowMutation) Description() (r string, exists bool)
- func (m *WorkflowMutation) DescriptionCleared() bool
- func (m *WorkflowMutation) EdgeCleared(name string) bool
- func (c *WorkflowMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *WorkflowMutation) Field(name string) (ent.Value, bool)
- func (m *WorkflowMutation) FieldCleared(name string) bool
- func (m *WorkflowMutation) Fields() []string
- func (m *WorkflowMutation) Groups() (r []*model.Group, exists bool)
- func (m *WorkflowMutation) ID() (id int, exists bool)
- func (m *WorkflowMutation) IDs(ctx context.Context) ([]int, error)
- func (m *WorkflowMutation) JobsCleared() bool
- func (m *WorkflowMutation) JobsIDs() (ids []string)
- func (m *WorkflowMutation) Name() (r string, exists bool)
- func (m *WorkflowMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *WorkflowMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *WorkflowMutation) OldGroups(ctx context.Context) (v []*model.Group, err error)
- func (m *WorkflowMutation) OldName(ctx context.Context) (v string, err error)
- func (m *WorkflowMutation) OldStates(ctx context.Context) (v []*model.State, err error)
- func (m *WorkflowMutation) OldTransitions(ctx context.Context) (v []*model.Transition, err error)
- func (m *WorkflowMutation) Op() Op
- func (c *WorkflowMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *WorkflowMutation) RemoveJobIDs(ids ...string)
- func (m *WorkflowMutation) RemovedEdges() []string
- func (m *WorkflowMutation) RemovedIDs(name string) []ent.Value
- func (m *WorkflowMutation) RemovedJobsIDs() (ids []string)
- func (m *WorkflowMutation) ResetDescription()
- func (m *WorkflowMutation) ResetEdge(name string) error
- func (m *WorkflowMutation) ResetField(name string) error
- func (m *WorkflowMutation) ResetGroups()
- func (m *WorkflowMutation) ResetJobs()
- func (m *WorkflowMutation) ResetName()
- func (m *WorkflowMutation) ResetStates()
- func (m *WorkflowMutation) ResetTransitions()
- func (m *WorkflowMutation) SetDescription(s string)
- func (m *WorkflowMutation) SetField(name string, value ent.Value) error
- func (m *WorkflowMutation) SetGroups(value []*model.Group)
- func (m *WorkflowMutation) SetName(s string)
- func (m *WorkflowMutation) SetOp(op Op)
- func (m *WorkflowMutation) SetStates(value []*model.State)
- func (m *WorkflowMutation) SetTransitions(value []*model.Transition)
- func (m *WorkflowMutation) States() (r []*model.State, exists bool)
- func (m *WorkflowMutation) Transitions() (r []*model.Transition, exists bool)
- func (m WorkflowMutation) Tx() (*Tx, error)
- func (m *WorkflowMutation) Type() string
- func (m *WorkflowMutation) Where(ps ...predicate.Workflow)
- func (m *WorkflowMutation) WhereP(ps ...func(*sql.Selector))
- type WorkflowQuery
- func (wq *WorkflowQuery) Aggregate(fns ...AggregateFunc) *WorkflowSelect
- func (wq *WorkflowQuery) All(ctx context.Context) ([]*Workflow, error)
- func (wq *WorkflowQuery) AllX(ctx context.Context) []*Workflow
- func (wq *WorkflowQuery) Clone() *WorkflowQuery
- func (wq *WorkflowQuery) Count(ctx context.Context) (int, error)
- func (wq *WorkflowQuery) CountX(ctx context.Context) int
- func (c *WorkflowQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (wq *WorkflowQuery) Exist(ctx context.Context) (bool, error)
- func (wq *WorkflowQuery) ExistX(ctx context.Context) bool
- func (wq *WorkflowQuery) First(ctx context.Context) (*Workflow, error)
- func (wq *WorkflowQuery) FirstID(ctx context.Context) (id int, err error)
- func (wq *WorkflowQuery) FirstIDX(ctx context.Context) int
- func (wq *WorkflowQuery) FirstX(ctx context.Context) *Workflow
- func (wq *WorkflowQuery) GroupBy(field string, fields ...string) *WorkflowGroupBy
- func (wq *WorkflowQuery) IDs(ctx context.Context) (ids []int, err error)
- func (wq *WorkflowQuery) IDsX(ctx context.Context) []int
- func (wq *WorkflowQuery) Limit(limit int) *WorkflowQuery
- func (wq *WorkflowQuery) Offset(offset int) *WorkflowQuery
- func (wq *WorkflowQuery) Only(ctx context.Context) (*Workflow, error)
- func (wq *WorkflowQuery) OnlyID(ctx context.Context) (id int, err error)
- func (wq *WorkflowQuery) OnlyIDX(ctx context.Context) int
- func (wq *WorkflowQuery) OnlyX(ctx context.Context) *Workflow
- func (wq *WorkflowQuery) Order(o ...workflow.OrderOption) *WorkflowQuery
- func (c *WorkflowQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (wq *WorkflowQuery) QueryJobs() *JobQuery
- func (wq *WorkflowQuery) Select(fields ...string) *WorkflowSelect
- func (wq *WorkflowQuery) Unique(unique bool) *WorkflowQuery
- func (wq *WorkflowQuery) Where(ps ...predicate.Workflow) *WorkflowQuery
- func (wq *WorkflowQuery) WithJobs(opts ...func(*JobQuery)) *WorkflowQuery
- type WorkflowSelect
- func (ws *WorkflowSelect) Aggregate(fns ...AggregateFunc) *WorkflowSelect
- func (s *WorkflowSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *WorkflowSelect) BoolX(ctx context.Context) bool
- func (s *WorkflowSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *WorkflowSelect) BoolsX(ctx context.Context) []bool
- func (c WorkflowSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *WorkflowSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *WorkflowSelect) Float64X(ctx context.Context) float64
- func (s *WorkflowSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *WorkflowSelect) Float64sX(ctx context.Context) []float64
- func (s *WorkflowSelect) Int(ctx context.Context) (_ int, err error)
- func (s *WorkflowSelect) IntX(ctx context.Context) int
- func (s *WorkflowSelect) Ints(ctx context.Context) ([]int, error)
- func (s *WorkflowSelect) IntsX(ctx context.Context) []int
- func (c WorkflowSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ws *WorkflowSelect) Scan(ctx context.Context, v any) error
- func (s *WorkflowSelect) ScanX(ctx context.Context, v any)
- func (s *WorkflowSelect) String(ctx context.Context) (_ string, err error)
- func (s *WorkflowSelect) StringX(ctx context.Context) string
- func (s *WorkflowSelect) Strings(ctx context.Context) ([]string, error)
- func (s *WorkflowSelect) StringsX(ctx context.Context) []string
- type WorkflowUpdate
- func (wu *WorkflowUpdate) AddJobIDs(ids ...string) *WorkflowUpdate
- func (wu *WorkflowUpdate) AddJobs(j ...*Job) *WorkflowUpdate
- func (wu *WorkflowUpdate) AppendGroups(m []*model.Group) *WorkflowUpdate
- func (wu *WorkflowUpdate) AppendStates(m []*model.State) *WorkflowUpdate
- func (wu *WorkflowUpdate) AppendTransitions(m []*model.Transition) *WorkflowUpdate
- func (wu *WorkflowUpdate) ClearDescription() *WorkflowUpdate
- func (wu *WorkflowUpdate) ClearJobs() *WorkflowUpdate
- func (wu *WorkflowUpdate) Exec(ctx context.Context) error
- func (c *WorkflowUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (wu *WorkflowUpdate) ExecX(ctx context.Context)
- func (wu *WorkflowUpdate) Mutation() *WorkflowMutation
- func (c *WorkflowUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (wu *WorkflowUpdate) RemoveJobIDs(ids ...string) *WorkflowUpdate
- func (wu *WorkflowUpdate) RemoveJobs(j ...*Job) *WorkflowUpdate
- func (wu *WorkflowUpdate) Save(ctx context.Context) (int, error)
- func (wu *WorkflowUpdate) SaveX(ctx context.Context) int
- func (wu *WorkflowUpdate) SetDescription(s string) *WorkflowUpdate
- func (wu *WorkflowUpdate) SetGroups(m []*model.Group) *WorkflowUpdate
- func (wu *WorkflowUpdate) SetName(s string) *WorkflowUpdate
- func (wu *WorkflowUpdate) SetNillableDescription(s *string) *WorkflowUpdate
- func (wu *WorkflowUpdate) SetNillableName(s *string) *WorkflowUpdate
- func (wu *WorkflowUpdate) SetStates(m []*model.State) *WorkflowUpdate
- func (wu *WorkflowUpdate) SetTransitions(m []*model.Transition) *WorkflowUpdate
- func (wu *WorkflowUpdate) Where(ps ...predicate.Workflow) *WorkflowUpdate
- type WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) AddJobIDs(ids ...string) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) AddJobs(j ...*Job) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) AppendGroups(m []*model.Group) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) AppendStates(m []*model.State) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) AppendTransitions(m []*model.Transition) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) ClearDescription() *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) ClearJobs() *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) Exec(ctx context.Context) error
- func (c *WorkflowUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (wuo *WorkflowUpdateOne) ExecX(ctx context.Context)
- func (wuo *WorkflowUpdateOne) Mutation() *WorkflowMutation
- func (c *WorkflowUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (wuo *WorkflowUpdateOne) RemoveJobIDs(ids ...string) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) RemoveJobs(j ...*Job) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) Save(ctx context.Context) (*Workflow, error)
- func (wuo *WorkflowUpdateOne) SaveX(ctx context.Context) *Workflow
- func (wuo *WorkflowUpdateOne) Select(field string, fields ...string) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) SetDescription(s string) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) SetGroups(m []*model.Group) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) SetName(s string) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) SetNillableDescription(s *string) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) SetNillableName(s *string) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) SetStates(m []*model.State) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) SetTransitions(m []*model.Transition) *WorkflowUpdateOne
- func (wuo *WorkflowUpdateOne) Where(ps ...predicate.Workflow) *WorkflowUpdateOne
- type Workflows
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeHistory = "History" TypeJob = "Job" TypeTag = "Tag" TypeWorkflow = "Workflow" )
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 // History is the client for interacting with the History builders. History *HistoryClient // Job is the client for interacting with the Job builders. Job *JobClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // Workflow is the client for interacting with the Workflow builders. Workflow *WorkflowClient // 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(). History. Query(). Count(ctx)
func (*Client) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
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) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
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 History ¶
type History struct { // ID of the ent. ID int `json:"id,omitempty"` // modification time Mtime time.Time `json:"mtime,omitempty"` // Status holds the value of the "status" field. Status model.JobStatus `json:"status,omitempty"` // Definition holds the value of the "definition" field. Definition map[string]interface{} `json:"definition,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the HistoryQuery when eager-loading is set. Edges HistoryEdges `json:"edges"` // contains filtered or unexported fields }
History is the model entity for the History schema.
func (*History) ExecContext ¶
func (c *History) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*History) QueryContext ¶
func (c *History) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*History) Unwrap ¶
Unwrap unwraps the History 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 (*History) Update ¶
func (h *History) Update() *HistoryUpdateOne
Update returns a builder for updating this History. Note that you need to call History.Unwrap() before calling this method if this History was returned from a transaction, and the transaction was committed or rolled back.
type HistoryClient ¶
type HistoryClient struct {
// contains filtered or unexported fields
}
HistoryClient is a client for the History schema.
func NewHistoryClient ¶
func NewHistoryClient(c config) *HistoryClient
NewHistoryClient returns a client for the History from the given config.
func (*HistoryClient) Create ¶
func (c *HistoryClient) Create() *HistoryCreate
Create returns a builder for creating a History entity.
func (*HistoryClient) CreateBulk ¶
func (c *HistoryClient) CreateBulk(builders ...*HistoryCreate) *HistoryCreateBulk
CreateBulk returns a builder for creating a bulk of History entities.
func (*HistoryClient) Delete ¶
func (c *HistoryClient) Delete() *HistoryDelete
Delete returns a delete builder for History.
func (*HistoryClient) DeleteOne ¶
func (c *HistoryClient) DeleteOne(h *History) *HistoryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*HistoryClient) DeleteOneID ¶
func (c *HistoryClient) DeleteOneID(id int) *HistoryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*HistoryClient) ExecContext ¶
func (c *HistoryClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*HistoryClient) GetX ¶
func (c *HistoryClient) GetX(ctx context.Context, id int) *History
GetX is like Get, but panics if an error occurs.
func (*HistoryClient) Hooks ¶
func (c *HistoryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*HistoryClient) Intercept ¶
func (c *HistoryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `history.Intercept(f(g(h())))`.
func (*HistoryClient) Interceptors ¶
func (c *HistoryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*HistoryClient) MapCreateBulk ¶ added in v0.2.0
func (c *HistoryClient) MapCreateBulk(slice any, setFunc func(*HistoryCreate, int)) *HistoryCreateBulk
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 (*HistoryClient) Query ¶
func (c *HistoryClient) Query() *HistoryQuery
Query returns a query builder for History.
func (*HistoryClient) QueryContext ¶
func (c *HistoryClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*HistoryClient) QueryJob ¶
func (c *HistoryClient) QueryJob(h *History) *JobQuery
QueryJob queries the job edge of a History.
func (*HistoryClient) Update ¶
func (c *HistoryClient) Update() *HistoryUpdate
Update returns an update builder for History.
func (*HistoryClient) UpdateOne ¶
func (c *HistoryClient) UpdateOne(h *History) *HistoryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*HistoryClient) UpdateOneID ¶
func (c *HistoryClient) UpdateOneID(id int) *HistoryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*HistoryClient) Use ¶
func (c *HistoryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `history.Hooks(f(g(h())))`.
type HistoryCreate ¶
type HistoryCreate struct {
// contains filtered or unexported fields
}
HistoryCreate is the builder for creating a History entity.
func (*HistoryCreate) Exec ¶
func (hc *HistoryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*HistoryCreate) ExecContext ¶
func (c *HistoryCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*HistoryCreate) ExecX ¶
func (hc *HistoryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HistoryCreate) Mutation ¶
func (hc *HistoryCreate) Mutation() *HistoryMutation
Mutation returns the HistoryMutation object of the builder.
func (*HistoryCreate) QueryContext ¶
func (c *HistoryCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*HistoryCreate) Save ¶
func (hc *HistoryCreate) Save(ctx context.Context) (*History, error)
Save creates the History in the database.
func (*HistoryCreate) SaveX ¶
func (hc *HistoryCreate) SaveX(ctx context.Context) *History
SaveX calls Save and panics if Save returns an error.
func (*HistoryCreate) SetDefinition ¶
func (hc *HistoryCreate) SetDefinition(m map[string]interface{}) *HistoryCreate
SetDefinition sets the "definition" field.
func (*HistoryCreate) SetJob ¶
func (hc *HistoryCreate) SetJob(j *Job) *HistoryCreate
SetJob sets the "job" edge to the Job entity.
func (*HistoryCreate) SetJobID ¶
func (hc *HistoryCreate) SetJobID(id string) *HistoryCreate
SetJobID sets the "job" edge to the Job entity by ID.
func (*HistoryCreate) SetMtime ¶
func (hc *HistoryCreate) SetMtime(t time.Time) *HistoryCreate
SetMtime sets the "mtime" field.
func (*HistoryCreate) SetNillableJobID ¶
func (hc *HistoryCreate) SetNillableJobID(id *string) *HistoryCreate
SetNillableJobID sets the "job" edge to the Job entity by ID if the given value is not nil.
func (*HistoryCreate) SetNillableStatus ¶
func (hc *HistoryCreate) SetNillableStatus(ms *model.JobStatus) *HistoryCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*HistoryCreate) SetStatus ¶
func (hc *HistoryCreate) SetStatus(ms model.JobStatus) *HistoryCreate
SetStatus sets the "status" field.
type HistoryCreateBulk ¶
type HistoryCreateBulk struct {
// contains filtered or unexported fields
}
HistoryCreateBulk is the builder for creating many History entities in bulk.
func (*HistoryCreateBulk) Exec ¶
func (hcb *HistoryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*HistoryCreateBulk) ExecContext ¶
func (c *HistoryCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*HistoryCreateBulk) ExecX ¶
func (hcb *HistoryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HistoryCreateBulk) QueryContext ¶
func (c *HistoryCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type HistoryDelete ¶
type HistoryDelete struct {
// contains filtered or unexported fields
}
HistoryDelete is the builder for deleting a History entity.
func (*HistoryDelete) Exec ¶
func (hd *HistoryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*HistoryDelete) ExecContext ¶
func (c *HistoryDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*HistoryDelete) ExecX ¶
func (hd *HistoryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*HistoryDelete) QueryContext ¶
func (c *HistoryDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*HistoryDelete) Where ¶
func (hd *HistoryDelete) Where(ps ...predicate.History) *HistoryDelete
Where appends a list predicates to the HistoryDelete builder.
type HistoryDeleteOne ¶
type HistoryDeleteOne struct {
// contains filtered or unexported fields
}
HistoryDeleteOne is the builder for deleting a single History entity.
func (*HistoryDeleteOne) Exec ¶
func (hdo *HistoryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*HistoryDeleteOne) ExecX ¶
func (hdo *HistoryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HistoryDeleteOne) Where ¶
func (hdo *HistoryDeleteOne) Where(ps ...predicate.History) *HistoryDeleteOne
Where appends a list predicates to the HistoryDelete builder.
type HistoryEdges ¶
type HistoryEdges struct { // Job holds the value of the job edge. Job *Job `json:"job,omitempty"` // contains filtered or unexported fields }
HistoryEdges holds the relations/edges for other nodes in the graph.
func (HistoryEdges) JobOrErr ¶
func (e HistoryEdges) JobOrErr() (*Job, error)
JobOrErr returns the Job value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type HistoryGroupBy ¶
type HistoryGroupBy struct {
// contains filtered or unexported fields
}
HistoryGroupBy is the group-by builder for History entities.
func (*HistoryGroupBy) Aggregate ¶
func (hgb *HistoryGroupBy) Aggregate(fns ...AggregateFunc) *HistoryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*HistoryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*HistoryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*HistoryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*HistoryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*HistoryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*HistoryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*HistoryGroupBy) Scan ¶
func (hgb *HistoryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*HistoryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type HistoryMutation ¶
type HistoryMutation struct {
// contains filtered or unexported fields
}
HistoryMutation represents an operation that mutates the History nodes in the graph.
func (*HistoryMutation) AddField ¶
func (m *HistoryMutation) 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 (*HistoryMutation) AddedEdges ¶
func (m *HistoryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*HistoryMutation) AddedField ¶
func (m *HistoryMutation) 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 (*HistoryMutation) AddedFields ¶
func (m *HistoryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*HistoryMutation) AddedIDs ¶
func (m *HistoryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*HistoryMutation) ClearDefinition ¶
func (m *HistoryMutation) ClearDefinition()
ClearDefinition clears the value of the "definition" field.
func (*HistoryMutation) ClearEdge ¶
func (m *HistoryMutation) 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 (*HistoryMutation) ClearField ¶
func (m *HistoryMutation) 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 (*HistoryMutation) ClearJob ¶
func (m *HistoryMutation) ClearJob()
ClearJob clears the "job" edge to the Job entity.
func (*HistoryMutation) ClearStatus ¶
func (m *HistoryMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*HistoryMutation) ClearedEdges ¶
func (m *HistoryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*HistoryMutation) ClearedFields ¶
func (m *HistoryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (HistoryMutation) Client ¶
func (m HistoryMutation) 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 (*HistoryMutation) Definition ¶
func (m *HistoryMutation) Definition() (r map[string]interface{}, exists bool)
Definition returns the value of the "definition" field in the mutation.
func (*HistoryMutation) DefinitionCleared ¶
func (m *HistoryMutation) DefinitionCleared() bool
DefinitionCleared returns if the "definition" field was cleared in this mutation.
func (*HistoryMutation) EdgeCleared ¶
func (m *HistoryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*HistoryMutation) ExecContext ¶
func (c *HistoryMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*HistoryMutation) Field ¶
func (m *HistoryMutation) 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 (*HistoryMutation) FieldCleared ¶
func (m *HistoryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*HistoryMutation) Fields ¶
func (m *HistoryMutation) 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 (*HistoryMutation) ID ¶
func (m *HistoryMutation) 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 (*HistoryMutation) IDs ¶
func (m *HistoryMutation) 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 (*HistoryMutation) JobCleared ¶
func (m *HistoryMutation) JobCleared() bool
JobCleared reports if the "job" edge to the Job entity was cleared.
func (*HistoryMutation) JobID ¶
func (m *HistoryMutation) JobID() (id string, exists bool)
JobID returns the "job" edge ID in the mutation.
func (*HistoryMutation) JobIDs ¶
func (m *HistoryMutation) JobIDs() (ids []string)
JobIDs returns the "job" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use JobID instead. It exists only for internal usage by the builders.
func (*HistoryMutation) Mtime ¶
func (m *HistoryMutation) Mtime() (r time.Time, exists bool)
Mtime returns the value of the "mtime" field in the mutation.
func (*HistoryMutation) OldDefinition ¶
func (m *HistoryMutation) OldDefinition(ctx context.Context) (v map[string]interface{}, err error)
OldDefinition returns the old "definition" field's value of the History entity. If the History 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 (*HistoryMutation) 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 (*HistoryMutation) OldMtime ¶
OldMtime returns the old "mtime" field's value of the History entity. If the History 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 (*HistoryMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the History entity. If the History 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 (*HistoryMutation) QueryContext ¶
func (c *HistoryMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*HistoryMutation) RemovedEdges ¶
func (m *HistoryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*HistoryMutation) RemovedIDs ¶
func (m *HistoryMutation) 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 (*HistoryMutation) ResetDefinition ¶
func (m *HistoryMutation) ResetDefinition()
ResetDefinition resets all changes to the "definition" field.
func (*HistoryMutation) ResetEdge ¶
func (m *HistoryMutation) 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 (*HistoryMutation) ResetField ¶
func (m *HistoryMutation) 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 (*HistoryMutation) ResetJob ¶
func (m *HistoryMutation) ResetJob()
ResetJob resets all changes to the "job" edge.
func (*HistoryMutation) ResetMtime ¶
func (m *HistoryMutation) ResetMtime()
ResetMtime resets all changes to the "mtime" field.
func (*HistoryMutation) ResetStatus ¶
func (m *HistoryMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*HistoryMutation) SetDefinition ¶
func (m *HistoryMutation) SetDefinition(value map[string]interface{})
SetDefinition sets the "definition" field.
func (*HistoryMutation) SetField ¶
func (m *HistoryMutation) 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 (*HistoryMutation) SetJobID ¶
func (m *HistoryMutation) SetJobID(id string)
SetJobID sets the "job" edge to the Job entity by id.
func (*HistoryMutation) SetMtime ¶
func (m *HistoryMutation) SetMtime(t time.Time)
SetMtime sets the "mtime" field.
func (*HistoryMutation) SetOp ¶
func (m *HistoryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*HistoryMutation) SetStatus ¶
func (m *HistoryMutation) SetStatus(ms model.JobStatus)
SetStatus sets the "status" field.
func (*HistoryMutation) Status ¶
func (m *HistoryMutation) Status() (r model.JobStatus, exists bool)
Status returns the value of the "status" field in the mutation.
func (*HistoryMutation) StatusCleared ¶
func (m *HistoryMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (HistoryMutation) Tx ¶
func (m HistoryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*HistoryMutation) Type ¶
func (m *HistoryMutation) Type() string
Type returns the node type of this mutation (History).
func (*HistoryMutation) Where ¶
func (m *HistoryMutation) Where(ps ...predicate.History)
Where appends a list predicates to the HistoryMutation builder.
func (*HistoryMutation) WhereP ¶
func (m *HistoryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the HistoryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type HistoryQuery ¶
type HistoryQuery struct {
// contains filtered or unexported fields
}
HistoryQuery is the builder for querying History entities.
func (*HistoryQuery) Aggregate ¶
func (hq *HistoryQuery) Aggregate(fns ...AggregateFunc) *HistorySelect
Aggregate returns a HistorySelect configured with the given aggregations.
func (*HistoryQuery) All ¶
func (hq *HistoryQuery) All(ctx context.Context) ([]*History, error)
All executes the query and returns a list of Histories.
func (*HistoryQuery) AllX ¶
func (hq *HistoryQuery) AllX(ctx context.Context) []*History
AllX is like All, but panics if an error occurs.
func (*HistoryQuery) Clone ¶
func (hq *HistoryQuery) Clone() *HistoryQuery
Clone returns a duplicate of the HistoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*HistoryQuery) Count ¶
func (hq *HistoryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*HistoryQuery) CountX ¶
func (hq *HistoryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*HistoryQuery) ExecContext ¶
func (c *HistoryQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*HistoryQuery) Exist ¶
func (hq *HistoryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*HistoryQuery) ExistX ¶
func (hq *HistoryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*HistoryQuery) First ¶
func (hq *HistoryQuery) First(ctx context.Context) (*History, error)
First returns the first History entity from the query. Returns a *NotFoundError when no History was found.
func (*HistoryQuery) FirstID ¶
func (hq *HistoryQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first History ID from the query. Returns a *NotFoundError when no History ID was found.
func (*HistoryQuery) FirstIDX ¶
func (hq *HistoryQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*HistoryQuery) FirstX ¶
func (hq *HistoryQuery) FirstX(ctx context.Context) *History
FirstX is like First, but panics if an error occurs.
func (*HistoryQuery) GroupBy ¶
func (hq *HistoryQuery) GroupBy(field string, fields ...string) *HistoryGroupBy
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 { Mtime time.Time `json:"mtime,omitempty"` Count int `json:"count,omitempty"` } client.History.Query(). GroupBy(history.FieldMtime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*HistoryQuery) IDs ¶
func (hq *HistoryQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of History IDs.
func (*HistoryQuery) IDsX ¶
func (hq *HistoryQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*HistoryQuery) Limit ¶
func (hq *HistoryQuery) Limit(limit int) *HistoryQuery
Limit the number of records to be returned by this query.
func (*HistoryQuery) Offset ¶
func (hq *HistoryQuery) Offset(offset int) *HistoryQuery
Offset to start from.
func (*HistoryQuery) Only ¶
func (hq *HistoryQuery) Only(ctx context.Context) (*History, error)
Only returns a single History entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one History entity is found. Returns a *NotFoundError when no History entities are found.
func (*HistoryQuery) OnlyID ¶
func (hq *HistoryQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only History ID in the query. Returns a *NotSingularError when more than one History ID is found. Returns a *NotFoundError when no entities are found.
func (*HistoryQuery) OnlyIDX ¶
func (hq *HistoryQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*HistoryQuery) OnlyX ¶
func (hq *HistoryQuery) OnlyX(ctx context.Context) *History
OnlyX is like Only, but panics if an error occurs.
func (*HistoryQuery) Order ¶
func (hq *HistoryQuery) Order(o ...history.OrderOption) *HistoryQuery
Order specifies how the records should be ordered.
func (*HistoryQuery) QueryContext ¶
func (c *HistoryQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*HistoryQuery) QueryJob ¶
func (hq *HistoryQuery) QueryJob() *JobQuery
QueryJob chains the current query on the "job" edge.
func (*HistoryQuery) Select ¶
func (hq *HistoryQuery) Select(fields ...string) *HistorySelect
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 { Mtime time.Time `json:"mtime,omitempty"` } client.History.Query(). Select(history.FieldMtime). Scan(ctx, &v)
func (*HistoryQuery) Unique ¶
func (hq *HistoryQuery) Unique(unique bool) *HistoryQuery
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 (*HistoryQuery) Where ¶
func (hq *HistoryQuery) Where(ps ...predicate.History) *HistoryQuery
Where adds a new predicate for the HistoryQuery builder.
func (*HistoryQuery) WithJob ¶
func (hq *HistoryQuery) WithJob(opts ...func(*JobQuery)) *HistoryQuery
WithJob tells the query-builder to eager-load the nodes that are connected to the "job" edge. The optional arguments are used to configure the query builder of the edge.
type HistorySelect ¶
type HistorySelect struct { *HistoryQuery // contains filtered or unexported fields }
HistorySelect is the builder for selecting fields of History entities.
func (*HistorySelect) Aggregate ¶
func (hs *HistorySelect) Aggregate(fns ...AggregateFunc) *HistorySelect
Aggregate adds the given aggregation functions to the selector query.
func (*HistorySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*HistorySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (HistorySelect) ExecContext ¶
func (c HistorySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*HistorySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*HistorySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*HistorySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*HistorySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (HistorySelect) QueryContext ¶
func (c HistorySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*HistorySelect) Scan ¶
func (hs *HistorySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*HistorySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type HistoryUpdate ¶
type HistoryUpdate struct {
// contains filtered or unexported fields
}
HistoryUpdate is the builder for updating History entities.
func (*HistoryUpdate) ClearDefinition ¶
func (hu *HistoryUpdate) ClearDefinition() *HistoryUpdate
ClearDefinition clears the value of the "definition" field.
func (*HistoryUpdate) ClearJob ¶
func (hu *HistoryUpdate) ClearJob() *HistoryUpdate
ClearJob clears the "job" edge to the Job entity.
func (*HistoryUpdate) ClearStatus ¶
func (hu *HistoryUpdate) ClearStatus() *HistoryUpdate
ClearStatus clears the value of the "status" field.
func (*HistoryUpdate) Exec ¶
func (hu *HistoryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*HistoryUpdate) ExecContext ¶
func (c *HistoryUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*HistoryUpdate) ExecX ¶
func (hu *HistoryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HistoryUpdate) Mutation ¶
func (hu *HistoryUpdate) Mutation() *HistoryMutation
Mutation returns the HistoryMutation object of the builder.
func (*HistoryUpdate) QueryContext ¶
func (c *HistoryUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*HistoryUpdate) Save ¶
func (hu *HistoryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*HistoryUpdate) SaveX ¶
func (hu *HistoryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*HistoryUpdate) SetDefinition ¶
func (hu *HistoryUpdate) SetDefinition(m map[string]interface{}) *HistoryUpdate
SetDefinition sets the "definition" field.
func (*HistoryUpdate) SetJob ¶
func (hu *HistoryUpdate) SetJob(j *Job) *HistoryUpdate
SetJob sets the "job" edge to the Job entity.
func (*HistoryUpdate) SetJobID ¶
func (hu *HistoryUpdate) SetJobID(id string) *HistoryUpdate
SetJobID sets the "job" edge to the Job entity by ID.
func (*HistoryUpdate) SetMtime ¶
func (hu *HistoryUpdate) SetMtime(t time.Time) *HistoryUpdate
SetMtime sets the "mtime" field.
func (*HistoryUpdate) SetNillableJobID ¶
func (hu *HistoryUpdate) SetNillableJobID(id *string) *HistoryUpdate
SetNillableJobID sets the "job" edge to the Job entity by ID if the given value is not nil.
func (*HistoryUpdate) SetNillableMtime ¶ added in v0.2.0
func (hu *HistoryUpdate) SetNillableMtime(t *time.Time) *HistoryUpdate
SetNillableMtime sets the "mtime" field if the given value is not nil.
func (*HistoryUpdate) SetNillableStatus ¶
func (hu *HistoryUpdate) SetNillableStatus(ms *model.JobStatus) *HistoryUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*HistoryUpdate) SetStatus ¶
func (hu *HistoryUpdate) SetStatus(ms model.JobStatus) *HistoryUpdate
SetStatus sets the "status" field.
func (*HistoryUpdate) Where ¶
func (hu *HistoryUpdate) Where(ps ...predicate.History) *HistoryUpdate
Where appends a list predicates to the HistoryUpdate builder.
type HistoryUpdateOne ¶
type HistoryUpdateOne struct {
// contains filtered or unexported fields
}
HistoryUpdateOne is the builder for updating a single History entity.
func (*HistoryUpdateOne) ClearDefinition ¶
func (huo *HistoryUpdateOne) ClearDefinition() *HistoryUpdateOne
ClearDefinition clears the value of the "definition" field.
func (*HistoryUpdateOne) ClearJob ¶
func (huo *HistoryUpdateOne) ClearJob() *HistoryUpdateOne
ClearJob clears the "job" edge to the Job entity.
func (*HistoryUpdateOne) ClearStatus ¶
func (huo *HistoryUpdateOne) ClearStatus() *HistoryUpdateOne
ClearStatus clears the value of the "status" field.
func (*HistoryUpdateOne) Exec ¶
func (huo *HistoryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*HistoryUpdateOne) ExecContext ¶
func (c *HistoryUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*HistoryUpdateOne) ExecX ¶
func (huo *HistoryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HistoryUpdateOne) Mutation ¶
func (huo *HistoryUpdateOne) Mutation() *HistoryMutation
Mutation returns the HistoryMutation object of the builder.
func (*HistoryUpdateOne) QueryContext ¶
func (c *HistoryUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*HistoryUpdateOne) Save ¶
func (huo *HistoryUpdateOne) Save(ctx context.Context) (*History, error)
Save executes the query and returns the updated History entity.
func (*HistoryUpdateOne) SaveX ¶
func (huo *HistoryUpdateOne) SaveX(ctx context.Context) *History
SaveX is like Save, but panics if an error occurs.
func (*HistoryUpdateOne) Select ¶
func (huo *HistoryUpdateOne) Select(field string, fields ...string) *HistoryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*HistoryUpdateOne) SetDefinition ¶
func (huo *HistoryUpdateOne) SetDefinition(m map[string]interface{}) *HistoryUpdateOne
SetDefinition sets the "definition" field.
func (*HistoryUpdateOne) SetJob ¶
func (huo *HistoryUpdateOne) SetJob(j *Job) *HistoryUpdateOne
SetJob sets the "job" edge to the Job entity.
func (*HistoryUpdateOne) SetJobID ¶
func (huo *HistoryUpdateOne) SetJobID(id string) *HistoryUpdateOne
SetJobID sets the "job" edge to the Job entity by ID.
func (*HistoryUpdateOne) SetMtime ¶
func (huo *HistoryUpdateOne) SetMtime(t time.Time) *HistoryUpdateOne
SetMtime sets the "mtime" field.
func (*HistoryUpdateOne) SetNillableJobID ¶
func (huo *HistoryUpdateOne) SetNillableJobID(id *string) *HistoryUpdateOne
SetNillableJobID sets the "job" edge to the Job entity by ID if the given value is not nil.
func (*HistoryUpdateOne) SetNillableMtime ¶ added in v0.2.0
func (huo *HistoryUpdateOne) SetNillableMtime(t *time.Time) *HistoryUpdateOne
SetNillableMtime sets the "mtime" field if the given value is not nil.
func (*HistoryUpdateOne) SetNillableStatus ¶
func (huo *HistoryUpdateOne) SetNillableStatus(ms *model.JobStatus) *HistoryUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*HistoryUpdateOne) SetStatus ¶
func (huo *HistoryUpdateOne) SetStatus(ms model.JobStatus) *HistoryUpdateOne
SetStatus sets the "status" field.
func (*HistoryUpdateOne) Where ¶
func (huo *HistoryUpdateOne) Where(ps ...predicate.History) *HistoryUpdateOne
Where appends a list predicates to the HistoryUpdate 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 Job ¶
type Job struct { // ID of the ent. ID string `json:"id,omitempty"` // start time Stime time.Time `json:"stime,omitempty"` // modification time Mtime time.Time `json:"mtime,omitempty"` // ClientID holds the value of the "client_id" field. ClientID string `json:"client_id,omitempty"` // Definition holds the value of the "definition" field. Definition map[string]interface{} `json:"definition,omitempty"` // Status holds the value of the "status" field. Status model.JobStatus `json:"status,omitempty"` // Group holds the value of the "group" field. Group string `json:"group,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the JobQuery when eager-loading is set. Edges JobEdges `json:"edges"` // contains filtered or unexported fields }
Job is the model entity for the Job schema.
func (*Job) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Job) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Job) QueryHistory ¶
func (j *Job) QueryHistory() *HistoryQuery
QueryHistory queries the "history" edge of the Job entity.
func (*Job) QueryWorkflow ¶
func (j *Job) QueryWorkflow() *WorkflowQuery
QueryWorkflow queries the "workflow" edge of the Job entity.
func (*Job) Unwrap ¶
Unwrap unwraps the Job 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 (*Job) Update ¶
func (j *Job) Update() *JobUpdateOne
Update returns a builder for updating this Job. Note that you need to call Job.Unwrap() before calling this method if this Job was returned from a transaction, and the transaction was committed or rolled back.
type JobClient ¶
type JobClient struct {
// contains filtered or unexported fields
}
JobClient is a client for the Job schema.
func NewJobClient ¶
func NewJobClient(c config) *JobClient
NewJobClient returns a client for the Job from the given config.
func (*JobClient) CreateBulk ¶
func (c *JobClient) CreateBulk(builders ...*JobCreate) *JobCreateBulk
CreateBulk returns a builder for creating a bulk of Job entities.
func (*JobClient) DeleteOne ¶
func (c *JobClient) DeleteOne(j *Job) *JobDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*JobClient) DeleteOneID ¶
func (c *JobClient) DeleteOneID(id string) *JobDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*JobClient) ExecContext ¶
func (c *JobClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*JobClient) Intercept ¶
func (c *JobClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `job.Intercept(f(g(h())))`.
func (*JobClient) Interceptors ¶
func (c *JobClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*JobClient) MapCreateBulk ¶ added in v0.2.0
func (c *JobClient) MapCreateBulk(slice any, setFunc func(*JobCreate, int)) *JobCreateBulk
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 (*JobClient) QueryContext ¶
func (c *JobClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*JobClient) QueryHistory ¶
func (c *JobClient) QueryHistory(j *Job) *HistoryQuery
QueryHistory queries the history edge of a Job.
func (*JobClient) QueryWorkflow ¶
func (c *JobClient) QueryWorkflow(j *Job) *WorkflowQuery
QueryWorkflow queries the workflow edge of a Job.
func (*JobClient) UpdateOne ¶
func (c *JobClient) UpdateOne(j *Job) *JobUpdateOne
UpdateOne returns an update builder for the given entity.
func (*JobClient) UpdateOneID ¶
func (c *JobClient) UpdateOneID(id string) *JobUpdateOne
UpdateOneID returns an update builder for the given id.
type JobCreate ¶
type JobCreate struct {
// contains filtered or unexported fields
}
JobCreate is the builder for creating a Job entity.
func (*JobCreate) AddHistory ¶
AddHistory adds the "history" edges to the History entity.
func (*JobCreate) AddHistoryIDs ¶
AddHistoryIDs adds the "history" edge to the History entity by IDs.
func (*JobCreate) ExecContext ¶
func (c *JobCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*JobCreate) Mutation ¶
func (jc *JobCreate) Mutation() *JobMutation
Mutation returns the JobMutation object of the builder.
func (*JobCreate) QueryContext ¶
func (c *JobCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*JobCreate) SetClientID ¶
SetClientID sets the "client_id" field.
func (*JobCreate) SetDefinition ¶
SetDefinition sets the "definition" field.
func (*JobCreate) SetNillableGroup ¶
SetNillableGroup sets the "group" field if the given value is not nil.
func (*JobCreate) SetNillableID ¶
SetNillableID sets the "id" field if the given value is not nil.
func (*JobCreate) SetNillableMtime ¶
SetNillableMtime sets the "mtime" field if the given value is not nil.
func (*JobCreate) SetNillableStime ¶
SetNillableStime sets the "stime" field if the given value is not nil.
func (*JobCreate) SetNillableWorkflowID ¶
SetNillableWorkflowID sets the "workflow" edge to the Workflow entity by ID if the given value is not nil.
func (*JobCreate) SetWorkflow ¶
SetWorkflow sets the "workflow" edge to the Workflow entity.
func (*JobCreate) SetWorkflowID ¶
SetWorkflowID sets the "workflow" edge to the Workflow entity by ID.
type JobCreateBulk ¶
type JobCreateBulk struct {
// contains filtered or unexported fields
}
JobCreateBulk is the builder for creating many Job entities in bulk.
func (*JobCreateBulk) Exec ¶
func (jcb *JobCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*JobCreateBulk) ExecContext ¶
func (c *JobCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*JobCreateBulk) ExecX ¶
func (jcb *JobCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*JobCreateBulk) QueryContext ¶
func (c *JobCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type JobDelete ¶
type JobDelete struct {
// contains filtered or unexported fields
}
JobDelete is the builder for deleting a Job entity.
func (*JobDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
func (*JobDelete) ExecContext ¶
func (c *JobDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
type JobDeleteOne ¶
type JobDeleteOne struct {
// contains filtered or unexported fields
}
JobDeleteOne is the builder for deleting a single Job entity.
func (*JobDeleteOne) Exec ¶
func (jdo *JobDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*JobDeleteOne) ExecX ¶
func (jdo *JobDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*JobDeleteOne) Where ¶
func (jdo *JobDeleteOne) Where(ps ...predicate.Job) *JobDeleteOne
Where appends a list predicates to the JobDelete builder.
type JobEdges ¶
type JobEdges struct { // Workflow holds the value of the workflow edge. Workflow *Workflow `json:"workflow,omitempty"` // History holds the value of the history edge. History []*History `json:"history,omitempty"` // Tags holds the value of the tags edge. Tags []*Tag `json:"tags,omitempty"` // contains filtered or unexported fields }
JobEdges holds the relations/edges for other nodes in the graph.
func (JobEdges) HistoryOrErr ¶
HistoryOrErr returns the History value or an error if the edge was not loaded in eager-loading.
func (JobEdges) TagsOrErr ¶
TagsOrErr returns the Tags value or an error if the edge was not loaded in eager-loading.
func (JobEdges) WorkflowOrErr ¶
WorkflowOrErr returns the Workflow value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type JobGroupBy ¶
type JobGroupBy struct {
// contains filtered or unexported fields
}
JobGroupBy is the group-by builder for Job entities.
func (*JobGroupBy) Aggregate ¶
func (jgb *JobGroupBy) Aggregate(fns ...AggregateFunc) *JobGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*JobGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*JobGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*JobGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*JobGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*JobGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*JobGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*JobGroupBy) Scan ¶
func (jgb *JobGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*JobGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type JobMutation ¶
type JobMutation struct {
// contains filtered or unexported fields
}
JobMutation represents an operation that mutates the Job nodes in the graph.
func (*JobMutation) AddField ¶
func (m *JobMutation) 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 (*JobMutation) AddHistoryIDs ¶
func (m *JobMutation) AddHistoryIDs(ids ...int)
AddHistoryIDs adds the "history" edge to the History entity by ids.
func (*JobMutation) AddTagIDs ¶
func (m *JobMutation) AddTagIDs(ids ...int)
AddTagIDs adds the "tags" edge to the Tag entity by ids.
func (*JobMutation) AddedEdges ¶
func (m *JobMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*JobMutation) AddedField ¶
func (m *JobMutation) 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 (*JobMutation) AddedFields ¶
func (m *JobMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*JobMutation) AddedIDs ¶
func (m *JobMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*JobMutation) ClearDefinition ¶
func (m *JobMutation) ClearDefinition()
ClearDefinition clears the value of the "definition" field.
func (*JobMutation) ClearEdge ¶
func (m *JobMutation) 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 (*JobMutation) ClearField ¶
func (m *JobMutation) 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 (*JobMutation) ClearGroup ¶
func (m *JobMutation) ClearGroup()
ClearGroup clears the value of the "group" field.
func (*JobMutation) ClearHistory ¶
func (m *JobMutation) ClearHistory()
ClearHistory clears the "history" edge to the History entity.
func (*JobMutation) ClearTags ¶
func (m *JobMutation) ClearTags()
ClearTags clears the "tags" edge to the Tag entity.
func (*JobMutation) ClearWorkflow ¶
func (m *JobMutation) ClearWorkflow()
ClearWorkflow clears the "workflow" edge to the Workflow entity.
func (*JobMutation) ClearedEdges ¶
func (m *JobMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*JobMutation) ClearedFields ¶
func (m *JobMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (JobMutation) Client ¶
func (m JobMutation) 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 (*JobMutation) ClientID ¶
func (m *JobMutation) ClientID() (r string, exists bool)
ClientID returns the value of the "client_id" field in the mutation.
func (*JobMutation) Definition ¶
func (m *JobMutation) Definition() (r map[string]interface{}, exists bool)
Definition returns the value of the "definition" field in the mutation.
func (*JobMutation) DefinitionCleared ¶
func (m *JobMutation) DefinitionCleared() bool
DefinitionCleared returns if the "definition" field was cleared in this mutation.
func (*JobMutation) EdgeCleared ¶
func (m *JobMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*JobMutation) ExecContext ¶
func (c *JobMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*JobMutation) Field ¶
func (m *JobMutation) 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 (*JobMutation) FieldCleared ¶
func (m *JobMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*JobMutation) Fields ¶
func (m *JobMutation) 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 (*JobMutation) Group ¶
func (m *JobMutation) Group() (r string, exists bool)
Group returns the value of the "group" field in the mutation.
func (*JobMutation) GroupCleared ¶
func (m *JobMutation) GroupCleared() bool
GroupCleared returns if the "group" field was cleared in this mutation.
func (*JobMutation) HistoryCleared ¶
func (m *JobMutation) HistoryCleared() bool
HistoryCleared reports if the "history" edge to the History entity was cleared.
func (*JobMutation) HistoryIDs ¶
func (m *JobMutation) HistoryIDs() (ids []int)
HistoryIDs returns the "history" edge IDs in the mutation.
func (*JobMutation) ID ¶
func (m *JobMutation) ID() (id string, 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 (*JobMutation) IDs ¶
func (m *JobMutation) IDs(ctx context.Context) ([]string, 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 (*JobMutation) Mtime ¶
func (m *JobMutation) Mtime() (r time.Time, exists bool)
Mtime returns the value of the "mtime" field in the mutation.
func (*JobMutation) OldClientID ¶
func (m *JobMutation) OldClientID(ctx context.Context) (v string, err error)
OldClientID returns the old "client_id" field's value of the Job entity. If the Job 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 (*JobMutation) OldDefinition ¶
func (m *JobMutation) OldDefinition(ctx context.Context) (v map[string]interface{}, err error)
OldDefinition returns the old "definition" field's value of the Job entity. If the Job 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 (*JobMutation) 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 (*JobMutation) OldGroup ¶
func (m *JobMutation) OldGroup(ctx context.Context) (v string, err error)
OldGroup returns the old "group" field's value of the Job entity. If the Job 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 (*JobMutation) OldMtime ¶
OldMtime returns the old "mtime" field's value of the Job entity. If the Job 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 (*JobMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the Job entity. If the Job 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 (*JobMutation) OldStime ¶
OldStime returns the old "stime" field's value of the Job entity. If the Job 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 (*JobMutation) QueryContext ¶
func (c *JobMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*JobMutation) RemoveHistoryIDs ¶
func (m *JobMutation) RemoveHistoryIDs(ids ...int)
RemoveHistoryIDs removes the "history" edge to the History entity by IDs.
func (*JobMutation) RemoveTagIDs ¶
func (m *JobMutation) RemoveTagIDs(ids ...int)
RemoveTagIDs removes the "tags" edge to the Tag entity by IDs.
func (*JobMutation) RemovedEdges ¶
func (m *JobMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*JobMutation) RemovedHistoryIDs ¶
func (m *JobMutation) RemovedHistoryIDs() (ids []int)
RemovedHistory returns the removed IDs of the "history" edge to the History entity.
func (*JobMutation) RemovedIDs ¶
func (m *JobMutation) 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 (*JobMutation) RemovedTagsIDs ¶
func (m *JobMutation) RemovedTagsIDs() (ids []int)
RemovedTags returns the removed IDs of the "tags" edge to the Tag entity.
func (*JobMutation) ResetClientID ¶
func (m *JobMutation) ResetClientID()
ResetClientID resets all changes to the "client_id" field.
func (*JobMutation) ResetDefinition ¶
func (m *JobMutation) ResetDefinition()
ResetDefinition resets all changes to the "definition" field.
func (*JobMutation) ResetEdge ¶
func (m *JobMutation) 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 (*JobMutation) ResetField ¶
func (m *JobMutation) 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 (*JobMutation) ResetGroup ¶
func (m *JobMutation) ResetGroup()
ResetGroup resets all changes to the "group" field.
func (*JobMutation) ResetHistory ¶
func (m *JobMutation) ResetHistory()
ResetHistory resets all changes to the "history" edge.
func (*JobMutation) ResetMtime ¶
func (m *JobMutation) ResetMtime()
ResetMtime resets all changes to the "mtime" field.
func (*JobMutation) ResetStatus ¶
func (m *JobMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*JobMutation) ResetStime ¶
func (m *JobMutation) ResetStime()
ResetStime resets all changes to the "stime" field.
func (*JobMutation) ResetTags ¶
func (m *JobMutation) ResetTags()
ResetTags resets all changes to the "tags" edge.
func (*JobMutation) ResetWorkflow ¶
func (m *JobMutation) ResetWorkflow()
ResetWorkflow resets all changes to the "workflow" edge.
func (*JobMutation) SetClientID ¶
func (m *JobMutation) SetClientID(s string)
SetClientID sets the "client_id" field.
func (*JobMutation) SetDefinition ¶
func (m *JobMutation) SetDefinition(value map[string]interface{})
SetDefinition sets the "definition" field.
func (*JobMutation) SetField ¶
func (m *JobMutation) 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 (*JobMutation) SetGroup ¶
func (m *JobMutation) SetGroup(s string)
SetGroup sets the "group" field.
func (*JobMutation) SetID ¶
func (m *JobMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Job entities.
func (*JobMutation) SetMtime ¶
func (m *JobMutation) SetMtime(t time.Time)
SetMtime sets the "mtime" field.
func (*JobMutation) SetOp ¶
func (m *JobMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*JobMutation) SetStatus ¶
func (m *JobMutation) SetStatus(ms model.JobStatus)
SetStatus sets the "status" field.
func (*JobMutation) SetStime ¶
func (m *JobMutation) SetStime(t time.Time)
SetStime sets the "stime" field.
func (*JobMutation) SetWorkflowID ¶
func (m *JobMutation) SetWorkflowID(id int)
SetWorkflowID sets the "workflow" edge to the Workflow entity by id.
func (*JobMutation) Status ¶
func (m *JobMutation) Status() (r model.JobStatus, exists bool)
Status returns the value of the "status" field in the mutation.
func (*JobMutation) Stime ¶
func (m *JobMutation) Stime() (r time.Time, exists bool)
Stime returns the value of the "stime" field in the mutation.
func (*JobMutation) TagsCleared ¶
func (m *JobMutation) TagsCleared() bool
TagsCleared reports if the "tags" edge to the Tag entity was cleared.
func (*JobMutation) TagsIDs ¶
func (m *JobMutation) TagsIDs() (ids []int)
TagsIDs returns the "tags" edge IDs in the mutation.
func (JobMutation) Tx ¶
func (m JobMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*JobMutation) Type ¶
func (m *JobMutation) Type() string
Type returns the node type of this mutation (Job).
func (*JobMutation) Where ¶
func (m *JobMutation) Where(ps ...predicate.Job)
Where appends a list predicates to the JobMutation builder.
func (*JobMutation) WhereP ¶
func (m *JobMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the JobMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*JobMutation) WorkflowCleared ¶
func (m *JobMutation) WorkflowCleared() bool
WorkflowCleared reports if the "workflow" edge to the Workflow entity was cleared.
func (*JobMutation) WorkflowID ¶
func (m *JobMutation) WorkflowID() (id int, exists bool)
WorkflowID returns the "workflow" edge ID in the mutation.
func (*JobMutation) WorkflowIDs ¶
func (m *JobMutation) WorkflowIDs() (ids []int)
WorkflowIDs returns the "workflow" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use WorkflowID instead. It exists only for internal usage by the builders.
type JobQuery ¶
type JobQuery struct {
// contains filtered or unexported fields
}
JobQuery is the builder for querying Job entities.
func (*JobQuery) Aggregate ¶
func (jq *JobQuery) Aggregate(fns ...AggregateFunc) *JobSelect
Aggregate returns a JobSelect configured with the given aggregations.
func (*JobQuery) Clone ¶
Clone returns a duplicate of the JobQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*JobQuery) ExecContext ¶
func (c *JobQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*JobQuery) First ¶
First returns the first Job entity from the query. Returns a *NotFoundError when no Job was found.
func (*JobQuery) FirstID ¶
FirstID returns the first Job ID from the query. Returns a *NotFoundError when no Job ID was found.
func (*JobQuery) GroupBy ¶
func (jq *JobQuery) GroupBy(field string, fields ...string) *JobGroupBy
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 { Stime time.Time `json:"stime,omitempty"` Count int `json:"count,omitempty"` } client.Job.Query(). GroupBy(job.FieldStime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*JobQuery) Only ¶
Only returns a single Job entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Job entity is found. Returns a *NotFoundError when no Job entities are found.
func (*JobQuery) OnlyID ¶
OnlyID is like Only, but returns the only Job ID in the query. Returns a *NotSingularError when more than one Job ID is found. Returns a *NotFoundError when no entities are found.
func (*JobQuery) Order ¶
func (jq *JobQuery) Order(o ...job.OrderOption) *JobQuery
Order specifies how the records should be ordered.
func (*JobQuery) QueryContext ¶
func (c *JobQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*JobQuery) QueryHistory ¶
func (jq *JobQuery) QueryHistory() *HistoryQuery
QueryHistory chains the current query on the "history" edge.
func (*JobQuery) QueryWorkflow ¶
func (jq *JobQuery) QueryWorkflow() *WorkflowQuery
QueryWorkflow chains the current query on the "workflow" edge.
func (*JobQuery) Select ¶
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 { Stime time.Time `json:"stime,omitempty"` } client.Job.Query(). Select(job.FieldStime). Scan(ctx, &v)
func (*JobQuery) Unique ¶
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 (*JobQuery) WithHistory ¶
func (jq *JobQuery) WithHistory(opts ...func(*HistoryQuery)) *JobQuery
WithHistory tells the query-builder to eager-load the nodes that are connected to the "history" edge. The optional arguments are used to configure the query builder of the edge.
func (*JobQuery) WithTags ¶
WithTags tells the query-builder to eager-load the nodes that are connected to the "tags" edge. The optional arguments are used to configure the query builder of the edge.
func (*JobQuery) WithWorkflow ¶
func (jq *JobQuery) WithWorkflow(opts ...func(*WorkflowQuery)) *JobQuery
WithWorkflow tells the query-builder to eager-load the nodes that are connected to the "workflow" edge. The optional arguments are used to configure the query builder of the edge.
type JobSelect ¶
type JobSelect struct { *JobQuery // contains filtered or unexported fields }
JobSelect is the builder for selecting fields of Job entities.
func (*JobSelect) Aggregate ¶
func (js *JobSelect) Aggregate(fns ...AggregateFunc) *JobSelect
Aggregate adds the given aggregation functions to the selector query.
func (*JobSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*JobSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (JobSelect) ExecContext ¶
func (c JobSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*JobSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*JobSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*JobSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*JobSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (JobSelect) QueryContext ¶
func (c JobSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*JobSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type JobUpdate ¶
type JobUpdate struct {
// contains filtered or unexported fields
}
JobUpdate is the builder for updating Job entities.
func (*JobUpdate) AddHistory ¶
AddHistory adds the "history" edges to the History entity.
func (*JobUpdate) AddHistoryIDs ¶
AddHistoryIDs adds the "history" edge to the History entity by IDs.
func (*JobUpdate) ClearDefinition ¶
ClearDefinition clears the value of the "definition" field.
func (*JobUpdate) ClearGroup ¶
ClearGroup clears the value of the "group" field.
func (*JobUpdate) ClearHistory ¶
ClearHistory clears all "history" edges to the History entity.
func (*JobUpdate) ClearWorkflow ¶
ClearWorkflow clears the "workflow" edge to the Workflow entity.
func (*JobUpdate) ExecContext ¶
func (c *JobUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*JobUpdate) Mutation ¶
func (ju *JobUpdate) Mutation() *JobMutation
Mutation returns the JobMutation object of the builder.
func (*JobUpdate) QueryContext ¶
func (c *JobUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*JobUpdate) RemoveHistory ¶
RemoveHistory removes "history" edges to History entities.
func (*JobUpdate) RemoveHistoryIDs ¶
RemoveHistoryIDs removes the "history" edge to History entities by IDs.
func (*JobUpdate) RemoveTagIDs ¶
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*JobUpdate) RemoveTags ¶
RemoveTags removes "tags" edges to Tag entities.
func (*JobUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*JobUpdate) SetClientID ¶
SetClientID sets the "client_id" field.
func (*JobUpdate) SetDefinition ¶
SetDefinition sets the "definition" field.
func (*JobUpdate) SetNillableClientID ¶ added in v0.2.0
SetNillableClientID sets the "client_id" field if the given value is not nil.
func (*JobUpdate) SetNillableGroup ¶
SetNillableGroup sets the "group" field if the given value is not nil.
func (*JobUpdate) SetNillableStatus ¶ added in v0.2.0
SetNillableStatus sets the "status" field if the given value is not nil.
func (*JobUpdate) SetNillableStime ¶
SetNillableStime sets the "stime" field if the given value is not nil.
func (*JobUpdate) SetNillableWorkflowID ¶
SetNillableWorkflowID sets the "workflow" edge to the Workflow entity by ID if the given value is not nil.
func (*JobUpdate) SetWorkflow ¶
SetWorkflow sets the "workflow" edge to the Workflow entity.
func (*JobUpdate) SetWorkflowID ¶
SetWorkflowID sets the "workflow" edge to the Workflow entity by ID.
type JobUpdateOne ¶
type JobUpdateOne struct {
// contains filtered or unexported fields
}
JobUpdateOne is the builder for updating a single Job entity.
func (*JobUpdateOne) AddHistory ¶
func (juo *JobUpdateOne) AddHistory(h ...*History) *JobUpdateOne
AddHistory adds the "history" edges to the History entity.
func (*JobUpdateOne) AddHistoryIDs ¶
func (juo *JobUpdateOne) AddHistoryIDs(ids ...int) *JobUpdateOne
AddHistoryIDs adds the "history" edge to the History entity by IDs.
func (*JobUpdateOne) AddTagIDs ¶
func (juo *JobUpdateOne) AddTagIDs(ids ...int) *JobUpdateOne
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*JobUpdateOne) AddTags ¶
func (juo *JobUpdateOne) AddTags(t ...*Tag) *JobUpdateOne
AddTags adds the "tags" edges to the Tag entity.
func (*JobUpdateOne) ClearDefinition ¶
func (juo *JobUpdateOne) ClearDefinition() *JobUpdateOne
ClearDefinition clears the value of the "definition" field.
func (*JobUpdateOne) ClearGroup ¶
func (juo *JobUpdateOne) ClearGroup() *JobUpdateOne
ClearGroup clears the value of the "group" field.
func (*JobUpdateOne) ClearHistory ¶
func (juo *JobUpdateOne) ClearHistory() *JobUpdateOne
ClearHistory clears all "history" edges to the History entity.
func (*JobUpdateOne) ClearTags ¶
func (juo *JobUpdateOne) ClearTags() *JobUpdateOne
ClearTags clears all "tags" edges to the Tag entity.
func (*JobUpdateOne) ClearWorkflow ¶
func (juo *JobUpdateOne) ClearWorkflow() *JobUpdateOne
ClearWorkflow clears the "workflow" edge to the Workflow entity.
func (*JobUpdateOne) Exec ¶
func (juo *JobUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*JobUpdateOne) ExecContext ¶
func (c *JobUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*JobUpdateOne) ExecX ¶
func (juo *JobUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*JobUpdateOne) Mutation ¶
func (juo *JobUpdateOne) Mutation() *JobMutation
Mutation returns the JobMutation object of the builder.
func (*JobUpdateOne) QueryContext ¶
func (c *JobUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*JobUpdateOne) RemoveHistory ¶
func (juo *JobUpdateOne) RemoveHistory(h ...*History) *JobUpdateOne
RemoveHistory removes "history" edges to History entities.
func (*JobUpdateOne) RemoveHistoryIDs ¶
func (juo *JobUpdateOne) RemoveHistoryIDs(ids ...int) *JobUpdateOne
RemoveHistoryIDs removes the "history" edge to History entities by IDs.
func (*JobUpdateOne) RemoveTagIDs ¶
func (juo *JobUpdateOne) RemoveTagIDs(ids ...int) *JobUpdateOne
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*JobUpdateOne) RemoveTags ¶
func (juo *JobUpdateOne) RemoveTags(t ...*Tag) *JobUpdateOne
RemoveTags removes "tags" edges to Tag entities.
func (*JobUpdateOne) Save ¶
func (juo *JobUpdateOne) Save(ctx context.Context) (*Job, error)
Save executes the query and returns the updated Job entity.
func (*JobUpdateOne) SaveX ¶
func (juo *JobUpdateOne) SaveX(ctx context.Context) *Job
SaveX is like Save, but panics if an error occurs.
func (*JobUpdateOne) Select ¶
func (juo *JobUpdateOne) Select(field string, fields ...string) *JobUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*JobUpdateOne) SetClientID ¶
func (juo *JobUpdateOne) SetClientID(s string) *JobUpdateOne
SetClientID sets the "client_id" field.
func (*JobUpdateOne) SetDefinition ¶
func (juo *JobUpdateOne) SetDefinition(m map[string]interface{}) *JobUpdateOne
SetDefinition sets the "definition" field.
func (*JobUpdateOne) SetGroup ¶
func (juo *JobUpdateOne) SetGroup(s string) *JobUpdateOne
SetGroup sets the "group" field.
func (*JobUpdateOne) SetMtime ¶
func (juo *JobUpdateOne) SetMtime(t time.Time) *JobUpdateOne
SetMtime sets the "mtime" field.
func (*JobUpdateOne) SetNillableClientID ¶ added in v0.2.0
func (juo *JobUpdateOne) SetNillableClientID(s *string) *JobUpdateOne
SetNillableClientID sets the "client_id" field if the given value is not nil.
func (*JobUpdateOne) SetNillableGroup ¶
func (juo *JobUpdateOne) SetNillableGroup(s *string) *JobUpdateOne
SetNillableGroup sets the "group" field if the given value is not nil.
func (*JobUpdateOne) SetNillableStatus ¶ added in v0.2.0
func (juo *JobUpdateOne) SetNillableStatus(ms *model.JobStatus) *JobUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*JobUpdateOne) SetNillableStime ¶
func (juo *JobUpdateOne) SetNillableStime(t *time.Time) *JobUpdateOne
SetNillableStime sets the "stime" field if the given value is not nil.
func (*JobUpdateOne) SetNillableWorkflowID ¶
func (juo *JobUpdateOne) SetNillableWorkflowID(id *int) *JobUpdateOne
SetNillableWorkflowID sets the "workflow" edge to the Workflow entity by ID if the given value is not nil.
func (*JobUpdateOne) SetStatus ¶
func (juo *JobUpdateOne) SetStatus(ms model.JobStatus) *JobUpdateOne
SetStatus sets the "status" field.
func (*JobUpdateOne) SetStime ¶
func (juo *JobUpdateOne) SetStime(t time.Time) *JobUpdateOne
SetStime sets the "stime" field.
func (*JobUpdateOne) SetWorkflow ¶
func (juo *JobUpdateOne) SetWorkflow(w *Workflow) *JobUpdateOne
SetWorkflow sets the "workflow" edge to the Workflow entity.
func (*JobUpdateOne) SetWorkflowID ¶
func (juo *JobUpdateOne) SetWorkflowID(id int) *JobUpdateOne
SetWorkflowID sets the "workflow" edge to the Workflow entity by ID.
func (*JobUpdateOne) Where ¶
func (juo *JobUpdateOne) Where(ps ...predicate.Job) *JobUpdateOne
Where appends a list predicates to the JobUpdate builder.
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 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 Tag ¶
type Tag struct { // ID of the ent. ID int `json:"id,omitempty"` // Name of the tag Name string `json:"name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TagQuery when eager-loading is set. Edges TagEdges `json:"edges"` // contains filtered or unexported fields }
Tag is the model entity for the Tag schema.
func (*Tag) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Tag) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Tag) Unwrap ¶
Unwrap unwraps the Tag 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 (*Tag) Update ¶
func (t *Tag) Update() *TagUpdateOne
Update returns a builder for updating this Tag. Note that you need to call Tag.Unwrap() before calling this method if this Tag was returned from a transaction, and the transaction was committed or rolled back.
type TagClient ¶
type TagClient struct {
// contains filtered or unexported fields
}
TagClient is a client for the Tag schema.
func NewTagClient ¶
func NewTagClient(c config) *TagClient
NewTagClient returns a client for the Tag from the given config.
func (*TagClient) CreateBulk ¶
func (c *TagClient) CreateBulk(builders ...*TagCreate) *TagCreateBulk
CreateBulk returns a builder for creating a bulk of Tag entities.
func (*TagClient) DeleteOne ¶
func (c *TagClient) DeleteOne(t *Tag) *TagDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TagClient) DeleteOneID ¶
func (c *TagClient) DeleteOneID(id int) *TagDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TagClient) ExecContext ¶
func (c *TagClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TagClient) Intercept ¶
func (c *TagClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tag.Intercept(f(g(h())))`.
func (*TagClient) Interceptors ¶
func (c *TagClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TagClient) MapCreateBulk ¶ added in v0.2.0
func (c *TagClient) MapCreateBulk(slice any, setFunc func(*TagCreate, int)) *TagCreateBulk
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 (*TagClient) QueryContext ¶
func (c *TagClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TagClient) UpdateOne ¶
func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TagClient) UpdateOneID ¶
func (c *TagClient) UpdateOneID(id int) *TagUpdateOne
UpdateOneID returns an update builder for the given id.
type TagCreate ¶
type TagCreate struct {
// contains filtered or unexported fields
}
TagCreate is the builder for creating a Tag entity.
func (*TagCreate) ExecContext ¶
func (c *TagCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TagCreate) Mutation ¶
func (tc *TagCreate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagCreate) QueryContext ¶
func (c *TagCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type TagCreateBulk ¶
type TagCreateBulk struct {
// contains filtered or unexported fields
}
TagCreateBulk is the builder for creating many Tag entities in bulk.
func (*TagCreateBulk) Exec ¶
func (tcb *TagCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TagCreateBulk) ExecContext ¶
func (c *TagCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TagCreateBulk) ExecX ¶
func (tcb *TagCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagCreateBulk) QueryContext ¶
func (c *TagCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type TagDelete ¶
type TagDelete struct {
// contains filtered or unexported fields
}
TagDelete is the builder for deleting a Tag entity.
func (*TagDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
func (*TagDelete) ExecContext ¶
func (c *TagDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
type TagDeleteOne ¶
type TagDeleteOne struct {
// contains filtered or unexported fields
}
TagDeleteOne is the builder for deleting a single Tag entity.
func (*TagDeleteOne) Exec ¶
func (tdo *TagDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TagDeleteOne) ExecX ¶
func (tdo *TagDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagDeleteOne) Where ¶
func (tdo *TagDeleteOne) Where(ps ...predicate.Tag) *TagDeleteOne
Where appends a list predicates to the TagDelete builder.
type TagEdges ¶
type TagEdges struct { // Jobs holds the value of the jobs edge. Jobs []*Job `json:"jobs,omitempty"` // contains filtered or unexported fields }
TagEdges holds the relations/edges for other nodes in the graph.
type TagGroupBy ¶
type TagGroupBy struct {
// contains filtered or unexported fields
}
TagGroupBy is the group-by builder for Tag entities.
func (*TagGroupBy) Aggregate ¶
func (tgb *TagGroupBy) Aggregate(fns ...AggregateFunc) *TagGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TagGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Scan ¶
func (tgb *TagGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TagGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TagMutation ¶
type TagMutation struct {
// contains filtered or unexported fields
}
TagMutation represents an operation that mutates the Tag nodes in the graph.
func (*TagMutation) AddField ¶
func (m *TagMutation) 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 (*TagMutation) AddJobIDs ¶
func (m *TagMutation) AddJobIDs(ids ...string)
AddJobIDs adds the "jobs" edge to the Job entity by ids.
func (*TagMutation) AddedEdges ¶
func (m *TagMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TagMutation) AddedField ¶
func (m *TagMutation) 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 (*TagMutation) AddedFields ¶
func (m *TagMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TagMutation) AddedIDs ¶
func (m *TagMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TagMutation) ClearEdge ¶
func (m *TagMutation) 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 (*TagMutation) ClearField ¶
func (m *TagMutation) 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 (*TagMutation) ClearJobs ¶
func (m *TagMutation) ClearJobs()
ClearJobs clears the "jobs" edge to the Job entity.
func (*TagMutation) ClearedEdges ¶
func (m *TagMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TagMutation) ClearedFields ¶
func (m *TagMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TagMutation) Client ¶
func (m TagMutation) 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 (*TagMutation) EdgeCleared ¶
func (m *TagMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TagMutation) ExecContext ¶
func (c *TagMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TagMutation) Field ¶
func (m *TagMutation) 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 (*TagMutation) FieldCleared ¶
func (m *TagMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TagMutation) Fields ¶
func (m *TagMutation) 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 (*TagMutation) ID ¶
func (m *TagMutation) 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 (*TagMutation) IDs ¶
func (m *TagMutation) 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 (*TagMutation) JobsCleared ¶
func (m *TagMutation) JobsCleared() bool
JobsCleared reports if the "jobs" edge to the Job entity was cleared.
func (*TagMutation) JobsIDs ¶
func (m *TagMutation) JobsIDs() (ids []string)
JobsIDs returns the "jobs" edge IDs in the mutation.
func (*TagMutation) Name ¶
func (m *TagMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*TagMutation) 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 (*TagMutation) OldName ¶
func (m *TagMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Tag entity. If the Tag 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 (*TagMutation) QueryContext ¶
func (c *TagMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TagMutation) RemoveJobIDs ¶
func (m *TagMutation) RemoveJobIDs(ids ...string)
RemoveJobIDs removes the "jobs" edge to the Job entity by IDs.
func (*TagMutation) RemovedEdges ¶
func (m *TagMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TagMutation) RemovedIDs ¶
func (m *TagMutation) 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 (*TagMutation) RemovedJobsIDs ¶
func (m *TagMutation) RemovedJobsIDs() (ids []string)
RemovedJobs returns the removed IDs of the "jobs" edge to the Job entity.
func (*TagMutation) ResetEdge ¶
func (m *TagMutation) 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 (*TagMutation) ResetField ¶
func (m *TagMutation) 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 (*TagMutation) ResetJobs ¶
func (m *TagMutation) ResetJobs()
ResetJobs resets all changes to the "jobs" edge.
func (*TagMutation) ResetName ¶
func (m *TagMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*TagMutation) SetField ¶
func (m *TagMutation) 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 (*TagMutation) SetName ¶
func (m *TagMutation) SetName(s string)
SetName sets the "name" field.
func (*TagMutation) SetOp ¶
func (m *TagMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (TagMutation) Tx ¶
func (m TagMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TagMutation) Type ¶
func (m *TagMutation) Type() string
Type returns the node type of this mutation (Tag).
func (*TagMutation) Where ¶
func (m *TagMutation) Where(ps ...predicate.Tag)
Where appends a list predicates to the TagMutation builder.
func (*TagMutation) WhereP ¶
func (m *TagMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TagMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TagQuery ¶
type TagQuery struct {
// contains filtered or unexported fields
}
TagQuery is the builder for querying Tag entities.
func (*TagQuery) Aggregate ¶
func (tq *TagQuery) Aggregate(fns ...AggregateFunc) *TagSelect
Aggregate returns a TagSelect configured with the given aggregations.
func (*TagQuery) Clone ¶
Clone returns a duplicate of the TagQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TagQuery) ExecContext ¶
func (c *TagQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TagQuery) First ¶
First returns the first Tag entity from the query. Returns a *NotFoundError when no Tag was found.
func (*TagQuery) FirstID ¶
FirstID returns the first Tag ID from the query. Returns a *NotFoundError when no Tag ID was found.
func (*TagQuery) GroupBy ¶
func (tq *TagQuery) GroupBy(field string, fields ...string) *TagGroupBy
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.Tag.Query(). GroupBy(tag.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TagQuery) Only ¶
Only returns a single Tag entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Tag entity is found. Returns a *NotFoundError when no Tag entities are found.
func (*TagQuery) OnlyID ¶
OnlyID is like Only, but returns the only Tag ID in the query. Returns a *NotSingularError when more than one Tag ID is found. Returns a *NotFoundError when no entities are found.
func (*TagQuery) Order ¶
func (tq *TagQuery) Order(o ...tag.OrderOption) *TagQuery
Order specifies how the records should be ordered.
func (*TagQuery) QueryContext ¶
func (c *TagQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TagQuery) Select ¶
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.Tag.Query(). Select(tag.FieldName). Scan(ctx, &v)
func (*TagQuery) Unique ¶
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.
type TagSelect ¶
type TagSelect struct { *TagQuery // contains filtered or unexported fields }
TagSelect is the builder for selecting fields of Tag entities.
func (*TagSelect) Aggregate ¶
func (ts *TagSelect) Aggregate(fns ...AggregateFunc) *TagSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TagSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TagSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (TagSelect) ExecContext ¶
func (c TagSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TagSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TagSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TagSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TagSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (TagSelect) QueryContext ¶
func (c TagSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TagSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TagUpdate ¶
type TagUpdate struct {
// contains filtered or unexported fields
}
TagUpdate is the builder for updating Tag entities.
func (*TagUpdate) ExecContext ¶
func (c *TagUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TagUpdate) Mutation ¶
func (tu *TagUpdate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdate) QueryContext ¶
func (c *TagUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TagUpdate) RemoveJobIDs ¶
RemoveJobIDs removes the "jobs" edge to Job entities by IDs.
func (*TagUpdate) RemoveJobs ¶
RemoveJobs removes "jobs" edges to Job entities.
func (*TagUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*TagUpdate) SetNillableName ¶ added in v0.2.0
SetNillableName sets the "name" field if the given value is not nil.
type TagUpdateOne ¶
type TagUpdateOne struct {
// contains filtered or unexported fields
}
TagUpdateOne is the builder for updating a single Tag entity.
func (*TagUpdateOne) AddJobIDs ¶
func (tuo *TagUpdateOne) AddJobIDs(ids ...string) *TagUpdateOne
AddJobIDs adds the "jobs" edge to the Job entity by IDs.
func (*TagUpdateOne) AddJobs ¶
func (tuo *TagUpdateOne) AddJobs(j ...*Job) *TagUpdateOne
AddJobs adds the "jobs" edges to the Job entity.
func (*TagUpdateOne) ClearJobs ¶
func (tuo *TagUpdateOne) ClearJobs() *TagUpdateOne
ClearJobs clears all "jobs" edges to the Job entity.
func (*TagUpdateOne) Exec ¶
func (tuo *TagUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TagUpdateOne) ExecContext ¶
func (c *TagUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TagUpdateOne) ExecX ¶
func (tuo *TagUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagUpdateOne) Mutation ¶
func (tuo *TagUpdateOne) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdateOne) QueryContext ¶
func (c *TagUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TagUpdateOne) RemoveJobIDs ¶
func (tuo *TagUpdateOne) RemoveJobIDs(ids ...string) *TagUpdateOne
RemoveJobIDs removes the "jobs" edge to Job entities by IDs.
func (*TagUpdateOne) RemoveJobs ¶
func (tuo *TagUpdateOne) RemoveJobs(j ...*Job) *TagUpdateOne
RemoveJobs removes "jobs" edges to Job entities.
func (*TagUpdateOne) Save ¶
func (tuo *TagUpdateOne) Save(ctx context.Context) (*Tag, error)
Save executes the query and returns the updated Tag entity.
func (*TagUpdateOne) SaveX ¶
func (tuo *TagUpdateOne) SaveX(ctx context.Context) *Tag
SaveX is like Save, but panics if an error occurs.
func (*TagUpdateOne) Select ¶
func (tuo *TagUpdateOne) Select(field string, fields ...string) *TagUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TagUpdateOne) SetName ¶
func (tuo *TagUpdateOne) SetName(s string) *TagUpdateOne
SetName sets the "name" field.
func (*TagUpdateOne) SetNillableName ¶ added in v0.2.0
func (tuo *TagUpdateOne) SetNillableName(s *string) *TagUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*TagUpdateOne) Where ¶
func (tuo *TagUpdateOne) Where(ps ...predicate.Tag) *TagUpdateOne
Where appends a list predicates to the TagUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // History is the client for interacting with the History builders. History *HistoryClient // Job is the client for interacting with the Job builders. Job *JobClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // Workflow is the client for interacting with the Workflow builders. Workflow *WorkflowClient // 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) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
func (*Tx) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Workflow ¶
type Workflow struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // States holds the value of the "states" field. States []*model.State `json:"states,omitempty"` // Transitions holds the value of the "transitions" field. Transitions []*model.Transition `json:"transitions,omitempty"` // Groups holds the value of the "groups" field. Groups []*model.Group `json:"groups,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the WorkflowQuery when eager-loading is set. Edges WorkflowEdges `json:"edges"` // contains filtered or unexported fields }
Workflow is the model entity for the Workflow schema.
func (*Workflow) ExecContext ¶
func (c *Workflow) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Workflow) QueryContext ¶
func (c *Workflow) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Workflow) Unwrap ¶
Unwrap unwraps the Workflow 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 (*Workflow) Update ¶
func (w *Workflow) Update() *WorkflowUpdateOne
Update returns a builder for updating this Workflow. Note that you need to call Workflow.Unwrap() before calling this method if this Workflow was returned from a transaction, and the transaction was committed or rolled back.
type WorkflowClient ¶
type WorkflowClient struct {
// contains filtered or unexported fields
}
WorkflowClient is a client for the Workflow schema.
func NewWorkflowClient ¶
func NewWorkflowClient(c config) *WorkflowClient
NewWorkflowClient returns a client for the Workflow from the given config.
func (*WorkflowClient) Create ¶
func (c *WorkflowClient) Create() *WorkflowCreate
Create returns a builder for creating a Workflow entity.
func (*WorkflowClient) CreateBulk ¶
func (c *WorkflowClient) CreateBulk(builders ...*WorkflowCreate) *WorkflowCreateBulk
CreateBulk returns a builder for creating a bulk of Workflow entities.
func (*WorkflowClient) Delete ¶
func (c *WorkflowClient) Delete() *WorkflowDelete
Delete returns a delete builder for Workflow.
func (*WorkflowClient) DeleteOne ¶
func (c *WorkflowClient) DeleteOne(w *Workflow) *WorkflowDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*WorkflowClient) DeleteOneID ¶
func (c *WorkflowClient) DeleteOneID(id int) *WorkflowDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*WorkflowClient) ExecContext ¶
func (c *WorkflowClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*WorkflowClient) GetX ¶
func (c *WorkflowClient) GetX(ctx context.Context, id int) *Workflow
GetX is like Get, but panics if an error occurs.
func (*WorkflowClient) Hooks ¶
func (c *WorkflowClient) Hooks() []Hook
Hooks returns the client hooks.
func (*WorkflowClient) Intercept ¶
func (c *WorkflowClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `workflow.Intercept(f(g(h())))`.
func (*WorkflowClient) Interceptors ¶
func (c *WorkflowClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*WorkflowClient) MapCreateBulk ¶ added in v0.2.0
func (c *WorkflowClient) MapCreateBulk(slice any, setFunc func(*WorkflowCreate, int)) *WorkflowCreateBulk
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 (*WorkflowClient) Query ¶
func (c *WorkflowClient) Query() *WorkflowQuery
Query returns a query builder for Workflow.
func (*WorkflowClient) QueryContext ¶
func (c *WorkflowClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*WorkflowClient) QueryJobs ¶
func (c *WorkflowClient) QueryJobs(w *Workflow) *JobQuery
QueryJobs queries the jobs edge of a Workflow.
func (*WorkflowClient) Update ¶
func (c *WorkflowClient) Update() *WorkflowUpdate
Update returns an update builder for Workflow.
func (*WorkflowClient) UpdateOne ¶
func (c *WorkflowClient) UpdateOne(w *Workflow) *WorkflowUpdateOne
UpdateOne returns an update builder for the given entity.
func (*WorkflowClient) UpdateOneID ¶
func (c *WorkflowClient) UpdateOneID(id int) *WorkflowUpdateOne
UpdateOneID returns an update builder for the given id.
func (*WorkflowClient) Use ¶
func (c *WorkflowClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `workflow.Hooks(f(g(h())))`.
type WorkflowCreate ¶
type WorkflowCreate struct {
// contains filtered or unexported fields
}
WorkflowCreate is the builder for creating a Workflow entity.
func (*WorkflowCreate) AddJobIDs ¶
func (wc *WorkflowCreate) AddJobIDs(ids ...string) *WorkflowCreate
AddJobIDs adds the "jobs" edge to the Job entity by IDs.
func (*WorkflowCreate) AddJobs ¶
func (wc *WorkflowCreate) AddJobs(j ...*Job) *WorkflowCreate
AddJobs adds the "jobs" edges to the Job entity.
func (*WorkflowCreate) Exec ¶
func (wc *WorkflowCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowCreate) ExecContext ¶
func (c *WorkflowCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*WorkflowCreate) ExecX ¶
func (wc *WorkflowCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowCreate) Mutation ¶
func (wc *WorkflowCreate) Mutation() *WorkflowMutation
Mutation returns the WorkflowMutation object of the builder.
func (*WorkflowCreate) QueryContext ¶
func (c *WorkflowCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*WorkflowCreate) Save ¶
func (wc *WorkflowCreate) Save(ctx context.Context) (*Workflow, error)
Save creates the Workflow in the database.
func (*WorkflowCreate) SaveX ¶
func (wc *WorkflowCreate) SaveX(ctx context.Context) *Workflow
SaveX calls Save and panics if Save returns an error.
func (*WorkflowCreate) SetDescription ¶ added in v0.2.0
func (wc *WorkflowCreate) SetDescription(s string) *WorkflowCreate
SetDescription sets the "description" field.
func (*WorkflowCreate) SetGroups ¶
func (wc *WorkflowCreate) SetGroups(m []*model.Group) *WorkflowCreate
SetGroups sets the "groups" field.
func (*WorkflowCreate) SetName ¶
func (wc *WorkflowCreate) SetName(s string) *WorkflowCreate
SetName sets the "name" field.
func (*WorkflowCreate) SetNillableDescription ¶ added in v0.2.0
func (wc *WorkflowCreate) SetNillableDescription(s *string) *WorkflowCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*WorkflowCreate) SetStates ¶
func (wc *WorkflowCreate) SetStates(m []*model.State) *WorkflowCreate
SetStates sets the "states" field.
func (*WorkflowCreate) SetTransitions ¶
func (wc *WorkflowCreate) SetTransitions(m []*model.Transition) *WorkflowCreate
SetTransitions sets the "transitions" field.
type WorkflowCreateBulk ¶
type WorkflowCreateBulk struct {
// contains filtered or unexported fields
}
WorkflowCreateBulk is the builder for creating many Workflow entities in bulk.
func (*WorkflowCreateBulk) Exec ¶
func (wcb *WorkflowCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowCreateBulk) ExecContext ¶
func (c *WorkflowCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*WorkflowCreateBulk) ExecX ¶
func (wcb *WorkflowCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowCreateBulk) QueryContext ¶
func (c *WorkflowCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type WorkflowDelete ¶
type WorkflowDelete struct {
// contains filtered or unexported fields
}
WorkflowDelete is the builder for deleting a Workflow entity.
func (*WorkflowDelete) Exec ¶
func (wd *WorkflowDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*WorkflowDelete) ExecContext ¶
func (c *WorkflowDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*WorkflowDelete) ExecX ¶
func (wd *WorkflowDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowDelete) QueryContext ¶
func (c *WorkflowDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*WorkflowDelete) Where ¶
func (wd *WorkflowDelete) Where(ps ...predicate.Workflow) *WorkflowDelete
Where appends a list predicates to the WorkflowDelete builder.
type WorkflowDeleteOne ¶
type WorkflowDeleteOne struct {
// contains filtered or unexported fields
}
WorkflowDeleteOne is the builder for deleting a single Workflow entity.
func (*WorkflowDeleteOne) Exec ¶
func (wdo *WorkflowDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*WorkflowDeleteOne) ExecX ¶
func (wdo *WorkflowDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowDeleteOne) Where ¶
func (wdo *WorkflowDeleteOne) Where(ps ...predicate.Workflow) *WorkflowDeleteOne
Where appends a list predicates to the WorkflowDelete builder.
type WorkflowEdges ¶
type WorkflowEdges struct { // Jobs holds the value of the jobs edge. Jobs []*Job `json:"jobs,omitempty"` // contains filtered or unexported fields }
WorkflowEdges holds the relations/edges for other nodes in the graph.
func (WorkflowEdges) JobsOrErr ¶
func (e WorkflowEdges) JobsOrErr() ([]*Job, error)
JobsOrErr returns the Jobs value or an error if the edge was not loaded in eager-loading.
type WorkflowGroupBy ¶
type WorkflowGroupBy struct {
// contains filtered or unexported fields
}
WorkflowGroupBy is the group-by builder for Workflow entities.
func (*WorkflowGroupBy) Aggregate ¶
func (wgb *WorkflowGroupBy) Aggregate(fns ...AggregateFunc) *WorkflowGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*WorkflowGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WorkflowGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WorkflowGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WorkflowGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WorkflowGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WorkflowGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WorkflowGroupBy) Scan ¶
func (wgb *WorkflowGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WorkflowGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WorkflowMutation ¶
type WorkflowMutation struct {
// contains filtered or unexported fields
}
WorkflowMutation represents an operation that mutates the Workflow nodes in the graph.
func (*WorkflowMutation) AddField ¶
func (m *WorkflowMutation) 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 (*WorkflowMutation) AddJobIDs ¶
func (m *WorkflowMutation) AddJobIDs(ids ...string)
AddJobIDs adds the "jobs" edge to the Job entity by ids.
func (*WorkflowMutation) AddedEdges ¶
func (m *WorkflowMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*WorkflowMutation) AddedField ¶
func (m *WorkflowMutation) 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 (*WorkflowMutation) AddedFields ¶
func (m *WorkflowMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*WorkflowMutation) AddedIDs ¶
func (m *WorkflowMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*WorkflowMutation) AppendGroups ¶
func (m *WorkflowMutation) AppendGroups(value []*model.Group)
AppendGroups adds value to the "groups" field.
func (*WorkflowMutation) AppendStates ¶
func (m *WorkflowMutation) AppendStates(value []*model.State)
AppendStates adds value to the "states" field.
func (*WorkflowMutation) AppendTransitions ¶
func (m *WorkflowMutation) AppendTransitions(value []*model.Transition)
AppendTransitions adds value to the "transitions" field.
func (*WorkflowMutation) AppendedGroups ¶
func (m *WorkflowMutation) AppendedGroups() ([]*model.Group, bool)
AppendedGroups returns the list of values that were appended to the "groups" field in this mutation.
func (*WorkflowMutation) AppendedStates ¶
func (m *WorkflowMutation) AppendedStates() ([]*model.State, bool)
AppendedStates returns the list of values that were appended to the "states" field in this mutation.
func (*WorkflowMutation) AppendedTransitions ¶
func (m *WorkflowMutation) AppendedTransitions() ([]*model.Transition, bool)
AppendedTransitions returns the list of values that were appended to the "transitions" field in this mutation.
func (*WorkflowMutation) ClearDescription ¶ added in v0.2.0
func (m *WorkflowMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*WorkflowMutation) ClearEdge ¶
func (m *WorkflowMutation) 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 (*WorkflowMutation) ClearField ¶
func (m *WorkflowMutation) 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 (*WorkflowMutation) ClearJobs ¶
func (m *WorkflowMutation) ClearJobs()
ClearJobs clears the "jobs" edge to the Job entity.
func (*WorkflowMutation) ClearedEdges ¶
func (m *WorkflowMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*WorkflowMutation) ClearedFields ¶
func (m *WorkflowMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (WorkflowMutation) Client ¶
func (m WorkflowMutation) 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 (*WorkflowMutation) Description ¶ added in v0.2.0
func (m *WorkflowMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*WorkflowMutation) DescriptionCleared ¶ added in v0.2.0
func (m *WorkflowMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*WorkflowMutation) EdgeCleared ¶
func (m *WorkflowMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*WorkflowMutation) ExecContext ¶
func (c *WorkflowMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*WorkflowMutation) Field ¶
func (m *WorkflowMutation) 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 (*WorkflowMutation) FieldCleared ¶
func (m *WorkflowMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*WorkflowMutation) Fields ¶
func (m *WorkflowMutation) 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 (*WorkflowMutation) Groups ¶
func (m *WorkflowMutation) Groups() (r []*model.Group, exists bool)
Groups returns the value of the "groups" field in the mutation.
func (*WorkflowMutation) ID ¶
func (m *WorkflowMutation) 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 (*WorkflowMutation) IDs ¶
func (m *WorkflowMutation) 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 (*WorkflowMutation) JobsCleared ¶
func (m *WorkflowMutation) JobsCleared() bool
JobsCleared reports if the "jobs" edge to the Job entity was cleared.
func (*WorkflowMutation) JobsIDs ¶
func (m *WorkflowMutation) JobsIDs() (ids []string)
JobsIDs returns the "jobs" edge IDs in the mutation.
func (*WorkflowMutation) Name ¶
func (m *WorkflowMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*WorkflowMutation) OldDescription ¶ added in v0.2.0
func (m *WorkflowMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Workflow entity. If the Workflow 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 (*WorkflowMutation) 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 (*WorkflowMutation) OldGroups ¶
OldGroups returns the old "groups" field's value of the Workflow entity. If the Workflow 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 (*WorkflowMutation) OldName ¶
func (m *WorkflowMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Workflow entity. If the Workflow 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 (*WorkflowMutation) OldStates ¶
OldStates returns the old "states" field's value of the Workflow entity. If the Workflow 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 (*WorkflowMutation) OldTransitions ¶
func (m *WorkflowMutation) OldTransitions(ctx context.Context) (v []*model.Transition, err error)
OldTransitions returns the old "transitions" field's value of the Workflow entity. If the Workflow 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 (*WorkflowMutation) QueryContext ¶
func (c *WorkflowMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*WorkflowMutation) RemoveJobIDs ¶
func (m *WorkflowMutation) RemoveJobIDs(ids ...string)
RemoveJobIDs removes the "jobs" edge to the Job entity by IDs.
func (*WorkflowMutation) RemovedEdges ¶
func (m *WorkflowMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*WorkflowMutation) RemovedIDs ¶
func (m *WorkflowMutation) 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 (*WorkflowMutation) RemovedJobsIDs ¶
func (m *WorkflowMutation) RemovedJobsIDs() (ids []string)
RemovedJobs returns the removed IDs of the "jobs" edge to the Job entity.
func (*WorkflowMutation) ResetDescription ¶ added in v0.2.0
func (m *WorkflowMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*WorkflowMutation) ResetEdge ¶
func (m *WorkflowMutation) 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 (*WorkflowMutation) ResetField ¶
func (m *WorkflowMutation) 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 (*WorkflowMutation) ResetGroups ¶
func (m *WorkflowMutation) ResetGroups()
ResetGroups resets all changes to the "groups" field.
func (*WorkflowMutation) ResetJobs ¶
func (m *WorkflowMutation) ResetJobs()
ResetJobs resets all changes to the "jobs" edge.
func (*WorkflowMutation) ResetName ¶
func (m *WorkflowMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*WorkflowMutation) ResetStates ¶
func (m *WorkflowMutation) ResetStates()
ResetStates resets all changes to the "states" field.
func (*WorkflowMutation) ResetTransitions ¶
func (m *WorkflowMutation) ResetTransitions()
ResetTransitions resets all changes to the "transitions" field.
func (*WorkflowMutation) SetDescription ¶ added in v0.2.0
func (m *WorkflowMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*WorkflowMutation) SetField ¶
func (m *WorkflowMutation) 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 (*WorkflowMutation) SetGroups ¶
func (m *WorkflowMutation) SetGroups(value []*model.Group)
SetGroups sets the "groups" field.
func (*WorkflowMutation) SetName ¶
func (m *WorkflowMutation) SetName(s string)
SetName sets the "name" field.
func (*WorkflowMutation) SetOp ¶
func (m *WorkflowMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*WorkflowMutation) SetStates ¶
func (m *WorkflowMutation) SetStates(value []*model.State)
SetStates sets the "states" field.
func (*WorkflowMutation) SetTransitions ¶
func (m *WorkflowMutation) SetTransitions(value []*model.Transition)
SetTransitions sets the "transitions" field.
func (*WorkflowMutation) States ¶
func (m *WorkflowMutation) States() (r []*model.State, exists bool)
States returns the value of the "states" field in the mutation.
func (*WorkflowMutation) Transitions ¶
func (m *WorkflowMutation) Transitions() (r []*model.Transition, exists bool)
Transitions returns the value of the "transitions" field in the mutation.
func (WorkflowMutation) Tx ¶
func (m WorkflowMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*WorkflowMutation) Type ¶
func (m *WorkflowMutation) Type() string
Type returns the node type of this mutation (Workflow).
func (*WorkflowMutation) Where ¶
func (m *WorkflowMutation) Where(ps ...predicate.Workflow)
Where appends a list predicates to the WorkflowMutation builder.
func (*WorkflowMutation) WhereP ¶
func (m *WorkflowMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the WorkflowMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type WorkflowQuery ¶
type WorkflowQuery struct {
// contains filtered or unexported fields
}
WorkflowQuery is the builder for querying Workflow entities.
func (*WorkflowQuery) Aggregate ¶
func (wq *WorkflowQuery) Aggregate(fns ...AggregateFunc) *WorkflowSelect
Aggregate returns a WorkflowSelect configured with the given aggregations.
func (*WorkflowQuery) All ¶
func (wq *WorkflowQuery) All(ctx context.Context) ([]*Workflow, error)
All executes the query and returns a list of Workflows.
func (*WorkflowQuery) AllX ¶
func (wq *WorkflowQuery) AllX(ctx context.Context) []*Workflow
AllX is like All, but panics if an error occurs.
func (*WorkflowQuery) Clone ¶
func (wq *WorkflowQuery) Clone() *WorkflowQuery
Clone returns a duplicate of the WorkflowQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*WorkflowQuery) Count ¶
func (wq *WorkflowQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*WorkflowQuery) CountX ¶
func (wq *WorkflowQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*WorkflowQuery) ExecContext ¶
func (c *WorkflowQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*WorkflowQuery) Exist ¶
func (wq *WorkflowQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*WorkflowQuery) ExistX ¶
func (wq *WorkflowQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*WorkflowQuery) First ¶
func (wq *WorkflowQuery) First(ctx context.Context) (*Workflow, error)
First returns the first Workflow entity from the query. Returns a *NotFoundError when no Workflow was found.
func (*WorkflowQuery) FirstID ¶
func (wq *WorkflowQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Workflow ID from the query. Returns a *NotFoundError when no Workflow ID was found.
func (*WorkflowQuery) FirstIDX ¶
func (wq *WorkflowQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*WorkflowQuery) FirstX ¶
func (wq *WorkflowQuery) FirstX(ctx context.Context) *Workflow
FirstX is like First, but panics if an error occurs.
func (*WorkflowQuery) GroupBy ¶
func (wq *WorkflowQuery) GroupBy(field string, fields ...string) *WorkflowGroupBy
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.Workflow.Query(). GroupBy(workflow.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*WorkflowQuery) IDs ¶
func (wq *WorkflowQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Workflow IDs.
func (*WorkflowQuery) IDsX ¶
func (wq *WorkflowQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*WorkflowQuery) Limit ¶
func (wq *WorkflowQuery) Limit(limit int) *WorkflowQuery
Limit the number of records to be returned by this query.
func (*WorkflowQuery) Offset ¶
func (wq *WorkflowQuery) Offset(offset int) *WorkflowQuery
Offset to start from.
func (*WorkflowQuery) Only ¶
func (wq *WorkflowQuery) Only(ctx context.Context) (*Workflow, error)
Only returns a single Workflow entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Workflow entity is found. Returns a *NotFoundError when no Workflow entities are found.
func (*WorkflowQuery) OnlyID ¶
func (wq *WorkflowQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Workflow ID in the query. Returns a *NotSingularError when more than one Workflow ID is found. Returns a *NotFoundError when no entities are found.
func (*WorkflowQuery) OnlyIDX ¶
func (wq *WorkflowQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*WorkflowQuery) OnlyX ¶
func (wq *WorkflowQuery) OnlyX(ctx context.Context) *Workflow
OnlyX is like Only, but panics if an error occurs.
func (*WorkflowQuery) Order ¶
func (wq *WorkflowQuery) Order(o ...workflow.OrderOption) *WorkflowQuery
Order specifies how the records should be ordered.
func (*WorkflowQuery) QueryContext ¶
func (c *WorkflowQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*WorkflowQuery) QueryJobs ¶
func (wq *WorkflowQuery) QueryJobs() *JobQuery
QueryJobs chains the current query on the "jobs" edge.
func (*WorkflowQuery) Select ¶
func (wq *WorkflowQuery) Select(fields ...string) *WorkflowSelect
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.Workflow.Query(). Select(workflow.FieldName). Scan(ctx, &v)
func (*WorkflowQuery) Unique ¶
func (wq *WorkflowQuery) Unique(unique bool) *WorkflowQuery
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 (*WorkflowQuery) Where ¶
func (wq *WorkflowQuery) Where(ps ...predicate.Workflow) *WorkflowQuery
Where adds a new predicate for the WorkflowQuery builder.
func (*WorkflowQuery) WithJobs ¶
func (wq *WorkflowQuery) WithJobs(opts ...func(*JobQuery)) *WorkflowQuery
WithJobs tells the query-builder to eager-load the nodes that are connected to the "jobs" edge. The optional arguments are used to configure the query builder of the edge.
type WorkflowSelect ¶
type WorkflowSelect struct { *WorkflowQuery // contains filtered or unexported fields }
WorkflowSelect is the builder for selecting fields of Workflow entities.
func (*WorkflowSelect) Aggregate ¶
func (ws *WorkflowSelect) Aggregate(fns ...AggregateFunc) *WorkflowSelect
Aggregate adds the given aggregation functions to the selector query.
func (*WorkflowSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WorkflowSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (WorkflowSelect) ExecContext ¶
func (c WorkflowSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*WorkflowSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WorkflowSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WorkflowSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WorkflowSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (WorkflowSelect) QueryContext ¶
func (c WorkflowSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*WorkflowSelect) Scan ¶
func (ws *WorkflowSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WorkflowSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WorkflowUpdate ¶
type WorkflowUpdate struct {
// contains filtered or unexported fields
}
WorkflowUpdate is the builder for updating Workflow entities.
func (*WorkflowUpdate) AddJobIDs ¶
func (wu *WorkflowUpdate) AddJobIDs(ids ...string) *WorkflowUpdate
AddJobIDs adds the "jobs" edge to the Job entity by IDs.
func (*WorkflowUpdate) AddJobs ¶
func (wu *WorkflowUpdate) AddJobs(j ...*Job) *WorkflowUpdate
AddJobs adds the "jobs" edges to the Job entity.
func (*WorkflowUpdate) AppendGroups ¶
func (wu *WorkflowUpdate) AppendGroups(m []*model.Group) *WorkflowUpdate
AppendGroups appends m to the "groups" field.
func (*WorkflowUpdate) AppendStates ¶
func (wu *WorkflowUpdate) AppendStates(m []*model.State) *WorkflowUpdate
AppendStates appends m to the "states" field.
func (*WorkflowUpdate) AppendTransitions ¶
func (wu *WorkflowUpdate) AppendTransitions(m []*model.Transition) *WorkflowUpdate
AppendTransitions appends m to the "transitions" field.
func (*WorkflowUpdate) ClearDescription ¶ added in v0.2.0
func (wu *WorkflowUpdate) ClearDescription() *WorkflowUpdate
ClearDescription clears the value of the "description" field.
func (*WorkflowUpdate) ClearJobs ¶
func (wu *WorkflowUpdate) ClearJobs() *WorkflowUpdate
ClearJobs clears all "jobs" edges to the Job entity.
func (*WorkflowUpdate) Exec ¶
func (wu *WorkflowUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowUpdate) ExecContext ¶
func (c *WorkflowUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*WorkflowUpdate) ExecX ¶
func (wu *WorkflowUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowUpdate) Mutation ¶
func (wu *WorkflowUpdate) Mutation() *WorkflowMutation
Mutation returns the WorkflowMutation object of the builder.
func (*WorkflowUpdate) QueryContext ¶
func (c *WorkflowUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*WorkflowUpdate) RemoveJobIDs ¶
func (wu *WorkflowUpdate) RemoveJobIDs(ids ...string) *WorkflowUpdate
RemoveJobIDs removes the "jobs" edge to Job entities by IDs.
func (*WorkflowUpdate) RemoveJobs ¶
func (wu *WorkflowUpdate) RemoveJobs(j ...*Job) *WorkflowUpdate
RemoveJobs removes "jobs" edges to Job entities.
func (*WorkflowUpdate) Save ¶
func (wu *WorkflowUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*WorkflowUpdate) SaveX ¶
func (wu *WorkflowUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*WorkflowUpdate) SetDescription ¶ added in v0.2.0
func (wu *WorkflowUpdate) SetDescription(s string) *WorkflowUpdate
SetDescription sets the "description" field.
func (*WorkflowUpdate) SetGroups ¶
func (wu *WorkflowUpdate) SetGroups(m []*model.Group) *WorkflowUpdate
SetGroups sets the "groups" field.
func (*WorkflowUpdate) SetName ¶
func (wu *WorkflowUpdate) SetName(s string) *WorkflowUpdate
SetName sets the "name" field.
func (*WorkflowUpdate) SetNillableDescription ¶ added in v0.2.0
func (wu *WorkflowUpdate) SetNillableDescription(s *string) *WorkflowUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*WorkflowUpdate) SetNillableName ¶ added in v0.2.0
func (wu *WorkflowUpdate) SetNillableName(s *string) *WorkflowUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*WorkflowUpdate) SetStates ¶
func (wu *WorkflowUpdate) SetStates(m []*model.State) *WorkflowUpdate
SetStates sets the "states" field.
func (*WorkflowUpdate) SetTransitions ¶
func (wu *WorkflowUpdate) SetTransitions(m []*model.Transition) *WorkflowUpdate
SetTransitions sets the "transitions" field.
func (*WorkflowUpdate) Where ¶
func (wu *WorkflowUpdate) Where(ps ...predicate.Workflow) *WorkflowUpdate
Where appends a list predicates to the WorkflowUpdate builder.
type WorkflowUpdateOne ¶
type WorkflowUpdateOne struct {
// contains filtered or unexported fields
}
WorkflowUpdateOne is the builder for updating a single Workflow entity.
func (*WorkflowUpdateOne) AddJobIDs ¶
func (wuo *WorkflowUpdateOne) AddJobIDs(ids ...string) *WorkflowUpdateOne
AddJobIDs adds the "jobs" edge to the Job entity by IDs.
func (*WorkflowUpdateOne) AddJobs ¶
func (wuo *WorkflowUpdateOne) AddJobs(j ...*Job) *WorkflowUpdateOne
AddJobs adds the "jobs" edges to the Job entity.
func (*WorkflowUpdateOne) AppendGroups ¶
func (wuo *WorkflowUpdateOne) AppendGroups(m []*model.Group) *WorkflowUpdateOne
AppendGroups appends m to the "groups" field.
func (*WorkflowUpdateOne) AppendStates ¶
func (wuo *WorkflowUpdateOne) AppendStates(m []*model.State) *WorkflowUpdateOne
AppendStates appends m to the "states" field.
func (*WorkflowUpdateOne) AppendTransitions ¶
func (wuo *WorkflowUpdateOne) AppendTransitions(m []*model.Transition) *WorkflowUpdateOne
AppendTransitions appends m to the "transitions" field.
func (*WorkflowUpdateOne) ClearDescription ¶ added in v0.2.0
func (wuo *WorkflowUpdateOne) ClearDescription() *WorkflowUpdateOne
ClearDescription clears the value of the "description" field.
func (*WorkflowUpdateOne) ClearJobs ¶
func (wuo *WorkflowUpdateOne) ClearJobs() *WorkflowUpdateOne
ClearJobs clears all "jobs" edges to the Job entity.
func (*WorkflowUpdateOne) Exec ¶
func (wuo *WorkflowUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*WorkflowUpdateOne) ExecContext ¶
func (c *WorkflowUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*WorkflowUpdateOne) ExecX ¶
func (wuo *WorkflowUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowUpdateOne) Mutation ¶
func (wuo *WorkflowUpdateOne) Mutation() *WorkflowMutation
Mutation returns the WorkflowMutation object of the builder.
func (*WorkflowUpdateOne) QueryContext ¶
func (c *WorkflowUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*WorkflowUpdateOne) RemoveJobIDs ¶
func (wuo *WorkflowUpdateOne) RemoveJobIDs(ids ...string) *WorkflowUpdateOne
RemoveJobIDs removes the "jobs" edge to Job entities by IDs.
func (*WorkflowUpdateOne) RemoveJobs ¶
func (wuo *WorkflowUpdateOne) RemoveJobs(j ...*Job) *WorkflowUpdateOne
RemoveJobs removes "jobs" edges to Job entities.
func (*WorkflowUpdateOne) Save ¶
func (wuo *WorkflowUpdateOne) Save(ctx context.Context) (*Workflow, error)
Save executes the query and returns the updated Workflow entity.
func (*WorkflowUpdateOne) SaveX ¶
func (wuo *WorkflowUpdateOne) SaveX(ctx context.Context) *Workflow
SaveX is like Save, but panics if an error occurs.
func (*WorkflowUpdateOne) Select ¶
func (wuo *WorkflowUpdateOne) Select(field string, fields ...string) *WorkflowUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*WorkflowUpdateOne) SetDescription ¶ added in v0.2.0
func (wuo *WorkflowUpdateOne) SetDescription(s string) *WorkflowUpdateOne
SetDescription sets the "description" field.
func (*WorkflowUpdateOne) SetGroups ¶
func (wuo *WorkflowUpdateOne) SetGroups(m []*model.Group) *WorkflowUpdateOne
SetGroups sets the "groups" field.
func (*WorkflowUpdateOne) SetName ¶
func (wuo *WorkflowUpdateOne) SetName(s string) *WorkflowUpdateOne
SetName sets the "name" field.
func (*WorkflowUpdateOne) SetNillableDescription ¶ added in v0.2.0
func (wuo *WorkflowUpdateOne) SetNillableDescription(s *string) *WorkflowUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*WorkflowUpdateOne) SetNillableName ¶ added in v0.2.0
func (wuo *WorkflowUpdateOne) SetNillableName(s *string) *WorkflowUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*WorkflowUpdateOne) SetStates ¶
func (wuo *WorkflowUpdateOne) SetStates(m []*model.State) *WorkflowUpdateOne
SetStates sets the "states" field.
func (*WorkflowUpdateOne) SetTransitions ¶
func (wuo *WorkflowUpdateOne) SetTransitions(m []*model.Transition) *WorkflowUpdateOne
SetTransitions sets the "transitions" field.
func (*WorkflowUpdateOne) Where ¶
func (wuo *WorkflowUpdateOne) Where(ps ...predicate.Workflow) *WorkflowUpdateOne
Where appends a list predicates to the WorkflowUpdate builder.
Source Files ¶
- client.go
- ent.go
- history.go
- history_create.go
- history_delete.go
- history_query.go
- history_update.go
- job.go
- job_create.go
- job_delete.go
- job_query.go
- job_update.go
- mutation.go
- runtime.go
- tag.go
- tag_create.go
- tag_delete.go
- tag_query.go
- tag_update.go
- tx.go
- workflow.go
- workflow_create.go
- workflow_delete.go
- workflow_query.go
- workflow_update.go