Documentation
¶
Index ¶
- Constants
- 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
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Dimension
- type DimensionClient
- func (c *DimensionClient) Create() *DimensionCreate
- func (c *DimensionClient) CreateBulk(builders ...*DimensionCreate) *DimensionCreateBulk
- func (c *DimensionClient) Delete() *DimensionDelete
- func (c *DimensionClient) DeleteOne(d *Dimension) *DimensionDeleteOne
- func (c *DimensionClient) DeleteOneID(id int) *DimensionDeleteOne
- func (c *DimensionClient) Get(ctx context.Context, id int) (*Dimension, error)
- func (c *DimensionClient) GetX(ctx context.Context, id int) *Dimension
- func (c *DimensionClient) Hooks() []Hook
- func (c *DimensionClient) Query() *DimensionQuery
- func (c *DimensionClient) QueryItem(d *Dimension) *ItemQuery
- func (c *DimensionClient) Update() *DimensionUpdate
- func (c *DimensionClient) UpdateOne(d *Dimension) *DimensionUpdateOne
- func (c *DimensionClient) UpdateOneID(id int) *DimensionUpdateOne
- func (c *DimensionClient) Use(hooks ...Hook)
- type DimensionCreate
- func (dc *DimensionCreate) AddItem(i ...*Item) *DimensionCreate
- func (dc *DimensionCreate) AddItemIDs(ids ...int) *DimensionCreate
- func (dc *DimensionCreate) Exec(ctx context.Context) error
- func (dc *DimensionCreate) ExecX(ctx context.Context)
- func (dc *DimensionCreate) Mutation() *DimensionMutation
- func (dc *DimensionCreate) Save(ctx context.Context) (*Dimension, error)
- func (dc *DimensionCreate) SaveX(ctx context.Context) *Dimension
- func (dc *DimensionCreate) SetCreateTime(t time.Time) *DimensionCreate
- func (dc *DimensionCreate) SetDisplayTitle(m map[string]string) *DimensionCreate
- func (dc *DimensionCreate) SetDisplayValue(m map[string]string) *DimensionCreate
- func (dc *DimensionCreate) SetMeta(m map[string]interface{}) *DimensionCreate
- func (dc *DimensionCreate) SetNillableCreateTime(t *time.Time) *DimensionCreate
- func (dc *DimensionCreate) SetTitle(s string) *DimensionCreate
- func (dc *DimensionCreate) SetValue(s string) *DimensionCreate
- type DimensionCreateBulk
- type DimensionDelete
- type DimensionDeleteOne
- type DimensionEdges
- type DimensionGroupBy
- func (dgb *DimensionGroupBy) Aggregate(fns ...AggregateFunc) *DimensionGroupBy
- func (dgb *DimensionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (dgb *DimensionGroupBy) BoolX(ctx context.Context) bool
- func (dgb *DimensionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (dgb *DimensionGroupBy) BoolsX(ctx context.Context) []bool
- func (dgb *DimensionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (dgb *DimensionGroupBy) Float64X(ctx context.Context) float64
- func (dgb *DimensionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (dgb *DimensionGroupBy) Float64sX(ctx context.Context) []float64
- func (dgb *DimensionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (dgb *DimensionGroupBy) IntX(ctx context.Context) int
- func (dgb *DimensionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (dgb *DimensionGroupBy) IntsX(ctx context.Context) []int
- func (dgb *DimensionGroupBy) Scan(ctx context.Context, v interface{}) error
- func (dgb *DimensionGroupBy) ScanX(ctx context.Context, v interface{})
- func (dgb *DimensionGroupBy) String(ctx context.Context) (_ string, err error)
- func (dgb *DimensionGroupBy) StringX(ctx context.Context) string
- func (dgb *DimensionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (dgb *DimensionGroupBy) StringsX(ctx context.Context) []string
- type DimensionMutation
- func (m *DimensionMutation) AddField(name string, value ent.Value) error
- func (m *DimensionMutation) AddItemIDs(ids ...int)
- func (m *DimensionMutation) AddedEdges() []string
- func (m *DimensionMutation) AddedField(name string) (ent.Value, bool)
- func (m *DimensionMutation) AddedFields() []string
- func (m *DimensionMutation) AddedIDs(name string) []ent.Value
- func (m *DimensionMutation) ClearDisplayTitle()
- func (m *DimensionMutation) ClearDisplayValue()
- func (m *DimensionMutation) ClearEdge(name string) error
- func (m *DimensionMutation) ClearField(name string) error
- func (m *DimensionMutation) ClearItem()
- func (m *DimensionMutation) ClearMeta()
- func (m *DimensionMutation) ClearedEdges() []string
- func (m *DimensionMutation) ClearedFields() []string
- func (m DimensionMutation) Client() *Client
- func (m *DimensionMutation) CreateTime() (r time.Time, exists bool)
- func (m *DimensionMutation) DisplayTitle() (r map[string]string, exists bool)
- func (m *DimensionMutation) DisplayTitleCleared() bool
- func (m *DimensionMutation) DisplayValue() (r map[string]string, exists bool)
- func (m *DimensionMutation) DisplayValueCleared() bool
- func (m *DimensionMutation) EdgeCleared(name string) bool
- func (m *DimensionMutation) Field(name string) (ent.Value, bool)
- func (m *DimensionMutation) FieldCleared(name string) bool
- func (m *DimensionMutation) Fields() []string
- func (m *DimensionMutation) ID() (id int, exists bool)
- func (m *DimensionMutation) IDs(ctx context.Context) ([]int, error)
- func (m *DimensionMutation) ItemCleared() bool
- func (m *DimensionMutation) ItemIDs() (ids []int)
- func (m *DimensionMutation) Meta() (r map[string]interface{}, exists bool)
- func (m *DimensionMutation) MetaCleared() bool
- func (m *DimensionMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *DimensionMutation) OldDisplayTitle(ctx context.Context) (v map[string]string, err error)
- func (m *DimensionMutation) OldDisplayValue(ctx context.Context) (v map[string]string, err error)
- func (m *DimensionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DimensionMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
- func (m *DimensionMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *DimensionMutation) OldValue(ctx context.Context) (v string, err error)
- func (m *DimensionMutation) Op() Op
- func (m *DimensionMutation) RemoveItemIDs(ids ...int)
- func (m *DimensionMutation) RemovedEdges() []string
- func (m *DimensionMutation) RemovedIDs(name string) []ent.Value
- func (m *DimensionMutation) RemovedItemIDs() (ids []int)
- func (m *DimensionMutation) ResetCreateTime()
- func (m *DimensionMutation) ResetDisplayTitle()
- func (m *DimensionMutation) ResetDisplayValue()
- func (m *DimensionMutation) ResetEdge(name string) error
- func (m *DimensionMutation) ResetField(name string) error
- func (m *DimensionMutation) ResetItem()
- func (m *DimensionMutation) ResetMeta()
- func (m *DimensionMutation) ResetTitle()
- func (m *DimensionMutation) ResetValue()
- func (m *DimensionMutation) SetCreateTime(t time.Time)
- func (m *DimensionMutation) SetDisplayTitle(value map[string]string)
- func (m *DimensionMutation) SetDisplayValue(value map[string]string)
- func (m *DimensionMutation) SetField(name string, value ent.Value) error
- func (m *DimensionMutation) SetMeta(value map[string]interface{})
- func (m *DimensionMutation) SetTitle(s string)
- func (m *DimensionMutation) SetValue(s string)
- func (m *DimensionMutation) Title() (r string, exists bool)
- func (m DimensionMutation) Tx() (*Tx, error)
- func (m *DimensionMutation) Type() string
- func (m *DimensionMutation) Value() (r string, exists bool)
- func (m *DimensionMutation) Where(ps ...predicate.Dimension)
- type DimensionQuery
- func (dq *DimensionQuery) All(ctx context.Context) ([]*Dimension, error)
- func (dq *DimensionQuery) AllX(ctx context.Context) []*Dimension
- func (dq *DimensionQuery) Clone() *DimensionQuery
- func (dq *DimensionQuery) Count(ctx context.Context) (int, error)
- func (dq *DimensionQuery) CountX(ctx context.Context) int
- func (dq *DimensionQuery) Exist(ctx context.Context) (bool, error)
- func (dq *DimensionQuery) ExistX(ctx context.Context) bool
- func (dq *DimensionQuery) First(ctx context.Context) (*Dimension, error)
- func (dq *DimensionQuery) FirstID(ctx context.Context) (id int, err error)
- func (dq *DimensionQuery) FirstIDX(ctx context.Context) int
- func (dq *DimensionQuery) FirstX(ctx context.Context) *Dimension
- func (dq *DimensionQuery) GroupBy(field string, fields ...string) *DimensionGroupBy
- func (dq *DimensionQuery) IDs(ctx context.Context) ([]int, error)
- func (dq *DimensionQuery) IDsX(ctx context.Context) []int
- func (dq *DimensionQuery) Limit(limit int) *DimensionQuery
- func (dq *DimensionQuery) Offset(offset int) *DimensionQuery
- func (dq *DimensionQuery) Only(ctx context.Context) (*Dimension, error)
- func (dq *DimensionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dq *DimensionQuery) OnlyIDX(ctx context.Context) int
- func (dq *DimensionQuery) OnlyX(ctx context.Context) *Dimension
- func (dq *DimensionQuery) Order(o ...OrderFunc) *DimensionQuery
- func (dq *DimensionQuery) QueryItem() *ItemQuery
- func (dq *DimensionQuery) Select(fields ...string) *DimensionSelect
- func (dq *DimensionQuery) Unique(unique bool) *DimensionQuery
- func (dq *DimensionQuery) Where(ps ...predicate.Dimension) *DimensionQuery
- func (dq *DimensionQuery) WithItem(opts ...func(*ItemQuery)) *DimensionQuery
- type DimensionSelect
- func (ds *DimensionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ds *DimensionSelect) BoolX(ctx context.Context) bool
- func (ds *DimensionSelect) Bools(ctx context.Context) ([]bool, error)
- func (ds *DimensionSelect) BoolsX(ctx context.Context) []bool
- func (ds *DimensionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ds *DimensionSelect) Float64X(ctx context.Context) float64
- func (ds *DimensionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ds *DimensionSelect) Float64sX(ctx context.Context) []float64
- func (ds *DimensionSelect) Int(ctx context.Context) (_ int, err error)
- func (ds *DimensionSelect) IntX(ctx context.Context) int
- func (ds *DimensionSelect) Ints(ctx context.Context) ([]int, error)
- func (ds *DimensionSelect) IntsX(ctx context.Context) []int
- func (ds *DimensionSelect) Scan(ctx context.Context, v interface{}) error
- func (ds *DimensionSelect) ScanX(ctx context.Context, v interface{})
- func (ds *DimensionSelect) String(ctx context.Context) (_ string, err error)
- func (ds *DimensionSelect) StringX(ctx context.Context) string
- func (ds *DimensionSelect) Strings(ctx context.Context) ([]string, error)
- func (ds *DimensionSelect) StringsX(ctx context.Context) []string
- type DimensionUpdate
- func (du *DimensionUpdate) AddItem(i ...*Item) *DimensionUpdate
- func (du *DimensionUpdate) AddItemIDs(ids ...int) *DimensionUpdate
- func (du *DimensionUpdate) ClearDisplayTitle() *DimensionUpdate
- func (du *DimensionUpdate) ClearDisplayValue() *DimensionUpdate
- func (du *DimensionUpdate) ClearItem() *DimensionUpdate
- func (du *DimensionUpdate) ClearMeta() *DimensionUpdate
- func (du *DimensionUpdate) Exec(ctx context.Context) error
- func (du *DimensionUpdate) ExecX(ctx context.Context)
- func (du *DimensionUpdate) Mutation() *DimensionMutation
- func (du *DimensionUpdate) RemoveItem(i ...*Item) *DimensionUpdate
- func (du *DimensionUpdate) RemoveItemIDs(ids ...int) *DimensionUpdate
- func (du *DimensionUpdate) Save(ctx context.Context) (int, error)
- func (du *DimensionUpdate) SaveX(ctx context.Context) int
- func (du *DimensionUpdate) SetDisplayTitle(m map[string]string) *DimensionUpdate
- func (du *DimensionUpdate) SetDisplayValue(m map[string]string) *DimensionUpdate
- func (du *DimensionUpdate) SetMeta(m map[string]interface{}) *DimensionUpdate
- func (du *DimensionUpdate) SetTitle(s string) *DimensionUpdate
- func (du *DimensionUpdate) SetValue(s string) *DimensionUpdate
- func (du *DimensionUpdate) Where(ps ...predicate.Dimension) *DimensionUpdate
- type DimensionUpdateOne
- func (duo *DimensionUpdateOne) AddItem(i ...*Item) *DimensionUpdateOne
- func (duo *DimensionUpdateOne) AddItemIDs(ids ...int) *DimensionUpdateOne
- func (duo *DimensionUpdateOne) ClearDisplayTitle() *DimensionUpdateOne
- func (duo *DimensionUpdateOne) ClearDisplayValue() *DimensionUpdateOne
- func (duo *DimensionUpdateOne) ClearItem() *DimensionUpdateOne
- func (duo *DimensionUpdateOne) ClearMeta() *DimensionUpdateOne
- func (duo *DimensionUpdateOne) Exec(ctx context.Context) error
- func (duo *DimensionUpdateOne) ExecX(ctx context.Context)
- func (duo *DimensionUpdateOne) Mutation() *DimensionMutation
- func (duo *DimensionUpdateOne) RemoveItem(i ...*Item) *DimensionUpdateOne
- func (duo *DimensionUpdateOne) RemoveItemIDs(ids ...int) *DimensionUpdateOne
- func (duo *DimensionUpdateOne) Save(ctx context.Context) (*Dimension, error)
- func (duo *DimensionUpdateOne) SaveX(ctx context.Context) *Dimension
- func (duo *DimensionUpdateOne) Select(field string, fields ...string) *DimensionUpdateOne
- func (duo *DimensionUpdateOne) SetDisplayTitle(m map[string]string) *DimensionUpdateOne
- func (duo *DimensionUpdateOne) SetDisplayValue(m map[string]string) *DimensionUpdateOne
- func (duo *DimensionUpdateOne) SetMeta(m map[string]interface{}) *DimensionUpdateOne
- func (duo *DimensionUpdateOne) SetTitle(s string) *DimensionUpdateOne
- func (duo *DimensionUpdateOne) SetValue(s string) *DimensionUpdateOne
- type Dimensions
- type Hook
- type Item
- type ItemClient
- func (c *ItemClient) Create() *ItemCreate
- func (c *ItemClient) CreateBulk(builders ...*ItemCreate) *ItemCreateBulk
- func (c *ItemClient) Delete() *ItemDelete
- func (c *ItemClient) DeleteOne(i *Item) *ItemDeleteOne
- func (c *ItemClient) DeleteOneID(id int) *ItemDeleteOne
- func (c *ItemClient) Get(ctx context.Context, id int) (*Item, error)
- func (c *ItemClient) GetX(ctx context.Context, id int) *Item
- func (c *ItemClient) Hooks() []Hook
- func (c *ItemClient) Query() *ItemQuery
- func (c *ItemClient) QueryDimensions(i *Item) *DimensionQuery
- func (c *ItemClient) QueryMetric(i *Item) *MetricQuery
- func (c *ItemClient) QueryTaskInstance(i *Item) *TaskInstanceQuery
- func (c *ItemClient) Update() *ItemUpdate
- func (c *ItemClient) UpdateOne(i *Item) *ItemUpdateOne
- func (c *ItemClient) UpdateOneID(id int) *ItemUpdateOne
- func (c *ItemClient) Use(hooks ...Hook)
- type ItemCreate
- func (ic *ItemCreate) AddDimensionIDs(ids ...int) *ItemCreate
- func (ic *ItemCreate) AddDimensions(d ...*Dimension) *ItemCreate
- func (ic *ItemCreate) Exec(ctx context.Context) error
- func (ic *ItemCreate) ExecX(ctx context.Context)
- func (ic *ItemCreate) Mutation() *ItemMutation
- func (ic *ItemCreate) Save(ctx context.Context) (*Item, error)
- func (ic *ItemCreate) SaveX(ctx context.Context) *Item
- func (ic *ItemCreate) SetCreateTime(t time.Time) *ItemCreate
- func (ic *ItemCreate) SetMeta(m map[string]interface{}) *ItemCreate
- func (ic *ItemCreate) SetMetric(m *Metric) *ItemCreate
- func (ic *ItemCreate) SetMetricID(id int) *ItemCreate
- func (ic *ItemCreate) SetNillableCreateTime(t *time.Time) *ItemCreate
- func (ic *ItemCreate) SetNillableTimestamp(t *time.Time) *ItemCreate
- func (ic *ItemCreate) SetNillableUpdateTime(t *time.Time) *ItemCreate
- func (ic *ItemCreate) SetTaskInstance(t *TaskInstance) *ItemCreate
- func (ic *ItemCreate) SetTaskInstanceID(id int) *ItemCreate
- func (ic *ItemCreate) SetTimestamp(t time.Time) *ItemCreate
- func (ic *ItemCreate) SetUpdateTime(t time.Time) *ItemCreate
- func (ic *ItemCreate) SetValue(f float64) *ItemCreate
- type ItemCreateBulk
- type ItemDelete
- type ItemDeleteOne
- type ItemEdges
- type ItemGroupBy
- func (igb *ItemGroupBy) Aggregate(fns ...AggregateFunc) *ItemGroupBy
- func (igb *ItemGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (igb *ItemGroupBy) BoolX(ctx context.Context) bool
- func (igb *ItemGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (igb *ItemGroupBy) BoolsX(ctx context.Context) []bool
- func (igb *ItemGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (igb *ItemGroupBy) Float64X(ctx context.Context) float64
- func (igb *ItemGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (igb *ItemGroupBy) Float64sX(ctx context.Context) []float64
- func (igb *ItemGroupBy) Int(ctx context.Context) (_ int, err error)
- func (igb *ItemGroupBy) IntX(ctx context.Context) int
- func (igb *ItemGroupBy) Ints(ctx context.Context) ([]int, error)
- func (igb *ItemGroupBy) IntsX(ctx context.Context) []int
- func (igb *ItemGroupBy) Scan(ctx context.Context, v interface{}) error
- func (igb *ItemGroupBy) ScanX(ctx context.Context, v interface{})
- func (igb *ItemGroupBy) String(ctx context.Context) (_ string, err error)
- func (igb *ItemGroupBy) StringX(ctx context.Context) string
- func (igb *ItemGroupBy) Strings(ctx context.Context) ([]string, error)
- func (igb *ItemGroupBy) StringsX(ctx context.Context) []string
- type ItemMutation
- func (m *ItemMutation) AddDimensionIDs(ids ...int)
- func (m *ItemMutation) AddField(name string, value ent.Value) error
- func (m *ItemMutation) AddValue(f float64)
- func (m *ItemMutation) AddedEdges() []string
- func (m *ItemMutation) AddedField(name string) (ent.Value, bool)
- func (m *ItemMutation) AddedFields() []string
- func (m *ItemMutation) AddedIDs(name string) []ent.Value
- func (m *ItemMutation) AddedValue() (r float64, exists bool)
- func (m *ItemMutation) ClearDimensions()
- func (m *ItemMutation) ClearEdge(name string) error
- func (m *ItemMutation) ClearField(name string) error
- func (m *ItemMutation) ClearMeta()
- func (m *ItemMutation) ClearMetric()
- func (m *ItemMutation) ClearTaskInstance()
- func (m *ItemMutation) ClearedEdges() []string
- func (m *ItemMutation) ClearedFields() []string
- func (m ItemMutation) Client() *Client
- func (m *ItemMutation) CreateTime() (r time.Time, exists bool)
- func (m *ItemMutation) DimensionsCleared() bool
- func (m *ItemMutation) DimensionsIDs() (ids []int)
- func (m *ItemMutation) EdgeCleared(name string) bool
- func (m *ItemMutation) Field(name string) (ent.Value, bool)
- func (m *ItemMutation) FieldCleared(name string) bool
- func (m *ItemMutation) Fields() []string
- func (m *ItemMutation) ID() (id int, exists bool)
- func (m *ItemMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ItemMutation) Meta() (r map[string]interface{}, exists bool)
- func (m *ItemMutation) MetaCleared() bool
- func (m *ItemMutation) MetricCleared() bool
- func (m *ItemMutation) MetricID() (id int, exists bool)
- func (m *ItemMutation) MetricIDs() (ids []int)
- func (m *ItemMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *ItemMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ItemMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
- func (m *ItemMutation) OldTimestamp(ctx context.Context) (v time.Time, err error)
- func (m *ItemMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *ItemMutation) OldValue(ctx context.Context) (v float64, err error)
- func (m *ItemMutation) Op() Op
- func (m *ItemMutation) RemoveDimensionIDs(ids ...int)
- func (m *ItemMutation) RemovedDimensionsIDs() (ids []int)
- func (m *ItemMutation) RemovedEdges() []string
- func (m *ItemMutation) RemovedIDs(name string) []ent.Value
- func (m *ItemMutation) ResetCreateTime()
- func (m *ItemMutation) ResetDimensions()
- func (m *ItemMutation) ResetEdge(name string) error
- func (m *ItemMutation) ResetField(name string) error
- func (m *ItemMutation) ResetMeta()
- func (m *ItemMutation) ResetMetric()
- func (m *ItemMutation) ResetTaskInstance()
- func (m *ItemMutation) ResetTimestamp()
- func (m *ItemMutation) ResetUpdateTime()
- func (m *ItemMutation) ResetValue()
- func (m *ItemMutation) SetCreateTime(t time.Time)
- func (m *ItemMutation) SetField(name string, value ent.Value) error
- func (m *ItemMutation) SetMeta(value map[string]interface{})
- func (m *ItemMutation) SetMetricID(id int)
- func (m *ItemMutation) SetTaskInstanceID(id int)
- func (m *ItemMutation) SetTimestamp(t time.Time)
- func (m *ItemMutation) SetUpdateTime(t time.Time)
- func (m *ItemMutation) SetValue(f float64)
- func (m *ItemMutation) TaskInstanceCleared() bool
- func (m *ItemMutation) TaskInstanceID() (id int, exists bool)
- func (m *ItemMutation) TaskInstanceIDs() (ids []int)
- func (m *ItemMutation) Timestamp() (r time.Time, exists bool)
- func (m ItemMutation) Tx() (*Tx, error)
- func (m *ItemMutation) Type() string
- func (m *ItemMutation) UpdateTime() (r time.Time, exists bool)
- func (m *ItemMutation) Value() (r float64, exists bool)
- func (m *ItemMutation) Where(ps ...predicate.Item)
- type ItemQuery
- func (iq *ItemQuery) All(ctx context.Context) ([]*Item, error)
- func (iq *ItemQuery) AllX(ctx context.Context) []*Item
- func (iq *ItemQuery) Clone() *ItemQuery
- func (iq *ItemQuery) Count(ctx context.Context) (int, error)
- func (iq *ItemQuery) CountX(ctx context.Context) int
- func (iq *ItemQuery) Exist(ctx context.Context) (bool, error)
- func (iq *ItemQuery) ExistX(ctx context.Context) bool
- func (iq *ItemQuery) First(ctx context.Context) (*Item, error)
- func (iq *ItemQuery) FirstID(ctx context.Context) (id int, err error)
- func (iq *ItemQuery) FirstIDX(ctx context.Context) int
- func (iq *ItemQuery) FirstX(ctx context.Context) *Item
- func (iq *ItemQuery) GroupBy(field string, fields ...string) *ItemGroupBy
- func (iq *ItemQuery) IDs(ctx context.Context) ([]int, error)
- func (iq *ItemQuery) IDsX(ctx context.Context) []int
- func (iq *ItemQuery) Limit(limit int) *ItemQuery
- func (iq *ItemQuery) Offset(offset int) *ItemQuery
- func (iq *ItemQuery) Only(ctx context.Context) (*Item, error)
- func (iq *ItemQuery) OnlyID(ctx context.Context) (id int, err error)
- func (iq *ItemQuery) OnlyIDX(ctx context.Context) int
- func (iq *ItemQuery) OnlyX(ctx context.Context) *Item
- func (iq *ItemQuery) Order(o ...OrderFunc) *ItemQuery
- func (iq *ItemQuery) QueryDimensions() *DimensionQuery
- func (iq *ItemQuery) QueryMetric() *MetricQuery
- func (iq *ItemQuery) QueryTaskInstance() *TaskInstanceQuery
- func (iq *ItemQuery) Select(fields ...string) *ItemSelect
- func (iq *ItemQuery) Unique(unique bool) *ItemQuery
- func (iq *ItemQuery) Where(ps ...predicate.Item) *ItemQuery
- func (iq *ItemQuery) WithDimensions(opts ...func(*DimensionQuery)) *ItemQuery
- func (iq *ItemQuery) WithMetric(opts ...func(*MetricQuery)) *ItemQuery
- func (iq *ItemQuery) WithTaskInstance(opts ...func(*TaskInstanceQuery)) *ItemQuery
- type ItemSelect
- func (is *ItemSelect) Bool(ctx context.Context) (_ bool, err error)
- func (is *ItemSelect) BoolX(ctx context.Context) bool
- func (is *ItemSelect) Bools(ctx context.Context) ([]bool, error)
- func (is *ItemSelect) BoolsX(ctx context.Context) []bool
- func (is *ItemSelect) Float64(ctx context.Context) (_ float64, err error)
- func (is *ItemSelect) Float64X(ctx context.Context) float64
- func (is *ItemSelect) Float64s(ctx context.Context) ([]float64, error)
- func (is *ItemSelect) Float64sX(ctx context.Context) []float64
- func (is *ItemSelect) Int(ctx context.Context) (_ int, err error)
- func (is *ItemSelect) IntX(ctx context.Context) int
- func (is *ItemSelect) Ints(ctx context.Context) ([]int, error)
- func (is *ItemSelect) IntsX(ctx context.Context) []int
- func (is *ItemSelect) Scan(ctx context.Context, v interface{}) error
- func (is *ItemSelect) ScanX(ctx context.Context, v interface{})
- func (is *ItemSelect) String(ctx context.Context) (_ string, err error)
- func (is *ItemSelect) StringX(ctx context.Context) string
- func (is *ItemSelect) Strings(ctx context.Context) ([]string, error)
- func (is *ItemSelect) StringsX(ctx context.Context) []string
- type ItemUpdate
- func (iu *ItemUpdate) AddDimensionIDs(ids ...int) *ItemUpdate
- func (iu *ItemUpdate) AddDimensions(d ...*Dimension) *ItemUpdate
- func (iu *ItemUpdate) AddValue(f float64) *ItemUpdate
- func (iu *ItemUpdate) ClearDimensions() *ItemUpdate
- func (iu *ItemUpdate) ClearMeta() *ItemUpdate
- func (iu *ItemUpdate) ClearMetric() *ItemUpdate
- func (iu *ItemUpdate) ClearTaskInstance() *ItemUpdate
- func (iu *ItemUpdate) Exec(ctx context.Context) error
- func (iu *ItemUpdate) ExecX(ctx context.Context)
- func (iu *ItemUpdate) Mutation() *ItemMutation
- func (iu *ItemUpdate) RemoveDimensionIDs(ids ...int) *ItemUpdate
- func (iu *ItemUpdate) RemoveDimensions(d ...*Dimension) *ItemUpdate
- func (iu *ItemUpdate) Save(ctx context.Context) (int, error)
- func (iu *ItemUpdate) SaveX(ctx context.Context) int
- func (iu *ItemUpdate) SetMeta(m map[string]interface{}) *ItemUpdate
- func (iu *ItemUpdate) SetMetric(m *Metric) *ItemUpdate
- func (iu *ItemUpdate) SetMetricID(id int) *ItemUpdate
- func (iu *ItemUpdate) SetNillableTimestamp(t *time.Time) *ItemUpdate
- func (iu *ItemUpdate) SetTaskInstance(t *TaskInstance) *ItemUpdate
- func (iu *ItemUpdate) SetTaskInstanceID(id int) *ItemUpdate
- func (iu *ItemUpdate) SetTimestamp(t time.Time) *ItemUpdate
- func (iu *ItemUpdate) SetUpdateTime(t time.Time) *ItemUpdate
- func (iu *ItemUpdate) SetValue(f float64) *ItemUpdate
- func (iu *ItemUpdate) Where(ps ...predicate.Item) *ItemUpdate
- type ItemUpdateOne
- func (iuo *ItemUpdateOne) AddDimensionIDs(ids ...int) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddDimensions(d ...*Dimension) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddValue(f float64) *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearDimensions() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearMeta() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearMetric() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearTaskInstance() *ItemUpdateOne
- func (iuo *ItemUpdateOne) Exec(ctx context.Context) error
- func (iuo *ItemUpdateOne) ExecX(ctx context.Context)
- func (iuo *ItemUpdateOne) Mutation() *ItemMutation
- func (iuo *ItemUpdateOne) RemoveDimensionIDs(ids ...int) *ItemUpdateOne
- func (iuo *ItemUpdateOne) RemoveDimensions(d ...*Dimension) *ItemUpdateOne
- func (iuo *ItemUpdateOne) Save(ctx context.Context) (*Item, error)
- func (iuo *ItemUpdateOne) SaveX(ctx context.Context) *Item
- func (iuo *ItemUpdateOne) Select(field string, fields ...string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetMeta(m map[string]interface{}) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetMetric(m *Metric) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetMetricID(id int) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableTimestamp(t *time.Time) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetTaskInstance(t *TaskInstance) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetTaskInstanceID(id int) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetTimestamp(t time.Time) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetUpdateTime(t time.Time) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetValue(f float64) *ItemUpdateOne
- type Items
- type Metric
- type MetricClient
- func (c *MetricClient) Create() *MetricCreate
- func (c *MetricClient) CreateBulk(builders ...*MetricCreate) *MetricCreateBulk
- func (c *MetricClient) Delete() *MetricDelete
- func (c *MetricClient) DeleteOne(m *Metric) *MetricDeleteOne
- func (c *MetricClient) DeleteOneID(id int) *MetricDeleteOne
- func (c *MetricClient) Get(ctx context.Context, id int) (*Metric, error)
- func (c *MetricClient) GetX(ctx context.Context, id int) *Metric
- func (c *MetricClient) Hooks() []Hook
- func (c *MetricClient) Query() *MetricQuery
- func (c *MetricClient) QueryItems(m *Metric) *ItemQuery
- func (c *MetricClient) QueryTask(m *Metric) *TaskQuery
- func (c *MetricClient) Update() *MetricUpdate
- func (c *MetricClient) UpdateOne(m *Metric) *MetricUpdateOne
- func (c *MetricClient) UpdateOneID(id int) *MetricUpdateOne
- func (c *MetricClient) Use(hooks ...Hook)
- type MetricCreate
- func (mc *MetricCreate) AddItemIDs(ids ...int) *MetricCreate
- func (mc *MetricCreate) AddItems(i ...*Item) *MetricCreate
- func (mc *MetricCreate) Exec(ctx context.Context) error
- func (mc *MetricCreate) ExecX(ctx context.Context)
- func (mc *MetricCreate) Mutation() *MetricMutation
- func (mc *MetricCreate) Save(ctx context.Context) (*Metric, error)
- func (mc *MetricCreate) SaveX(ctx context.Context) *Metric
- func (mc *MetricCreate) SetCreateTime(t time.Time) *MetricCreate
- func (mc *MetricCreate) SetDescription(s string) *MetricCreate
- func (mc *MetricCreate) SetDisplayTitle(m map[string]string) *MetricCreate
- func (mc *MetricCreate) SetMeta(m map[string]interface{}) *MetricCreate
- func (mc *MetricCreate) SetNillableCreateTime(t *time.Time) *MetricCreate
- func (mc *MetricCreate) SetNillableDescription(s *string) *MetricCreate
- func (mc *MetricCreate) SetNillableUpdateTime(t *time.Time) *MetricCreate
- func (mc *MetricCreate) SetTask(t *Task) *MetricCreate
- func (mc *MetricCreate) SetTaskID(id int) *MetricCreate
- func (mc *MetricCreate) SetTitle(s string) *MetricCreate
- func (mc *MetricCreate) SetUpdateTime(t time.Time) *MetricCreate
- type MetricCreateBulk
- type MetricDelete
- type MetricDeleteOne
- type MetricEdges
- type MetricGroupBy
- func (mgb *MetricGroupBy) Aggregate(fns ...AggregateFunc) *MetricGroupBy
- func (mgb *MetricGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (mgb *MetricGroupBy) BoolX(ctx context.Context) bool
- func (mgb *MetricGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (mgb *MetricGroupBy) BoolsX(ctx context.Context) []bool
- func (mgb *MetricGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (mgb *MetricGroupBy) Float64X(ctx context.Context) float64
- func (mgb *MetricGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (mgb *MetricGroupBy) Float64sX(ctx context.Context) []float64
- func (mgb *MetricGroupBy) Int(ctx context.Context) (_ int, err error)
- func (mgb *MetricGroupBy) IntX(ctx context.Context) int
- func (mgb *MetricGroupBy) Ints(ctx context.Context) ([]int, error)
- func (mgb *MetricGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MetricGroupBy) Scan(ctx context.Context, v interface{}) error
- func (mgb *MetricGroupBy) ScanX(ctx context.Context, v interface{})
- func (mgb *MetricGroupBy) String(ctx context.Context) (_ string, err error)
- func (mgb *MetricGroupBy) StringX(ctx context.Context) string
- func (mgb *MetricGroupBy) Strings(ctx context.Context) ([]string, error)
- func (mgb *MetricGroupBy) StringsX(ctx context.Context) []string
- type MetricMutation
- func (m *MetricMutation) AddField(name string, value ent.Value) error
- func (m *MetricMutation) AddItemIDs(ids ...int)
- func (m *MetricMutation) AddedEdges() []string
- func (m *MetricMutation) AddedField(name string) (ent.Value, bool)
- func (m *MetricMutation) AddedFields() []string
- func (m *MetricMutation) AddedIDs(name string) []ent.Value
- func (m *MetricMutation) ClearDescription()
- func (m *MetricMutation) ClearDisplayTitle()
- func (m *MetricMutation) ClearEdge(name string) error
- func (m *MetricMutation) ClearField(name string) error
- func (m *MetricMutation) ClearItems()
- func (m *MetricMutation) ClearMeta()
- func (m *MetricMutation) ClearTask()
- func (m *MetricMutation) ClearedEdges() []string
- func (m *MetricMutation) ClearedFields() []string
- func (m MetricMutation) Client() *Client
- func (m *MetricMutation) CreateTime() (r time.Time, exists bool)
- func (m *MetricMutation) Description() (r string, exists bool)
- func (m *MetricMutation) DescriptionCleared() bool
- func (m *MetricMutation) DisplayTitle() (r map[string]string, exists bool)
- func (m *MetricMutation) DisplayTitleCleared() bool
- func (m *MetricMutation) EdgeCleared(name string) bool
- func (m *MetricMutation) Field(name string) (ent.Value, bool)
- func (m *MetricMutation) FieldCleared(name string) bool
- func (m *MetricMutation) Fields() []string
- func (m *MetricMutation) ID() (id int, exists bool)
- func (m *MetricMutation) IDs(ctx context.Context) ([]int, error)
- func (m *MetricMutation) ItemsCleared() bool
- func (m *MetricMutation) ItemsIDs() (ids []int)
- func (m *MetricMutation) Meta() (r map[string]interface{}, exists bool)
- func (m *MetricMutation) MetaCleared() bool
- func (m *MetricMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *MetricMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *MetricMutation) OldDisplayTitle(ctx context.Context) (v map[string]string, err error)
- func (m *MetricMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MetricMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
- func (m *MetricMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *MetricMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *MetricMutation) Op() Op
- func (m *MetricMutation) RemoveItemIDs(ids ...int)
- func (m *MetricMutation) RemovedEdges() []string
- func (m *MetricMutation) RemovedIDs(name string) []ent.Value
- func (m *MetricMutation) RemovedItemsIDs() (ids []int)
- func (m *MetricMutation) ResetCreateTime()
- func (m *MetricMutation) ResetDescription()
- func (m *MetricMutation) ResetDisplayTitle()
- func (m *MetricMutation) ResetEdge(name string) error
- func (m *MetricMutation) ResetField(name string) error
- func (m *MetricMutation) ResetItems()
- func (m *MetricMutation) ResetMeta()
- func (m *MetricMutation) ResetTask()
- func (m *MetricMutation) ResetTitle()
- func (m *MetricMutation) ResetUpdateTime()
- func (m *MetricMutation) SetCreateTime(t time.Time)
- func (m *MetricMutation) SetDescription(s string)
- func (m *MetricMutation) SetDisplayTitle(value map[string]string)
- func (m *MetricMutation) SetField(name string, value ent.Value) error
- func (m *MetricMutation) SetMeta(value map[string]interface{})
- func (m *MetricMutation) SetTaskID(id int)
- func (m *MetricMutation) SetTitle(s string)
- func (m *MetricMutation) SetUpdateTime(t time.Time)
- func (m *MetricMutation) TaskCleared() bool
- func (m *MetricMutation) TaskID() (id int, exists bool)
- func (m *MetricMutation) TaskIDs() (ids []int)
- func (m *MetricMutation) Title() (r string, exists bool)
- func (m MetricMutation) Tx() (*Tx, error)
- func (m *MetricMutation) Type() string
- func (m *MetricMutation) UpdateTime() (r time.Time, exists bool)
- func (m *MetricMutation) Where(ps ...predicate.Metric)
- type MetricQuery
- func (mq *MetricQuery) All(ctx context.Context) ([]*Metric, error)
- func (mq *MetricQuery) AllX(ctx context.Context) []*Metric
- func (mq *MetricQuery) Clone() *MetricQuery
- func (mq *MetricQuery) Count(ctx context.Context) (int, error)
- func (mq *MetricQuery) CountX(ctx context.Context) int
- func (mq *MetricQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MetricQuery) ExistX(ctx context.Context) bool
- func (mq *MetricQuery) First(ctx context.Context) (*Metric, error)
- func (mq *MetricQuery) FirstID(ctx context.Context) (id int, err error)
- func (mq *MetricQuery) FirstIDX(ctx context.Context) int
- func (mq *MetricQuery) FirstX(ctx context.Context) *Metric
- func (mq *MetricQuery) GroupBy(field string, fields ...string) *MetricGroupBy
- func (mq *MetricQuery) IDs(ctx context.Context) ([]int, error)
- func (mq *MetricQuery) IDsX(ctx context.Context) []int
- func (mq *MetricQuery) Limit(limit int) *MetricQuery
- func (mq *MetricQuery) Offset(offset int) *MetricQuery
- func (mq *MetricQuery) Only(ctx context.Context) (*Metric, error)
- func (mq *MetricQuery) OnlyID(ctx context.Context) (id int, err error)
- func (mq *MetricQuery) OnlyIDX(ctx context.Context) int
- func (mq *MetricQuery) OnlyX(ctx context.Context) *Metric
- func (mq *MetricQuery) Order(o ...OrderFunc) *MetricQuery
- func (mq *MetricQuery) QueryItems() *ItemQuery
- func (mq *MetricQuery) QueryTask() *TaskQuery
- func (mq *MetricQuery) Select(fields ...string) *MetricSelect
- func (mq *MetricQuery) Unique(unique bool) *MetricQuery
- func (mq *MetricQuery) Where(ps ...predicate.Metric) *MetricQuery
- func (mq *MetricQuery) WithItems(opts ...func(*ItemQuery)) *MetricQuery
- func (mq *MetricQuery) WithTask(opts ...func(*TaskQuery)) *MetricQuery
- type MetricSelect
- func (ms *MetricSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ms *MetricSelect) BoolX(ctx context.Context) bool
- func (ms *MetricSelect) Bools(ctx context.Context) ([]bool, error)
- func (ms *MetricSelect) BoolsX(ctx context.Context) []bool
- func (ms *MetricSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ms *MetricSelect) Float64X(ctx context.Context) float64
- func (ms *MetricSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ms *MetricSelect) Float64sX(ctx context.Context) []float64
- func (ms *MetricSelect) Int(ctx context.Context) (_ int, err error)
- func (ms *MetricSelect) IntX(ctx context.Context) int
- func (ms *MetricSelect) Ints(ctx context.Context) ([]int, error)
- func (ms *MetricSelect) IntsX(ctx context.Context) []int
- func (ms *MetricSelect) Scan(ctx context.Context, v interface{}) error
- func (ms *MetricSelect) ScanX(ctx context.Context, v interface{})
- func (ms *MetricSelect) String(ctx context.Context) (_ string, err error)
- func (ms *MetricSelect) StringX(ctx context.Context) string
- func (ms *MetricSelect) Strings(ctx context.Context) ([]string, error)
- func (ms *MetricSelect) StringsX(ctx context.Context) []string
- type MetricUpdate
- func (mu *MetricUpdate) AddItemIDs(ids ...int) *MetricUpdate
- func (mu *MetricUpdate) AddItems(i ...*Item) *MetricUpdate
- func (mu *MetricUpdate) ClearDescription() *MetricUpdate
- func (mu *MetricUpdate) ClearDisplayTitle() *MetricUpdate
- func (mu *MetricUpdate) ClearItems() *MetricUpdate
- func (mu *MetricUpdate) ClearMeta() *MetricUpdate
- func (mu *MetricUpdate) ClearTask() *MetricUpdate
- func (mu *MetricUpdate) Exec(ctx context.Context) error
- func (mu *MetricUpdate) ExecX(ctx context.Context)
- func (mu *MetricUpdate) Mutation() *MetricMutation
- func (mu *MetricUpdate) RemoveItemIDs(ids ...int) *MetricUpdate
- func (mu *MetricUpdate) RemoveItems(i ...*Item) *MetricUpdate
- func (mu *MetricUpdate) Save(ctx context.Context) (int, error)
- func (mu *MetricUpdate) SaveX(ctx context.Context) int
- func (mu *MetricUpdate) SetDescription(s string) *MetricUpdate
- func (mu *MetricUpdate) SetDisplayTitle(m map[string]string) *MetricUpdate
- func (mu *MetricUpdate) SetMeta(m map[string]interface{}) *MetricUpdate
- func (mu *MetricUpdate) SetNillableDescription(s *string) *MetricUpdate
- func (mu *MetricUpdate) SetTask(t *Task) *MetricUpdate
- func (mu *MetricUpdate) SetTaskID(id int) *MetricUpdate
- func (mu *MetricUpdate) SetTitle(s string) *MetricUpdate
- func (mu *MetricUpdate) SetUpdateTime(t time.Time) *MetricUpdate
- func (mu *MetricUpdate) Where(ps ...predicate.Metric) *MetricUpdate
- type MetricUpdateOne
- func (muo *MetricUpdateOne) AddItemIDs(ids ...int) *MetricUpdateOne
- func (muo *MetricUpdateOne) AddItems(i ...*Item) *MetricUpdateOne
- func (muo *MetricUpdateOne) ClearDescription() *MetricUpdateOne
- func (muo *MetricUpdateOne) ClearDisplayTitle() *MetricUpdateOne
- func (muo *MetricUpdateOne) ClearItems() *MetricUpdateOne
- func (muo *MetricUpdateOne) ClearMeta() *MetricUpdateOne
- func (muo *MetricUpdateOne) ClearTask() *MetricUpdateOne
- func (muo *MetricUpdateOne) Exec(ctx context.Context) error
- func (muo *MetricUpdateOne) ExecX(ctx context.Context)
- func (muo *MetricUpdateOne) Mutation() *MetricMutation
- func (muo *MetricUpdateOne) RemoveItemIDs(ids ...int) *MetricUpdateOne
- func (muo *MetricUpdateOne) RemoveItems(i ...*Item) *MetricUpdateOne
- func (muo *MetricUpdateOne) Save(ctx context.Context) (*Metric, error)
- func (muo *MetricUpdateOne) SaveX(ctx context.Context) *Metric
- func (muo *MetricUpdateOne) Select(field string, fields ...string) *MetricUpdateOne
- func (muo *MetricUpdateOne) SetDescription(s string) *MetricUpdateOne
- func (muo *MetricUpdateOne) SetDisplayTitle(m map[string]string) *MetricUpdateOne
- func (muo *MetricUpdateOne) SetMeta(m map[string]interface{}) *MetricUpdateOne
- func (muo *MetricUpdateOne) SetNillableDescription(s *string) *MetricUpdateOne
- func (muo *MetricUpdateOne) SetTask(t *Task) *MetricUpdateOne
- func (muo *MetricUpdateOne) SetTaskID(id int) *MetricUpdateOne
- func (muo *MetricUpdateOne) SetTitle(s string) *MetricUpdateOne
- func (muo *MetricUpdateOne) SetUpdateTime(t time.Time) *MetricUpdateOne
- type Metrics
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Task
- type TaskCategories
- type TaskCategory
- type TaskCategoryClient
- func (c *TaskCategoryClient) Create() *TaskCategoryCreate
- func (c *TaskCategoryClient) CreateBulk(builders ...*TaskCategoryCreate) *TaskCategoryCreateBulk
- func (c *TaskCategoryClient) Delete() *TaskCategoryDelete
- func (c *TaskCategoryClient) DeleteOne(tc *TaskCategory) *TaskCategoryDeleteOne
- func (c *TaskCategoryClient) DeleteOneID(id int) *TaskCategoryDeleteOne
- func (c *TaskCategoryClient) Get(ctx context.Context, id int) (*TaskCategory, error)
- func (c *TaskCategoryClient) GetX(ctx context.Context, id int) *TaskCategory
- func (c *TaskCategoryClient) Hooks() []Hook
- func (c *TaskCategoryClient) Query() *TaskCategoryQuery
- func (c *TaskCategoryClient) QueryTasks(tc *TaskCategory) *TaskQuery
- func (c *TaskCategoryClient) Update() *TaskCategoryUpdate
- func (c *TaskCategoryClient) UpdateOne(tc *TaskCategory) *TaskCategoryUpdateOne
- func (c *TaskCategoryClient) UpdateOneID(id int) *TaskCategoryUpdateOne
- func (c *TaskCategoryClient) Use(hooks ...Hook)
- type TaskCategoryCreate
- func (tcc *TaskCategoryCreate) AddTaskIDs(ids ...int) *TaskCategoryCreate
- func (tcc *TaskCategoryCreate) AddTasks(t ...*Task) *TaskCategoryCreate
- func (tcc *TaskCategoryCreate) Exec(ctx context.Context) error
- func (tcc *TaskCategoryCreate) ExecX(ctx context.Context)
- func (tcc *TaskCategoryCreate) Mutation() *TaskCategoryMutation
- func (tcc *TaskCategoryCreate) Save(ctx context.Context) (*TaskCategory, error)
- func (tcc *TaskCategoryCreate) SaveX(ctx context.Context) *TaskCategory
- func (tcc *TaskCategoryCreate) SetCreateTime(t time.Time) *TaskCategoryCreate
- func (tcc *TaskCategoryCreate) SetDescription(s string) *TaskCategoryCreate
- func (tcc *TaskCategoryCreate) SetDisplay(b bool) *TaskCategoryCreate
- func (tcc *TaskCategoryCreate) SetMeta(m map[string]interface{}) *TaskCategoryCreate
- func (tcc *TaskCategoryCreate) SetNillableCreateTime(t *time.Time) *TaskCategoryCreate
- func (tcc *TaskCategoryCreate) SetNillableDescription(s *string) *TaskCategoryCreate
- func (tcc *TaskCategoryCreate) SetNillableDisplay(b *bool) *TaskCategoryCreate
- func (tcc *TaskCategoryCreate) SetNillableUpdateTime(t *time.Time) *TaskCategoryCreate
- func (tcc *TaskCategoryCreate) SetTitle(s string) *TaskCategoryCreate
- func (tcc *TaskCategoryCreate) SetUpdateTime(t time.Time) *TaskCategoryCreate
- type TaskCategoryCreateBulk
- type TaskCategoryDelete
- type TaskCategoryDeleteOne
- type TaskCategoryEdges
- type TaskCategoryGroupBy
- func (tcgb *TaskCategoryGroupBy) Aggregate(fns ...AggregateFunc) *TaskCategoryGroupBy
- func (tcgb *TaskCategoryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (tcgb *TaskCategoryGroupBy) BoolX(ctx context.Context) bool
- func (tcgb *TaskCategoryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (tcgb *TaskCategoryGroupBy) BoolsX(ctx context.Context) []bool
- func (tcgb *TaskCategoryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (tcgb *TaskCategoryGroupBy) Float64X(ctx context.Context) float64
- func (tcgb *TaskCategoryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (tcgb *TaskCategoryGroupBy) Float64sX(ctx context.Context) []float64
- func (tcgb *TaskCategoryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (tcgb *TaskCategoryGroupBy) IntX(ctx context.Context) int
- func (tcgb *TaskCategoryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (tcgb *TaskCategoryGroupBy) IntsX(ctx context.Context) []int
- func (tcgb *TaskCategoryGroupBy) Scan(ctx context.Context, v interface{}) error
- func (tcgb *TaskCategoryGroupBy) ScanX(ctx context.Context, v interface{})
- func (tcgb *TaskCategoryGroupBy) String(ctx context.Context) (_ string, err error)
- func (tcgb *TaskCategoryGroupBy) StringX(ctx context.Context) string
- func (tcgb *TaskCategoryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (tcgb *TaskCategoryGroupBy) StringsX(ctx context.Context) []string
- type TaskCategoryMutation
- func (m *TaskCategoryMutation) AddField(name string, value ent.Value) error
- func (m *TaskCategoryMutation) AddTaskIDs(ids ...int)
- func (m *TaskCategoryMutation) AddedEdges() []string
- func (m *TaskCategoryMutation) AddedField(name string) (ent.Value, bool)
- func (m *TaskCategoryMutation) AddedFields() []string
- func (m *TaskCategoryMutation) AddedIDs(name string) []ent.Value
- func (m *TaskCategoryMutation) ClearDescription()
- func (m *TaskCategoryMutation) ClearEdge(name string) error
- func (m *TaskCategoryMutation) ClearField(name string) error
- func (m *TaskCategoryMutation) ClearMeta()
- func (m *TaskCategoryMutation) ClearTasks()
- func (m *TaskCategoryMutation) ClearedEdges() []string
- func (m *TaskCategoryMutation) ClearedFields() []string
- func (m TaskCategoryMutation) Client() *Client
- func (m *TaskCategoryMutation) CreateTime() (r time.Time, exists bool)
- func (m *TaskCategoryMutation) Description() (r string, exists bool)
- func (m *TaskCategoryMutation) DescriptionCleared() bool
- func (m *TaskCategoryMutation) Display() (r bool, exists bool)
- func (m *TaskCategoryMutation) EdgeCleared(name string) bool
- func (m *TaskCategoryMutation) Field(name string) (ent.Value, bool)
- func (m *TaskCategoryMutation) FieldCleared(name string) bool
- func (m *TaskCategoryMutation) Fields() []string
- func (m *TaskCategoryMutation) ID() (id int, exists bool)
- func (m *TaskCategoryMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TaskCategoryMutation) Meta() (r map[string]interface{}, exists bool)
- func (m *TaskCategoryMutation) MetaCleared() bool
- func (m *TaskCategoryMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *TaskCategoryMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *TaskCategoryMutation) OldDisplay(ctx context.Context) (v bool, err error)
- func (m *TaskCategoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TaskCategoryMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
- func (m *TaskCategoryMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *TaskCategoryMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *TaskCategoryMutation) Op() Op
- func (m *TaskCategoryMutation) RemoveTaskIDs(ids ...int)
- func (m *TaskCategoryMutation) RemovedEdges() []string
- func (m *TaskCategoryMutation) RemovedIDs(name string) []ent.Value
- func (m *TaskCategoryMutation) RemovedTasksIDs() (ids []int)
- func (m *TaskCategoryMutation) ResetCreateTime()
- func (m *TaskCategoryMutation) ResetDescription()
- func (m *TaskCategoryMutation) ResetDisplay()
- func (m *TaskCategoryMutation) ResetEdge(name string) error
- func (m *TaskCategoryMutation) ResetField(name string) error
- func (m *TaskCategoryMutation) ResetMeta()
- func (m *TaskCategoryMutation) ResetTasks()
- func (m *TaskCategoryMutation) ResetTitle()
- func (m *TaskCategoryMutation) ResetUpdateTime()
- func (m *TaskCategoryMutation) SetCreateTime(t time.Time)
- func (m *TaskCategoryMutation) SetDescription(s string)
- func (m *TaskCategoryMutation) SetDisplay(b bool)
- func (m *TaskCategoryMutation) SetField(name string, value ent.Value) error
- func (m *TaskCategoryMutation) SetMeta(value map[string]interface{})
- func (m *TaskCategoryMutation) SetTitle(s string)
- func (m *TaskCategoryMutation) SetUpdateTime(t time.Time)
- func (m *TaskCategoryMutation) TasksCleared() bool
- func (m *TaskCategoryMutation) TasksIDs() (ids []int)
- func (m *TaskCategoryMutation) Title() (r string, exists bool)
- func (m TaskCategoryMutation) Tx() (*Tx, error)
- func (m *TaskCategoryMutation) Type() string
- func (m *TaskCategoryMutation) UpdateTime() (r time.Time, exists bool)
- func (m *TaskCategoryMutation) Where(ps ...predicate.TaskCategory)
- type TaskCategoryQuery
- func (tcq *TaskCategoryQuery) All(ctx context.Context) ([]*TaskCategory, error)
- func (tcq *TaskCategoryQuery) AllX(ctx context.Context) []*TaskCategory
- func (tcq *TaskCategoryQuery) Clone() *TaskCategoryQuery
- func (tcq *TaskCategoryQuery) Count(ctx context.Context) (int, error)
- func (tcq *TaskCategoryQuery) CountX(ctx context.Context) int
- func (tcq *TaskCategoryQuery) Exist(ctx context.Context) (bool, error)
- func (tcq *TaskCategoryQuery) ExistX(ctx context.Context) bool
- func (tcq *TaskCategoryQuery) First(ctx context.Context) (*TaskCategory, error)
- func (tcq *TaskCategoryQuery) FirstID(ctx context.Context) (id int, err error)
- func (tcq *TaskCategoryQuery) FirstIDX(ctx context.Context) int
- func (tcq *TaskCategoryQuery) FirstX(ctx context.Context) *TaskCategory
- func (tcq *TaskCategoryQuery) GroupBy(field string, fields ...string) *TaskCategoryGroupBy
- func (tcq *TaskCategoryQuery) IDs(ctx context.Context) ([]int, error)
- func (tcq *TaskCategoryQuery) IDsX(ctx context.Context) []int
- func (tcq *TaskCategoryQuery) Limit(limit int) *TaskCategoryQuery
- func (tcq *TaskCategoryQuery) Offset(offset int) *TaskCategoryQuery
- func (tcq *TaskCategoryQuery) Only(ctx context.Context) (*TaskCategory, error)
- func (tcq *TaskCategoryQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tcq *TaskCategoryQuery) OnlyIDX(ctx context.Context) int
- func (tcq *TaskCategoryQuery) OnlyX(ctx context.Context) *TaskCategory
- func (tcq *TaskCategoryQuery) Order(o ...OrderFunc) *TaskCategoryQuery
- func (tcq *TaskCategoryQuery) QueryTasks() *TaskQuery
- func (tcq *TaskCategoryQuery) Select(fields ...string) *TaskCategorySelect
- func (tcq *TaskCategoryQuery) Unique(unique bool) *TaskCategoryQuery
- func (tcq *TaskCategoryQuery) Where(ps ...predicate.TaskCategory) *TaskCategoryQuery
- func (tcq *TaskCategoryQuery) WithTasks(opts ...func(*TaskQuery)) *TaskCategoryQuery
- type TaskCategorySelect
- func (tcs *TaskCategorySelect) Bool(ctx context.Context) (_ bool, err error)
- func (tcs *TaskCategorySelect) BoolX(ctx context.Context) bool
- func (tcs *TaskCategorySelect) Bools(ctx context.Context) ([]bool, error)
- func (tcs *TaskCategorySelect) BoolsX(ctx context.Context) []bool
- func (tcs *TaskCategorySelect) Float64(ctx context.Context) (_ float64, err error)
- func (tcs *TaskCategorySelect) Float64X(ctx context.Context) float64
- func (tcs *TaskCategorySelect) Float64s(ctx context.Context) ([]float64, error)
- func (tcs *TaskCategorySelect) Float64sX(ctx context.Context) []float64
- func (tcs *TaskCategorySelect) Int(ctx context.Context) (_ int, err error)
- func (tcs *TaskCategorySelect) IntX(ctx context.Context) int
- func (tcs *TaskCategorySelect) Ints(ctx context.Context) ([]int, error)
- func (tcs *TaskCategorySelect) IntsX(ctx context.Context) []int
- func (tcs *TaskCategorySelect) Scan(ctx context.Context, v interface{}) error
- func (tcs *TaskCategorySelect) ScanX(ctx context.Context, v interface{})
- func (tcs *TaskCategorySelect) String(ctx context.Context) (_ string, err error)
- func (tcs *TaskCategorySelect) StringX(ctx context.Context) string
- func (tcs *TaskCategorySelect) Strings(ctx context.Context) ([]string, error)
- func (tcs *TaskCategorySelect) StringsX(ctx context.Context) []string
- type TaskCategoryUpdate
- func (tcu *TaskCategoryUpdate) AddTaskIDs(ids ...int) *TaskCategoryUpdate
- func (tcu *TaskCategoryUpdate) AddTasks(t ...*Task) *TaskCategoryUpdate
- func (tcu *TaskCategoryUpdate) ClearDescription() *TaskCategoryUpdate
- func (tcu *TaskCategoryUpdate) ClearMeta() *TaskCategoryUpdate
- func (tcu *TaskCategoryUpdate) ClearTasks() *TaskCategoryUpdate
- func (tcu *TaskCategoryUpdate) Exec(ctx context.Context) error
- func (tcu *TaskCategoryUpdate) ExecX(ctx context.Context)
- func (tcu *TaskCategoryUpdate) Mutation() *TaskCategoryMutation
- func (tcu *TaskCategoryUpdate) RemoveTaskIDs(ids ...int) *TaskCategoryUpdate
- func (tcu *TaskCategoryUpdate) RemoveTasks(t ...*Task) *TaskCategoryUpdate
- func (tcu *TaskCategoryUpdate) Save(ctx context.Context) (int, error)
- func (tcu *TaskCategoryUpdate) SaveX(ctx context.Context) int
- func (tcu *TaskCategoryUpdate) SetDescription(s string) *TaskCategoryUpdate
- func (tcu *TaskCategoryUpdate) SetDisplay(b bool) *TaskCategoryUpdate
- func (tcu *TaskCategoryUpdate) SetMeta(m map[string]interface{}) *TaskCategoryUpdate
- func (tcu *TaskCategoryUpdate) SetNillableDescription(s *string) *TaskCategoryUpdate
- func (tcu *TaskCategoryUpdate) SetNillableDisplay(b *bool) *TaskCategoryUpdate
- func (tcu *TaskCategoryUpdate) SetTitle(s string) *TaskCategoryUpdate
- func (tcu *TaskCategoryUpdate) SetUpdateTime(t time.Time) *TaskCategoryUpdate
- func (tcu *TaskCategoryUpdate) Where(ps ...predicate.TaskCategory) *TaskCategoryUpdate
- type TaskCategoryUpdateOne
- func (tcuo *TaskCategoryUpdateOne) AddTaskIDs(ids ...int) *TaskCategoryUpdateOne
- func (tcuo *TaskCategoryUpdateOne) AddTasks(t ...*Task) *TaskCategoryUpdateOne
- func (tcuo *TaskCategoryUpdateOne) ClearDescription() *TaskCategoryUpdateOne
- func (tcuo *TaskCategoryUpdateOne) ClearMeta() *TaskCategoryUpdateOne
- func (tcuo *TaskCategoryUpdateOne) ClearTasks() *TaskCategoryUpdateOne
- func (tcuo *TaskCategoryUpdateOne) Exec(ctx context.Context) error
- func (tcuo *TaskCategoryUpdateOne) ExecX(ctx context.Context)
- func (tcuo *TaskCategoryUpdateOne) Mutation() *TaskCategoryMutation
- func (tcuo *TaskCategoryUpdateOne) RemoveTaskIDs(ids ...int) *TaskCategoryUpdateOne
- func (tcuo *TaskCategoryUpdateOne) RemoveTasks(t ...*Task) *TaskCategoryUpdateOne
- func (tcuo *TaskCategoryUpdateOne) Save(ctx context.Context) (*TaskCategory, error)
- func (tcuo *TaskCategoryUpdateOne) SaveX(ctx context.Context) *TaskCategory
- func (tcuo *TaskCategoryUpdateOne) Select(field string, fields ...string) *TaskCategoryUpdateOne
- func (tcuo *TaskCategoryUpdateOne) SetDescription(s string) *TaskCategoryUpdateOne
- func (tcuo *TaskCategoryUpdateOne) SetDisplay(b bool) *TaskCategoryUpdateOne
- func (tcuo *TaskCategoryUpdateOne) SetMeta(m map[string]interface{}) *TaskCategoryUpdateOne
- func (tcuo *TaskCategoryUpdateOne) SetNillableDescription(s *string) *TaskCategoryUpdateOne
- func (tcuo *TaskCategoryUpdateOne) SetNillableDisplay(b *bool) *TaskCategoryUpdateOne
- func (tcuo *TaskCategoryUpdateOne) SetTitle(s string) *TaskCategoryUpdateOne
- func (tcuo *TaskCategoryUpdateOne) SetUpdateTime(t time.Time) *TaskCategoryUpdateOne
- type TaskClient
- func (c *TaskClient) Create() *TaskCreate
- func (c *TaskClient) CreateBulk(builders ...*TaskCreate) *TaskCreateBulk
- func (c *TaskClient) Delete() *TaskDelete
- func (c *TaskClient) DeleteOne(t *Task) *TaskDeleteOne
- func (c *TaskClient) DeleteOneID(id int) *TaskDeleteOne
- func (c *TaskClient) Get(ctx context.Context, id int) (*Task, error)
- func (c *TaskClient) GetX(ctx context.Context, id int) *Task
- func (c *TaskClient) Hooks() []Hook
- func (c *TaskClient) Query() *TaskQuery
- func (c *TaskClient) QueryCategory(t *Task) *TaskCategoryQuery
- func (c *TaskClient) QueryInstances(t *Task) *TaskInstanceQuery
- func (c *TaskClient) QueryMetrics(t *Task) *MetricQuery
- func (c *TaskClient) QueryTags(t *Task) *TaskTagQuery
- func (c *TaskClient) Update() *TaskUpdate
- func (c *TaskClient) UpdateOne(t *Task) *TaskUpdateOne
- func (c *TaskClient) UpdateOneID(id int) *TaskUpdateOne
- func (c *TaskClient) Use(hooks ...Hook)
- type TaskCreate
- func (tc *TaskCreate) AddInstanceIDs(ids ...int) *TaskCreate
- func (tc *TaskCreate) AddInstances(t ...*TaskInstance) *TaskCreate
- func (tc *TaskCreate) AddMetricIDs(ids ...int) *TaskCreate
- func (tc *TaskCreate) AddMetrics(m ...*Metric) *TaskCreate
- func (tc *TaskCreate) AddTagIDs(ids ...int) *TaskCreate
- func (tc *TaskCreate) AddTags(t ...*TaskTag) *TaskCreate
- func (tc *TaskCreate) Exec(ctx context.Context) error
- func (tc *TaskCreate) ExecX(ctx context.Context)
- func (tc *TaskCreate) Mutation() *TaskMutation
- func (tc *TaskCreate) Save(ctx context.Context) (*Task, error)
- func (tc *TaskCreate) SaveX(ctx context.Context) *Task
- func (tc *TaskCreate) SetActive(b bool) *TaskCreate
- func (tc *TaskCreate) SetArgs(m map[string]interface{}) *TaskCreate
- func (tc *TaskCreate) SetCategory(t *TaskCategory) *TaskCreate
- func (tc *TaskCreate) SetCategoryID(id int) *TaskCreate
- func (tc *TaskCreate) SetCode(s string) *TaskCreate
- func (tc *TaskCreate) SetCreateTime(t time.Time) *TaskCreate
- func (tc *TaskCreate) SetDescription(s string) *TaskCreate
- func (tc *TaskCreate) SetDisplay(b bool) *TaskCreate
- func (tc *TaskCreate) SetNillableActive(b *bool) *TaskCreate
- func (tc *TaskCreate) SetNillableCreateTime(t *time.Time) *TaskCreate
- func (tc *TaskCreate) SetNillableDescription(s *string) *TaskCreate
- func (tc *TaskCreate) SetNillableDisplay(b *bool) *TaskCreate
- func (tc *TaskCreate) SetNillableSchedule(s *string) *TaskCreate
- func (tc *TaskCreate) SetNillableUpdateTime(t *time.Time) *TaskCreate
- func (tc *TaskCreate) SetSchedule(s string) *TaskCreate
- func (tc *TaskCreate) SetTitle(s string) *TaskCreate
- func (tc *TaskCreate) SetType(t task.Type) *TaskCreate
- func (tc *TaskCreate) SetUpdateTime(t time.Time) *TaskCreate
- type TaskCreateBulk
- type TaskDelete
- type TaskDeleteOne
- type TaskEdges
- type TaskGroupBy
- func (tgb *TaskGroupBy) Aggregate(fns ...AggregateFunc) *TaskGroupBy
- func (tgb *TaskGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (tgb *TaskGroupBy) BoolX(ctx context.Context) bool
- func (tgb *TaskGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (tgb *TaskGroupBy) BoolsX(ctx context.Context) []bool
- func (tgb *TaskGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (tgb *TaskGroupBy) Float64X(ctx context.Context) float64
- func (tgb *TaskGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (tgb *TaskGroupBy) Float64sX(ctx context.Context) []float64
- func (tgb *TaskGroupBy) Int(ctx context.Context) (_ int, err error)
- func (tgb *TaskGroupBy) IntX(ctx context.Context) int
- func (tgb *TaskGroupBy) Ints(ctx context.Context) ([]int, error)
- func (tgb *TaskGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TaskGroupBy) Scan(ctx context.Context, v interface{}) error
- func (tgb *TaskGroupBy) ScanX(ctx context.Context, v interface{})
- func (tgb *TaskGroupBy) String(ctx context.Context) (_ string, err error)
- func (tgb *TaskGroupBy) StringX(ctx context.Context) string
- func (tgb *TaskGroupBy) Strings(ctx context.Context) ([]string, error)
- func (tgb *TaskGroupBy) StringsX(ctx context.Context) []string
- type TaskInstance
- type TaskInstanceClient
- func (c *TaskInstanceClient) Create() *TaskInstanceCreate
- func (c *TaskInstanceClient) CreateBulk(builders ...*TaskInstanceCreate) *TaskInstanceCreateBulk
- func (c *TaskInstanceClient) Delete() *TaskInstanceDelete
- func (c *TaskInstanceClient) DeleteOne(ti *TaskInstance) *TaskInstanceDeleteOne
- func (c *TaskInstanceClient) DeleteOneID(id int) *TaskInstanceDeleteOne
- func (c *TaskInstanceClient) Get(ctx context.Context, id int) (*TaskInstance, error)
- func (c *TaskInstanceClient) GetX(ctx context.Context, id int) *TaskInstance
- func (c *TaskInstanceClient) Hooks() []Hook
- func (c *TaskInstanceClient) Query() *TaskInstanceQuery
- func (c *TaskInstanceClient) QueryItems(ti *TaskInstance) *ItemQuery
- func (c *TaskInstanceClient) QueryTask(ti *TaskInstance) *TaskQuery
- func (c *TaskInstanceClient) Update() *TaskInstanceUpdate
- func (c *TaskInstanceClient) UpdateOne(ti *TaskInstance) *TaskInstanceUpdateOne
- func (c *TaskInstanceClient) UpdateOneID(id int) *TaskInstanceUpdateOne
- func (c *TaskInstanceClient) Use(hooks ...Hook)
- type TaskInstanceCreate
- func (tic *TaskInstanceCreate) AddItemIDs(ids ...int) *TaskInstanceCreate
- func (tic *TaskInstanceCreate) AddItems(i ...*Item) *TaskInstanceCreate
- func (tic *TaskInstanceCreate) Exec(ctx context.Context) error
- func (tic *TaskInstanceCreate) ExecX(ctx context.Context)
- func (tic *TaskInstanceCreate) Mutation() *TaskInstanceMutation
- func (tic *TaskInstanceCreate) Save(ctx context.Context) (*TaskInstance, error)
- func (tic *TaskInstanceCreate) SaveX(ctx context.Context) *TaskInstance
- func (tic *TaskInstanceCreate) SetAttempt(i int) *TaskInstanceCreate
- func (tic *TaskInstanceCreate) SetCreateTime(t time.Time) *TaskInstanceCreate
- func (tic *TaskInstanceCreate) SetEndTime(t time.Time) *TaskInstanceCreate
- func (tic *TaskInstanceCreate) SetError(s string) *TaskInstanceCreate
- func (tic *TaskInstanceCreate) SetMeta(m map[string]interface{}) *TaskInstanceCreate
- func (tic *TaskInstanceCreate) SetNillableAttempt(i *int) *TaskInstanceCreate
- func (tic *TaskInstanceCreate) SetNillableCreateTime(t *time.Time) *TaskInstanceCreate
- func (tic *TaskInstanceCreate) SetNillableEndTime(t *time.Time) *TaskInstanceCreate
- func (tic *TaskInstanceCreate) SetNillableError(s *string) *TaskInstanceCreate
- func (tic *TaskInstanceCreate) SetNillableRunning(b *bool) *TaskInstanceCreate
- func (tic *TaskInstanceCreate) SetNillableStartTime(t *time.Time) *TaskInstanceCreate
- func (tic *TaskInstanceCreate) SetNillableSuccess(b *bool) *TaskInstanceCreate
- func (tic *TaskInstanceCreate) SetNillableUpdateTime(t *time.Time) *TaskInstanceCreate
- func (tic *TaskInstanceCreate) SetRunning(b bool) *TaskInstanceCreate
- func (tic *TaskInstanceCreate) SetStartTime(t time.Time) *TaskInstanceCreate
- func (tic *TaskInstanceCreate) SetSuccess(b bool) *TaskInstanceCreate
- func (tic *TaskInstanceCreate) SetTask(t *Task) *TaskInstanceCreate
- func (tic *TaskInstanceCreate) SetTaskID(id int) *TaskInstanceCreate
- func (tic *TaskInstanceCreate) SetUpdateTime(t time.Time) *TaskInstanceCreate
- type TaskInstanceCreateBulk
- type TaskInstanceDelete
- type TaskInstanceDeleteOne
- type TaskInstanceEdges
- type TaskInstanceGroupBy
- func (tigb *TaskInstanceGroupBy) Aggregate(fns ...AggregateFunc) *TaskInstanceGroupBy
- func (tigb *TaskInstanceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (tigb *TaskInstanceGroupBy) BoolX(ctx context.Context) bool
- func (tigb *TaskInstanceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (tigb *TaskInstanceGroupBy) BoolsX(ctx context.Context) []bool
- func (tigb *TaskInstanceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (tigb *TaskInstanceGroupBy) Float64X(ctx context.Context) float64
- func (tigb *TaskInstanceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (tigb *TaskInstanceGroupBy) Float64sX(ctx context.Context) []float64
- func (tigb *TaskInstanceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (tigb *TaskInstanceGroupBy) IntX(ctx context.Context) int
- func (tigb *TaskInstanceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (tigb *TaskInstanceGroupBy) IntsX(ctx context.Context) []int
- func (tigb *TaskInstanceGroupBy) Scan(ctx context.Context, v interface{}) error
- func (tigb *TaskInstanceGroupBy) ScanX(ctx context.Context, v interface{})
- func (tigb *TaskInstanceGroupBy) String(ctx context.Context) (_ string, err error)
- func (tigb *TaskInstanceGroupBy) StringX(ctx context.Context) string
- func (tigb *TaskInstanceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (tigb *TaskInstanceGroupBy) StringsX(ctx context.Context) []string
- type TaskInstanceMutation
- func (m *TaskInstanceMutation) AddAttempt(i int)
- func (m *TaskInstanceMutation) AddField(name string, value ent.Value) error
- func (m *TaskInstanceMutation) AddItemIDs(ids ...int)
- func (m *TaskInstanceMutation) AddedAttempt() (r int, exists bool)
- func (m *TaskInstanceMutation) AddedEdges() []string
- func (m *TaskInstanceMutation) AddedField(name string) (ent.Value, bool)
- func (m *TaskInstanceMutation) AddedFields() []string
- func (m *TaskInstanceMutation) AddedIDs(name string) []ent.Value
- func (m *TaskInstanceMutation) Attempt() (r int, exists bool)
- func (m *TaskInstanceMutation) ClearEdge(name string) error
- func (m *TaskInstanceMutation) ClearEndTime()
- func (m *TaskInstanceMutation) ClearError()
- func (m *TaskInstanceMutation) ClearField(name string) error
- func (m *TaskInstanceMutation) ClearItems()
- func (m *TaskInstanceMutation) ClearMeta()
- func (m *TaskInstanceMutation) ClearSuccess()
- func (m *TaskInstanceMutation) ClearTask()
- func (m *TaskInstanceMutation) ClearedEdges() []string
- func (m *TaskInstanceMutation) ClearedFields() []string
- func (m TaskInstanceMutation) Client() *Client
- func (m *TaskInstanceMutation) CreateTime() (r time.Time, exists bool)
- func (m *TaskInstanceMutation) EdgeCleared(name string) bool
- func (m *TaskInstanceMutation) EndTime() (r time.Time, exists bool)
- func (m *TaskInstanceMutation) EndTimeCleared() bool
- func (m *TaskInstanceMutation) Error() (r string, exists bool)
- func (m *TaskInstanceMutation) ErrorCleared() bool
- func (m *TaskInstanceMutation) Field(name string) (ent.Value, bool)
- func (m *TaskInstanceMutation) FieldCleared(name string) bool
- func (m *TaskInstanceMutation) Fields() []string
- func (m *TaskInstanceMutation) ID() (id int, exists bool)
- func (m *TaskInstanceMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TaskInstanceMutation) ItemsCleared() bool
- func (m *TaskInstanceMutation) ItemsIDs() (ids []int)
- func (m *TaskInstanceMutation) Meta() (r map[string]interface{}, exists bool)
- func (m *TaskInstanceMutation) MetaCleared() bool
- func (m *TaskInstanceMutation) OldAttempt(ctx context.Context) (v int, err error)
- func (m *TaskInstanceMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *TaskInstanceMutation) OldEndTime(ctx context.Context) (v time.Time, err error)
- func (m *TaskInstanceMutation) OldError(ctx context.Context) (v *string, err error)
- func (m *TaskInstanceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TaskInstanceMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
- func (m *TaskInstanceMutation) OldRunning(ctx context.Context) (v bool, err error)
- func (m *TaskInstanceMutation) OldStartTime(ctx context.Context) (v time.Time, err error)
- func (m *TaskInstanceMutation) OldSuccess(ctx context.Context) (v *bool, err error)
- func (m *TaskInstanceMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *TaskInstanceMutation) Op() Op
- func (m *TaskInstanceMutation) RemoveItemIDs(ids ...int)
- func (m *TaskInstanceMutation) RemovedEdges() []string
- func (m *TaskInstanceMutation) RemovedIDs(name string) []ent.Value
- func (m *TaskInstanceMutation) RemovedItemsIDs() (ids []int)
- func (m *TaskInstanceMutation) ResetAttempt()
- func (m *TaskInstanceMutation) ResetCreateTime()
- func (m *TaskInstanceMutation) ResetEdge(name string) error
- func (m *TaskInstanceMutation) ResetEndTime()
- func (m *TaskInstanceMutation) ResetError()
- func (m *TaskInstanceMutation) ResetField(name string) error
- func (m *TaskInstanceMutation) ResetItems()
- func (m *TaskInstanceMutation) ResetMeta()
- func (m *TaskInstanceMutation) ResetRunning()
- func (m *TaskInstanceMutation) ResetStartTime()
- func (m *TaskInstanceMutation) ResetSuccess()
- func (m *TaskInstanceMutation) ResetTask()
- func (m *TaskInstanceMutation) ResetUpdateTime()
- func (m *TaskInstanceMutation) Running() (r bool, exists bool)
- func (m *TaskInstanceMutation) SetAttempt(i int)
- func (m *TaskInstanceMutation) SetCreateTime(t time.Time)
- func (m *TaskInstanceMutation) SetEndTime(t time.Time)
- func (m *TaskInstanceMutation) SetError(s string)
- func (m *TaskInstanceMutation) SetField(name string, value ent.Value) error
- func (m *TaskInstanceMutation) SetMeta(value map[string]interface{})
- func (m *TaskInstanceMutation) SetRunning(b bool)
- func (m *TaskInstanceMutation) SetStartTime(t time.Time)
- func (m *TaskInstanceMutation) SetSuccess(b bool)
- func (m *TaskInstanceMutation) SetTaskID(id int)
- func (m *TaskInstanceMutation) SetUpdateTime(t time.Time)
- func (m *TaskInstanceMutation) StartTime() (r time.Time, exists bool)
- func (m *TaskInstanceMutation) Success() (r bool, exists bool)
- func (m *TaskInstanceMutation) SuccessCleared() bool
- func (m *TaskInstanceMutation) TaskCleared() bool
- func (m *TaskInstanceMutation) TaskID() (id int, exists bool)
- func (m *TaskInstanceMutation) TaskIDs() (ids []int)
- func (m TaskInstanceMutation) Tx() (*Tx, error)
- func (m *TaskInstanceMutation) Type() string
- func (m *TaskInstanceMutation) UpdateTime() (r time.Time, exists bool)
- func (m *TaskInstanceMutation) Where(ps ...predicate.TaskInstance)
- type TaskInstanceQuery
- func (tiq *TaskInstanceQuery) All(ctx context.Context) ([]*TaskInstance, error)
- func (tiq *TaskInstanceQuery) AllX(ctx context.Context) []*TaskInstance
- func (tiq *TaskInstanceQuery) Clone() *TaskInstanceQuery
- func (tiq *TaskInstanceQuery) Count(ctx context.Context) (int, error)
- func (tiq *TaskInstanceQuery) CountX(ctx context.Context) int
- func (tiq *TaskInstanceQuery) Exist(ctx context.Context) (bool, error)
- func (tiq *TaskInstanceQuery) ExistX(ctx context.Context) bool
- func (tiq *TaskInstanceQuery) First(ctx context.Context) (*TaskInstance, error)
- func (tiq *TaskInstanceQuery) FirstID(ctx context.Context) (id int, err error)
- func (tiq *TaskInstanceQuery) FirstIDX(ctx context.Context) int
- func (tiq *TaskInstanceQuery) FirstX(ctx context.Context) *TaskInstance
- func (tiq *TaskInstanceQuery) GroupBy(field string, fields ...string) *TaskInstanceGroupBy
- func (tiq *TaskInstanceQuery) IDs(ctx context.Context) ([]int, error)
- func (tiq *TaskInstanceQuery) IDsX(ctx context.Context) []int
- func (tiq *TaskInstanceQuery) Limit(limit int) *TaskInstanceQuery
- func (tiq *TaskInstanceQuery) Offset(offset int) *TaskInstanceQuery
- func (tiq *TaskInstanceQuery) Only(ctx context.Context) (*TaskInstance, error)
- func (tiq *TaskInstanceQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tiq *TaskInstanceQuery) OnlyIDX(ctx context.Context) int
- func (tiq *TaskInstanceQuery) OnlyX(ctx context.Context) *TaskInstance
- func (tiq *TaskInstanceQuery) Order(o ...OrderFunc) *TaskInstanceQuery
- func (tiq *TaskInstanceQuery) QueryItems() *ItemQuery
- func (tiq *TaskInstanceQuery) QueryTask() *TaskQuery
- func (tiq *TaskInstanceQuery) Select(fields ...string) *TaskInstanceSelect
- func (tiq *TaskInstanceQuery) Unique(unique bool) *TaskInstanceQuery
- func (tiq *TaskInstanceQuery) Where(ps ...predicate.TaskInstance) *TaskInstanceQuery
- func (tiq *TaskInstanceQuery) WithItems(opts ...func(*ItemQuery)) *TaskInstanceQuery
- func (tiq *TaskInstanceQuery) WithTask(opts ...func(*TaskQuery)) *TaskInstanceQuery
- type TaskInstanceSelect
- func (tis *TaskInstanceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (tis *TaskInstanceSelect) BoolX(ctx context.Context) bool
- func (tis *TaskInstanceSelect) Bools(ctx context.Context) ([]bool, error)
- func (tis *TaskInstanceSelect) BoolsX(ctx context.Context) []bool
- func (tis *TaskInstanceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (tis *TaskInstanceSelect) Float64X(ctx context.Context) float64
- func (tis *TaskInstanceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (tis *TaskInstanceSelect) Float64sX(ctx context.Context) []float64
- func (tis *TaskInstanceSelect) Int(ctx context.Context) (_ int, err error)
- func (tis *TaskInstanceSelect) IntX(ctx context.Context) int
- func (tis *TaskInstanceSelect) Ints(ctx context.Context) ([]int, error)
- func (tis *TaskInstanceSelect) IntsX(ctx context.Context) []int
- func (tis *TaskInstanceSelect) Scan(ctx context.Context, v interface{}) error
- func (tis *TaskInstanceSelect) ScanX(ctx context.Context, v interface{})
- func (tis *TaskInstanceSelect) String(ctx context.Context) (_ string, err error)
- func (tis *TaskInstanceSelect) StringX(ctx context.Context) string
- func (tis *TaskInstanceSelect) Strings(ctx context.Context) ([]string, error)
- func (tis *TaskInstanceSelect) StringsX(ctx context.Context) []string
- type TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) AddItemIDs(ids ...int) *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) AddItems(i ...*Item) *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) ClearEndTime() *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) ClearError() *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) ClearItems() *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) ClearMeta() *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) ClearSuccess() *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) ClearTask() *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) Exec(ctx context.Context) error
- func (tiu *TaskInstanceUpdate) ExecX(ctx context.Context)
- func (tiu *TaskInstanceUpdate) Mutation() *TaskInstanceMutation
- func (tiu *TaskInstanceUpdate) RemoveItemIDs(ids ...int) *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) RemoveItems(i ...*Item) *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) Save(ctx context.Context) (int, error)
- func (tiu *TaskInstanceUpdate) SaveX(ctx context.Context) int
- func (tiu *TaskInstanceUpdate) SetEndTime(t time.Time) *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) SetError(s string) *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) SetMeta(m map[string]interface{}) *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) SetNillableEndTime(t *time.Time) *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) SetNillableError(s *string) *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) SetNillableRunning(b *bool) *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) SetNillableStartTime(t *time.Time) *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) SetNillableSuccess(b *bool) *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) SetRunning(b bool) *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) SetStartTime(t time.Time) *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) SetSuccess(b bool) *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) SetTask(t *Task) *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) SetTaskID(id int) *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) SetUpdateTime(t time.Time) *TaskInstanceUpdate
- func (tiu *TaskInstanceUpdate) Where(ps ...predicate.TaskInstance) *TaskInstanceUpdate
- type TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) AddItemIDs(ids ...int) *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) AddItems(i ...*Item) *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) ClearEndTime() *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) ClearError() *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) ClearItems() *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) ClearMeta() *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) ClearSuccess() *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) ClearTask() *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) Exec(ctx context.Context) error
- func (tiuo *TaskInstanceUpdateOne) ExecX(ctx context.Context)
- func (tiuo *TaskInstanceUpdateOne) Mutation() *TaskInstanceMutation
- func (tiuo *TaskInstanceUpdateOne) RemoveItemIDs(ids ...int) *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) RemoveItems(i ...*Item) *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) Save(ctx context.Context) (*TaskInstance, error)
- func (tiuo *TaskInstanceUpdateOne) SaveX(ctx context.Context) *TaskInstance
- func (tiuo *TaskInstanceUpdateOne) Select(field string, fields ...string) *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) SetEndTime(t time.Time) *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) SetError(s string) *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) SetMeta(m map[string]interface{}) *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) SetNillableEndTime(t *time.Time) *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) SetNillableError(s *string) *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) SetNillableRunning(b *bool) *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) SetNillableStartTime(t *time.Time) *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) SetNillableSuccess(b *bool) *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) SetRunning(b bool) *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) SetStartTime(t time.Time) *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) SetSuccess(b bool) *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) SetTask(t *Task) *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) SetTaskID(id int) *TaskInstanceUpdateOne
- func (tiuo *TaskInstanceUpdateOne) SetUpdateTime(t time.Time) *TaskInstanceUpdateOne
- type TaskInstances
- type TaskMutation
- func (m *TaskMutation) Active() (r bool, exists bool)
- func (m *TaskMutation) AddField(name string, value ent.Value) error
- func (m *TaskMutation) AddInstanceIDs(ids ...int)
- func (m *TaskMutation) AddMetricIDs(ids ...int)
- func (m *TaskMutation) AddTagIDs(ids ...int)
- func (m *TaskMutation) AddedEdges() []string
- func (m *TaskMutation) AddedField(name string) (ent.Value, bool)
- func (m *TaskMutation) AddedFields() []string
- func (m *TaskMutation) AddedIDs(name string) []ent.Value
- func (m *TaskMutation) Args() (r map[string]interface{}, exists bool)
- func (m *TaskMutation) ArgsCleared() bool
- func (m *TaskMutation) CategoryCleared() bool
- func (m *TaskMutation) CategoryID() (id int, exists bool)
- func (m *TaskMutation) CategoryIDs() (ids []int)
- func (m *TaskMutation) ClearArgs()
- func (m *TaskMutation) ClearCategory()
- func (m *TaskMutation) ClearDescription()
- func (m *TaskMutation) ClearEdge(name string) error
- func (m *TaskMutation) ClearField(name string) error
- func (m *TaskMutation) ClearInstances()
- func (m *TaskMutation) ClearMetrics()
- func (m *TaskMutation) ClearSchedule()
- func (m *TaskMutation) ClearTags()
- func (m *TaskMutation) ClearedEdges() []string
- func (m *TaskMutation) ClearedFields() []string
- func (m TaskMutation) Client() *Client
- func (m *TaskMutation) Code() (r string, exists bool)
- func (m *TaskMutation) CreateTime() (r time.Time, exists bool)
- func (m *TaskMutation) Description() (r string, exists bool)
- func (m *TaskMutation) DescriptionCleared() bool
- func (m *TaskMutation) Display() (r bool, exists bool)
- func (m *TaskMutation) EdgeCleared(name string) bool
- func (m *TaskMutation) Field(name string) (ent.Value, bool)
- func (m *TaskMutation) FieldCleared(name string) bool
- func (m *TaskMutation) Fields() []string
- func (m *TaskMutation) GetType() (r task.Type, exists bool)
- func (m *TaskMutation) ID() (id int, exists bool)
- func (m *TaskMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TaskMutation) InstancesCleared() bool
- func (m *TaskMutation) InstancesIDs() (ids []int)
- func (m *TaskMutation) MetricsCleared() bool
- func (m *TaskMutation) MetricsIDs() (ids []int)
- func (m *TaskMutation) OldActive(ctx context.Context) (v bool, err error)
- func (m *TaskMutation) OldArgs(ctx context.Context) (v map[string]interface{}, err error)
- func (m *TaskMutation) OldCode(ctx context.Context) (v string, err error)
- func (m *TaskMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *TaskMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *TaskMutation) OldDisplay(ctx context.Context) (v bool, err error)
- func (m *TaskMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TaskMutation) OldSchedule(ctx context.Context) (v string, err error)
- func (m *TaskMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *TaskMutation) OldType(ctx context.Context) (v task.Type, err error)
- func (m *TaskMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *TaskMutation) Op() Op
- func (m *TaskMutation) RemoveInstanceIDs(ids ...int)
- func (m *TaskMutation) RemoveMetricIDs(ids ...int)
- func (m *TaskMutation) RemoveTagIDs(ids ...int)
- func (m *TaskMutation) RemovedEdges() []string
- func (m *TaskMutation) RemovedIDs(name string) []ent.Value
- func (m *TaskMutation) RemovedInstancesIDs() (ids []int)
- func (m *TaskMutation) RemovedMetricsIDs() (ids []int)
- func (m *TaskMutation) RemovedTagsIDs() (ids []int)
- func (m *TaskMutation) ResetActive()
- func (m *TaskMutation) ResetArgs()
- func (m *TaskMutation) ResetCategory()
- func (m *TaskMutation) ResetCode()
- func (m *TaskMutation) ResetCreateTime()
- func (m *TaskMutation) ResetDescription()
- func (m *TaskMutation) ResetDisplay()
- func (m *TaskMutation) ResetEdge(name string) error
- func (m *TaskMutation) ResetField(name string) error
- func (m *TaskMutation) ResetInstances()
- func (m *TaskMutation) ResetMetrics()
- func (m *TaskMutation) ResetSchedule()
- func (m *TaskMutation) ResetTags()
- func (m *TaskMutation) ResetTitle()
- func (m *TaskMutation) ResetType()
- func (m *TaskMutation) ResetUpdateTime()
- func (m *TaskMutation) Schedule() (r string, exists bool)
- func (m *TaskMutation) ScheduleCleared() bool
- func (m *TaskMutation) SetActive(b bool)
- func (m *TaskMutation) SetArgs(value map[string]interface{})
- func (m *TaskMutation) SetCategoryID(id int)
- func (m *TaskMutation) SetCode(s string)
- func (m *TaskMutation) SetCreateTime(t time.Time)
- func (m *TaskMutation) SetDescription(s string)
- func (m *TaskMutation) SetDisplay(b bool)
- func (m *TaskMutation) SetField(name string, value ent.Value) error
- func (m *TaskMutation) SetSchedule(s string)
- func (m *TaskMutation) SetTitle(s string)
- func (m *TaskMutation) SetType(t task.Type)
- func (m *TaskMutation) SetUpdateTime(t time.Time)
- func (m *TaskMutation) TagsCleared() bool
- func (m *TaskMutation) TagsIDs() (ids []int)
- func (m *TaskMutation) Title() (r string, exists bool)
- func (m TaskMutation) Tx() (*Tx, error)
- func (m *TaskMutation) Type() string
- func (m *TaskMutation) UpdateTime() (r time.Time, exists bool)
- func (m *TaskMutation) Where(ps ...predicate.Task)
- type TaskQuery
- func (tq *TaskQuery) All(ctx context.Context) ([]*Task, error)
- func (tq *TaskQuery) AllX(ctx context.Context) []*Task
- func (tq *TaskQuery) Clone() *TaskQuery
- func (tq *TaskQuery) Count(ctx context.Context) (int, error)
- func (tq *TaskQuery) CountX(ctx context.Context) int
- func (tq *TaskQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TaskQuery) ExistX(ctx context.Context) bool
- func (tq *TaskQuery) First(ctx context.Context) (*Task, error)
- func (tq *TaskQuery) FirstID(ctx context.Context) (id int, err error)
- func (tq *TaskQuery) FirstIDX(ctx context.Context) int
- func (tq *TaskQuery) FirstX(ctx context.Context) *Task
- func (tq *TaskQuery) GroupBy(field string, fields ...string) *TaskGroupBy
- func (tq *TaskQuery) IDs(ctx context.Context) ([]int, error)
- func (tq *TaskQuery) IDsX(ctx context.Context) []int
- func (tq *TaskQuery) Limit(limit int) *TaskQuery
- func (tq *TaskQuery) Offset(offset int) *TaskQuery
- func (tq *TaskQuery) Only(ctx context.Context) (*Task, error)
- func (tq *TaskQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tq *TaskQuery) OnlyIDX(ctx context.Context) int
- func (tq *TaskQuery) OnlyX(ctx context.Context) *Task
- func (tq *TaskQuery) Order(o ...OrderFunc) *TaskQuery
- func (tq *TaskQuery) QueryCategory() *TaskCategoryQuery
- func (tq *TaskQuery) QueryInstances() *TaskInstanceQuery
- func (tq *TaskQuery) QueryMetrics() *MetricQuery
- func (tq *TaskQuery) QueryTags() *TaskTagQuery
- func (tq *TaskQuery) Select(fields ...string) *TaskSelect
- func (tq *TaskQuery) Unique(unique bool) *TaskQuery
- func (tq *TaskQuery) Where(ps ...predicate.Task) *TaskQuery
- func (tq *TaskQuery) WithCategory(opts ...func(*TaskCategoryQuery)) *TaskQuery
- func (tq *TaskQuery) WithInstances(opts ...func(*TaskInstanceQuery)) *TaskQuery
- func (tq *TaskQuery) WithMetrics(opts ...func(*MetricQuery)) *TaskQuery
- func (tq *TaskQuery) WithTags(opts ...func(*TaskTagQuery)) *TaskQuery
- type TaskSelect
- func (ts *TaskSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ts *TaskSelect) BoolX(ctx context.Context) bool
- func (ts *TaskSelect) Bools(ctx context.Context) ([]bool, error)
- func (ts *TaskSelect) BoolsX(ctx context.Context) []bool
- func (ts *TaskSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ts *TaskSelect) Float64X(ctx context.Context) float64
- func (ts *TaskSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ts *TaskSelect) Float64sX(ctx context.Context) []float64
- func (ts *TaskSelect) Int(ctx context.Context) (_ int, err error)
- func (ts *TaskSelect) IntX(ctx context.Context) int
- func (ts *TaskSelect) Ints(ctx context.Context) ([]int, error)
- func (ts *TaskSelect) IntsX(ctx context.Context) []int
- func (ts *TaskSelect) Scan(ctx context.Context, v interface{}) error
- func (ts *TaskSelect) ScanX(ctx context.Context, v interface{})
- func (ts *TaskSelect) String(ctx context.Context) (_ string, err error)
- func (ts *TaskSelect) StringX(ctx context.Context) string
- func (ts *TaskSelect) Strings(ctx context.Context) ([]string, error)
- func (ts *TaskSelect) StringsX(ctx context.Context) []string
- type TaskTag
- type TaskTagClient
- func (c *TaskTagClient) Create() *TaskTagCreate
- func (c *TaskTagClient) CreateBulk(builders ...*TaskTagCreate) *TaskTagCreateBulk
- func (c *TaskTagClient) Delete() *TaskTagDelete
- func (c *TaskTagClient) DeleteOne(tt *TaskTag) *TaskTagDeleteOne
- func (c *TaskTagClient) DeleteOneID(id int) *TaskTagDeleteOne
- func (c *TaskTagClient) Get(ctx context.Context, id int) (*TaskTag, error)
- func (c *TaskTagClient) GetX(ctx context.Context, id int) *TaskTag
- func (c *TaskTagClient) Hooks() []Hook
- func (c *TaskTagClient) Query() *TaskTagQuery
- func (c *TaskTagClient) QueryTasks(tt *TaskTag) *TaskQuery
- func (c *TaskTagClient) Update() *TaskTagUpdate
- func (c *TaskTagClient) UpdateOne(tt *TaskTag) *TaskTagUpdateOne
- func (c *TaskTagClient) UpdateOneID(id int) *TaskTagUpdateOne
- func (c *TaskTagClient) Use(hooks ...Hook)
- type TaskTagCreate
- func (ttc *TaskTagCreate) AddTaskIDs(ids ...int) *TaskTagCreate
- func (ttc *TaskTagCreate) AddTasks(t ...*Task) *TaskTagCreate
- func (ttc *TaskTagCreate) Exec(ctx context.Context) error
- func (ttc *TaskTagCreate) ExecX(ctx context.Context)
- func (ttc *TaskTagCreate) Mutation() *TaskTagMutation
- func (ttc *TaskTagCreate) Save(ctx context.Context) (*TaskTag, error)
- func (ttc *TaskTagCreate) SaveX(ctx context.Context) *TaskTag
- func (ttc *TaskTagCreate) SetCreateTime(t time.Time) *TaskTagCreate
- func (ttc *TaskTagCreate) SetDescription(s string) *TaskTagCreate
- func (ttc *TaskTagCreate) SetDisplay(b bool) *TaskTagCreate
- func (ttc *TaskTagCreate) SetMeta(m map[string]interface{}) *TaskTagCreate
- func (ttc *TaskTagCreate) SetNillableCreateTime(t *time.Time) *TaskTagCreate
- func (ttc *TaskTagCreate) SetNillableDescription(s *string) *TaskTagCreate
- func (ttc *TaskTagCreate) SetNillableDisplay(b *bool) *TaskTagCreate
- func (ttc *TaskTagCreate) SetNillableUpdateTime(t *time.Time) *TaskTagCreate
- func (ttc *TaskTagCreate) SetTitle(s string) *TaskTagCreate
- func (ttc *TaskTagCreate) SetUpdateTime(t time.Time) *TaskTagCreate
- type TaskTagCreateBulk
- type TaskTagDelete
- type TaskTagDeleteOne
- type TaskTagEdges
- type TaskTagGroupBy
- func (ttgb *TaskTagGroupBy) Aggregate(fns ...AggregateFunc) *TaskTagGroupBy
- func (ttgb *TaskTagGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ttgb *TaskTagGroupBy) BoolX(ctx context.Context) bool
- func (ttgb *TaskTagGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ttgb *TaskTagGroupBy) BoolsX(ctx context.Context) []bool
- func (ttgb *TaskTagGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ttgb *TaskTagGroupBy) Float64X(ctx context.Context) float64
- func (ttgb *TaskTagGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ttgb *TaskTagGroupBy) Float64sX(ctx context.Context) []float64
- func (ttgb *TaskTagGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ttgb *TaskTagGroupBy) IntX(ctx context.Context) int
- func (ttgb *TaskTagGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ttgb *TaskTagGroupBy) IntsX(ctx context.Context) []int
- func (ttgb *TaskTagGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ttgb *TaskTagGroupBy) ScanX(ctx context.Context, v interface{})
- func (ttgb *TaskTagGroupBy) String(ctx context.Context) (_ string, err error)
- func (ttgb *TaskTagGroupBy) StringX(ctx context.Context) string
- func (ttgb *TaskTagGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ttgb *TaskTagGroupBy) StringsX(ctx context.Context) []string
- type TaskTagMutation
- func (m *TaskTagMutation) AddField(name string, value ent.Value) error
- func (m *TaskTagMutation) AddTaskIDs(ids ...int)
- func (m *TaskTagMutation) AddedEdges() []string
- func (m *TaskTagMutation) AddedField(name string) (ent.Value, bool)
- func (m *TaskTagMutation) AddedFields() []string
- func (m *TaskTagMutation) AddedIDs(name string) []ent.Value
- func (m *TaskTagMutation) ClearDescription()
- func (m *TaskTagMutation) ClearEdge(name string) error
- func (m *TaskTagMutation) ClearField(name string) error
- func (m *TaskTagMutation) ClearMeta()
- func (m *TaskTagMutation) ClearTasks()
- func (m *TaskTagMutation) ClearedEdges() []string
- func (m *TaskTagMutation) ClearedFields() []string
- func (m TaskTagMutation) Client() *Client
- func (m *TaskTagMutation) CreateTime() (r time.Time, exists bool)
- func (m *TaskTagMutation) Description() (r string, exists bool)
- func (m *TaskTagMutation) DescriptionCleared() bool
- func (m *TaskTagMutation) Display() (r bool, exists bool)
- func (m *TaskTagMutation) EdgeCleared(name string) bool
- func (m *TaskTagMutation) Field(name string) (ent.Value, bool)
- func (m *TaskTagMutation) FieldCleared(name string) bool
- func (m *TaskTagMutation) Fields() []string
- func (m *TaskTagMutation) ID() (id int, exists bool)
- func (m *TaskTagMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TaskTagMutation) Meta() (r map[string]interface{}, exists bool)
- func (m *TaskTagMutation) MetaCleared() bool
- func (m *TaskTagMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *TaskTagMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *TaskTagMutation) OldDisplay(ctx context.Context) (v bool, err error)
- func (m *TaskTagMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TaskTagMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
- func (m *TaskTagMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *TaskTagMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *TaskTagMutation) Op() Op
- func (m *TaskTagMutation) RemoveTaskIDs(ids ...int)
- func (m *TaskTagMutation) RemovedEdges() []string
- func (m *TaskTagMutation) RemovedIDs(name string) []ent.Value
- func (m *TaskTagMutation) RemovedTasksIDs() (ids []int)
- func (m *TaskTagMutation) ResetCreateTime()
- func (m *TaskTagMutation) ResetDescription()
- func (m *TaskTagMutation) ResetDisplay()
- func (m *TaskTagMutation) ResetEdge(name string) error
- func (m *TaskTagMutation) ResetField(name string) error
- func (m *TaskTagMutation) ResetMeta()
- func (m *TaskTagMutation) ResetTasks()
- func (m *TaskTagMutation) ResetTitle()
- func (m *TaskTagMutation) ResetUpdateTime()
- func (m *TaskTagMutation) SetCreateTime(t time.Time)
- func (m *TaskTagMutation) SetDescription(s string)
- func (m *TaskTagMutation) SetDisplay(b bool)
- func (m *TaskTagMutation) SetField(name string, value ent.Value) error
- func (m *TaskTagMutation) SetMeta(value map[string]interface{})
- func (m *TaskTagMutation) SetTitle(s string)
- func (m *TaskTagMutation) SetUpdateTime(t time.Time)
- func (m *TaskTagMutation) TasksCleared() bool
- func (m *TaskTagMutation) TasksIDs() (ids []int)
- func (m *TaskTagMutation) Title() (r string, exists bool)
- func (m TaskTagMutation) Tx() (*Tx, error)
- func (m *TaskTagMutation) Type() string
- func (m *TaskTagMutation) UpdateTime() (r time.Time, exists bool)
- func (m *TaskTagMutation) Where(ps ...predicate.TaskTag)
- type TaskTagQuery
- func (ttq *TaskTagQuery) All(ctx context.Context) ([]*TaskTag, error)
- func (ttq *TaskTagQuery) AllX(ctx context.Context) []*TaskTag
- func (ttq *TaskTagQuery) Clone() *TaskTagQuery
- func (ttq *TaskTagQuery) Count(ctx context.Context) (int, error)
- func (ttq *TaskTagQuery) CountX(ctx context.Context) int
- func (ttq *TaskTagQuery) Exist(ctx context.Context) (bool, error)
- func (ttq *TaskTagQuery) ExistX(ctx context.Context) bool
- func (ttq *TaskTagQuery) First(ctx context.Context) (*TaskTag, error)
- func (ttq *TaskTagQuery) FirstID(ctx context.Context) (id int, err error)
- func (ttq *TaskTagQuery) FirstIDX(ctx context.Context) int
- func (ttq *TaskTagQuery) FirstX(ctx context.Context) *TaskTag
- func (ttq *TaskTagQuery) GroupBy(field string, fields ...string) *TaskTagGroupBy
- func (ttq *TaskTagQuery) IDs(ctx context.Context) ([]int, error)
- func (ttq *TaskTagQuery) IDsX(ctx context.Context) []int
- func (ttq *TaskTagQuery) Limit(limit int) *TaskTagQuery
- func (ttq *TaskTagQuery) Offset(offset int) *TaskTagQuery
- func (ttq *TaskTagQuery) Only(ctx context.Context) (*TaskTag, error)
- func (ttq *TaskTagQuery) OnlyID(ctx context.Context) (id int, err error)
- func (ttq *TaskTagQuery) OnlyIDX(ctx context.Context) int
- func (ttq *TaskTagQuery) OnlyX(ctx context.Context) *TaskTag
- func (ttq *TaskTagQuery) Order(o ...OrderFunc) *TaskTagQuery
- func (ttq *TaskTagQuery) QueryTasks() *TaskQuery
- func (ttq *TaskTagQuery) Select(fields ...string) *TaskTagSelect
- func (ttq *TaskTagQuery) Unique(unique bool) *TaskTagQuery
- func (ttq *TaskTagQuery) Where(ps ...predicate.TaskTag) *TaskTagQuery
- func (ttq *TaskTagQuery) WithTasks(opts ...func(*TaskQuery)) *TaskTagQuery
- type TaskTagSelect
- func (tts *TaskTagSelect) Bool(ctx context.Context) (_ bool, err error)
- func (tts *TaskTagSelect) BoolX(ctx context.Context) bool
- func (tts *TaskTagSelect) Bools(ctx context.Context) ([]bool, error)
- func (tts *TaskTagSelect) BoolsX(ctx context.Context) []bool
- func (tts *TaskTagSelect) Float64(ctx context.Context) (_ float64, err error)
- func (tts *TaskTagSelect) Float64X(ctx context.Context) float64
- func (tts *TaskTagSelect) Float64s(ctx context.Context) ([]float64, error)
- func (tts *TaskTagSelect) Float64sX(ctx context.Context) []float64
- func (tts *TaskTagSelect) Int(ctx context.Context) (_ int, err error)
- func (tts *TaskTagSelect) IntX(ctx context.Context) int
- func (tts *TaskTagSelect) Ints(ctx context.Context) ([]int, error)
- func (tts *TaskTagSelect) IntsX(ctx context.Context) []int
- func (tts *TaskTagSelect) Scan(ctx context.Context, v interface{}) error
- func (tts *TaskTagSelect) ScanX(ctx context.Context, v interface{})
- func (tts *TaskTagSelect) String(ctx context.Context) (_ string, err error)
- func (tts *TaskTagSelect) StringX(ctx context.Context) string
- func (tts *TaskTagSelect) Strings(ctx context.Context) ([]string, error)
- func (tts *TaskTagSelect) StringsX(ctx context.Context) []string
- type TaskTagUpdate
- func (ttu *TaskTagUpdate) AddTaskIDs(ids ...int) *TaskTagUpdate
- func (ttu *TaskTagUpdate) AddTasks(t ...*Task) *TaskTagUpdate
- func (ttu *TaskTagUpdate) ClearDescription() *TaskTagUpdate
- func (ttu *TaskTagUpdate) ClearMeta() *TaskTagUpdate
- func (ttu *TaskTagUpdate) ClearTasks() *TaskTagUpdate
- func (ttu *TaskTagUpdate) Exec(ctx context.Context) error
- func (ttu *TaskTagUpdate) ExecX(ctx context.Context)
- func (ttu *TaskTagUpdate) Mutation() *TaskTagMutation
- func (ttu *TaskTagUpdate) RemoveTaskIDs(ids ...int) *TaskTagUpdate
- func (ttu *TaskTagUpdate) RemoveTasks(t ...*Task) *TaskTagUpdate
- func (ttu *TaskTagUpdate) Save(ctx context.Context) (int, error)
- func (ttu *TaskTagUpdate) SaveX(ctx context.Context) int
- func (ttu *TaskTagUpdate) SetDescription(s string) *TaskTagUpdate
- func (ttu *TaskTagUpdate) SetDisplay(b bool) *TaskTagUpdate
- func (ttu *TaskTagUpdate) SetMeta(m map[string]interface{}) *TaskTagUpdate
- func (ttu *TaskTagUpdate) SetNillableDescription(s *string) *TaskTagUpdate
- func (ttu *TaskTagUpdate) SetNillableDisplay(b *bool) *TaskTagUpdate
- func (ttu *TaskTagUpdate) SetTitle(s string) *TaskTagUpdate
- func (ttu *TaskTagUpdate) SetUpdateTime(t time.Time) *TaskTagUpdate
- func (ttu *TaskTagUpdate) Where(ps ...predicate.TaskTag) *TaskTagUpdate
- type TaskTagUpdateOne
- func (ttuo *TaskTagUpdateOne) AddTaskIDs(ids ...int) *TaskTagUpdateOne
- func (ttuo *TaskTagUpdateOne) AddTasks(t ...*Task) *TaskTagUpdateOne
- func (ttuo *TaskTagUpdateOne) ClearDescription() *TaskTagUpdateOne
- func (ttuo *TaskTagUpdateOne) ClearMeta() *TaskTagUpdateOne
- func (ttuo *TaskTagUpdateOne) ClearTasks() *TaskTagUpdateOne
- func (ttuo *TaskTagUpdateOne) Exec(ctx context.Context) error
- func (ttuo *TaskTagUpdateOne) ExecX(ctx context.Context)
- func (ttuo *TaskTagUpdateOne) Mutation() *TaskTagMutation
- func (ttuo *TaskTagUpdateOne) RemoveTaskIDs(ids ...int) *TaskTagUpdateOne
- func (ttuo *TaskTagUpdateOne) RemoveTasks(t ...*Task) *TaskTagUpdateOne
- func (ttuo *TaskTagUpdateOne) Save(ctx context.Context) (*TaskTag, error)
- func (ttuo *TaskTagUpdateOne) SaveX(ctx context.Context) *TaskTag
- func (ttuo *TaskTagUpdateOne) Select(field string, fields ...string) *TaskTagUpdateOne
- func (ttuo *TaskTagUpdateOne) SetDescription(s string) *TaskTagUpdateOne
- func (ttuo *TaskTagUpdateOne) SetDisplay(b bool) *TaskTagUpdateOne
- func (ttuo *TaskTagUpdateOne) SetMeta(m map[string]interface{}) *TaskTagUpdateOne
- func (ttuo *TaskTagUpdateOne) SetNillableDescription(s *string) *TaskTagUpdateOne
- func (ttuo *TaskTagUpdateOne) SetNillableDisplay(b *bool) *TaskTagUpdateOne
- func (ttuo *TaskTagUpdateOne) SetTitle(s string) *TaskTagUpdateOne
- func (ttuo *TaskTagUpdateOne) SetUpdateTime(t time.Time) *TaskTagUpdateOne
- type TaskTags
- type TaskUpdate
- func (tu *TaskUpdate) AddInstanceIDs(ids ...int) *TaskUpdate
- func (tu *TaskUpdate) AddInstances(t ...*TaskInstance) *TaskUpdate
- func (tu *TaskUpdate) AddMetricIDs(ids ...int) *TaskUpdate
- func (tu *TaskUpdate) AddMetrics(m ...*Metric) *TaskUpdate
- func (tu *TaskUpdate) AddTagIDs(ids ...int) *TaskUpdate
- func (tu *TaskUpdate) AddTags(t ...*TaskTag) *TaskUpdate
- func (tu *TaskUpdate) ClearArgs() *TaskUpdate
- func (tu *TaskUpdate) ClearCategory() *TaskUpdate
- func (tu *TaskUpdate) ClearDescription() *TaskUpdate
- func (tu *TaskUpdate) ClearInstances() *TaskUpdate
- func (tu *TaskUpdate) ClearMetrics() *TaskUpdate
- func (tu *TaskUpdate) ClearSchedule() *TaskUpdate
- func (tu *TaskUpdate) ClearTags() *TaskUpdate
- func (tu *TaskUpdate) Exec(ctx context.Context) error
- func (tu *TaskUpdate) ExecX(ctx context.Context)
- func (tu *TaskUpdate) Mutation() *TaskMutation
- func (tu *TaskUpdate) RemoveInstanceIDs(ids ...int) *TaskUpdate
- func (tu *TaskUpdate) RemoveInstances(t ...*TaskInstance) *TaskUpdate
- func (tu *TaskUpdate) RemoveMetricIDs(ids ...int) *TaskUpdate
- func (tu *TaskUpdate) RemoveMetrics(m ...*Metric) *TaskUpdate
- func (tu *TaskUpdate) RemoveTagIDs(ids ...int) *TaskUpdate
- func (tu *TaskUpdate) RemoveTags(t ...*TaskTag) *TaskUpdate
- func (tu *TaskUpdate) Save(ctx context.Context) (int, error)
- func (tu *TaskUpdate) SaveX(ctx context.Context) int
- func (tu *TaskUpdate) SetActive(b bool) *TaskUpdate
- func (tu *TaskUpdate) SetArgs(m map[string]interface{}) *TaskUpdate
- func (tu *TaskUpdate) SetCategory(t *TaskCategory) *TaskUpdate
- func (tu *TaskUpdate) SetCategoryID(id int) *TaskUpdate
- func (tu *TaskUpdate) SetDescription(s string) *TaskUpdate
- func (tu *TaskUpdate) SetDisplay(b bool) *TaskUpdate
- func (tu *TaskUpdate) SetNillableActive(b *bool) *TaskUpdate
- func (tu *TaskUpdate) SetNillableDescription(s *string) *TaskUpdate
- func (tu *TaskUpdate) SetNillableDisplay(b *bool) *TaskUpdate
- func (tu *TaskUpdate) SetNillableSchedule(s *string) *TaskUpdate
- func (tu *TaskUpdate) SetSchedule(s string) *TaskUpdate
- func (tu *TaskUpdate) SetTitle(s string) *TaskUpdate
- func (tu *TaskUpdate) SetUpdateTime(t time.Time) *TaskUpdate
- func (tu *TaskUpdate) Where(ps ...predicate.Task) *TaskUpdate
- type TaskUpdateOne
- func (tuo *TaskUpdateOne) AddInstanceIDs(ids ...int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) AddInstances(t ...*TaskInstance) *TaskUpdateOne
- func (tuo *TaskUpdateOne) AddMetricIDs(ids ...int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) AddMetrics(m ...*Metric) *TaskUpdateOne
- func (tuo *TaskUpdateOne) AddTagIDs(ids ...int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) AddTags(t ...*TaskTag) *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearArgs() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearCategory() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearDescription() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearInstances() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearMetrics() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearSchedule() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearTags() *TaskUpdateOne
- func (tuo *TaskUpdateOne) Exec(ctx context.Context) error
- func (tuo *TaskUpdateOne) ExecX(ctx context.Context)
- func (tuo *TaskUpdateOne) Mutation() *TaskMutation
- func (tuo *TaskUpdateOne) RemoveInstanceIDs(ids ...int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) RemoveInstances(t ...*TaskInstance) *TaskUpdateOne
- func (tuo *TaskUpdateOne) RemoveMetricIDs(ids ...int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) RemoveMetrics(m ...*Metric) *TaskUpdateOne
- func (tuo *TaskUpdateOne) RemoveTagIDs(ids ...int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) RemoveTags(t ...*TaskTag) *TaskUpdateOne
- func (tuo *TaskUpdateOne) Save(ctx context.Context) (*Task, error)
- func (tuo *TaskUpdateOne) SaveX(ctx context.Context) *Task
- func (tuo *TaskUpdateOne) Select(field string, fields ...string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetActive(b bool) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetArgs(m map[string]interface{}) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetCategory(t *TaskCategory) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetCategoryID(id int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetDescription(s string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetDisplay(b bool) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillableActive(b *bool) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillableDescription(s *string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillableDisplay(b *bool) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillableSchedule(s *string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetSchedule(s string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetTitle(s string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetUpdateTime(t time.Time) *TaskUpdateOne
- type Tasks
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeDimension = "Dimension" TypeItem = "Item" TypeMetric = "Metric" TypeTask = "Task" TypeTaskCategory = "TaskCategory" TypeTaskInstance = "TaskInstance" TypeTaskTag = "TaskTag" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
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 // Dimension is the client for interacting with the Dimension builders. Dimension *DimensionClient // Item is the client for interacting with the Item builders. Item *ItemClient // Metric is the client for interacting with the Metric builders. Metric *MetricClient // Task is the client for interacting with the Task builders. Task *TaskClient // TaskCategory is the client for interacting with the TaskCategory builders. TaskCategory *TaskCategoryClient // TaskInstance is the client for interacting with the TaskInstance builders. TaskInstance *TaskInstanceClient // TaskTag is the client for interacting with the TaskTag builders. TaskTag *TaskTagClient // 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(). Dimension. Query(). Count(ctx)
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 Dimension ¶
type Dimension struct { // ID of the ent. ID int `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Value holds the value of the "value" field. Value string `json:"value,omitempty"` // DisplayTitle holds the value of the "display_title" field. DisplayTitle map[string]string `json:"display_title,omitempty"` // DisplayValue holds the value of the "display_value" field. DisplayValue map[string]string `json:"display_value,omitempty"` // Meta holds the value of the "meta" field. Meta map[string]interface{} `json:"meta,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DimensionQuery when eager-loading is set. Edges DimensionEdges `json:"edges"` // contains filtered or unexported fields }
Dimension is the model entity for the Dimension schema.
func (*Dimension) Unwrap ¶
Unwrap unwraps the Dimension 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 (*Dimension) Update ¶
func (d *Dimension) Update() *DimensionUpdateOne
Update returns a builder for updating this Dimension. Note that you need to call Dimension.Unwrap() before calling this method if this Dimension was returned from a transaction, and the transaction was committed or rolled back.
type DimensionClient ¶
type DimensionClient struct {
// contains filtered or unexported fields
}
DimensionClient is a client for the Dimension schema.
func NewDimensionClient ¶
func NewDimensionClient(c config) *DimensionClient
NewDimensionClient returns a client for the Dimension from the given config.
func (*DimensionClient) Create ¶
func (c *DimensionClient) Create() *DimensionCreate
Create returns a create builder for Dimension.
func (*DimensionClient) CreateBulk ¶
func (c *DimensionClient) CreateBulk(builders ...*DimensionCreate) *DimensionCreateBulk
CreateBulk returns a builder for creating a bulk of Dimension entities.
func (*DimensionClient) Delete ¶
func (c *DimensionClient) Delete() *DimensionDelete
Delete returns a delete builder for Dimension.
func (*DimensionClient) DeleteOne ¶
func (c *DimensionClient) DeleteOne(d *Dimension) *DimensionDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*DimensionClient) DeleteOneID ¶
func (c *DimensionClient) DeleteOneID(id int) *DimensionDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*DimensionClient) GetX ¶
func (c *DimensionClient) GetX(ctx context.Context, id int) *Dimension
GetX is like Get, but panics if an error occurs.
func (*DimensionClient) Hooks ¶
func (c *DimensionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DimensionClient) Query ¶
func (c *DimensionClient) Query() *DimensionQuery
Query returns a query builder for Dimension.
func (*DimensionClient) QueryItem ¶
func (c *DimensionClient) QueryItem(d *Dimension) *ItemQuery
QueryItem queries the item edge of a Dimension.
func (*DimensionClient) Update ¶
func (c *DimensionClient) Update() *DimensionUpdate
Update returns an update builder for Dimension.
func (*DimensionClient) UpdateOne ¶
func (c *DimensionClient) UpdateOne(d *Dimension) *DimensionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DimensionClient) UpdateOneID ¶
func (c *DimensionClient) UpdateOneID(id int) *DimensionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DimensionClient) Use ¶
func (c *DimensionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `dimension.Hooks(f(g(h())))`.
type DimensionCreate ¶
type DimensionCreate struct {
// contains filtered or unexported fields
}
DimensionCreate is the builder for creating a Dimension entity.
func (*DimensionCreate) AddItem ¶
func (dc *DimensionCreate) AddItem(i ...*Item) *DimensionCreate
AddItem adds the "item" edges to the Item entity.
func (*DimensionCreate) AddItemIDs ¶
func (dc *DimensionCreate) AddItemIDs(ids ...int) *DimensionCreate
AddItemIDs adds the "item" edge to the Item entity by IDs.
func (*DimensionCreate) Exec ¶
func (dc *DimensionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DimensionCreate) ExecX ¶
func (dc *DimensionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DimensionCreate) Mutation ¶
func (dc *DimensionCreate) Mutation() *DimensionMutation
Mutation returns the DimensionMutation object of the builder.
func (*DimensionCreate) Save ¶
func (dc *DimensionCreate) Save(ctx context.Context) (*Dimension, error)
Save creates the Dimension in the database.
func (*DimensionCreate) SaveX ¶
func (dc *DimensionCreate) SaveX(ctx context.Context) *Dimension
SaveX calls Save and panics if Save returns an error.
func (*DimensionCreate) SetCreateTime ¶
func (dc *DimensionCreate) SetCreateTime(t time.Time) *DimensionCreate
SetCreateTime sets the "create_time" field.
func (*DimensionCreate) SetDisplayTitle ¶
func (dc *DimensionCreate) SetDisplayTitle(m map[string]string) *DimensionCreate
SetDisplayTitle sets the "display_title" field.
func (*DimensionCreate) SetDisplayValue ¶
func (dc *DimensionCreate) SetDisplayValue(m map[string]string) *DimensionCreate
SetDisplayValue sets the "display_value" field.
func (*DimensionCreate) SetMeta ¶
func (dc *DimensionCreate) SetMeta(m map[string]interface{}) *DimensionCreate
SetMeta sets the "meta" field.
func (*DimensionCreate) SetNillableCreateTime ¶
func (dc *DimensionCreate) SetNillableCreateTime(t *time.Time) *DimensionCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*DimensionCreate) SetTitle ¶
func (dc *DimensionCreate) SetTitle(s string) *DimensionCreate
SetTitle sets the "title" field.
func (*DimensionCreate) SetValue ¶
func (dc *DimensionCreate) SetValue(s string) *DimensionCreate
SetValue sets the "value" field.
type DimensionCreateBulk ¶
type DimensionCreateBulk struct {
// contains filtered or unexported fields
}
DimensionCreateBulk is the builder for creating many Dimension entities in bulk.
func (*DimensionCreateBulk) Exec ¶
func (dcb *DimensionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DimensionCreateBulk) ExecX ¶
func (dcb *DimensionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DimensionDelete ¶
type DimensionDelete struct {
// contains filtered or unexported fields
}
DimensionDelete is the builder for deleting a Dimension entity.
func (*DimensionDelete) Exec ¶
func (dd *DimensionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DimensionDelete) ExecX ¶
func (dd *DimensionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DimensionDelete) Where ¶
func (dd *DimensionDelete) Where(ps ...predicate.Dimension) *DimensionDelete
Where appends a list predicates to the DimensionDelete builder.
type DimensionDeleteOne ¶
type DimensionDeleteOne struct {
// contains filtered or unexported fields
}
DimensionDeleteOne is the builder for deleting a single Dimension entity.
func (*DimensionDeleteOne) Exec ¶
func (ddo *DimensionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DimensionDeleteOne) ExecX ¶
func (ddo *DimensionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DimensionEdges ¶
type DimensionEdges struct { // Item holds the value of the item edge. Item []*Item `json:"item,omitempty"` // contains filtered or unexported fields }
DimensionEdges holds the relations/edges for other nodes in the graph.
func (DimensionEdges) ItemOrErr ¶
func (e DimensionEdges) ItemOrErr() ([]*Item, error)
ItemOrErr returns the Item value or an error if the edge was not loaded in eager-loading.
type DimensionGroupBy ¶
type DimensionGroupBy struct {
// contains filtered or unexported fields
}
DimensionGroupBy is the group-by builder for Dimension entities.
func (*DimensionGroupBy) Aggregate ¶
func (dgb *DimensionGroupBy) Aggregate(fns ...AggregateFunc) *DimensionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DimensionGroupBy) Bool ¶
func (dgb *DimensionGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DimensionGroupBy) BoolX ¶
func (dgb *DimensionGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DimensionGroupBy) Bools ¶
func (dgb *DimensionGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*DimensionGroupBy) BoolsX ¶
func (dgb *DimensionGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DimensionGroupBy) Float64 ¶
func (dgb *DimensionGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DimensionGroupBy) Float64X ¶
func (dgb *DimensionGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DimensionGroupBy) Float64s ¶
func (dgb *DimensionGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*DimensionGroupBy) Float64sX ¶
func (dgb *DimensionGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DimensionGroupBy) Int ¶
func (dgb *DimensionGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DimensionGroupBy) IntX ¶
func (dgb *DimensionGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DimensionGroupBy) Ints ¶
func (dgb *DimensionGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*DimensionGroupBy) IntsX ¶
func (dgb *DimensionGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DimensionGroupBy) Scan ¶
func (dgb *DimensionGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*DimensionGroupBy) ScanX ¶
func (dgb *DimensionGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DimensionGroupBy) String ¶
func (dgb *DimensionGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*DimensionGroupBy) StringX ¶
func (dgb *DimensionGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DimensionMutation ¶
type DimensionMutation struct {
// contains filtered or unexported fields
}
DimensionMutation represents an operation that mutates the Dimension nodes in the graph.
func (*DimensionMutation) AddField ¶
func (m *DimensionMutation) 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 (*DimensionMutation) AddItemIDs ¶
func (m *DimensionMutation) AddItemIDs(ids ...int)
AddItemIDs adds the "item" edge to the Item entity by ids.
func (*DimensionMutation) AddedEdges ¶
func (m *DimensionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DimensionMutation) AddedField ¶
func (m *DimensionMutation) 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 (*DimensionMutation) AddedFields ¶
func (m *DimensionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DimensionMutation) AddedIDs ¶
func (m *DimensionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DimensionMutation) ClearDisplayTitle ¶
func (m *DimensionMutation) ClearDisplayTitle()
ClearDisplayTitle clears the value of the "display_title" field.
func (*DimensionMutation) ClearDisplayValue ¶
func (m *DimensionMutation) ClearDisplayValue()
ClearDisplayValue clears the value of the "display_value" field.
func (*DimensionMutation) ClearEdge ¶
func (m *DimensionMutation) 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 (*DimensionMutation) ClearField ¶
func (m *DimensionMutation) 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 (*DimensionMutation) ClearItem ¶
func (m *DimensionMutation) ClearItem()
ClearItem clears the "item" edge to the Item entity.
func (*DimensionMutation) ClearMeta ¶
func (m *DimensionMutation) ClearMeta()
ClearMeta clears the value of the "meta" field.
func (*DimensionMutation) ClearedEdges ¶
func (m *DimensionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DimensionMutation) ClearedFields ¶
func (m *DimensionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DimensionMutation) Client ¶
func (m DimensionMutation) 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 (*DimensionMutation) CreateTime ¶
func (m *DimensionMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*DimensionMutation) DisplayTitle ¶
func (m *DimensionMutation) DisplayTitle() (r map[string]string, exists bool)
DisplayTitle returns the value of the "display_title" field in the mutation.
func (*DimensionMutation) DisplayTitleCleared ¶
func (m *DimensionMutation) DisplayTitleCleared() bool
DisplayTitleCleared returns if the "display_title" field was cleared in this mutation.
func (*DimensionMutation) DisplayValue ¶
func (m *DimensionMutation) DisplayValue() (r map[string]string, exists bool)
DisplayValue returns the value of the "display_value" field in the mutation.
func (*DimensionMutation) DisplayValueCleared ¶
func (m *DimensionMutation) DisplayValueCleared() bool
DisplayValueCleared returns if the "display_value" field was cleared in this mutation.
func (*DimensionMutation) EdgeCleared ¶
func (m *DimensionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DimensionMutation) Field ¶
func (m *DimensionMutation) 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 (*DimensionMutation) FieldCleared ¶
func (m *DimensionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DimensionMutation) Fields ¶
func (m *DimensionMutation) 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 (*DimensionMutation) ID ¶
func (m *DimensionMutation) 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 (*DimensionMutation) IDs ¶
func (m *DimensionMutation) 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 (*DimensionMutation) ItemCleared ¶
func (m *DimensionMutation) ItemCleared() bool
ItemCleared reports if the "item" edge to the Item entity was cleared.
func (*DimensionMutation) ItemIDs ¶
func (m *DimensionMutation) ItemIDs() (ids []int)
ItemIDs returns the "item" edge IDs in the mutation.
func (*DimensionMutation) Meta ¶
func (m *DimensionMutation) Meta() (r map[string]interface{}, exists bool)
Meta returns the value of the "meta" field in the mutation.
func (*DimensionMutation) MetaCleared ¶
func (m *DimensionMutation) MetaCleared() bool
MetaCleared returns if the "meta" field was cleared in this mutation.
func (*DimensionMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Dimension entity. If the Dimension 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 (*DimensionMutation) OldDisplayTitle ¶
OldDisplayTitle returns the old "display_title" field's value of the Dimension entity. If the Dimension 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 (*DimensionMutation) OldDisplayValue ¶
OldDisplayValue returns the old "display_value" field's value of the Dimension entity. If the Dimension 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 (*DimensionMutation) 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 (*DimensionMutation) OldMeta ¶
func (m *DimensionMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
OldMeta returns the old "meta" field's value of the Dimension entity. If the Dimension 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 (*DimensionMutation) OldTitle ¶
func (m *DimensionMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the Dimension entity. If the Dimension 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 (*DimensionMutation) OldValue ¶
func (m *DimensionMutation) OldValue(ctx context.Context) (v string, err error)
OldValue returns the old "value" field's value of the Dimension entity. If the Dimension 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 (*DimensionMutation) RemoveItemIDs ¶
func (m *DimensionMutation) RemoveItemIDs(ids ...int)
RemoveItemIDs removes the "item" edge to the Item entity by IDs.
func (*DimensionMutation) RemovedEdges ¶
func (m *DimensionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DimensionMutation) RemovedIDs ¶
func (m *DimensionMutation) 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 (*DimensionMutation) RemovedItemIDs ¶
func (m *DimensionMutation) RemovedItemIDs() (ids []int)
RemovedItem returns the removed IDs of the "item" edge to the Item entity.
func (*DimensionMutation) ResetCreateTime ¶
func (m *DimensionMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*DimensionMutation) ResetDisplayTitle ¶
func (m *DimensionMutation) ResetDisplayTitle()
ResetDisplayTitle resets all changes to the "display_title" field.
func (*DimensionMutation) ResetDisplayValue ¶
func (m *DimensionMutation) ResetDisplayValue()
ResetDisplayValue resets all changes to the "display_value" field.
func (*DimensionMutation) ResetEdge ¶
func (m *DimensionMutation) 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 (*DimensionMutation) ResetField ¶
func (m *DimensionMutation) 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 (*DimensionMutation) ResetItem ¶
func (m *DimensionMutation) ResetItem()
ResetItem resets all changes to the "item" edge.
func (*DimensionMutation) ResetMeta ¶
func (m *DimensionMutation) ResetMeta()
ResetMeta resets all changes to the "meta" field.
func (*DimensionMutation) ResetTitle ¶
func (m *DimensionMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*DimensionMutation) ResetValue ¶
func (m *DimensionMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*DimensionMutation) SetCreateTime ¶
func (m *DimensionMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*DimensionMutation) SetDisplayTitle ¶
func (m *DimensionMutation) SetDisplayTitle(value map[string]string)
SetDisplayTitle sets the "display_title" field.
func (*DimensionMutation) SetDisplayValue ¶
func (m *DimensionMutation) SetDisplayValue(value map[string]string)
SetDisplayValue sets the "display_value" field.
func (*DimensionMutation) SetField ¶
func (m *DimensionMutation) 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 (*DimensionMutation) SetMeta ¶
func (m *DimensionMutation) SetMeta(value map[string]interface{})
SetMeta sets the "meta" field.
func (*DimensionMutation) SetTitle ¶
func (m *DimensionMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*DimensionMutation) SetValue ¶
func (m *DimensionMutation) SetValue(s string)
SetValue sets the "value" field.
func (*DimensionMutation) Title ¶
func (m *DimensionMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (DimensionMutation) Tx ¶
func (m DimensionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DimensionMutation) Type ¶
func (m *DimensionMutation) Type() string
Type returns the node type of this mutation (Dimension).
func (*DimensionMutation) Value ¶
func (m *DimensionMutation) Value() (r string, exists bool)
Value returns the value of the "value" field in the mutation.
func (*DimensionMutation) Where ¶
func (m *DimensionMutation) Where(ps ...predicate.Dimension)
Where appends a list predicates to the DimensionMutation builder.
type DimensionQuery ¶
type DimensionQuery struct {
// contains filtered or unexported fields
}
DimensionQuery is the builder for querying Dimension entities.
func (*DimensionQuery) All ¶
func (dq *DimensionQuery) All(ctx context.Context) ([]*Dimension, error)
All executes the query and returns a list of Dimensions.
func (*DimensionQuery) AllX ¶
func (dq *DimensionQuery) AllX(ctx context.Context) []*Dimension
AllX is like All, but panics if an error occurs.
func (*DimensionQuery) Clone ¶
func (dq *DimensionQuery) Clone() *DimensionQuery
Clone returns a duplicate of the DimensionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DimensionQuery) Count ¶
func (dq *DimensionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DimensionQuery) CountX ¶
func (dq *DimensionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DimensionQuery) Exist ¶
func (dq *DimensionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DimensionQuery) ExistX ¶
func (dq *DimensionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DimensionQuery) First ¶
func (dq *DimensionQuery) First(ctx context.Context) (*Dimension, error)
First returns the first Dimension entity from the query. Returns a *NotFoundError when no Dimension was found.
func (*DimensionQuery) FirstID ¶
func (dq *DimensionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Dimension ID from the query. Returns a *NotFoundError when no Dimension ID was found.
func (*DimensionQuery) FirstIDX ¶
func (dq *DimensionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DimensionQuery) FirstX ¶
func (dq *DimensionQuery) FirstX(ctx context.Context) *Dimension
FirstX is like First, but panics if an error occurs.
func (*DimensionQuery) GroupBy ¶
func (dq *DimensionQuery) GroupBy(field string, fields ...string) *DimensionGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Dimension.Query(). GroupBy(dimension.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DimensionQuery) IDs ¶
func (dq *DimensionQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Dimension IDs.
func (*DimensionQuery) IDsX ¶
func (dq *DimensionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DimensionQuery) Limit ¶
func (dq *DimensionQuery) Limit(limit int) *DimensionQuery
Limit adds a limit step to the query.
func (*DimensionQuery) Offset ¶
func (dq *DimensionQuery) Offset(offset int) *DimensionQuery
Offset adds an offset step to the query.
func (*DimensionQuery) Only ¶
func (dq *DimensionQuery) Only(ctx context.Context) (*Dimension, error)
Only returns a single Dimension entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Dimension entity is not found. Returns a *NotFoundError when no Dimension entities are found.
func (*DimensionQuery) OnlyID ¶
func (dq *DimensionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Dimension ID in the query. Returns a *NotSingularError when exactly one Dimension ID is not found. Returns a *NotFoundError when no entities are found.
func (*DimensionQuery) OnlyIDX ¶
func (dq *DimensionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DimensionQuery) OnlyX ¶
func (dq *DimensionQuery) OnlyX(ctx context.Context) *Dimension
OnlyX is like Only, but panics if an error occurs.
func (*DimensionQuery) Order ¶
func (dq *DimensionQuery) Order(o ...OrderFunc) *DimensionQuery
Order adds an order step to the query.
func (*DimensionQuery) QueryItem ¶
func (dq *DimensionQuery) QueryItem() *ItemQuery
QueryItem chains the current query on the "item" edge.
func (*DimensionQuery) Select ¶
func (dq *DimensionQuery) Select(fields ...string) *DimensionSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Dimension.Query(). Select(dimension.FieldCreateTime). Scan(ctx, &v)
func (*DimensionQuery) Unique ¶
func (dq *DimensionQuery) Unique(unique bool) *DimensionQuery
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 (*DimensionQuery) Where ¶
func (dq *DimensionQuery) Where(ps ...predicate.Dimension) *DimensionQuery
Where adds a new predicate for the DimensionQuery builder.
func (*DimensionQuery) WithItem ¶
func (dq *DimensionQuery) WithItem(opts ...func(*ItemQuery)) *DimensionQuery
WithItem tells the query-builder to eager-load the nodes that are connected to the "item" edge. The optional arguments are used to configure the query builder of the edge.
type DimensionSelect ¶
type DimensionSelect struct { *DimensionQuery // contains filtered or unexported fields }
DimensionSelect is the builder for selecting fields of Dimension entities.
func (*DimensionSelect) Bool ¶
func (ds *DimensionSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DimensionSelect) BoolX ¶
func (ds *DimensionSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DimensionSelect) Bools ¶
func (ds *DimensionSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DimensionSelect) BoolsX ¶
func (ds *DimensionSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DimensionSelect) Float64 ¶
func (ds *DimensionSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DimensionSelect) Float64X ¶
func (ds *DimensionSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DimensionSelect) Float64s ¶
func (ds *DimensionSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DimensionSelect) Float64sX ¶
func (ds *DimensionSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DimensionSelect) Int ¶
func (ds *DimensionSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DimensionSelect) IntX ¶
func (ds *DimensionSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DimensionSelect) Ints ¶
func (ds *DimensionSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DimensionSelect) IntsX ¶
func (ds *DimensionSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DimensionSelect) Scan ¶
func (ds *DimensionSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*DimensionSelect) ScanX ¶
func (ds *DimensionSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DimensionSelect) String ¶
func (ds *DimensionSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*DimensionSelect) StringX ¶
func (ds *DimensionSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DimensionUpdate ¶
type DimensionUpdate struct {
// contains filtered or unexported fields
}
DimensionUpdate is the builder for updating Dimension entities.
func (*DimensionUpdate) AddItem ¶
func (du *DimensionUpdate) AddItem(i ...*Item) *DimensionUpdate
AddItem adds the "item" edges to the Item entity.
func (*DimensionUpdate) AddItemIDs ¶
func (du *DimensionUpdate) AddItemIDs(ids ...int) *DimensionUpdate
AddItemIDs adds the "item" edge to the Item entity by IDs.
func (*DimensionUpdate) ClearDisplayTitle ¶
func (du *DimensionUpdate) ClearDisplayTitle() *DimensionUpdate
ClearDisplayTitle clears the value of the "display_title" field.
func (*DimensionUpdate) ClearDisplayValue ¶
func (du *DimensionUpdate) ClearDisplayValue() *DimensionUpdate
ClearDisplayValue clears the value of the "display_value" field.
func (*DimensionUpdate) ClearItem ¶
func (du *DimensionUpdate) ClearItem() *DimensionUpdate
ClearItem clears all "item" edges to the Item entity.
func (*DimensionUpdate) ClearMeta ¶
func (du *DimensionUpdate) ClearMeta() *DimensionUpdate
ClearMeta clears the value of the "meta" field.
func (*DimensionUpdate) Exec ¶
func (du *DimensionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DimensionUpdate) ExecX ¶
func (du *DimensionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DimensionUpdate) Mutation ¶
func (du *DimensionUpdate) Mutation() *DimensionMutation
Mutation returns the DimensionMutation object of the builder.
func (*DimensionUpdate) RemoveItem ¶
func (du *DimensionUpdate) RemoveItem(i ...*Item) *DimensionUpdate
RemoveItem removes "item" edges to Item entities.
func (*DimensionUpdate) RemoveItemIDs ¶
func (du *DimensionUpdate) RemoveItemIDs(ids ...int) *DimensionUpdate
RemoveItemIDs removes the "item" edge to Item entities by IDs.
func (*DimensionUpdate) Save ¶
func (du *DimensionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DimensionUpdate) SaveX ¶
func (du *DimensionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DimensionUpdate) SetDisplayTitle ¶
func (du *DimensionUpdate) SetDisplayTitle(m map[string]string) *DimensionUpdate
SetDisplayTitle sets the "display_title" field.
func (*DimensionUpdate) SetDisplayValue ¶
func (du *DimensionUpdate) SetDisplayValue(m map[string]string) *DimensionUpdate
SetDisplayValue sets the "display_value" field.
func (*DimensionUpdate) SetMeta ¶
func (du *DimensionUpdate) SetMeta(m map[string]interface{}) *DimensionUpdate
SetMeta sets the "meta" field.
func (*DimensionUpdate) SetTitle ¶
func (du *DimensionUpdate) SetTitle(s string) *DimensionUpdate
SetTitle sets the "title" field.
func (*DimensionUpdate) SetValue ¶
func (du *DimensionUpdate) SetValue(s string) *DimensionUpdate
SetValue sets the "value" field.
func (*DimensionUpdate) Where ¶
func (du *DimensionUpdate) Where(ps ...predicate.Dimension) *DimensionUpdate
Where appends a list predicates to the DimensionUpdate builder.
type DimensionUpdateOne ¶
type DimensionUpdateOne struct {
// contains filtered or unexported fields
}
DimensionUpdateOne is the builder for updating a single Dimension entity.
func (*DimensionUpdateOne) AddItem ¶
func (duo *DimensionUpdateOne) AddItem(i ...*Item) *DimensionUpdateOne
AddItem adds the "item" edges to the Item entity.
func (*DimensionUpdateOne) AddItemIDs ¶
func (duo *DimensionUpdateOne) AddItemIDs(ids ...int) *DimensionUpdateOne
AddItemIDs adds the "item" edge to the Item entity by IDs.
func (*DimensionUpdateOne) ClearDisplayTitle ¶
func (duo *DimensionUpdateOne) ClearDisplayTitle() *DimensionUpdateOne
ClearDisplayTitle clears the value of the "display_title" field.
func (*DimensionUpdateOne) ClearDisplayValue ¶
func (duo *DimensionUpdateOne) ClearDisplayValue() *DimensionUpdateOne
ClearDisplayValue clears the value of the "display_value" field.
func (*DimensionUpdateOne) ClearItem ¶
func (duo *DimensionUpdateOne) ClearItem() *DimensionUpdateOne
ClearItem clears all "item" edges to the Item entity.
func (*DimensionUpdateOne) ClearMeta ¶
func (duo *DimensionUpdateOne) ClearMeta() *DimensionUpdateOne
ClearMeta clears the value of the "meta" field.
func (*DimensionUpdateOne) Exec ¶
func (duo *DimensionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DimensionUpdateOne) ExecX ¶
func (duo *DimensionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DimensionUpdateOne) Mutation ¶
func (duo *DimensionUpdateOne) Mutation() *DimensionMutation
Mutation returns the DimensionMutation object of the builder.
func (*DimensionUpdateOne) RemoveItem ¶
func (duo *DimensionUpdateOne) RemoveItem(i ...*Item) *DimensionUpdateOne
RemoveItem removes "item" edges to Item entities.
func (*DimensionUpdateOne) RemoveItemIDs ¶
func (duo *DimensionUpdateOne) RemoveItemIDs(ids ...int) *DimensionUpdateOne
RemoveItemIDs removes the "item" edge to Item entities by IDs.
func (*DimensionUpdateOne) Save ¶
func (duo *DimensionUpdateOne) Save(ctx context.Context) (*Dimension, error)
Save executes the query and returns the updated Dimension entity.
func (*DimensionUpdateOne) SaveX ¶
func (duo *DimensionUpdateOne) SaveX(ctx context.Context) *Dimension
SaveX is like Save, but panics if an error occurs.
func (*DimensionUpdateOne) Select ¶
func (duo *DimensionUpdateOne) Select(field string, fields ...string) *DimensionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DimensionUpdateOne) SetDisplayTitle ¶
func (duo *DimensionUpdateOne) SetDisplayTitle(m map[string]string) *DimensionUpdateOne
SetDisplayTitle sets the "display_title" field.
func (*DimensionUpdateOne) SetDisplayValue ¶
func (duo *DimensionUpdateOne) SetDisplayValue(m map[string]string) *DimensionUpdateOne
SetDisplayValue sets the "display_value" field.
func (*DimensionUpdateOne) SetMeta ¶
func (duo *DimensionUpdateOne) SetMeta(m map[string]interface{}) *DimensionUpdateOne
SetMeta sets the "meta" field.
func (*DimensionUpdateOne) SetTitle ¶
func (duo *DimensionUpdateOne) SetTitle(s string) *DimensionUpdateOne
SetTitle sets the "title" field.
func (*DimensionUpdateOne) SetValue ¶
func (duo *DimensionUpdateOne) SetValue(s string) *DimensionUpdateOne
SetValue sets the "value" field.
type Item ¶
type Item struct { // ID of the ent. ID int `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Value holds the value of the "value" field. Value float64 `json:"value,omitempty"` // Timestamp holds the value of the "timestamp" field. Timestamp time.Time `json:"timestamp,omitempty"` // Meta holds the value of the "meta" field. Meta map[string]interface{} `json:"meta,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ItemQuery when eager-loading is set. Edges ItemEdges `json:"edges"` // contains filtered or unexported fields }
Item is the model entity for the Item schema.
func (*Item) QueryDimensions ¶
func (i *Item) QueryDimensions() *DimensionQuery
QueryDimensions queries the "dimensions" edge of the Item entity.
func (*Item) QueryMetric ¶
func (i *Item) QueryMetric() *MetricQuery
QueryMetric queries the "metric" edge of the Item entity.
func (*Item) QueryTaskInstance ¶
func (i *Item) QueryTaskInstance() *TaskInstanceQuery
QueryTaskInstance queries the "task_instance" edge of the Item entity.
func (*Item) Unwrap ¶
Unwrap unwraps the Item 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 (*Item) Update ¶
func (i *Item) Update() *ItemUpdateOne
Update returns a builder for updating this Item. Note that you need to call Item.Unwrap() before calling this method if this Item was returned from a transaction, and the transaction was committed or rolled back.
type ItemClient ¶
type ItemClient struct {
// contains filtered or unexported fields
}
ItemClient is a client for the Item schema.
func NewItemClient ¶
func NewItemClient(c config) *ItemClient
NewItemClient returns a client for the Item from the given config.
func (*ItemClient) Create ¶
func (c *ItemClient) Create() *ItemCreate
Create returns a create builder for Item.
func (*ItemClient) CreateBulk ¶
func (c *ItemClient) CreateBulk(builders ...*ItemCreate) *ItemCreateBulk
CreateBulk returns a builder for creating a bulk of Item entities.
func (*ItemClient) Delete ¶
func (c *ItemClient) Delete() *ItemDelete
Delete returns a delete builder for Item.
func (*ItemClient) DeleteOne ¶
func (c *ItemClient) DeleteOne(i *Item) *ItemDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*ItemClient) DeleteOneID ¶
func (c *ItemClient) DeleteOneID(id int) *ItemDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*ItemClient) GetX ¶
func (c *ItemClient) GetX(ctx context.Context, id int) *Item
GetX is like Get, but panics if an error occurs.
func (*ItemClient) Query ¶
func (c *ItemClient) Query() *ItemQuery
Query returns a query builder for Item.
func (*ItemClient) QueryDimensions ¶
func (c *ItemClient) QueryDimensions(i *Item) *DimensionQuery
QueryDimensions queries the dimensions edge of a Item.
func (*ItemClient) QueryMetric ¶
func (c *ItemClient) QueryMetric(i *Item) *MetricQuery
QueryMetric queries the metric edge of a Item.
func (*ItemClient) QueryTaskInstance ¶
func (c *ItemClient) QueryTaskInstance(i *Item) *TaskInstanceQuery
QueryTaskInstance queries the task_instance edge of a Item.
func (*ItemClient) Update ¶
func (c *ItemClient) Update() *ItemUpdate
Update returns an update builder for Item.
func (*ItemClient) UpdateOne ¶
func (c *ItemClient) UpdateOne(i *Item) *ItemUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ItemClient) UpdateOneID ¶
func (c *ItemClient) UpdateOneID(id int) *ItemUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ItemClient) Use ¶
func (c *ItemClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `item.Hooks(f(g(h())))`.
type ItemCreate ¶
type ItemCreate struct {
// contains filtered or unexported fields
}
ItemCreate is the builder for creating a Item entity.
func (*ItemCreate) AddDimensionIDs ¶
func (ic *ItemCreate) AddDimensionIDs(ids ...int) *ItemCreate
AddDimensionIDs adds the "dimensions" edge to the Dimension entity by IDs.
func (*ItemCreate) AddDimensions ¶
func (ic *ItemCreate) AddDimensions(d ...*Dimension) *ItemCreate
AddDimensions adds the "dimensions" edges to the Dimension entity.
func (*ItemCreate) Exec ¶
func (ic *ItemCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemCreate) ExecX ¶
func (ic *ItemCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemCreate) Mutation ¶
func (ic *ItemCreate) Mutation() *ItemMutation
Mutation returns the ItemMutation object of the builder.
func (*ItemCreate) Save ¶
func (ic *ItemCreate) Save(ctx context.Context) (*Item, error)
Save creates the Item in the database.
func (*ItemCreate) SaveX ¶
func (ic *ItemCreate) SaveX(ctx context.Context) *Item
SaveX calls Save and panics if Save returns an error.
func (*ItemCreate) SetCreateTime ¶
func (ic *ItemCreate) SetCreateTime(t time.Time) *ItemCreate
SetCreateTime sets the "create_time" field.
func (*ItemCreate) SetMeta ¶
func (ic *ItemCreate) SetMeta(m map[string]interface{}) *ItemCreate
SetMeta sets the "meta" field.
func (*ItemCreate) SetMetric ¶
func (ic *ItemCreate) SetMetric(m *Metric) *ItemCreate
SetMetric sets the "metric" edge to the Metric entity.
func (*ItemCreate) SetMetricID ¶
func (ic *ItemCreate) SetMetricID(id int) *ItemCreate
SetMetricID sets the "metric" edge to the Metric entity by ID.
func (*ItemCreate) SetNillableCreateTime ¶
func (ic *ItemCreate) SetNillableCreateTime(t *time.Time) *ItemCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ItemCreate) SetNillableTimestamp ¶
func (ic *ItemCreate) SetNillableTimestamp(t *time.Time) *ItemCreate
SetNillableTimestamp sets the "timestamp" field if the given value is not nil.
func (*ItemCreate) SetNillableUpdateTime ¶
func (ic *ItemCreate) SetNillableUpdateTime(t *time.Time) *ItemCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ItemCreate) SetTaskInstance ¶
func (ic *ItemCreate) SetTaskInstance(t *TaskInstance) *ItemCreate
SetTaskInstance sets the "task_instance" edge to the TaskInstance entity.
func (*ItemCreate) SetTaskInstanceID ¶
func (ic *ItemCreate) SetTaskInstanceID(id int) *ItemCreate
SetTaskInstanceID sets the "task_instance" edge to the TaskInstance entity by ID.
func (*ItemCreate) SetTimestamp ¶
func (ic *ItemCreate) SetTimestamp(t time.Time) *ItemCreate
SetTimestamp sets the "timestamp" field.
func (*ItemCreate) SetUpdateTime ¶
func (ic *ItemCreate) SetUpdateTime(t time.Time) *ItemCreate
SetUpdateTime sets the "update_time" field.
func (*ItemCreate) SetValue ¶
func (ic *ItemCreate) SetValue(f float64) *ItemCreate
SetValue sets the "value" field.
type ItemCreateBulk ¶
type ItemCreateBulk struct {
// contains filtered or unexported fields
}
ItemCreateBulk is the builder for creating many Item entities in bulk.
func (*ItemCreateBulk) Exec ¶
func (icb *ItemCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemCreateBulk) ExecX ¶
func (icb *ItemCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ItemDelete ¶
type ItemDelete struct {
// contains filtered or unexported fields
}
ItemDelete is the builder for deleting a Item entity.
func (*ItemDelete) Exec ¶
func (id *ItemDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ItemDelete) ExecX ¶
func (id *ItemDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ItemDelete) Where ¶
func (id *ItemDelete) Where(ps ...predicate.Item) *ItemDelete
Where appends a list predicates to the ItemDelete builder.
type ItemDeleteOne ¶
type ItemDeleteOne struct {
// contains filtered or unexported fields
}
ItemDeleteOne is the builder for deleting a single Item entity.
func (*ItemDeleteOne) Exec ¶
func (ido *ItemDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ItemDeleteOne) ExecX ¶
func (ido *ItemDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ItemEdges ¶
type ItemEdges struct { // Dimensions holds the value of the dimensions edge. Dimensions []*Dimension `json:"dimensions,omitempty"` // TaskInstance holds the value of the task_instance edge. TaskInstance *TaskInstance `json:"task_instance,omitempty"` // Metric holds the value of the metric edge. Metric *Metric `json:"metric,omitempty"` // contains filtered or unexported fields }
ItemEdges holds the relations/edges for other nodes in the graph.
func (ItemEdges) DimensionsOrErr ¶
DimensionsOrErr returns the Dimensions value or an error if the edge was not loaded in eager-loading.
func (ItemEdges) MetricOrErr ¶
MetricOrErr returns the Metric value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ItemEdges) TaskInstanceOrErr ¶
func (e ItemEdges) TaskInstanceOrErr() (*TaskInstance, error)
TaskInstanceOrErr returns the TaskInstance value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ItemGroupBy ¶
type ItemGroupBy struct {
// contains filtered or unexported fields
}
ItemGroupBy is the group-by builder for Item entities.
func (*ItemGroupBy) Aggregate ¶
func (igb *ItemGroupBy) Aggregate(fns ...AggregateFunc) *ItemGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ItemGroupBy) Bool ¶
func (igb *ItemGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ItemGroupBy) BoolX ¶
func (igb *ItemGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ItemGroupBy) Bools ¶
func (igb *ItemGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*ItemGroupBy) BoolsX ¶
func (igb *ItemGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ItemGroupBy) Float64 ¶
func (igb *ItemGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ItemGroupBy) Float64X ¶
func (igb *ItemGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ItemGroupBy) Float64s ¶
func (igb *ItemGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*ItemGroupBy) Float64sX ¶
func (igb *ItemGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ItemGroupBy) Int ¶
func (igb *ItemGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ItemGroupBy) IntX ¶
func (igb *ItemGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ItemGroupBy) Ints ¶
func (igb *ItemGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*ItemGroupBy) IntsX ¶
func (igb *ItemGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ItemGroupBy) Scan ¶
func (igb *ItemGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*ItemGroupBy) ScanX ¶
func (igb *ItemGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ItemGroupBy) String ¶
func (igb *ItemGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ItemGroupBy) StringX ¶
func (igb *ItemGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ItemMutation ¶
type ItemMutation struct {
// contains filtered or unexported fields
}
ItemMutation represents an operation that mutates the Item nodes in the graph.
func (*ItemMutation) AddDimensionIDs ¶
func (m *ItemMutation) AddDimensionIDs(ids ...int)
AddDimensionIDs adds the "dimensions" edge to the Dimension entity by ids.
func (*ItemMutation) AddField ¶
func (m *ItemMutation) 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 (*ItemMutation) AddValue ¶
func (m *ItemMutation) AddValue(f float64)
AddValue adds f to the "value" field.
func (*ItemMutation) AddedEdges ¶
func (m *ItemMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ItemMutation) AddedField ¶
func (m *ItemMutation) 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 (*ItemMutation) AddedFields ¶
func (m *ItemMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ItemMutation) AddedIDs ¶
func (m *ItemMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ItemMutation) AddedValue ¶
func (m *ItemMutation) AddedValue() (r float64, exists bool)
AddedValue returns the value that was added to the "value" field in this mutation.
func (*ItemMutation) ClearDimensions ¶
func (m *ItemMutation) ClearDimensions()
ClearDimensions clears the "dimensions" edge to the Dimension entity.
func (*ItemMutation) ClearEdge ¶
func (m *ItemMutation) 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 (*ItemMutation) ClearField ¶
func (m *ItemMutation) 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 (*ItemMutation) ClearMeta ¶
func (m *ItemMutation) ClearMeta()
ClearMeta clears the value of the "meta" field.
func (*ItemMutation) ClearMetric ¶
func (m *ItemMutation) ClearMetric()
ClearMetric clears the "metric" edge to the Metric entity.
func (*ItemMutation) ClearTaskInstance ¶
func (m *ItemMutation) ClearTaskInstance()
ClearTaskInstance clears the "task_instance" edge to the TaskInstance entity.
func (*ItemMutation) ClearedEdges ¶
func (m *ItemMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ItemMutation) ClearedFields ¶
func (m *ItemMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ItemMutation) Client ¶
func (m ItemMutation) 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 (*ItemMutation) CreateTime ¶
func (m *ItemMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*ItemMutation) DimensionsCleared ¶
func (m *ItemMutation) DimensionsCleared() bool
DimensionsCleared reports if the "dimensions" edge to the Dimension entity was cleared.
func (*ItemMutation) DimensionsIDs ¶
func (m *ItemMutation) DimensionsIDs() (ids []int)
DimensionsIDs returns the "dimensions" edge IDs in the mutation.
func (*ItemMutation) EdgeCleared ¶
func (m *ItemMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ItemMutation) Field ¶
func (m *ItemMutation) 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 (*ItemMutation) FieldCleared ¶
func (m *ItemMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ItemMutation) Fields ¶
func (m *ItemMutation) 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 (*ItemMutation) ID ¶
func (m *ItemMutation) 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 (*ItemMutation) IDs ¶
func (m *ItemMutation) 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 (*ItemMutation) Meta ¶
func (m *ItemMutation) Meta() (r map[string]interface{}, exists bool)
Meta returns the value of the "meta" field in the mutation.
func (*ItemMutation) MetaCleared ¶
func (m *ItemMutation) MetaCleared() bool
MetaCleared returns if the "meta" field was cleared in this mutation.
func (*ItemMutation) MetricCleared ¶
func (m *ItemMutation) MetricCleared() bool
MetricCleared reports if the "metric" edge to the Metric entity was cleared.
func (*ItemMutation) MetricID ¶
func (m *ItemMutation) MetricID() (id int, exists bool)
MetricID returns the "metric" edge ID in the mutation.
func (*ItemMutation) MetricIDs ¶
func (m *ItemMutation) MetricIDs() (ids []int)
MetricIDs returns the "metric" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MetricID instead. It exists only for internal usage by the builders.
func (*ItemMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Item entity. If the Item 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 (*ItemMutation) 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 (*ItemMutation) OldMeta ¶
func (m *ItemMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
OldMeta returns the old "meta" field's value of the Item entity. If the Item 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 (*ItemMutation) OldTimestamp ¶
OldTimestamp returns the old "timestamp" field's value of the Item entity. If the Item 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 (*ItemMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Item entity. If the Item 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 (*ItemMutation) OldValue ¶
func (m *ItemMutation) OldValue(ctx context.Context) (v float64, err error)
OldValue returns the old "value" field's value of the Item entity. If the Item 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 (*ItemMutation) RemoveDimensionIDs ¶
func (m *ItemMutation) RemoveDimensionIDs(ids ...int)
RemoveDimensionIDs removes the "dimensions" edge to the Dimension entity by IDs.
func (*ItemMutation) RemovedDimensionsIDs ¶
func (m *ItemMutation) RemovedDimensionsIDs() (ids []int)
RemovedDimensions returns the removed IDs of the "dimensions" edge to the Dimension entity.
func (*ItemMutation) RemovedEdges ¶
func (m *ItemMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ItemMutation) RemovedIDs ¶
func (m *ItemMutation) 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 (*ItemMutation) ResetCreateTime ¶
func (m *ItemMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*ItemMutation) ResetDimensions ¶
func (m *ItemMutation) ResetDimensions()
ResetDimensions resets all changes to the "dimensions" edge.
func (*ItemMutation) ResetEdge ¶
func (m *ItemMutation) 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 (*ItemMutation) ResetField ¶
func (m *ItemMutation) 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 (*ItemMutation) ResetMeta ¶
func (m *ItemMutation) ResetMeta()
ResetMeta resets all changes to the "meta" field.
func (*ItemMutation) ResetMetric ¶
func (m *ItemMutation) ResetMetric()
ResetMetric resets all changes to the "metric" edge.
func (*ItemMutation) ResetTaskInstance ¶
func (m *ItemMutation) ResetTaskInstance()
ResetTaskInstance resets all changes to the "task_instance" edge.
func (*ItemMutation) ResetTimestamp ¶
func (m *ItemMutation) ResetTimestamp()
ResetTimestamp resets all changes to the "timestamp" field.
func (*ItemMutation) ResetUpdateTime ¶
func (m *ItemMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*ItemMutation) ResetValue ¶
func (m *ItemMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*ItemMutation) SetCreateTime ¶
func (m *ItemMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*ItemMutation) SetField ¶
func (m *ItemMutation) 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 (*ItemMutation) SetMeta ¶
func (m *ItemMutation) SetMeta(value map[string]interface{})
SetMeta sets the "meta" field.
func (*ItemMutation) SetMetricID ¶
func (m *ItemMutation) SetMetricID(id int)
SetMetricID sets the "metric" edge to the Metric entity by id.
func (*ItemMutation) SetTaskInstanceID ¶
func (m *ItemMutation) SetTaskInstanceID(id int)
SetTaskInstanceID sets the "task_instance" edge to the TaskInstance entity by id.
func (*ItemMutation) SetTimestamp ¶
func (m *ItemMutation) SetTimestamp(t time.Time)
SetTimestamp sets the "timestamp" field.
func (*ItemMutation) SetUpdateTime ¶
func (m *ItemMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*ItemMutation) SetValue ¶
func (m *ItemMutation) SetValue(f float64)
SetValue sets the "value" field.
func (*ItemMutation) TaskInstanceCleared ¶
func (m *ItemMutation) TaskInstanceCleared() bool
TaskInstanceCleared reports if the "task_instance" edge to the TaskInstance entity was cleared.
func (*ItemMutation) TaskInstanceID ¶
func (m *ItemMutation) TaskInstanceID() (id int, exists bool)
TaskInstanceID returns the "task_instance" edge ID in the mutation.
func (*ItemMutation) TaskInstanceIDs ¶
func (m *ItemMutation) TaskInstanceIDs() (ids []int)
TaskInstanceIDs returns the "task_instance" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TaskInstanceID instead. It exists only for internal usage by the builders.
func (*ItemMutation) Timestamp ¶
func (m *ItemMutation) Timestamp() (r time.Time, exists bool)
Timestamp returns the value of the "timestamp" field in the mutation.
func (ItemMutation) Tx ¶
func (m ItemMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ItemMutation) Type ¶
func (m *ItemMutation) Type() string
Type returns the node type of this mutation (Item).
func (*ItemMutation) UpdateTime ¶
func (m *ItemMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*ItemMutation) Value ¶
func (m *ItemMutation) Value() (r float64, exists bool)
Value returns the value of the "value" field in the mutation.
func (*ItemMutation) Where ¶
func (m *ItemMutation) Where(ps ...predicate.Item)
Where appends a list predicates to the ItemMutation builder.
type ItemQuery ¶
type ItemQuery struct {
// contains filtered or unexported fields
}
ItemQuery is the builder for querying Item entities.
func (*ItemQuery) Clone ¶
Clone returns a duplicate of the ItemQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ItemQuery) First ¶
First returns the first Item entity from the query. Returns a *NotFoundError when no Item was found.
func (*ItemQuery) FirstID ¶
FirstID returns the first Item ID from the query. Returns a *NotFoundError when no Item ID was found.
func (*ItemQuery) GroupBy ¶
func (iq *ItemQuery) GroupBy(field string, fields ...string) *ItemGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Item.Query(). GroupBy(item.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ItemQuery) Only ¶
Only returns a single Item entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Item entity is not found. Returns a *NotFoundError when no Item entities are found.
func (*ItemQuery) OnlyID ¶
OnlyID is like Only, but returns the only Item ID in the query. Returns a *NotSingularError when exactly one Item ID is not found. Returns a *NotFoundError when no entities are found.
func (*ItemQuery) QueryDimensions ¶
func (iq *ItemQuery) QueryDimensions() *DimensionQuery
QueryDimensions chains the current query on the "dimensions" edge.
func (*ItemQuery) QueryMetric ¶
func (iq *ItemQuery) QueryMetric() *MetricQuery
QueryMetric chains the current query on the "metric" edge.
func (*ItemQuery) QueryTaskInstance ¶
func (iq *ItemQuery) QueryTaskInstance() *TaskInstanceQuery
QueryTaskInstance chains the current query on the "task_instance" edge.
func (*ItemQuery) Select ¶
func (iq *ItemQuery) Select(fields ...string) *ItemSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Item.Query(). Select(item.FieldCreateTime). Scan(ctx, &v)
func (*ItemQuery) 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 (*ItemQuery) WithDimensions ¶
func (iq *ItemQuery) WithDimensions(opts ...func(*DimensionQuery)) *ItemQuery
WithDimensions tells the query-builder to eager-load the nodes that are connected to the "dimensions" edge. The optional arguments are used to configure the query builder of the edge.
func (*ItemQuery) WithMetric ¶
func (iq *ItemQuery) WithMetric(opts ...func(*MetricQuery)) *ItemQuery
WithMetric tells the query-builder to eager-load the nodes that are connected to the "metric" edge. The optional arguments are used to configure the query builder of the edge.
func (*ItemQuery) WithTaskInstance ¶
func (iq *ItemQuery) WithTaskInstance(opts ...func(*TaskInstanceQuery)) *ItemQuery
WithTaskInstance tells the query-builder to eager-load the nodes that are connected to the "task_instance" edge. The optional arguments are used to configure the query builder of the edge.
type ItemSelect ¶
type ItemSelect struct { *ItemQuery // contains filtered or unexported fields }
ItemSelect is the builder for selecting fields of Item entities.
func (*ItemSelect) Bool ¶
func (is *ItemSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ItemSelect) BoolX ¶
func (is *ItemSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ItemSelect) Bools ¶
func (is *ItemSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ItemSelect) BoolsX ¶
func (is *ItemSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ItemSelect) Float64 ¶
func (is *ItemSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Float64X ¶
func (is *ItemSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ItemSelect) Float64s ¶
func (is *ItemSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Float64sX ¶
func (is *ItemSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ItemSelect) Int ¶
func (is *ItemSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ItemSelect) IntX ¶
func (is *ItemSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ItemSelect) Ints ¶
func (is *ItemSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ItemSelect) IntsX ¶
func (is *ItemSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ItemSelect) Scan ¶
func (is *ItemSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*ItemSelect) ScanX ¶
func (is *ItemSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ItemSelect) String ¶
func (is *ItemSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ItemSelect) StringX ¶
func (is *ItemSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ItemUpdate ¶
type ItemUpdate struct {
// contains filtered or unexported fields
}
ItemUpdate is the builder for updating Item entities.
func (*ItemUpdate) AddDimensionIDs ¶
func (iu *ItemUpdate) AddDimensionIDs(ids ...int) *ItemUpdate
AddDimensionIDs adds the "dimensions" edge to the Dimension entity by IDs.
func (*ItemUpdate) AddDimensions ¶
func (iu *ItemUpdate) AddDimensions(d ...*Dimension) *ItemUpdate
AddDimensions adds the "dimensions" edges to the Dimension entity.
func (*ItemUpdate) AddValue ¶
func (iu *ItemUpdate) AddValue(f float64) *ItemUpdate
AddValue adds f to the "value" field.
func (*ItemUpdate) ClearDimensions ¶
func (iu *ItemUpdate) ClearDimensions() *ItemUpdate
ClearDimensions clears all "dimensions" edges to the Dimension entity.
func (*ItemUpdate) ClearMeta ¶
func (iu *ItemUpdate) ClearMeta() *ItemUpdate
ClearMeta clears the value of the "meta" field.
func (*ItemUpdate) ClearMetric ¶
func (iu *ItemUpdate) ClearMetric() *ItemUpdate
ClearMetric clears the "metric" edge to the Metric entity.
func (*ItemUpdate) ClearTaskInstance ¶
func (iu *ItemUpdate) ClearTaskInstance() *ItemUpdate
ClearTaskInstance clears the "task_instance" edge to the TaskInstance entity.
func (*ItemUpdate) Exec ¶
func (iu *ItemUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemUpdate) ExecX ¶
func (iu *ItemUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemUpdate) Mutation ¶
func (iu *ItemUpdate) Mutation() *ItemMutation
Mutation returns the ItemMutation object of the builder.
func (*ItemUpdate) RemoveDimensionIDs ¶
func (iu *ItemUpdate) RemoveDimensionIDs(ids ...int) *ItemUpdate
RemoveDimensionIDs removes the "dimensions" edge to Dimension entities by IDs.
func (*ItemUpdate) RemoveDimensions ¶
func (iu *ItemUpdate) RemoveDimensions(d ...*Dimension) *ItemUpdate
RemoveDimensions removes "dimensions" edges to Dimension entities.
func (*ItemUpdate) Save ¶
func (iu *ItemUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ItemUpdate) SaveX ¶
func (iu *ItemUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ItemUpdate) SetMeta ¶
func (iu *ItemUpdate) SetMeta(m map[string]interface{}) *ItemUpdate
SetMeta sets the "meta" field.
func (*ItemUpdate) SetMetric ¶
func (iu *ItemUpdate) SetMetric(m *Metric) *ItemUpdate
SetMetric sets the "metric" edge to the Metric entity.
func (*ItemUpdate) SetMetricID ¶
func (iu *ItemUpdate) SetMetricID(id int) *ItemUpdate
SetMetricID sets the "metric" edge to the Metric entity by ID.
func (*ItemUpdate) SetNillableTimestamp ¶
func (iu *ItemUpdate) SetNillableTimestamp(t *time.Time) *ItemUpdate
SetNillableTimestamp sets the "timestamp" field if the given value is not nil.
func (*ItemUpdate) SetTaskInstance ¶
func (iu *ItemUpdate) SetTaskInstance(t *TaskInstance) *ItemUpdate
SetTaskInstance sets the "task_instance" edge to the TaskInstance entity.
func (*ItemUpdate) SetTaskInstanceID ¶
func (iu *ItemUpdate) SetTaskInstanceID(id int) *ItemUpdate
SetTaskInstanceID sets the "task_instance" edge to the TaskInstance entity by ID.
func (*ItemUpdate) SetTimestamp ¶
func (iu *ItemUpdate) SetTimestamp(t time.Time) *ItemUpdate
SetTimestamp sets the "timestamp" field.
func (*ItemUpdate) SetUpdateTime ¶
func (iu *ItemUpdate) SetUpdateTime(t time.Time) *ItemUpdate
SetUpdateTime sets the "update_time" field.
func (*ItemUpdate) SetValue ¶
func (iu *ItemUpdate) SetValue(f float64) *ItemUpdate
SetValue sets the "value" field.
func (*ItemUpdate) Where ¶
func (iu *ItemUpdate) Where(ps ...predicate.Item) *ItemUpdate
Where appends a list predicates to the ItemUpdate builder.
type ItemUpdateOne ¶
type ItemUpdateOne struct {
// contains filtered or unexported fields
}
ItemUpdateOne is the builder for updating a single Item entity.
func (*ItemUpdateOne) AddDimensionIDs ¶
func (iuo *ItemUpdateOne) AddDimensionIDs(ids ...int) *ItemUpdateOne
AddDimensionIDs adds the "dimensions" edge to the Dimension entity by IDs.
func (*ItemUpdateOne) AddDimensions ¶
func (iuo *ItemUpdateOne) AddDimensions(d ...*Dimension) *ItemUpdateOne
AddDimensions adds the "dimensions" edges to the Dimension entity.
func (*ItemUpdateOne) AddValue ¶
func (iuo *ItemUpdateOne) AddValue(f float64) *ItemUpdateOne
AddValue adds f to the "value" field.
func (*ItemUpdateOne) ClearDimensions ¶
func (iuo *ItemUpdateOne) ClearDimensions() *ItemUpdateOne
ClearDimensions clears all "dimensions" edges to the Dimension entity.
func (*ItemUpdateOne) ClearMeta ¶
func (iuo *ItemUpdateOne) ClearMeta() *ItemUpdateOne
ClearMeta clears the value of the "meta" field.
func (*ItemUpdateOne) ClearMetric ¶
func (iuo *ItemUpdateOne) ClearMetric() *ItemUpdateOne
ClearMetric clears the "metric" edge to the Metric entity.
func (*ItemUpdateOne) ClearTaskInstance ¶
func (iuo *ItemUpdateOne) ClearTaskInstance() *ItemUpdateOne
ClearTaskInstance clears the "task_instance" edge to the TaskInstance entity.
func (*ItemUpdateOne) Exec ¶
func (iuo *ItemUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ItemUpdateOne) ExecX ¶
func (iuo *ItemUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemUpdateOne) Mutation ¶
func (iuo *ItemUpdateOne) Mutation() *ItemMutation
Mutation returns the ItemMutation object of the builder.
func (*ItemUpdateOne) RemoveDimensionIDs ¶
func (iuo *ItemUpdateOne) RemoveDimensionIDs(ids ...int) *ItemUpdateOne
RemoveDimensionIDs removes the "dimensions" edge to Dimension entities by IDs.
func (*ItemUpdateOne) RemoveDimensions ¶
func (iuo *ItemUpdateOne) RemoveDimensions(d ...*Dimension) *ItemUpdateOne
RemoveDimensions removes "dimensions" edges to Dimension entities.
func (*ItemUpdateOne) Save ¶
func (iuo *ItemUpdateOne) Save(ctx context.Context) (*Item, error)
Save executes the query and returns the updated Item entity.
func (*ItemUpdateOne) SaveX ¶
func (iuo *ItemUpdateOne) SaveX(ctx context.Context) *Item
SaveX is like Save, but panics if an error occurs.
func (*ItemUpdateOne) Select ¶
func (iuo *ItemUpdateOne) Select(field string, fields ...string) *ItemUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ItemUpdateOne) SetMeta ¶
func (iuo *ItemUpdateOne) SetMeta(m map[string]interface{}) *ItemUpdateOne
SetMeta sets the "meta" field.
func (*ItemUpdateOne) SetMetric ¶
func (iuo *ItemUpdateOne) SetMetric(m *Metric) *ItemUpdateOne
SetMetric sets the "metric" edge to the Metric entity.
func (*ItemUpdateOne) SetMetricID ¶
func (iuo *ItemUpdateOne) SetMetricID(id int) *ItemUpdateOne
SetMetricID sets the "metric" edge to the Metric entity by ID.
func (*ItemUpdateOne) SetNillableTimestamp ¶
func (iuo *ItemUpdateOne) SetNillableTimestamp(t *time.Time) *ItemUpdateOne
SetNillableTimestamp sets the "timestamp" field if the given value is not nil.
func (*ItemUpdateOne) SetTaskInstance ¶
func (iuo *ItemUpdateOne) SetTaskInstance(t *TaskInstance) *ItemUpdateOne
SetTaskInstance sets the "task_instance" edge to the TaskInstance entity.
func (*ItemUpdateOne) SetTaskInstanceID ¶
func (iuo *ItemUpdateOne) SetTaskInstanceID(id int) *ItemUpdateOne
SetTaskInstanceID sets the "task_instance" edge to the TaskInstance entity by ID.
func (*ItemUpdateOne) SetTimestamp ¶
func (iuo *ItemUpdateOne) SetTimestamp(t time.Time) *ItemUpdateOne
SetTimestamp sets the "timestamp" field.
func (*ItemUpdateOne) SetUpdateTime ¶
func (iuo *ItemUpdateOne) SetUpdateTime(t time.Time) *ItemUpdateOne
SetUpdateTime sets the "update_time" field.
func (*ItemUpdateOne) SetValue ¶
func (iuo *ItemUpdateOne) SetValue(f float64) *ItemUpdateOne
SetValue sets the "value" field.
type Metric ¶
type Metric struct { // ID of the ent. ID int `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // DisplayTitle holds the value of the "display_title" field. DisplayTitle map[string]string `json:"display_title,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Meta holds the value of the "meta" field. Meta map[string]interface{} `json:"meta,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MetricQuery when eager-loading is set. Edges MetricEdges `json:"edges"` // contains filtered or unexported fields }
Metric is the model entity for the Metric schema.
func (*Metric) QueryItems ¶
QueryItems queries the "items" edge of the Metric entity.
func (*Metric) Unwrap ¶
Unwrap unwraps the Metric 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 (*Metric) Update ¶
func (m *Metric) Update() *MetricUpdateOne
Update returns a builder for updating this Metric. Note that you need to call Metric.Unwrap() before calling this method if this Metric was returned from a transaction, and the transaction was committed or rolled back.
type MetricClient ¶
type MetricClient struct {
// contains filtered or unexported fields
}
MetricClient is a client for the Metric schema.
func NewMetricClient ¶
func NewMetricClient(c config) *MetricClient
NewMetricClient returns a client for the Metric from the given config.
func (*MetricClient) Create ¶
func (c *MetricClient) Create() *MetricCreate
Create returns a create builder for Metric.
func (*MetricClient) CreateBulk ¶
func (c *MetricClient) CreateBulk(builders ...*MetricCreate) *MetricCreateBulk
CreateBulk returns a builder for creating a bulk of Metric entities.
func (*MetricClient) Delete ¶
func (c *MetricClient) Delete() *MetricDelete
Delete returns a delete builder for Metric.
func (*MetricClient) DeleteOne ¶
func (c *MetricClient) DeleteOne(m *Metric) *MetricDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*MetricClient) DeleteOneID ¶
func (c *MetricClient) DeleteOneID(id int) *MetricDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*MetricClient) GetX ¶
func (c *MetricClient) GetX(ctx context.Context, id int) *Metric
GetX is like Get, but panics if an error occurs.
func (*MetricClient) Query ¶
func (c *MetricClient) Query() *MetricQuery
Query returns a query builder for Metric.
func (*MetricClient) QueryItems ¶
func (c *MetricClient) QueryItems(m *Metric) *ItemQuery
QueryItems queries the items edge of a Metric.
func (*MetricClient) QueryTask ¶
func (c *MetricClient) QueryTask(m *Metric) *TaskQuery
QueryTask queries the task edge of a Metric.
func (*MetricClient) Update ¶
func (c *MetricClient) Update() *MetricUpdate
Update returns an update builder for Metric.
func (*MetricClient) UpdateOne ¶
func (c *MetricClient) UpdateOne(m *Metric) *MetricUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MetricClient) UpdateOneID ¶
func (c *MetricClient) UpdateOneID(id int) *MetricUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MetricClient) Use ¶
func (c *MetricClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `metric.Hooks(f(g(h())))`.
type MetricCreate ¶
type MetricCreate struct {
// contains filtered or unexported fields
}
MetricCreate is the builder for creating a Metric entity.
func (*MetricCreate) AddItemIDs ¶
func (mc *MetricCreate) AddItemIDs(ids ...int) *MetricCreate
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*MetricCreate) AddItems ¶
func (mc *MetricCreate) AddItems(i ...*Item) *MetricCreate
AddItems adds the "items" edges to the Item entity.
func (*MetricCreate) Exec ¶
func (mc *MetricCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MetricCreate) ExecX ¶
func (mc *MetricCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetricCreate) Mutation ¶
func (mc *MetricCreate) Mutation() *MetricMutation
Mutation returns the MetricMutation object of the builder.
func (*MetricCreate) Save ¶
func (mc *MetricCreate) Save(ctx context.Context) (*Metric, error)
Save creates the Metric in the database.
func (*MetricCreate) SaveX ¶
func (mc *MetricCreate) SaveX(ctx context.Context) *Metric
SaveX calls Save and panics if Save returns an error.
func (*MetricCreate) SetCreateTime ¶
func (mc *MetricCreate) SetCreateTime(t time.Time) *MetricCreate
SetCreateTime sets the "create_time" field.
func (*MetricCreate) SetDescription ¶
func (mc *MetricCreate) SetDescription(s string) *MetricCreate
SetDescription sets the "description" field.
func (*MetricCreate) SetDisplayTitle ¶
func (mc *MetricCreate) SetDisplayTitle(m map[string]string) *MetricCreate
SetDisplayTitle sets the "display_title" field.
func (*MetricCreate) SetMeta ¶
func (mc *MetricCreate) SetMeta(m map[string]interface{}) *MetricCreate
SetMeta sets the "meta" field.
func (*MetricCreate) SetNillableCreateTime ¶
func (mc *MetricCreate) SetNillableCreateTime(t *time.Time) *MetricCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*MetricCreate) SetNillableDescription ¶
func (mc *MetricCreate) SetNillableDescription(s *string) *MetricCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*MetricCreate) SetNillableUpdateTime ¶
func (mc *MetricCreate) SetNillableUpdateTime(t *time.Time) *MetricCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*MetricCreate) SetTask ¶
func (mc *MetricCreate) SetTask(t *Task) *MetricCreate
SetTask sets the "task" edge to the Task entity.
func (*MetricCreate) SetTaskID ¶
func (mc *MetricCreate) SetTaskID(id int) *MetricCreate
SetTaskID sets the "task" edge to the Task entity by ID.
func (*MetricCreate) SetTitle ¶
func (mc *MetricCreate) SetTitle(s string) *MetricCreate
SetTitle sets the "title" field.
func (*MetricCreate) SetUpdateTime ¶
func (mc *MetricCreate) SetUpdateTime(t time.Time) *MetricCreate
SetUpdateTime sets the "update_time" field.
type MetricCreateBulk ¶
type MetricCreateBulk struct {
// contains filtered or unexported fields
}
MetricCreateBulk is the builder for creating many Metric entities in bulk.
func (*MetricCreateBulk) Exec ¶
func (mcb *MetricCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MetricCreateBulk) ExecX ¶
func (mcb *MetricCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MetricDelete ¶
type MetricDelete struct {
// contains filtered or unexported fields
}
MetricDelete is the builder for deleting a Metric entity.
func (*MetricDelete) Exec ¶
func (md *MetricDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MetricDelete) ExecX ¶
func (md *MetricDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MetricDelete) Where ¶
func (md *MetricDelete) Where(ps ...predicate.Metric) *MetricDelete
Where appends a list predicates to the MetricDelete builder.
type MetricDeleteOne ¶
type MetricDeleteOne struct {
// contains filtered or unexported fields
}
MetricDeleteOne is the builder for deleting a single Metric entity.
func (*MetricDeleteOne) Exec ¶
func (mdo *MetricDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MetricDeleteOne) ExecX ¶
func (mdo *MetricDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MetricEdges ¶
type MetricEdges struct { // Items holds the value of the items edge. Items []*Item `json:"items,omitempty"` // Task holds the value of the task edge. Task *Task `json:"task,omitempty"` // contains filtered or unexported fields }
MetricEdges holds the relations/edges for other nodes in the graph.
func (MetricEdges) ItemsOrErr ¶
func (e MetricEdges) ItemsOrErr() ([]*Item, error)
ItemsOrErr returns the Items value or an error if the edge was not loaded in eager-loading.
func (MetricEdges) TaskOrErr ¶
func (e MetricEdges) TaskOrErr() (*Task, error)
TaskOrErr returns the Task value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type MetricGroupBy ¶
type MetricGroupBy struct {
// contains filtered or unexported fields
}
MetricGroupBy is the group-by builder for Metric entities.
func (*MetricGroupBy) Aggregate ¶
func (mgb *MetricGroupBy) Aggregate(fns ...AggregateFunc) *MetricGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MetricGroupBy) Bool ¶
func (mgb *MetricGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*MetricGroupBy) BoolX ¶
func (mgb *MetricGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*MetricGroupBy) Bools ¶
func (mgb *MetricGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*MetricGroupBy) BoolsX ¶
func (mgb *MetricGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*MetricGroupBy) Float64 ¶
func (mgb *MetricGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*MetricGroupBy) Float64X ¶
func (mgb *MetricGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*MetricGroupBy) Float64s ¶
func (mgb *MetricGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*MetricGroupBy) Float64sX ¶
func (mgb *MetricGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*MetricGroupBy) Int ¶
func (mgb *MetricGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*MetricGroupBy) IntX ¶
func (mgb *MetricGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*MetricGroupBy) Ints ¶
func (mgb *MetricGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*MetricGroupBy) IntsX ¶
func (mgb *MetricGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*MetricGroupBy) Scan ¶
func (mgb *MetricGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*MetricGroupBy) ScanX ¶
func (mgb *MetricGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*MetricGroupBy) String ¶
func (mgb *MetricGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*MetricGroupBy) StringX ¶
func (mgb *MetricGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type MetricMutation ¶
type MetricMutation struct {
// contains filtered or unexported fields
}
MetricMutation represents an operation that mutates the Metric nodes in the graph.
func (*MetricMutation) AddField ¶
func (m *MetricMutation) 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 (*MetricMutation) AddItemIDs ¶
func (m *MetricMutation) AddItemIDs(ids ...int)
AddItemIDs adds the "items" edge to the Item entity by ids.
func (*MetricMutation) AddedEdges ¶
func (m *MetricMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MetricMutation) AddedField ¶
func (m *MetricMutation) 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 (*MetricMutation) AddedFields ¶
func (m *MetricMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MetricMutation) AddedIDs ¶
func (m *MetricMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MetricMutation) ClearDescription ¶
func (m *MetricMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*MetricMutation) ClearDisplayTitle ¶
func (m *MetricMutation) ClearDisplayTitle()
ClearDisplayTitle clears the value of the "display_title" field.
func (*MetricMutation) ClearEdge ¶
func (m *MetricMutation) 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 (*MetricMutation) ClearField ¶
func (m *MetricMutation) 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 (*MetricMutation) ClearItems ¶
func (m *MetricMutation) ClearItems()
ClearItems clears the "items" edge to the Item entity.
func (*MetricMutation) ClearMeta ¶
func (m *MetricMutation) ClearMeta()
ClearMeta clears the value of the "meta" field.
func (*MetricMutation) ClearTask ¶
func (m *MetricMutation) ClearTask()
ClearTask clears the "task" edge to the Task entity.
func (*MetricMutation) ClearedEdges ¶
func (m *MetricMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MetricMutation) ClearedFields ¶
func (m *MetricMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MetricMutation) Client ¶
func (m MetricMutation) 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 (*MetricMutation) CreateTime ¶
func (m *MetricMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*MetricMutation) Description ¶
func (m *MetricMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*MetricMutation) DescriptionCleared ¶
func (m *MetricMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*MetricMutation) DisplayTitle ¶
func (m *MetricMutation) DisplayTitle() (r map[string]string, exists bool)
DisplayTitle returns the value of the "display_title" field in the mutation.
func (*MetricMutation) DisplayTitleCleared ¶
func (m *MetricMutation) DisplayTitleCleared() bool
DisplayTitleCleared returns if the "display_title" field was cleared in this mutation.
func (*MetricMutation) EdgeCleared ¶
func (m *MetricMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MetricMutation) Field ¶
func (m *MetricMutation) 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 (*MetricMutation) FieldCleared ¶
func (m *MetricMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MetricMutation) Fields ¶
func (m *MetricMutation) 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 (*MetricMutation) ID ¶
func (m *MetricMutation) 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 (*MetricMutation) IDs ¶
func (m *MetricMutation) 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 (*MetricMutation) ItemsCleared ¶
func (m *MetricMutation) ItemsCleared() bool
ItemsCleared reports if the "items" edge to the Item entity was cleared.
func (*MetricMutation) ItemsIDs ¶
func (m *MetricMutation) ItemsIDs() (ids []int)
ItemsIDs returns the "items" edge IDs in the mutation.
func (*MetricMutation) Meta ¶
func (m *MetricMutation) Meta() (r map[string]interface{}, exists bool)
Meta returns the value of the "meta" field in the mutation.
func (*MetricMutation) MetaCleared ¶
func (m *MetricMutation) MetaCleared() bool
MetaCleared returns if the "meta" field was cleared in this mutation.
func (*MetricMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Metric entity. If the Metric 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 (*MetricMutation) OldDescription ¶
func (m *MetricMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Metric entity. If the Metric 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 (*MetricMutation) OldDisplayTitle ¶
OldDisplayTitle returns the old "display_title" field's value of the Metric entity. If the Metric 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 (*MetricMutation) 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 (*MetricMutation) OldMeta ¶
func (m *MetricMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
OldMeta returns the old "meta" field's value of the Metric entity. If the Metric 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 (*MetricMutation) OldTitle ¶
func (m *MetricMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the Metric entity. If the Metric 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 (*MetricMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Metric entity. If the Metric 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 (*MetricMutation) RemoveItemIDs ¶
func (m *MetricMutation) RemoveItemIDs(ids ...int)
RemoveItemIDs removes the "items" edge to the Item entity by IDs.
func (*MetricMutation) RemovedEdges ¶
func (m *MetricMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MetricMutation) RemovedIDs ¶
func (m *MetricMutation) 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 (*MetricMutation) RemovedItemsIDs ¶
func (m *MetricMutation) RemovedItemsIDs() (ids []int)
RemovedItems returns the removed IDs of the "items" edge to the Item entity.
func (*MetricMutation) ResetCreateTime ¶
func (m *MetricMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*MetricMutation) ResetDescription ¶
func (m *MetricMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*MetricMutation) ResetDisplayTitle ¶
func (m *MetricMutation) ResetDisplayTitle()
ResetDisplayTitle resets all changes to the "display_title" field.
func (*MetricMutation) ResetEdge ¶
func (m *MetricMutation) 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 (*MetricMutation) ResetField ¶
func (m *MetricMutation) 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 (*MetricMutation) ResetItems ¶
func (m *MetricMutation) ResetItems()
ResetItems resets all changes to the "items" edge.
func (*MetricMutation) ResetMeta ¶
func (m *MetricMutation) ResetMeta()
ResetMeta resets all changes to the "meta" field.
func (*MetricMutation) ResetTask ¶
func (m *MetricMutation) ResetTask()
ResetTask resets all changes to the "task" edge.
func (*MetricMutation) ResetTitle ¶
func (m *MetricMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*MetricMutation) ResetUpdateTime ¶
func (m *MetricMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*MetricMutation) SetCreateTime ¶
func (m *MetricMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*MetricMutation) SetDescription ¶
func (m *MetricMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*MetricMutation) SetDisplayTitle ¶
func (m *MetricMutation) SetDisplayTitle(value map[string]string)
SetDisplayTitle sets the "display_title" field.
func (*MetricMutation) SetField ¶
func (m *MetricMutation) 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 (*MetricMutation) SetMeta ¶
func (m *MetricMutation) SetMeta(value map[string]interface{})
SetMeta sets the "meta" field.
func (*MetricMutation) SetTaskID ¶
func (m *MetricMutation) SetTaskID(id int)
SetTaskID sets the "task" edge to the Task entity by id.
func (*MetricMutation) SetTitle ¶
func (m *MetricMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*MetricMutation) SetUpdateTime ¶
func (m *MetricMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*MetricMutation) TaskCleared ¶
func (m *MetricMutation) TaskCleared() bool
TaskCleared reports if the "task" edge to the Task entity was cleared.
func (*MetricMutation) TaskID ¶
func (m *MetricMutation) TaskID() (id int, exists bool)
TaskID returns the "task" edge ID in the mutation.
func (*MetricMutation) TaskIDs ¶
func (m *MetricMutation) TaskIDs() (ids []int)
TaskIDs returns the "task" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TaskID instead. It exists only for internal usage by the builders.
func (*MetricMutation) Title ¶
func (m *MetricMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (MetricMutation) Tx ¶
func (m MetricMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MetricMutation) Type ¶
func (m *MetricMutation) Type() string
Type returns the node type of this mutation (Metric).
func (*MetricMutation) UpdateTime ¶
func (m *MetricMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*MetricMutation) Where ¶
func (m *MetricMutation) Where(ps ...predicate.Metric)
Where appends a list predicates to the MetricMutation builder.
type MetricQuery ¶
type MetricQuery struct {
// contains filtered or unexported fields
}
MetricQuery is the builder for querying Metric entities.
func (*MetricQuery) All ¶
func (mq *MetricQuery) All(ctx context.Context) ([]*Metric, error)
All executes the query and returns a list of Metrics.
func (*MetricQuery) AllX ¶
func (mq *MetricQuery) AllX(ctx context.Context) []*Metric
AllX is like All, but panics if an error occurs.
func (*MetricQuery) Clone ¶
func (mq *MetricQuery) Clone() *MetricQuery
Clone returns a duplicate of the MetricQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MetricQuery) Count ¶
func (mq *MetricQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MetricQuery) CountX ¶
func (mq *MetricQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MetricQuery) Exist ¶
func (mq *MetricQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MetricQuery) ExistX ¶
func (mq *MetricQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MetricQuery) First ¶
func (mq *MetricQuery) First(ctx context.Context) (*Metric, error)
First returns the first Metric entity from the query. Returns a *NotFoundError when no Metric was found.
func (*MetricQuery) FirstID ¶
func (mq *MetricQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Metric ID from the query. Returns a *NotFoundError when no Metric ID was found.
func (*MetricQuery) FirstIDX ¶
func (mq *MetricQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*MetricQuery) FirstX ¶
func (mq *MetricQuery) FirstX(ctx context.Context) *Metric
FirstX is like First, but panics if an error occurs.
func (*MetricQuery) GroupBy ¶
func (mq *MetricQuery) GroupBy(field string, fields ...string) *MetricGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Metric.Query(). GroupBy(metric.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MetricQuery) IDs ¶
func (mq *MetricQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Metric IDs.
func (*MetricQuery) IDsX ¶
func (mq *MetricQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MetricQuery) Limit ¶
func (mq *MetricQuery) Limit(limit int) *MetricQuery
Limit adds a limit step to the query.
func (*MetricQuery) Offset ¶
func (mq *MetricQuery) Offset(offset int) *MetricQuery
Offset adds an offset step to the query.
func (*MetricQuery) Only ¶
func (mq *MetricQuery) Only(ctx context.Context) (*Metric, error)
Only returns a single Metric entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Metric entity is not found. Returns a *NotFoundError when no Metric entities are found.
func (*MetricQuery) OnlyID ¶
func (mq *MetricQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Metric ID in the query. Returns a *NotSingularError when exactly one Metric ID is not found. Returns a *NotFoundError when no entities are found.
func (*MetricQuery) OnlyIDX ¶
func (mq *MetricQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MetricQuery) OnlyX ¶
func (mq *MetricQuery) OnlyX(ctx context.Context) *Metric
OnlyX is like Only, but panics if an error occurs.
func (*MetricQuery) Order ¶
func (mq *MetricQuery) Order(o ...OrderFunc) *MetricQuery
Order adds an order step to the query.
func (*MetricQuery) QueryItems ¶
func (mq *MetricQuery) QueryItems() *ItemQuery
QueryItems chains the current query on the "items" edge.
func (*MetricQuery) QueryTask ¶
func (mq *MetricQuery) QueryTask() *TaskQuery
QueryTask chains the current query on the "task" edge.
func (*MetricQuery) Select ¶
func (mq *MetricQuery) Select(fields ...string) *MetricSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Metric.Query(). Select(metric.FieldCreateTime). Scan(ctx, &v)
func (*MetricQuery) Unique ¶
func (mq *MetricQuery) Unique(unique bool) *MetricQuery
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 (*MetricQuery) Where ¶
func (mq *MetricQuery) Where(ps ...predicate.Metric) *MetricQuery
Where adds a new predicate for the MetricQuery builder.
func (*MetricQuery) WithItems ¶
func (mq *MetricQuery) WithItems(opts ...func(*ItemQuery)) *MetricQuery
WithItems tells the query-builder to eager-load the nodes that are connected to the "items" edge. The optional arguments are used to configure the query builder of the edge.
func (*MetricQuery) WithTask ¶
func (mq *MetricQuery) WithTask(opts ...func(*TaskQuery)) *MetricQuery
WithTask tells the query-builder to eager-load the nodes that are connected to the "task" edge. The optional arguments are used to configure the query builder of the edge.
type MetricSelect ¶
type MetricSelect struct { *MetricQuery // contains filtered or unexported fields }
MetricSelect is the builder for selecting fields of Metric entities.
func (*MetricSelect) Bool ¶
func (ms *MetricSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MetricSelect) BoolX ¶
func (ms *MetricSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*MetricSelect) Bools ¶
func (ms *MetricSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MetricSelect) BoolsX ¶
func (ms *MetricSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*MetricSelect) Float64 ¶
func (ms *MetricSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MetricSelect) Float64X ¶
func (ms *MetricSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*MetricSelect) Float64s ¶
func (ms *MetricSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MetricSelect) Float64sX ¶
func (ms *MetricSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*MetricSelect) Int ¶
func (ms *MetricSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MetricSelect) IntX ¶
func (ms *MetricSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*MetricSelect) Ints ¶
func (ms *MetricSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MetricSelect) IntsX ¶
func (ms *MetricSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*MetricSelect) Scan ¶
func (ms *MetricSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*MetricSelect) ScanX ¶
func (ms *MetricSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*MetricSelect) String ¶
func (ms *MetricSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*MetricSelect) StringX ¶
func (ms *MetricSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type MetricUpdate ¶
type MetricUpdate struct {
// contains filtered or unexported fields
}
MetricUpdate is the builder for updating Metric entities.
func (*MetricUpdate) AddItemIDs ¶
func (mu *MetricUpdate) AddItemIDs(ids ...int) *MetricUpdate
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*MetricUpdate) AddItems ¶
func (mu *MetricUpdate) AddItems(i ...*Item) *MetricUpdate
AddItems adds the "items" edges to the Item entity.
func (*MetricUpdate) ClearDescription ¶
func (mu *MetricUpdate) ClearDescription() *MetricUpdate
ClearDescription clears the value of the "description" field.
func (*MetricUpdate) ClearDisplayTitle ¶
func (mu *MetricUpdate) ClearDisplayTitle() *MetricUpdate
ClearDisplayTitle clears the value of the "display_title" field.
func (*MetricUpdate) ClearItems ¶
func (mu *MetricUpdate) ClearItems() *MetricUpdate
ClearItems clears all "items" edges to the Item entity.
func (*MetricUpdate) ClearMeta ¶
func (mu *MetricUpdate) ClearMeta() *MetricUpdate
ClearMeta clears the value of the "meta" field.
func (*MetricUpdate) ClearTask ¶
func (mu *MetricUpdate) ClearTask() *MetricUpdate
ClearTask clears the "task" edge to the Task entity.
func (*MetricUpdate) Exec ¶
func (mu *MetricUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MetricUpdate) ExecX ¶
func (mu *MetricUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetricUpdate) Mutation ¶
func (mu *MetricUpdate) Mutation() *MetricMutation
Mutation returns the MetricMutation object of the builder.
func (*MetricUpdate) RemoveItemIDs ¶
func (mu *MetricUpdate) RemoveItemIDs(ids ...int) *MetricUpdate
RemoveItemIDs removes the "items" edge to Item entities by IDs.
func (*MetricUpdate) RemoveItems ¶
func (mu *MetricUpdate) RemoveItems(i ...*Item) *MetricUpdate
RemoveItems removes "items" edges to Item entities.
func (*MetricUpdate) Save ¶
func (mu *MetricUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MetricUpdate) SaveX ¶
func (mu *MetricUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MetricUpdate) SetDescription ¶
func (mu *MetricUpdate) SetDescription(s string) *MetricUpdate
SetDescription sets the "description" field.
func (*MetricUpdate) SetDisplayTitle ¶
func (mu *MetricUpdate) SetDisplayTitle(m map[string]string) *MetricUpdate
SetDisplayTitle sets the "display_title" field.
func (*MetricUpdate) SetMeta ¶
func (mu *MetricUpdate) SetMeta(m map[string]interface{}) *MetricUpdate
SetMeta sets the "meta" field.
func (*MetricUpdate) SetNillableDescription ¶
func (mu *MetricUpdate) SetNillableDescription(s *string) *MetricUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*MetricUpdate) SetTask ¶
func (mu *MetricUpdate) SetTask(t *Task) *MetricUpdate
SetTask sets the "task" edge to the Task entity.
func (*MetricUpdate) SetTaskID ¶
func (mu *MetricUpdate) SetTaskID(id int) *MetricUpdate
SetTaskID sets the "task" edge to the Task entity by ID.
func (*MetricUpdate) SetTitle ¶
func (mu *MetricUpdate) SetTitle(s string) *MetricUpdate
SetTitle sets the "title" field.
func (*MetricUpdate) SetUpdateTime ¶
func (mu *MetricUpdate) SetUpdateTime(t time.Time) *MetricUpdate
SetUpdateTime sets the "update_time" field.
func (*MetricUpdate) Where ¶
func (mu *MetricUpdate) Where(ps ...predicate.Metric) *MetricUpdate
Where appends a list predicates to the MetricUpdate builder.
type MetricUpdateOne ¶
type MetricUpdateOne struct {
// contains filtered or unexported fields
}
MetricUpdateOne is the builder for updating a single Metric entity.
func (*MetricUpdateOne) AddItemIDs ¶
func (muo *MetricUpdateOne) AddItemIDs(ids ...int) *MetricUpdateOne
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*MetricUpdateOne) AddItems ¶
func (muo *MetricUpdateOne) AddItems(i ...*Item) *MetricUpdateOne
AddItems adds the "items" edges to the Item entity.
func (*MetricUpdateOne) ClearDescription ¶
func (muo *MetricUpdateOne) ClearDescription() *MetricUpdateOne
ClearDescription clears the value of the "description" field.
func (*MetricUpdateOne) ClearDisplayTitle ¶
func (muo *MetricUpdateOne) ClearDisplayTitle() *MetricUpdateOne
ClearDisplayTitle clears the value of the "display_title" field.
func (*MetricUpdateOne) ClearItems ¶
func (muo *MetricUpdateOne) ClearItems() *MetricUpdateOne
ClearItems clears all "items" edges to the Item entity.
func (*MetricUpdateOne) ClearMeta ¶
func (muo *MetricUpdateOne) ClearMeta() *MetricUpdateOne
ClearMeta clears the value of the "meta" field.
func (*MetricUpdateOne) ClearTask ¶
func (muo *MetricUpdateOne) ClearTask() *MetricUpdateOne
ClearTask clears the "task" edge to the Task entity.
func (*MetricUpdateOne) Exec ¶
func (muo *MetricUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MetricUpdateOne) ExecX ¶
func (muo *MetricUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetricUpdateOne) Mutation ¶
func (muo *MetricUpdateOne) Mutation() *MetricMutation
Mutation returns the MetricMutation object of the builder.
func (*MetricUpdateOne) RemoveItemIDs ¶
func (muo *MetricUpdateOne) RemoveItemIDs(ids ...int) *MetricUpdateOne
RemoveItemIDs removes the "items" edge to Item entities by IDs.
func (*MetricUpdateOne) RemoveItems ¶
func (muo *MetricUpdateOne) RemoveItems(i ...*Item) *MetricUpdateOne
RemoveItems removes "items" edges to Item entities.
func (*MetricUpdateOne) Save ¶
func (muo *MetricUpdateOne) Save(ctx context.Context) (*Metric, error)
Save executes the query and returns the updated Metric entity.
func (*MetricUpdateOne) SaveX ¶
func (muo *MetricUpdateOne) SaveX(ctx context.Context) *Metric
SaveX is like Save, but panics if an error occurs.
func (*MetricUpdateOne) Select ¶
func (muo *MetricUpdateOne) Select(field string, fields ...string) *MetricUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MetricUpdateOne) SetDescription ¶
func (muo *MetricUpdateOne) SetDescription(s string) *MetricUpdateOne
SetDescription sets the "description" field.
func (*MetricUpdateOne) SetDisplayTitle ¶
func (muo *MetricUpdateOne) SetDisplayTitle(m map[string]string) *MetricUpdateOne
SetDisplayTitle sets the "display_title" field.
func (*MetricUpdateOne) SetMeta ¶
func (muo *MetricUpdateOne) SetMeta(m map[string]interface{}) *MetricUpdateOne
SetMeta sets the "meta" field.
func (*MetricUpdateOne) SetNillableDescription ¶
func (muo *MetricUpdateOne) SetNillableDescription(s *string) *MetricUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*MetricUpdateOne) SetTask ¶
func (muo *MetricUpdateOne) SetTask(t *Task) *MetricUpdateOne
SetTask sets the "task" edge to the Task entity.
func (*MetricUpdateOne) SetTaskID ¶
func (muo *MetricUpdateOne) SetTaskID(id int) *MetricUpdateOne
SetTaskID sets the "task" edge to the Task entity by ID.
func (*MetricUpdateOne) SetTitle ¶
func (muo *MetricUpdateOne) SetTitle(s string) *MetricUpdateOne
SetTitle sets the "title" field.
func (*MetricUpdateOne) SetUpdateTime ¶
func (muo *MetricUpdateOne) SetUpdateTime(t time.Time) *MetricUpdateOne
SetUpdateTime sets the "update_time" field.
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 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 Task ¶
type Task struct { // ID of the ent. ID int `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Type holds the value of the "type" field. Type task.Type `json:"type,omitempty"` // Code holds the value of the "code" field. Code string `json:"code,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Active holds the value of the "active" field. Active bool `json:"active,omitempty"` // Display holds the value of the "display" field. Display bool `json:"display,omitempty"` // Schedule holds the value of the "schedule" field. Schedule string `json:"schedule,omitempty"` // Args holds the value of the "args" field. Args map[string]interface{} `json:"args,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TaskQuery when eager-loading is set. Edges TaskEdges `json:"edges"` // contains filtered or unexported fields }
Task is the model entity for the Task schema.
func (*Task) QueryCategory ¶
func (t *Task) QueryCategory() *TaskCategoryQuery
QueryCategory queries the "category" edge of the Task entity.
func (*Task) QueryInstances ¶
func (t *Task) QueryInstances() *TaskInstanceQuery
QueryInstances queries the "instances" edge of the Task entity.
func (*Task) QueryMetrics ¶
func (t *Task) QueryMetrics() *MetricQuery
QueryMetrics queries the "metrics" edge of the Task entity.
func (*Task) QueryTags ¶
func (t *Task) QueryTags() *TaskTagQuery
QueryTags queries the "tags" edge of the Task entity.
func (*Task) Unwrap ¶
Unwrap unwraps the Task 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 (*Task) Update ¶
func (t *Task) Update() *TaskUpdateOne
Update returns a builder for updating this Task. Note that you need to call Task.Unwrap() before calling this method if this Task was returned from a transaction, and the transaction was committed or rolled back.
type TaskCategories ¶
type TaskCategories []*TaskCategory
TaskCategories is a parsable slice of TaskCategory.
type TaskCategory ¶
type TaskCategory struct { // ID of the ent. ID int `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Display holds the value of the "display" field. Display bool `json:"display,omitempty"` // Meta holds the value of the "meta" field. Meta map[string]interface{} `json:"meta,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TaskCategoryQuery when eager-loading is set. Edges TaskCategoryEdges `json:"edges"` // contains filtered or unexported fields }
TaskCategory is the model entity for the TaskCategory schema.
func (*TaskCategory) QueryTasks ¶
func (tc *TaskCategory) QueryTasks() *TaskQuery
QueryTasks queries the "tasks" edge of the TaskCategory entity.
func (*TaskCategory) String ¶
func (tc *TaskCategory) String() string
String implements the fmt.Stringer.
func (*TaskCategory) Unwrap ¶
func (tc *TaskCategory) Unwrap() *TaskCategory
Unwrap unwraps the TaskCategory 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 (*TaskCategory) Update ¶
func (tc *TaskCategory) Update() *TaskCategoryUpdateOne
Update returns a builder for updating this TaskCategory. Note that you need to call TaskCategory.Unwrap() before calling this method if this TaskCategory was returned from a transaction, and the transaction was committed or rolled back.
type TaskCategoryClient ¶
type TaskCategoryClient struct {
// contains filtered or unexported fields
}
TaskCategoryClient is a client for the TaskCategory schema.
func NewTaskCategoryClient ¶
func NewTaskCategoryClient(c config) *TaskCategoryClient
NewTaskCategoryClient returns a client for the TaskCategory from the given config.
func (*TaskCategoryClient) Create ¶
func (c *TaskCategoryClient) Create() *TaskCategoryCreate
Create returns a create builder for TaskCategory.
func (*TaskCategoryClient) CreateBulk ¶
func (c *TaskCategoryClient) CreateBulk(builders ...*TaskCategoryCreate) *TaskCategoryCreateBulk
CreateBulk returns a builder for creating a bulk of TaskCategory entities.
func (*TaskCategoryClient) Delete ¶
func (c *TaskCategoryClient) Delete() *TaskCategoryDelete
Delete returns a delete builder for TaskCategory.
func (*TaskCategoryClient) DeleteOne ¶
func (c *TaskCategoryClient) DeleteOne(tc *TaskCategory) *TaskCategoryDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*TaskCategoryClient) DeleteOneID ¶
func (c *TaskCategoryClient) DeleteOneID(id int) *TaskCategoryDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*TaskCategoryClient) Get ¶
func (c *TaskCategoryClient) Get(ctx context.Context, id int) (*TaskCategory, error)
Get returns a TaskCategory entity by its id.
func (*TaskCategoryClient) GetX ¶
func (c *TaskCategoryClient) GetX(ctx context.Context, id int) *TaskCategory
GetX is like Get, but panics if an error occurs.
func (*TaskCategoryClient) Hooks ¶
func (c *TaskCategoryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TaskCategoryClient) Query ¶
func (c *TaskCategoryClient) Query() *TaskCategoryQuery
Query returns a query builder for TaskCategory.
func (*TaskCategoryClient) QueryTasks ¶
func (c *TaskCategoryClient) QueryTasks(tc *TaskCategory) *TaskQuery
QueryTasks queries the tasks edge of a TaskCategory.
func (*TaskCategoryClient) Update ¶
func (c *TaskCategoryClient) Update() *TaskCategoryUpdate
Update returns an update builder for TaskCategory.
func (*TaskCategoryClient) UpdateOne ¶
func (c *TaskCategoryClient) UpdateOne(tc *TaskCategory) *TaskCategoryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TaskCategoryClient) UpdateOneID ¶
func (c *TaskCategoryClient) UpdateOneID(id int) *TaskCategoryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TaskCategoryClient) Use ¶
func (c *TaskCategoryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `taskcategory.Hooks(f(g(h())))`.
type TaskCategoryCreate ¶
type TaskCategoryCreate struct {
// contains filtered or unexported fields
}
TaskCategoryCreate is the builder for creating a TaskCategory entity.
func (*TaskCategoryCreate) AddTaskIDs ¶
func (tcc *TaskCategoryCreate) AddTaskIDs(ids ...int) *TaskCategoryCreate
AddTaskIDs adds the "tasks" edge to the Task entity by IDs.
func (*TaskCategoryCreate) AddTasks ¶
func (tcc *TaskCategoryCreate) AddTasks(t ...*Task) *TaskCategoryCreate
AddTasks adds the "tasks" edges to the Task entity.
func (*TaskCategoryCreate) Exec ¶
func (tcc *TaskCategoryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskCategoryCreate) ExecX ¶
func (tcc *TaskCategoryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskCategoryCreate) Mutation ¶
func (tcc *TaskCategoryCreate) Mutation() *TaskCategoryMutation
Mutation returns the TaskCategoryMutation object of the builder.
func (*TaskCategoryCreate) Save ¶
func (tcc *TaskCategoryCreate) Save(ctx context.Context) (*TaskCategory, error)
Save creates the TaskCategory in the database.
func (*TaskCategoryCreate) SaveX ¶
func (tcc *TaskCategoryCreate) SaveX(ctx context.Context) *TaskCategory
SaveX calls Save and panics if Save returns an error.
func (*TaskCategoryCreate) SetCreateTime ¶
func (tcc *TaskCategoryCreate) SetCreateTime(t time.Time) *TaskCategoryCreate
SetCreateTime sets the "create_time" field.
func (*TaskCategoryCreate) SetDescription ¶
func (tcc *TaskCategoryCreate) SetDescription(s string) *TaskCategoryCreate
SetDescription sets the "description" field.
func (*TaskCategoryCreate) SetDisplay ¶
func (tcc *TaskCategoryCreate) SetDisplay(b bool) *TaskCategoryCreate
SetDisplay sets the "display" field.
func (*TaskCategoryCreate) SetMeta ¶
func (tcc *TaskCategoryCreate) SetMeta(m map[string]interface{}) *TaskCategoryCreate
SetMeta sets the "meta" field.
func (*TaskCategoryCreate) SetNillableCreateTime ¶
func (tcc *TaskCategoryCreate) SetNillableCreateTime(t *time.Time) *TaskCategoryCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*TaskCategoryCreate) SetNillableDescription ¶
func (tcc *TaskCategoryCreate) SetNillableDescription(s *string) *TaskCategoryCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*TaskCategoryCreate) SetNillableDisplay ¶
func (tcc *TaskCategoryCreate) SetNillableDisplay(b *bool) *TaskCategoryCreate
SetNillableDisplay sets the "display" field if the given value is not nil.
func (*TaskCategoryCreate) SetNillableUpdateTime ¶
func (tcc *TaskCategoryCreate) SetNillableUpdateTime(t *time.Time) *TaskCategoryCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*TaskCategoryCreate) SetTitle ¶
func (tcc *TaskCategoryCreate) SetTitle(s string) *TaskCategoryCreate
SetTitle sets the "title" field.
func (*TaskCategoryCreate) SetUpdateTime ¶
func (tcc *TaskCategoryCreate) SetUpdateTime(t time.Time) *TaskCategoryCreate
SetUpdateTime sets the "update_time" field.
type TaskCategoryCreateBulk ¶
type TaskCategoryCreateBulk struct {
// contains filtered or unexported fields
}
TaskCategoryCreateBulk is the builder for creating many TaskCategory entities in bulk.
func (*TaskCategoryCreateBulk) Exec ¶
func (tccb *TaskCategoryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskCategoryCreateBulk) ExecX ¶
func (tccb *TaskCategoryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskCategoryCreateBulk) Save ¶
func (tccb *TaskCategoryCreateBulk) Save(ctx context.Context) ([]*TaskCategory, error)
Save creates the TaskCategory entities in the database.
func (*TaskCategoryCreateBulk) SaveX ¶
func (tccb *TaskCategoryCreateBulk) SaveX(ctx context.Context) []*TaskCategory
SaveX is like Save, but panics if an error occurs.
type TaskCategoryDelete ¶
type TaskCategoryDelete struct {
// contains filtered or unexported fields
}
TaskCategoryDelete is the builder for deleting a TaskCategory entity.
func (*TaskCategoryDelete) Exec ¶
func (tcd *TaskCategoryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TaskCategoryDelete) ExecX ¶
func (tcd *TaskCategoryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TaskCategoryDelete) Where ¶
func (tcd *TaskCategoryDelete) Where(ps ...predicate.TaskCategory) *TaskCategoryDelete
Where appends a list predicates to the TaskCategoryDelete builder.
type TaskCategoryDeleteOne ¶
type TaskCategoryDeleteOne struct {
// contains filtered or unexported fields
}
TaskCategoryDeleteOne is the builder for deleting a single TaskCategory entity.
func (*TaskCategoryDeleteOne) Exec ¶
func (tcdo *TaskCategoryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TaskCategoryDeleteOne) ExecX ¶
func (tcdo *TaskCategoryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TaskCategoryEdges ¶
type TaskCategoryEdges struct { // Tasks holds the value of the tasks edge. Tasks []*Task `json:"tasks,omitempty"` // contains filtered or unexported fields }
TaskCategoryEdges holds the relations/edges for other nodes in the graph.
func (TaskCategoryEdges) TasksOrErr ¶
func (e TaskCategoryEdges) TasksOrErr() ([]*Task, error)
TasksOrErr returns the Tasks value or an error if the edge was not loaded in eager-loading.
type TaskCategoryGroupBy ¶
type TaskCategoryGroupBy struct {
// contains filtered or unexported fields
}
TaskCategoryGroupBy is the group-by builder for TaskCategory entities.
func (*TaskCategoryGroupBy) Aggregate ¶
func (tcgb *TaskCategoryGroupBy) Aggregate(fns ...AggregateFunc) *TaskCategoryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TaskCategoryGroupBy) Bool ¶
func (tcgb *TaskCategoryGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TaskCategoryGroupBy) BoolX ¶
func (tcgb *TaskCategoryGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*TaskCategoryGroupBy) Bools ¶
func (tcgb *TaskCategoryGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*TaskCategoryGroupBy) BoolsX ¶
func (tcgb *TaskCategoryGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*TaskCategoryGroupBy) Float64 ¶
func (tcgb *TaskCategoryGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TaskCategoryGroupBy) Float64X ¶
func (tcgb *TaskCategoryGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*TaskCategoryGroupBy) Float64s ¶
func (tcgb *TaskCategoryGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*TaskCategoryGroupBy) Float64sX ¶
func (tcgb *TaskCategoryGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*TaskCategoryGroupBy) Int ¶
func (tcgb *TaskCategoryGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TaskCategoryGroupBy) IntX ¶
func (tcgb *TaskCategoryGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*TaskCategoryGroupBy) Ints ¶
func (tcgb *TaskCategoryGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*TaskCategoryGroupBy) IntsX ¶
func (tcgb *TaskCategoryGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*TaskCategoryGroupBy) Scan ¶
func (tcgb *TaskCategoryGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*TaskCategoryGroupBy) ScanX ¶
func (tcgb *TaskCategoryGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*TaskCategoryGroupBy) String ¶
func (tcgb *TaskCategoryGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TaskCategoryGroupBy) StringX ¶
func (tcgb *TaskCategoryGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type TaskCategoryMutation ¶
type TaskCategoryMutation struct {
// contains filtered or unexported fields
}
TaskCategoryMutation represents an operation that mutates the TaskCategory nodes in the graph.
func (*TaskCategoryMutation) AddField ¶
func (m *TaskCategoryMutation) 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 (*TaskCategoryMutation) AddTaskIDs ¶
func (m *TaskCategoryMutation) AddTaskIDs(ids ...int)
AddTaskIDs adds the "tasks" edge to the Task entity by ids.
func (*TaskCategoryMutation) AddedEdges ¶
func (m *TaskCategoryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TaskCategoryMutation) AddedField ¶
func (m *TaskCategoryMutation) 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 (*TaskCategoryMutation) AddedFields ¶
func (m *TaskCategoryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TaskCategoryMutation) AddedIDs ¶
func (m *TaskCategoryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TaskCategoryMutation) ClearDescription ¶
func (m *TaskCategoryMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*TaskCategoryMutation) ClearEdge ¶
func (m *TaskCategoryMutation) 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 (*TaskCategoryMutation) ClearField ¶
func (m *TaskCategoryMutation) 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 (*TaskCategoryMutation) ClearMeta ¶
func (m *TaskCategoryMutation) ClearMeta()
ClearMeta clears the value of the "meta" field.
func (*TaskCategoryMutation) ClearTasks ¶
func (m *TaskCategoryMutation) ClearTasks()
ClearTasks clears the "tasks" edge to the Task entity.
func (*TaskCategoryMutation) ClearedEdges ¶
func (m *TaskCategoryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TaskCategoryMutation) ClearedFields ¶
func (m *TaskCategoryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TaskCategoryMutation) Client ¶
func (m TaskCategoryMutation) 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 (*TaskCategoryMutation) CreateTime ¶
func (m *TaskCategoryMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*TaskCategoryMutation) Description ¶
func (m *TaskCategoryMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*TaskCategoryMutation) DescriptionCleared ¶
func (m *TaskCategoryMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*TaskCategoryMutation) Display ¶
func (m *TaskCategoryMutation) Display() (r bool, exists bool)
Display returns the value of the "display" field in the mutation.
func (*TaskCategoryMutation) EdgeCleared ¶
func (m *TaskCategoryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TaskCategoryMutation) Field ¶
func (m *TaskCategoryMutation) 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 (*TaskCategoryMutation) FieldCleared ¶
func (m *TaskCategoryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TaskCategoryMutation) Fields ¶
func (m *TaskCategoryMutation) 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 (*TaskCategoryMutation) ID ¶
func (m *TaskCategoryMutation) 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 (*TaskCategoryMutation) IDs ¶
func (m *TaskCategoryMutation) 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 (*TaskCategoryMutation) Meta ¶
func (m *TaskCategoryMutation) Meta() (r map[string]interface{}, exists bool)
Meta returns the value of the "meta" field in the mutation.
func (*TaskCategoryMutation) MetaCleared ¶
func (m *TaskCategoryMutation) MetaCleared() bool
MetaCleared returns if the "meta" field was cleared in this mutation.
func (*TaskCategoryMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the TaskCategory entity. If the TaskCategory 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 (*TaskCategoryMutation) OldDescription ¶
func (m *TaskCategoryMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the TaskCategory entity. If the TaskCategory 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 (*TaskCategoryMutation) OldDisplay ¶
func (m *TaskCategoryMutation) OldDisplay(ctx context.Context) (v bool, err error)
OldDisplay returns the old "display" field's value of the TaskCategory entity. If the TaskCategory 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 (*TaskCategoryMutation) 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 (*TaskCategoryMutation) OldMeta ¶
func (m *TaskCategoryMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
OldMeta returns the old "meta" field's value of the TaskCategory entity. If the TaskCategory 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 (*TaskCategoryMutation) OldTitle ¶
func (m *TaskCategoryMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the TaskCategory entity. If the TaskCategory 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 (*TaskCategoryMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the TaskCategory entity. If the TaskCategory 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 (*TaskCategoryMutation) Op ¶
func (m *TaskCategoryMutation) Op() Op
Op returns the operation name.
func (*TaskCategoryMutation) RemoveTaskIDs ¶
func (m *TaskCategoryMutation) RemoveTaskIDs(ids ...int)
RemoveTaskIDs removes the "tasks" edge to the Task entity by IDs.
func (*TaskCategoryMutation) RemovedEdges ¶
func (m *TaskCategoryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TaskCategoryMutation) RemovedIDs ¶
func (m *TaskCategoryMutation) 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 (*TaskCategoryMutation) RemovedTasksIDs ¶
func (m *TaskCategoryMutation) RemovedTasksIDs() (ids []int)
RemovedTasks returns the removed IDs of the "tasks" edge to the Task entity.
func (*TaskCategoryMutation) ResetCreateTime ¶
func (m *TaskCategoryMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*TaskCategoryMutation) ResetDescription ¶
func (m *TaskCategoryMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*TaskCategoryMutation) ResetDisplay ¶
func (m *TaskCategoryMutation) ResetDisplay()
ResetDisplay resets all changes to the "display" field.
func (*TaskCategoryMutation) ResetEdge ¶
func (m *TaskCategoryMutation) 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 (*TaskCategoryMutation) ResetField ¶
func (m *TaskCategoryMutation) 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 (*TaskCategoryMutation) ResetMeta ¶
func (m *TaskCategoryMutation) ResetMeta()
ResetMeta resets all changes to the "meta" field.
func (*TaskCategoryMutation) ResetTasks ¶
func (m *TaskCategoryMutation) ResetTasks()
ResetTasks resets all changes to the "tasks" edge.
func (*TaskCategoryMutation) ResetTitle ¶
func (m *TaskCategoryMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*TaskCategoryMutation) ResetUpdateTime ¶
func (m *TaskCategoryMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*TaskCategoryMutation) SetCreateTime ¶
func (m *TaskCategoryMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*TaskCategoryMutation) SetDescription ¶
func (m *TaskCategoryMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*TaskCategoryMutation) SetDisplay ¶
func (m *TaskCategoryMutation) SetDisplay(b bool)
SetDisplay sets the "display" field.
func (*TaskCategoryMutation) SetField ¶
func (m *TaskCategoryMutation) 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 (*TaskCategoryMutation) SetMeta ¶
func (m *TaskCategoryMutation) SetMeta(value map[string]interface{})
SetMeta sets the "meta" field.
func (*TaskCategoryMutation) SetTitle ¶
func (m *TaskCategoryMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*TaskCategoryMutation) SetUpdateTime ¶
func (m *TaskCategoryMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*TaskCategoryMutation) TasksCleared ¶
func (m *TaskCategoryMutation) TasksCleared() bool
TasksCleared reports if the "tasks" edge to the Task entity was cleared.
func (*TaskCategoryMutation) TasksIDs ¶
func (m *TaskCategoryMutation) TasksIDs() (ids []int)
TasksIDs returns the "tasks" edge IDs in the mutation.
func (*TaskCategoryMutation) Title ¶
func (m *TaskCategoryMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (TaskCategoryMutation) Tx ¶
func (m TaskCategoryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TaskCategoryMutation) Type ¶
func (m *TaskCategoryMutation) Type() string
Type returns the node type of this mutation (TaskCategory).
func (*TaskCategoryMutation) UpdateTime ¶
func (m *TaskCategoryMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*TaskCategoryMutation) Where ¶
func (m *TaskCategoryMutation) Where(ps ...predicate.TaskCategory)
Where appends a list predicates to the TaskCategoryMutation builder.
type TaskCategoryQuery ¶
type TaskCategoryQuery struct {
// contains filtered or unexported fields
}
TaskCategoryQuery is the builder for querying TaskCategory entities.
func (*TaskCategoryQuery) All ¶
func (tcq *TaskCategoryQuery) All(ctx context.Context) ([]*TaskCategory, error)
All executes the query and returns a list of TaskCategories.
func (*TaskCategoryQuery) AllX ¶
func (tcq *TaskCategoryQuery) AllX(ctx context.Context) []*TaskCategory
AllX is like All, but panics if an error occurs.
func (*TaskCategoryQuery) Clone ¶
func (tcq *TaskCategoryQuery) Clone() *TaskCategoryQuery
Clone returns a duplicate of the TaskCategoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TaskCategoryQuery) Count ¶
func (tcq *TaskCategoryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TaskCategoryQuery) CountX ¶
func (tcq *TaskCategoryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TaskCategoryQuery) Exist ¶
func (tcq *TaskCategoryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TaskCategoryQuery) ExistX ¶
func (tcq *TaskCategoryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TaskCategoryQuery) First ¶
func (tcq *TaskCategoryQuery) First(ctx context.Context) (*TaskCategory, error)
First returns the first TaskCategory entity from the query. Returns a *NotFoundError when no TaskCategory was found.
func (*TaskCategoryQuery) FirstID ¶
func (tcq *TaskCategoryQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first TaskCategory ID from the query. Returns a *NotFoundError when no TaskCategory ID was found.
func (*TaskCategoryQuery) FirstIDX ¶
func (tcq *TaskCategoryQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*TaskCategoryQuery) FirstX ¶
func (tcq *TaskCategoryQuery) FirstX(ctx context.Context) *TaskCategory
FirstX is like First, but panics if an error occurs.
func (*TaskCategoryQuery) GroupBy ¶
func (tcq *TaskCategoryQuery) GroupBy(field string, fields ...string) *TaskCategoryGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.TaskCategory.Query(). GroupBy(taskcategory.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TaskCategoryQuery) IDs ¶
func (tcq *TaskCategoryQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of TaskCategory IDs.
func (*TaskCategoryQuery) IDsX ¶
func (tcq *TaskCategoryQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*TaskCategoryQuery) Limit ¶
func (tcq *TaskCategoryQuery) Limit(limit int) *TaskCategoryQuery
Limit adds a limit step to the query.
func (*TaskCategoryQuery) Offset ¶
func (tcq *TaskCategoryQuery) Offset(offset int) *TaskCategoryQuery
Offset adds an offset step to the query.
func (*TaskCategoryQuery) Only ¶
func (tcq *TaskCategoryQuery) Only(ctx context.Context) (*TaskCategory, error)
Only returns a single TaskCategory entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one TaskCategory entity is not found. Returns a *NotFoundError when no TaskCategory entities are found.
func (*TaskCategoryQuery) OnlyID ¶
func (tcq *TaskCategoryQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only TaskCategory ID in the query. Returns a *NotSingularError when exactly one TaskCategory ID is not found. Returns a *NotFoundError when no entities are found.
func (*TaskCategoryQuery) OnlyIDX ¶
func (tcq *TaskCategoryQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TaskCategoryQuery) OnlyX ¶
func (tcq *TaskCategoryQuery) OnlyX(ctx context.Context) *TaskCategory
OnlyX is like Only, but panics if an error occurs.
func (*TaskCategoryQuery) Order ¶
func (tcq *TaskCategoryQuery) Order(o ...OrderFunc) *TaskCategoryQuery
Order adds an order step to the query.
func (*TaskCategoryQuery) QueryTasks ¶
func (tcq *TaskCategoryQuery) QueryTasks() *TaskQuery
QueryTasks chains the current query on the "tasks" edge.
func (*TaskCategoryQuery) Select ¶
func (tcq *TaskCategoryQuery) Select(fields ...string) *TaskCategorySelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.TaskCategory.Query(). Select(taskcategory.FieldCreateTime). Scan(ctx, &v)
func (*TaskCategoryQuery) Unique ¶
func (tcq *TaskCategoryQuery) Unique(unique bool) *TaskCategoryQuery
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 (*TaskCategoryQuery) Where ¶
func (tcq *TaskCategoryQuery) Where(ps ...predicate.TaskCategory) *TaskCategoryQuery
Where adds a new predicate for the TaskCategoryQuery builder.
func (*TaskCategoryQuery) WithTasks ¶
func (tcq *TaskCategoryQuery) WithTasks(opts ...func(*TaskQuery)) *TaskCategoryQuery
WithTasks tells the query-builder to eager-load the nodes that are connected to the "tasks" edge. The optional arguments are used to configure the query builder of the edge.
type TaskCategorySelect ¶
type TaskCategorySelect struct { *TaskCategoryQuery // contains filtered or unexported fields }
TaskCategorySelect is the builder for selecting fields of TaskCategory entities.
func (*TaskCategorySelect) Bool ¶
func (tcs *TaskCategorySelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TaskCategorySelect) BoolX ¶
func (tcs *TaskCategorySelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*TaskCategorySelect) Bools ¶
func (tcs *TaskCategorySelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TaskCategorySelect) BoolsX ¶
func (tcs *TaskCategorySelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*TaskCategorySelect) Float64 ¶
func (tcs *TaskCategorySelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TaskCategorySelect) Float64X ¶
func (tcs *TaskCategorySelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*TaskCategorySelect) Float64s ¶
func (tcs *TaskCategorySelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TaskCategorySelect) Float64sX ¶
func (tcs *TaskCategorySelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*TaskCategorySelect) Int ¶
func (tcs *TaskCategorySelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TaskCategorySelect) IntX ¶
func (tcs *TaskCategorySelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*TaskCategorySelect) Ints ¶
func (tcs *TaskCategorySelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TaskCategorySelect) IntsX ¶
func (tcs *TaskCategorySelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*TaskCategorySelect) Scan ¶
func (tcs *TaskCategorySelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*TaskCategorySelect) ScanX ¶
func (tcs *TaskCategorySelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*TaskCategorySelect) String ¶
func (tcs *TaskCategorySelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*TaskCategorySelect) StringX ¶
func (tcs *TaskCategorySelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type TaskCategoryUpdate ¶
type TaskCategoryUpdate struct {
// contains filtered or unexported fields
}
TaskCategoryUpdate is the builder for updating TaskCategory entities.
func (*TaskCategoryUpdate) AddTaskIDs ¶
func (tcu *TaskCategoryUpdate) AddTaskIDs(ids ...int) *TaskCategoryUpdate
AddTaskIDs adds the "tasks" edge to the Task entity by IDs.
func (*TaskCategoryUpdate) AddTasks ¶
func (tcu *TaskCategoryUpdate) AddTasks(t ...*Task) *TaskCategoryUpdate
AddTasks adds the "tasks" edges to the Task entity.
func (*TaskCategoryUpdate) ClearDescription ¶
func (tcu *TaskCategoryUpdate) ClearDescription() *TaskCategoryUpdate
ClearDescription clears the value of the "description" field.
func (*TaskCategoryUpdate) ClearMeta ¶
func (tcu *TaskCategoryUpdate) ClearMeta() *TaskCategoryUpdate
ClearMeta clears the value of the "meta" field.
func (*TaskCategoryUpdate) ClearTasks ¶
func (tcu *TaskCategoryUpdate) ClearTasks() *TaskCategoryUpdate
ClearTasks clears all "tasks" edges to the Task entity.
func (*TaskCategoryUpdate) Exec ¶
func (tcu *TaskCategoryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskCategoryUpdate) ExecX ¶
func (tcu *TaskCategoryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskCategoryUpdate) Mutation ¶
func (tcu *TaskCategoryUpdate) Mutation() *TaskCategoryMutation
Mutation returns the TaskCategoryMutation object of the builder.
func (*TaskCategoryUpdate) RemoveTaskIDs ¶
func (tcu *TaskCategoryUpdate) RemoveTaskIDs(ids ...int) *TaskCategoryUpdate
RemoveTaskIDs removes the "tasks" edge to Task entities by IDs.
func (*TaskCategoryUpdate) RemoveTasks ¶
func (tcu *TaskCategoryUpdate) RemoveTasks(t ...*Task) *TaskCategoryUpdate
RemoveTasks removes "tasks" edges to Task entities.
func (*TaskCategoryUpdate) Save ¶
func (tcu *TaskCategoryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TaskCategoryUpdate) SaveX ¶
func (tcu *TaskCategoryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TaskCategoryUpdate) SetDescription ¶
func (tcu *TaskCategoryUpdate) SetDescription(s string) *TaskCategoryUpdate
SetDescription sets the "description" field.
func (*TaskCategoryUpdate) SetDisplay ¶
func (tcu *TaskCategoryUpdate) SetDisplay(b bool) *TaskCategoryUpdate
SetDisplay sets the "display" field.
func (*TaskCategoryUpdate) SetMeta ¶
func (tcu *TaskCategoryUpdate) SetMeta(m map[string]interface{}) *TaskCategoryUpdate
SetMeta sets the "meta" field.
func (*TaskCategoryUpdate) SetNillableDescription ¶
func (tcu *TaskCategoryUpdate) SetNillableDescription(s *string) *TaskCategoryUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*TaskCategoryUpdate) SetNillableDisplay ¶
func (tcu *TaskCategoryUpdate) SetNillableDisplay(b *bool) *TaskCategoryUpdate
SetNillableDisplay sets the "display" field if the given value is not nil.
func (*TaskCategoryUpdate) SetTitle ¶
func (tcu *TaskCategoryUpdate) SetTitle(s string) *TaskCategoryUpdate
SetTitle sets the "title" field.
func (*TaskCategoryUpdate) SetUpdateTime ¶
func (tcu *TaskCategoryUpdate) SetUpdateTime(t time.Time) *TaskCategoryUpdate
SetUpdateTime sets the "update_time" field.
func (*TaskCategoryUpdate) Where ¶
func (tcu *TaskCategoryUpdate) Where(ps ...predicate.TaskCategory) *TaskCategoryUpdate
Where appends a list predicates to the TaskCategoryUpdate builder.
type TaskCategoryUpdateOne ¶
type TaskCategoryUpdateOne struct {
// contains filtered or unexported fields
}
TaskCategoryUpdateOne is the builder for updating a single TaskCategory entity.
func (*TaskCategoryUpdateOne) AddTaskIDs ¶
func (tcuo *TaskCategoryUpdateOne) AddTaskIDs(ids ...int) *TaskCategoryUpdateOne
AddTaskIDs adds the "tasks" edge to the Task entity by IDs.
func (*TaskCategoryUpdateOne) AddTasks ¶
func (tcuo *TaskCategoryUpdateOne) AddTasks(t ...*Task) *TaskCategoryUpdateOne
AddTasks adds the "tasks" edges to the Task entity.
func (*TaskCategoryUpdateOne) ClearDescription ¶
func (tcuo *TaskCategoryUpdateOne) ClearDescription() *TaskCategoryUpdateOne
ClearDescription clears the value of the "description" field.
func (*TaskCategoryUpdateOne) ClearMeta ¶
func (tcuo *TaskCategoryUpdateOne) ClearMeta() *TaskCategoryUpdateOne
ClearMeta clears the value of the "meta" field.
func (*TaskCategoryUpdateOne) ClearTasks ¶
func (tcuo *TaskCategoryUpdateOne) ClearTasks() *TaskCategoryUpdateOne
ClearTasks clears all "tasks" edges to the Task entity.
func (*TaskCategoryUpdateOne) Exec ¶
func (tcuo *TaskCategoryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TaskCategoryUpdateOne) ExecX ¶
func (tcuo *TaskCategoryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskCategoryUpdateOne) Mutation ¶
func (tcuo *TaskCategoryUpdateOne) Mutation() *TaskCategoryMutation
Mutation returns the TaskCategoryMutation object of the builder.
func (*TaskCategoryUpdateOne) RemoveTaskIDs ¶
func (tcuo *TaskCategoryUpdateOne) RemoveTaskIDs(ids ...int) *TaskCategoryUpdateOne
RemoveTaskIDs removes the "tasks" edge to Task entities by IDs.
func (*TaskCategoryUpdateOne) RemoveTasks ¶
func (tcuo *TaskCategoryUpdateOne) RemoveTasks(t ...*Task) *TaskCategoryUpdateOne
RemoveTasks removes "tasks" edges to Task entities.
func (*TaskCategoryUpdateOne) Save ¶
func (tcuo *TaskCategoryUpdateOne) Save(ctx context.Context) (*TaskCategory, error)
Save executes the query and returns the updated TaskCategory entity.
func (*TaskCategoryUpdateOne) SaveX ¶
func (tcuo *TaskCategoryUpdateOne) SaveX(ctx context.Context) *TaskCategory
SaveX is like Save, but panics if an error occurs.
func (*TaskCategoryUpdateOne) Select ¶
func (tcuo *TaskCategoryUpdateOne) Select(field string, fields ...string) *TaskCategoryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TaskCategoryUpdateOne) SetDescription ¶
func (tcuo *TaskCategoryUpdateOne) SetDescription(s string) *TaskCategoryUpdateOne
SetDescription sets the "description" field.
func (*TaskCategoryUpdateOne) SetDisplay ¶
func (tcuo *TaskCategoryUpdateOne) SetDisplay(b bool) *TaskCategoryUpdateOne
SetDisplay sets the "display" field.
func (*TaskCategoryUpdateOne) SetMeta ¶
func (tcuo *TaskCategoryUpdateOne) SetMeta(m map[string]interface{}) *TaskCategoryUpdateOne
SetMeta sets the "meta" field.
func (*TaskCategoryUpdateOne) SetNillableDescription ¶
func (tcuo *TaskCategoryUpdateOne) SetNillableDescription(s *string) *TaskCategoryUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*TaskCategoryUpdateOne) SetNillableDisplay ¶
func (tcuo *TaskCategoryUpdateOne) SetNillableDisplay(b *bool) *TaskCategoryUpdateOne
SetNillableDisplay sets the "display" field if the given value is not nil.
func (*TaskCategoryUpdateOne) SetTitle ¶
func (tcuo *TaskCategoryUpdateOne) SetTitle(s string) *TaskCategoryUpdateOne
SetTitle sets the "title" field.
func (*TaskCategoryUpdateOne) SetUpdateTime ¶
func (tcuo *TaskCategoryUpdateOne) SetUpdateTime(t time.Time) *TaskCategoryUpdateOne
SetUpdateTime sets the "update_time" field.
type TaskClient ¶
type TaskClient struct {
// contains filtered or unexported fields
}
TaskClient is a client for the Task schema.
func NewTaskClient ¶
func NewTaskClient(c config) *TaskClient
NewTaskClient returns a client for the Task from the given config.
func (*TaskClient) Create ¶
func (c *TaskClient) Create() *TaskCreate
Create returns a create builder for Task.
func (*TaskClient) CreateBulk ¶
func (c *TaskClient) CreateBulk(builders ...*TaskCreate) *TaskCreateBulk
CreateBulk returns a builder for creating a bulk of Task entities.
func (*TaskClient) Delete ¶
func (c *TaskClient) Delete() *TaskDelete
Delete returns a delete builder for Task.
func (*TaskClient) DeleteOne ¶
func (c *TaskClient) DeleteOne(t *Task) *TaskDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*TaskClient) DeleteOneID ¶
func (c *TaskClient) DeleteOneID(id int) *TaskDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*TaskClient) GetX ¶
func (c *TaskClient) GetX(ctx context.Context, id int) *Task
GetX is like Get, but panics if an error occurs.
func (*TaskClient) Query ¶
func (c *TaskClient) Query() *TaskQuery
Query returns a query builder for Task.
func (*TaskClient) QueryCategory ¶
func (c *TaskClient) QueryCategory(t *Task) *TaskCategoryQuery
QueryCategory queries the category edge of a Task.
func (*TaskClient) QueryInstances ¶
func (c *TaskClient) QueryInstances(t *Task) *TaskInstanceQuery
QueryInstances queries the instances edge of a Task.
func (*TaskClient) QueryMetrics ¶
func (c *TaskClient) QueryMetrics(t *Task) *MetricQuery
QueryMetrics queries the metrics edge of a Task.
func (*TaskClient) QueryTags ¶
func (c *TaskClient) QueryTags(t *Task) *TaskTagQuery
QueryTags queries the tags edge of a Task.
func (*TaskClient) Update ¶
func (c *TaskClient) Update() *TaskUpdate
Update returns an update builder for Task.
func (*TaskClient) UpdateOne ¶
func (c *TaskClient) UpdateOne(t *Task) *TaskUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TaskClient) UpdateOneID ¶
func (c *TaskClient) UpdateOneID(id int) *TaskUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TaskClient) Use ¶
func (c *TaskClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `task.Hooks(f(g(h())))`.
type TaskCreate ¶
type TaskCreate struct {
// contains filtered or unexported fields
}
TaskCreate is the builder for creating a Task entity.
func (*TaskCreate) AddInstanceIDs ¶
func (tc *TaskCreate) AddInstanceIDs(ids ...int) *TaskCreate
AddInstanceIDs adds the "instances" edge to the TaskInstance entity by IDs.
func (*TaskCreate) AddInstances ¶
func (tc *TaskCreate) AddInstances(t ...*TaskInstance) *TaskCreate
AddInstances adds the "instances" edges to the TaskInstance entity.
func (*TaskCreate) AddMetricIDs ¶
func (tc *TaskCreate) AddMetricIDs(ids ...int) *TaskCreate
AddMetricIDs adds the "metrics" edge to the Metric entity by IDs.
func (*TaskCreate) AddMetrics ¶
func (tc *TaskCreate) AddMetrics(m ...*Metric) *TaskCreate
AddMetrics adds the "metrics" edges to the Metric entity.
func (*TaskCreate) AddTagIDs ¶
func (tc *TaskCreate) AddTagIDs(ids ...int) *TaskCreate
AddTagIDs adds the "tags" edge to the TaskTag entity by IDs.
func (*TaskCreate) AddTags ¶
func (tc *TaskCreate) AddTags(t ...*TaskTag) *TaskCreate
AddTags adds the "tags" edges to the TaskTag entity.
func (*TaskCreate) Exec ¶
func (tc *TaskCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskCreate) ExecX ¶
func (tc *TaskCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskCreate) Mutation ¶
func (tc *TaskCreate) Mutation() *TaskMutation
Mutation returns the TaskMutation object of the builder.
func (*TaskCreate) Save ¶
func (tc *TaskCreate) Save(ctx context.Context) (*Task, error)
Save creates the Task in the database.
func (*TaskCreate) SaveX ¶
func (tc *TaskCreate) SaveX(ctx context.Context) *Task
SaveX calls Save and panics if Save returns an error.
func (*TaskCreate) SetActive ¶
func (tc *TaskCreate) SetActive(b bool) *TaskCreate
SetActive sets the "active" field.
func (*TaskCreate) SetArgs ¶
func (tc *TaskCreate) SetArgs(m map[string]interface{}) *TaskCreate
SetArgs sets the "args" field.
func (*TaskCreate) SetCategory ¶
func (tc *TaskCreate) SetCategory(t *TaskCategory) *TaskCreate
SetCategory sets the "category" edge to the TaskCategory entity.
func (*TaskCreate) SetCategoryID ¶
func (tc *TaskCreate) SetCategoryID(id int) *TaskCreate
SetCategoryID sets the "category" edge to the TaskCategory entity by ID.
func (*TaskCreate) SetCode ¶
func (tc *TaskCreate) SetCode(s string) *TaskCreate
SetCode sets the "code" field.
func (*TaskCreate) SetCreateTime ¶
func (tc *TaskCreate) SetCreateTime(t time.Time) *TaskCreate
SetCreateTime sets the "create_time" field.
func (*TaskCreate) SetDescription ¶
func (tc *TaskCreate) SetDescription(s string) *TaskCreate
SetDescription sets the "description" field.
func (*TaskCreate) SetDisplay ¶
func (tc *TaskCreate) SetDisplay(b bool) *TaskCreate
SetDisplay sets the "display" field.
func (*TaskCreate) SetNillableActive ¶
func (tc *TaskCreate) SetNillableActive(b *bool) *TaskCreate
SetNillableActive sets the "active" field if the given value is not nil.
func (*TaskCreate) SetNillableCreateTime ¶
func (tc *TaskCreate) SetNillableCreateTime(t *time.Time) *TaskCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*TaskCreate) SetNillableDescription ¶
func (tc *TaskCreate) SetNillableDescription(s *string) *TaskCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*TaskCreate) SetNillableDisplay ¶
func (tc *TaskCreate) SetNillableDisplay(b *bool) *TaskCreate
SetNillableDisplay sets the "display" field if the given value is not nil.
func (*TaskCreate) SetNillableSchedule ¶
func (tc *TaskCreate) SetNillableSchedule(s *string) *TaskCreate
SetNillableSchedule sets the "schedule" field if the given value is not nil.
func (*TaskCreate) SetNillableUpdateTime ¶
func (tc *TaskCreate) SetNillableUpdateTime(t *time.Time) *TaskCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*TaskCreate) SetSchedule ¶
func (tc *TaskCreate) SetSchedule(s string) *TaskCreate
SetSchedule sets the "schedule" field.
func (*TaskCreate) SetTitle ¶
func (tc *TaskCreate) SetTitle(s string) *TaskCreate
SetTitle sets the "title" field.
func (*TaskCreate) SetType ¶
func (tc *TaskCreate) SetType(t task.Type) *TaskCreate
SetType sets the "type" field.
func (*TaskCreate) SetUpdateTime ¶
func (tc *TaskCreate) SetUpdateTime(t time.Time) *TaskCreate
SetUpdateTime sets the "update_time" field.
type TaskCreateBulk ¶
type TaskCreateBulk struct {
// contains filtered or unexported fields
}
TaskCreateBulk is the builder for creating many Task entities in bulk.
func (*TaskCreateBulk) Exec ¶
func (tcb *TaskCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskCreateBulk) ExecX ¶
func (tcb *TaskCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TaskDelete ¶
type TaskDelete struct {
// contains filtered or unexported fields
}
TaskDelete is the builder for deleting a Task entity.
func (*TaskDelete) Exec ¶
func (td *TaskDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TaskDelete) ExecX ¶
func (td *TaskDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TaskDelete) Where ¶
func (td *TaskDelete) Where(ps ...predicate.Task) *TaskDelete
Where appends a list predicates to the TaskDelete builder.
type TaskDeleteOne ¶
type TaskDeleteOne struct {
// contains filtered or unexported fields
}
TaskDeleteOne is the builder for deleting a single Task entity.
func (*TaskDeleteOne) Exec ¶
func (tdo *TaskDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TaskDeleteOne) ExecX ¶
func (tdo *TaskDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TaskEdges ¶
type TaskEdges struct { // Instances holds the value of the instances edge. Instances []*TaskInstance `json:"instances,omitempty"` // Metrics holds the value of the metrics edge. Metrics []*Metric `json:"metrics,omitempty"` // Category holds the value of the category edge. Category *TaskCategory `json:"category,omitempty"` // Tags holds the value of the tags edge. Tags []*TaskTag `json:"tags,omitempty"` // contains filtered or unexported fields }
TaskEdges holds the relations/edges for other nodes in the graph.
func (TaskEdges) CategoryOrErr ¶
func (e TaskEdges) CategoryOrErr() (*TaskCategory, error)
CategoryOrErr returns the Category value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (TaskEdges) InstancesOrErr ¶
func (e TaskEdges) InstancesOrErr() ([]*TaskInstance, error)
InstancesOrErr returns the Instances value or an error if the edge was not loaded in eager-loading.
func (TaskEdges) MetricsOrErr ¶
MetricsOrErr returns the Metrics value or an error if the edge was not loaded in eager-loading.
type TaskGroupBy ¶
type TaskGroupBy struct {
// contains filtered or unexported fields
}
TaskGroupBy is the group-by builder for Task entities.
func (*TaskGroupBy) Aggregate ¶
func (tgb *TaskGroupBy) Aggregate(fns ...AggregateFunc) *TaskGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TaskGroupBy) Bool ¶
func (tgb *TaskGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TaskGroupBy) BoolX ¶
func (tgb *TaskGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*TaskGroupBy) Bools ¶
func (tgb *TaskGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*TaskGroupBy) BoolsX ¶
func (tgb *TaskGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*TaskGroupBy) Float64 ¶
func (tgb *TaskGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TaskGroupBy) Float64X ¶
func (tgb *TaskGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*TaskGroupBy) Float64s ¶
func (tgb *TaskGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*TaskGroupBy) Float64sX ¶
func (tgb *TaskGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*TaskGroupBy) Int ¶
func (tgb *TaskGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TaskGroupBy) IntX ¶
func (tgb *TaskGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*TaskGroupBy) Ints ¶
func (tgb *TaskGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*TaskGroupBy) IntsX ¶
func (tgb *TaskGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*TaskGroupBy) Scan ¶
func (tgb *TaskGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*TaskGroupBy) ScanX ¶
func (tgb *TaskGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*TaskGroupBy) String ¶
func (tgb *TaskGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TaskGroupBy) StringX ¶
func (tgb *TaskGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type TaskInstance ¶
type TaskInstance struct { // ID of the ent. ID int `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // StartTime holds the value of the "start_time" field. StartTime time.Time `json:"start_time,omitempty"` // EndTime holds the value of the "end_time" field. EndTime time.Time `json:"end_time,omitempty"` // Attempt holds the value of the "attempt" field. Attempt int `json:"attempt,omitempty"` // Success holds the value of the "success" field. Success *bool `json:"success,omitempty"` // Running holds the value of the "running" field. Running bool `json:"running,omitempty"` // Error holds the value of the "error" field. Error *string `json:"error,omitempty"` // Meta holds the value of the "meta" field. Meta map[string]interface{} `json:"meta,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TaskInstanceQuery when eager-loading is set. Edges TaskInstanceEdges `json:"edges"` // contains filtered or unexported fields }
TaskInstance is the model entity for the TaskInstance schema.
func (*TaskInstance) QueryItems ¶
func (ti *TaskInstance) QueryItems() *ItemQuery
QueryItems queries the "items" edge of the TaskInstance entity.
func (*TaskInstance) QueryTask ¶
func (ti *TaskInstance) QueryTask() *TaskQuery
QueryTask queries the "task" edge of the TaskInstance entity.
func (*TaskInstance) String ¶
func (ti *TaskInstance) String() string
String implements the fmt.Stringer.
func (*TaskInstance) Unwrap ¶
func (ti *TaskInstance) Unwrap() *TaskInstance
Unwrap unwraps the TaskInstance 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 (*TaskInstance) Update ¶
func (ti *TaskInstance) Update() *TaskInstanceUpdateOne
Update returns a builder for updating this TaskInstance. Note that you need to call TaskInstance.Unwrap() before calling this method if this TaskInstance was returned from a transaction, and the transaction was committed or rolled back.
type TaskInstanceClient ¶
type TaskInstanceClient struct {
// contains filtered or unexported fields
}
TaskInstanceClient is a client for the TaskInstance schema.
func NewTaskInstanceClient ¶
func NewTaskInstanceClient(c config) *TaskInstanceClient
NewTaskInstanceClient returns a client for the TaskInstance from the given config.
func (*TaskInstanceClient) Create ¶
func (c *TaskInstanceClient) Create() *TaskInstanceCreate
Create returns a create builder for TaskInstance.
func (*TaskInstanceClient) CreateBulk ¶
func (c *TaskInstanceClient) CreateBulk(builders ...*TaskInstanceCreate) *TaskInstanceCreateBulk
CreateBulk returns a builder for creating a bulk of TaskInstance entities.
func (*TaskInstanceClient) Delete ¶
func (c *TaskInstanceClient) Delete() *TaskInstanceDelete
Delete returns a delete builder for TaskInstance.
func (*TaskInstanceClient) DeleteOne ¶
func (c *TaskInstanceClient) DeleteOne(ti *TaskInstance) *TaskInstanceDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*TaskInstanceClient) DeleteOneID ¶
func (c *TaskInstanceClient) DeleteOneID(id int) *TaskInstanceDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*TaskInstanceClient) Get ¶
func (c *TaskInstanceClient) Get(ctx context.Context, id int) (*TaskInstance, error)
Get returns a TaskInstance entity by its id.
func (*TaskInstanceClient) GetX ¶
func (c *TaskInstanceClient) GetX(ctx context.Context, id int) *TaskInstance
GetX is like Get, but panics if an error occurs.
func (*TaskInstanceClient) Hooks ¶
func (c *TaskInstanceClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TaskInstanceClient) Query ¶
func (c *TaskInstanceClient) Query() *TaskInstanceQuery
Query returns a query builder for TaskInstance.
func (*TaskInstanceClient) QueryItems ¶
func (c *TaskInstanceClient) QueryItems(ti *TaskInstance) *ItemQuery
QueryItems queries the items edge of a TaskInstance.
func (*TaskInstanceClient) QueryTask ¶
func (c *TaskInstanceClient) QueryTask(ti *TaskInstance) *TaskQuery
QueryTask queries the task edge of a TaskInstance.
func (*TaskInstanceClient) Update ¶
func (c *TaskInstanceClient) Update() *TaskInstanceUpdate
Update returns an update builder for TaskInstance.
func (*TaskInstanceClient) UpdateOne ¶
func (c *TaskInstanceClient) UpdateOne(ti *TaskInstance) *TaskInstanceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TaskInstanceClient) UpdateOneID ¶
func (c *TaskInstanceClient) UpdateOneID(id int) *TaskInstanceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TaskInstanceClient) Use ¶
func (c *TaskInstanceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `taskinstance.Hooks(f(g(h())))`.
type TaskInstanceCreate ¶
type TaskInstanceCreate struct {
// contains filtered or unexported fields
}
TaskInstanceCreate is the builder for creating a TaskInstance entity.
func (*TaskInstanceCreate) AddItemIDs ¶
func (tic *TaskInstanceCreate) AddItemIDs(ids ...int) *TaskInstanceCreate
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*TaskInstanceCreate) AddItems ¶
func (tic *TaskInstanceCreate) AddItems(i ...*Item) *TaskInstanceCreate
AddItems adds the "items" edges to the Item entity.
func (*TaskInstanceCreate) Exec ¶
func (tic *TaskInstanceCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskInstanceCreate) ExecX ¶
func (tic *TaskInstanceCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskInstanceCreate) Mutation ¶
func (tic *TaskInstanceCreate) Mutation() *TaskInstanceMutation
Mutation returns the TaskInstanceMutation object of the builder.
func (*TaskInstanceCreate) Save ¶
func (tic *TaskInstanceCreate) Save(ctx context.Context) (*TaskInstance, error)
Save creates the TaskInstance in the database.
func (*TaskInstanceCreate) SaveX ¶
func (tic *TaskInstanceCreate) SaveX(ctx context.Context) *TaskInstance
SaveX calls Save and panics if Save returns an error.
func (*TaskInstanceCreate) SetAttempt ¶
func (tic *TaskInstanceCreate) SetAttempt(i int) *TaskInstanceCreate
SetAttempt sets the "attempt" field.
func (*TaskInstanceCreate) SetCreateTime ¶
func (tic *TaskInstanceCreate) SetCreateTime(t time.Time) *TaskInstanceCreate
SetCreateTime sets the "create_time" field.
func (*TaskInstanceCreate) SetEndTime ¶
func (tic *TaskInstanceCreate) SetEndTime(t time.Time) *TaskInstanceCreate
SetEndTime sets the "end_time" field.
func (*TaskInstanceCreate) SetError ¶
func (tic *TaskInstanceCreate) SetError(s string) *TaskInstanceCreate
SetError sets the "error" field.
func (*TaskInstanceCreate) SetMeta ¶
func (tic *TaskInstanceCreate) SetMeta(m map[string]interface{}) *TaskInstanceCreate
SetMeta sets the "meta" field.
func (*TaskInstanceCreate) SetNillableAttempt ¶
func (tic *TaskInstanceCreate) SetNillableAttempt(i *int) *TaskInstanceCreate
SetNillableAttempt sets the "attempt" field if the given value is not nil.
func (*TaskInstanceCreate) SetNillableCreateTime ¶
func (tic *TaskInstanceCreate) SetNillableCreateTime(t *time.Time) *TaskInstanceCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*TaskInstanceCreate) SetNillableEndTime ¶
func (tic *TaskInstanceCreate) SetNillableEndTime(t *time.Time) *TaskInstanceCreate
SetNillableEndTime sets the "end_time" field if the given value is not nil.
func (*TaskInstanceCreate) SetNillableError ¶
func (tic *TaskInstanceCreate) SetNillableError(s *string) *TaskInstanceCreate
SetNillableError sets the "error" field if the given value is not nil.
func (*TaskInstanceCreate) SetNillableRunning ¶
func (tic *TaskInstanceCreate) SetNillableRunning(b *bool) *TaskInstanceCreate
SetNillableRunning sets the "running" field if the given value is not nil.
func (*TaskInstanceCreate) SetNillableStartTime ¶
func (tic *TaskInstanceCreate) SetNillableStartTime(t *time.Time) *TaskInstanceCreate
SetNillableStartTime sets the "start_time" field if the given value is not nil.
func (*TaskInstanceCreate) SetNillableSuccess ¶
func (tic *TaskInstanceCreate) SetNillableSuccess(b *bool) *TaskInstanceCreate
SetNillableSuccess sets the "success" field if the given value is not nil.
func (*TaskInstanceCreate) SetNillableUpdateTime ¶
func (tic *TaskInstanceCreate) SetNillableUpdateTime(t *time.Time) *TaskInstanceCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*TaskInstanceCreate) SetRunning ¶
func (tic *TaskInstanceCreate) SetRunning(b bool) *TaskInstanceCreate
SetRunning sets the "running" field.
func (*TaskInstanceCreate) SetStartTime ¶
func (tic *TaskInstanceCreate) SetStartTime(t time.Time) *TaskInstanceCreate
SetStartTime sets the "start_time" field.
func (*TaskInstanceCreate) SetSuccess ¶
func (tic *TaskInstanceCreate) SetSuccess(b bool) *TaskInstanceCreate
SetSuccess sets the "success" field.
func (*TaskInstanceCreate) SetTask ¶
func (tic *TaskInstanceCreate) SetTask(t *Task) *TaskInstanceCreate
SetTask sets the "task" edge to the Task entity.
func (*TaskInstanceCreate) SetTaskID ¶
func (tic *TaskInstanceCreate) SetTaskID(id int) *TaskInstanceCreate
SetTaskID sets the "task" edge to the Task entity by ID.
func (*TaskInstanceCreate) SetUpdateTime ¶
func (tic *TaskInstanceCreate) SetUpdateTime(t time.Time) *TaskInstanceCreate
SetUpdateTime sets the "update_time" field.
type TaskInstanceCreateBulk ¶
type TaskInstanceCreateBulk struct {
// contains filtered or unexported fields
}
TaskInstanceCreateBulk is the builder for creating many TaskInstance entities in bulk.
func (*TaskInstanceCreateBulk) Exec ¶
func (ticb *TaskInstanceCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskInstanceCreateBulk) ExecX ¶
func (ticb *TaskInstanceCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskInstanceCreateBulk) Save ¶
func (ticb *TaskInstanceCreateBulk) Save(ctx context.Context) ([]*TaskInstance, error)
Save creates the TaskInstance entities in the database.
func (*TaskInstanceCreateBulk) SaveX ¶
func (ticb *TaskInstanceCreateBulk) SaveX(ctx context.Context) []*TaskInstance
SaveX is like Save, but panics if an error occurs.
type TaskInstanceDelete ¶
type TaskInstanceDelete struct {
// contains filtered or unexported fields
}
TaskInstanceDelete is the builder for deleting a TaskInstance entity.
func (*TaskInstanceDelete) Exec ¶
func (tid *TaskInstanceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TaskInstanceDelete) ExecX ¶
func (tid *TaskInstanceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TaskInstanceDelete) Where ¶
func (tid *TaskInstanceDelete) Where(ps ...predicate.TaskInstance) *TaskInstanceDelete
Where appends a list predicates to the TaskInstanceDelete builder.
type TaskInstanceDeleteOne ¶
type TaskInstanceDeleteOne struct {
// contains filtered or unexported fields
}
TaskInstanceDeleteOne is the builder for deleting a single TaskInstance entity.
func (*TaskInstanceDeleteOne) Exec ¶
func (tido *TaskInstanceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TaskInstanceDeleteOne) ExecX ¶
func (tido *TaskInstanceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TaskInstanceEdges ¶
type TaskInstanceEdges struct { // Items holds the value of the items edge. Items []*Item `json:"items,omitempty"` // Task holds the value of the task edge. Task *Task `json:"task,omitempty"` // contains filtered or unexported fields }
TaskInstanceEdges holds the relations/edges for other nodes in the graph.
func (TaskInstanceEdges) ItemsOrErr ¶
func (e TaskInstanceEdges) ItemsOrErr() ([]*Item, error)
ItemsOrErr returns the Items value or an error if the edge was not loaded in eager-loading.
func (TaskInstanceEdges) TaskOrErr ¶
func (e TaskInstanceEdges) TaskOrErr() (*Task, error)
TaskOrErr returns the Task value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type TaskInstanceGroupBy ¶
type TaskInstanceGroupBy struct {
// contains filtered or unexported fields
}
TaskInstanceGroupBy is the group-by builder for TaskInstance entities.
func (*TaskInstanceGroupBy) Aggregate ¶
func (tigb *TaskInstanceGroupBy) Aggregate(fns ...AggregateFunc) *TaskInstanceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TaskInstanceGroupBy) Bool ¶
func (tigb *TaskInstanceGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TaskInstanceGroupBy) BoolX ¶
func (tigb *TaskInstanceGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*TaskInstanceGroupBy) Bools ¶
func (tigb *TaskInstanceGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*TaskInstanceGroupBy) BoolsX ¶
func (tigb *TaskInstanceGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*TaskInstanceGroupBy) Float64 ¶
func (tigb *TaskInstanceGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TaskInstanceGroupBy) Float64X ¶
func (tigb *TaskInstanceGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*TaskInstanceGroupBy) Float64s ¶
func (tigb *TaskInstanceGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*TaskInstanceGroupBy) Float64sX ¶
func (tigb *TaskInstanceGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*TaskInstanceGroupBy) Int ¶
func (tigb *TaskInstanceGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TaskInstanceGroupBy) IntX ¶
func (tigb *TaskInstanceGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*TaskInstanceGroupBy) Ints ¶
func (tigb *TaskInstanceGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*TaskInstanceGroupBy) IntsX ¶
func (tigb *TaskInstanceGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*TaskInstanceGroupBy) Scan ¶
func (tigb *TaskInstanceGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*TaskInstanceGroupBy) ScanX ¶
func (tigb *TaskInstanceGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*TaskInstanceGroupBy) String ¶
func (tigb *TaskInstanceGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TaskInstanceGroupBy) StringX ¶
func (tigb *TaskInstanceGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type TaskInstanceMutation ¶
type TaskInstanceMutation struct {
// contains filtered or unexported fields
}
TaskInstanceMutation represents an operation that mutates the TaskInstance nodes in the graph.
func (*TaskInstanceMutation) AddAttempt ¶
func (m *TaskInstanceMutation) AddAttempt(i int)
AddAttempt adds i to the "attempt" field.
func (*TaskInstanceMutation) AddField ¶
func (m *TaskInstanceMutation) 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 (*TaskInstanceMutation) AddItemIDs ¶
func (m *TaskInstanceMutation) AddItemIDs(ids ...int)
AddItemIDs adds the "items" edge to the Item entity by ids.
func (*TaskInstanceMutation) AddedAttempt ¶
func (m *TaskInstanceMutation) AddedAttempt() (r int, exists bool)
AddedAttempt returns the value that was added to the "attempt" field in this mutation.
func (*TaskInstanceMutation) AddedEdges ¶
func (m *TaskInstanceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TaskInstanceMutation) AddedField ¶
func (m *TaskInstanceMutation) 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 (*TaskInstanceMutation) AddedFields ¶
func (m *TaskInstanceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TaskInstanceMutation) AddedIDs ¶
func (m *TaskInstanceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TaskInstanceMutation) Attempt ¶
func (m *TaskInstanceMutation) Attempt() (r int, exists bool)
Attempt returns the value of the "attempt" field in the mutation.
func (*TaskInstanceMutation) ClearEdge ¶
func (m *TaskInstanceMutation) 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 (*TaskInstanceMutation) ClearEndTime ¶
func (m *TaskInstanceMutation) ClearEndTime()
ClearEndTime clears the value of the "end_time" field.
func (*TaskInstanceMutation) ClearError ¶
func (m *TaskInstanceMutation) ClearError()
ClearError clears the value of the "error" field.
func (*TaskInstanceMutation) ClearField ¶
func (m *TaskInstanceMutation) 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 (*TaskInstanceMutation) ClearItems ¶
func (m *TaskInstanceMutation) ClearItems()
ClearItems clears the "items" edge to the Item entity.
func (*TaskInstanceMutation) ClearMeta ¶
func (m *TaskInstanceMutation) ClearMeta()
ClearMeta clears the value of the "meta" field.
func (*TaskInstanceMutation) ClearSuccess ¶
func (m *TaskInstanceMutation) ClearSuccess()
ClearSuccess clears the value of the "success" field.
func (*TaskInstanceMutation) ClearTask ¶
func (m *TaskInstanceMutation) ClearTask()
ClearTask clears the "task" edge to the Task entity.
func (*TaskInstanceMutation) ClearedEdges ¶
func (m *TaskInstanceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TaskInstanceMutation) ClearedFields ¶
func (m *TaskInstanceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TaskInstanceMutation) Client ¶
func (m TaskInstanceMutation) 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 (*TaskInstanceMutation) CreateTime ¶
func (m *TaskInstanceMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*TaskInstanceMutation) EdgeCleared ¶
func (m *TaskInstanceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TaskInstanceMutation) EndTime ¶
func (m *TaskInstanceMutation) EndTime() (r time.Time, exists bool)
EndTime returns the value of the "end_time" field in the mutation.
func (*TaskInstanceMutation) EndTimeCleared ¶
func (m *TaskInstanceMutation) EndTimeCleared() bool
EndTimeCleared returns if the "end_time" field was cleared in this mutation.
func (*TaskInstanceMutation) Error ¶
func (m *TaskInstanceMutation) Error() (r string, exists bool)
Error returns the value of the "error" field in the mutation.
func (*TaskInstanceMutation) ErrorCleared ¶
func (m *TaskInstanceMutation) ErrorCleared() bool
ErrorCleared returns if the "error" field was cleared in this mutation.
func (*TaskInstanceMutation) Field ¶
func (m *TaskInstanceMutation) 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 (*TaskInstanceMutation) FieldCleared ¶
func (m *TaskInstanceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TaskInstanceMutation) Fields ¶
func (m *TaskInstanceMutation) 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 (*TaskInstanceMutation) ID ¶
func (m *TaskInstanceMutation) 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 (*TaskInstanceMutation) IDs ¶
func (m *TaskInstanceMutation) 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 (*TaskInstanceMutation) ItemsCleared ¶
func (m *TaskInstanceMutation) ItemsCleared() bool
ItemsCleared reports if the "items" edge to the Item entity was cleared.
func (*TaskInstanceMutation) ItemsIDs ¶
func (m *TaskInstanceMutation) ItemsIDs() (ids []int)
ItemsIDs returns the "items" edge IDs in the mutation.
func (*TaskInstanceMutation) Meta ¶
func (m *TaskInstanceMutation) Meta() (r map[string]interface{}, exists bool)
Meta returns the value of the "meta" field in the mutation.
func (*TaskInstanceMutation) MetaCleared ¶
func (m *TaskInstanceMutation) MetaCleared() bool
MetaCleared returns if the "meta" field was cleared in this mutation.
func (*TaskInstanceMutation) OldAttempt ¶
func (m *TaskInstanceMutation) OldAttempt(ctx context.Context) (v int, err error)
OldAttempt returns the old "attempt" field's value of the TaskInstance entity. If the TaskInstance 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 (*TaskInstanceMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the TaskInstance entity. If the TaskInstance 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 (*TaskInstanceMutation) OldEndTime ¶
OldEndTime returns the old "end_time" field's value of the TaskInstance entity. If the TaskInstance 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 (*TaskInstanceMutation) OldError ¶
func (m *TaskInstanceMutation) OldError(ctx context.Context) (v *string, err error)
OldError returns the old "error" field's value of the TaskInstance entity. If the TaskInstance 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 (*TaskInstanceMutation) 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 (*TaskInstanceMutation) OldMeta ¶
func (m *TaskInstanceMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
OldMeta returns the old "meta" field's value of the TaskInstance entity. If the TaskInstance 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 (*TaskInstanceMutation) OldRunning ¶
func (m *TaskInstanceMutation) OldRunning(ctx context.Context) (v bool, err error)
OldRunning returns the old "running" field's value of the TaskInstance entity. If the TaskInstance 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 (*TaskInstanceMutation) OldStartTime ¶
OldStartTime returns the old "start_time" field's value of the TaskInstance entity. If the TaskInstance 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 (*TaskInstanceMutation) OldSuccess ¶
func (m *TaskInstanceMutation) OldSuccess(ctx context.Context) (v *bool, err error)
OldSuccess returns the old "success" field's value of the TaskInstance entity. If the TaskInstance 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 (*TaskInstanceMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the TaskInstance entity. If the TaskInstance 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 (*TaskInstanceMutation) Op ¶
func (m *TaskInstanceMutation) Op() Op
Op returns the operation name.
func (*TaskInstanceMutation) RemoveItemIDs ¶
func (m *TaskInstanceMutation) RemoveItemIDs(ids ...int)
RemoveItemIDs removes the "items" edge to the Item entity by IDs.
func (*TaskInstanceMutation) RemovedEdges ¶
func (m *TaskInstanceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TaskInstanceMutation) RemovedIDs ¶
func (m *TaskInstanceMutation) 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 (*TaskInstanceMutation) RemovedItemsIDs ¶
func (m *TaskInstanceMutation) RemovedItemsIDs() (ids []int)
RemovedItems returns the removed IDs of the "items" edge to the Item entity.
func (*TaskInstanceMutation) ResetAttempt ¶
func (m *TaskInstanceMutation) ResetAttempt()
ResetAttempt resets all changes to the "attempt" field.
func (*TaskInstanceMutation) ResetCreateTime ¶
func (m *TaskInstanceMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*TaskInstanceMutation) ResetEdge ¶
func (m *TaskInstanceMutation) 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 (*TaskInstanceMutation) ResetEndTime ¶
func (m *TaskInstanceMutation) ResetEndTime()
ResetEndTime resets all changes to the "end_time" field.
func (*TaskInstanceMutation) ResetError ¶
func (m *TaskInstanceMutation) ResetError()
ResetError resets all changes to the "error" field.
func (*TaskInstanceMutation) ResetField ¶
func (m *TaskInstanceMutation) 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 (*TaskInstanceMutation) ResetItems ¶
func (m *TaskInstanceMutation) ResetItems()
ResetItems resets all changes to the "items" edge.
func (*TaskInstanceMutation) ResetMeta ¶
func (m *TaskInstanceMutation) ResetMeta()
ResetMeta resets all changes to the "meta" field.
func (*TaskInstanceMutation) ResetRunning ¶
func (m *TaskInstanceMutation) ResetRunning()
ResetRunning resets all changes to the "running" field.
func (*TaskInstanceMutation) ResetStartTime ¶
func (m *TaskInstanceMutation) ResetStartTime()
ResetStartTime resets all changes to the "start_time" field.
func (*TaskInstanceMutation) ResetSuccess ¶
func (m *TaskInstanceMutation) ResetSuccess()
ResetSuccess resets all changes to the "success" field.
func (*TaskInstanceMutation) ResetTask ¶
func (m *TaskInstanceMutation) ResetTask()
ResetTask resets all changes to the "task" edge.
func (*TaskInstanceMutation) ResetUpdateTime ¶
func (m *TaskInstanceMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*TaskInstanceMutation) Running ¶
func (m *TaskInstanceMutation) Running() (r bool, exists bool)
Running returns the value of the "running" field in the mutation.
func (*TaskInstanceMutation) SetAttempt ¶
func (m *TaskInstanceMutation) SetAttempt(i int)
SetAttempt sets the "attempt" field.
func (*TaskInstanceMutation) SetCreateTime ¶
func (m *TaskInstanceMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*TaskInstanceMutation) SetEndTime ¶
func (m *TaskInstanceMutation) SetEndTime(t time.Time)
SetEndTime sets the "end_time" field.
func (*TaskInstanceMutation) SetError ¶
func (m *TaskInstanceMutation) SetError(s string)
SetError sets the "error" field.
func (*TaskInstanceMutation) SetField ¶
func (m *TaskInstanceMutation) 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 (*TaskInstanceMutation) SetMeta ¶
func (m *TaskInstanceMutation) SetMeta(value map[string]interface{})
SetMeta sets the "meta" field.
func (*TaskInstanceMutation) SetRunning ¶
func (m *TaskInstanceMutation) SetRunning(b bool)
SetRunning sets the "running" field.
func (*TaskInstanceMutation) SetStartTime ¶
func (m *TaskInstanceMutation) SetStartTime(t time.Time)
SetStartTime sets the "start_time" field.
func (*TaskInstanceMutation) SetSuccess ¶
func (m *TaskInstanceMutation) SetSuccess(b bool)
SetSuccess sets the "success" field.
func (*TaskInstanceMutation) SetTaskID ¶
func (m *TaskInstanceMutation) SetTaskID(id int)
SetTaskID sets the "task" edge to the Task entity by id.
func (*TaskInstanceMutation) SetUpdateTime ¶
func (m *TaskInstanceMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*TaskInstanceMutation) StartTime ¶
func (m *TaskInstanceMutation) StartTime() (r time.Time, exists bool)
StartTime returns the value of the "start_time" field in the mutation.
func (*TaskInstanceMutation) Success ¶
func (m *TaskInstanceMutation) Success() (r bool, exists bool)
Success returns the value of the "success" field in the mutation.
func (*TaskInstanceMutation) SuccessCleared ¶
func (m *TaskInstanceMutation) SuccessCleared() bool
SuccessCleared returns if the "success" field was cleared in this mutation.
func (*TaskInstanceMutation) TaskCleared ¶
func (m *TaskInstanceMutation) TaskCleared() bool
TaskCleared reports if the "task" edge to the Task entity was cleared.
func (*TaskInstanceMutation) TaskID ¶
func (m *TaskInstanceMutation) TaskID() (id int, exists bool)
TaskID returns the "task" edge ID in the mutation.
func (*TaskInstanceMutation) TaskIDs ¶
func (m *TaskInstanceMutation) TaskIDs() (ids []int)
TaskIDs returns the "task" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TaskID instead. It exists only for internal usage by the builders.
func (TaskInstanceMutation) Tx ¶
func (m TaskInstanceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TaskInstanceMutation) Type ¶
func (m *TaskInstanceMutation) Type() string
Type returns the node type of this mutation (TaskInstance).
func (*TaskInstanceMutation) UpdateTime ¶
func (m *TaskInstanceMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*TaskInstanceMutation) Where ¶
func (m *TaskInstanceMutation) Where(ps ...predicate.TaskInstance)
Where appends a list predicates to the TaskInstanceMutation builder.
type TaskInstanceQuery ¶
type TaskInstanceQuery struct {
// contains filtered or unexported fields
}
TaskInstanceQuery is the builder for querying TaskInstance entities.
func (*TaskInstanceQuery) All ¶
func (tiq *TaskInstanceQuery) All(ctx context.Context) ([]*TaskInstance, error)
All executes the query and returns a list of TaskInstances.
func (*TaskInstanceQuery) AllX ¶
func (tiq *TaskInstanceQuery) AllX(ctx context.Context) []*TaskInstance
AllX is like All, but panics if an error occurs.
func (*TaskInstanceQuery) Clone ¶
func (tiq *TaskInstanceQuery) Clone() *TaskInstanceQuery
Clone returns a duplicate of the TaskInstanceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TaskInstanceQuery) Count ¶
func (tiq *TaskInstanceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TaskInstanceQuery) CountX ¶
func (tiq *TaskInstanceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TaskInstanceQuery) Exist ¶
func (tiq *TaskInstanceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TaskInstanceQuery) ExistX ¶
func (tiq *TaskInstanceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TaskInstanceQuery) First ¶
func (tiq *TaskInstanceQuery) First(ctx context.Context) (*TaskInstance, error)
First returns the first TaskInstance entity from the query. Returns a *NotFoundError when no TaskInstance was found.
func (*TaskInstanceQuery) FirstID ¶
func (tiq *TaskInstanceQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first TaskInstance ID from the query. Returns a *NotFoundError when no TaskInstance ID was found.
func (*TaskInstanceQuery) FirstIDX ¶
func (tiq *TaskInstanceQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*TaskInstanceQuery) FirstX ¶
func (tiq *TaskInstanceQuery) FirstX(ctx context.Context) *TaskInstance
FirstX is like First, but panics if an error occurs.
func (*TaskInstanceQuery) GroupBy ¶
func (tiq *TaskInstanceQuery) GroupBy(field string, fields ...string) *TaskInstanceGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.TaskInstance.Query(). GroupBy(taskinstance.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TaskInstanceQuery) IDs ¶
func (tiq *TaskInstanceQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of TaskInstance IDs.
func (*TaskInstanceQuery) IDsX ¶
func (tiq *TaskInstanceQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*TaskInstanceQuery) Limit ¶
func (tiq *TaskInstanceQuery) Limit(limit int) *TaskInstanceQuery
Limit adds a limit step to the query.
func (*TaskInstanceQuery) Offset ¶
func (tiq *TaskInstanceQuery) Offset(offset int) *TaskInstanceQuery
Offset adds an offset step to the query.
func (*TaskInstanceQuery) Only ¶
func (tiq *TaskInstanceQuery) Only(ctx context.Context) (*TaskInstance, error)
Only returns a single TaskInstance entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one TaskInstance entity is not found. Returns a *NotFoundError when no TaskInstance entities are found.
func (*TaskInstanceQuery) OnlyID ¶
func (tiq *TaskInstanceQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only TaskInstance ID in the query. Returns a *NotSingularError when exactly one TaskInstance ID is not found. Returns a *NotFoundError when no entities are found.
func (*TaskInstanceQuery) OnlyIDX ¶
func (tiq *TaskInstanceQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TaskInstanceQuery) OnlyX ¶
func (tiq *TaskInstanceQuery) OnlyX(ctx context.Context) *TaskInstance
OnlyX is like Only, but panics if an error occurs.
func (*TaskInstanceQuery) Order ¶
func (tiq *TaskInstanceQuery) Order(o ...OrderFunc) *TaskInstanceQuery
Order adds an order step to the query.
func (*TaskInstanceQuery) QueryItems ¶
func (tiq *TaskInstanceQuery) QueryItems() *ItemQuery
QueryItems chains the current query on the "items" edge.
func (*TaskInstanceQuery) QueryTask ¶
func (tiq *TaskInstanceQuery) QueryTask() *TaskQuery
QueryTask chains the current query on the "task" edge.
func (*TaskInstanceQuery) Select ¶
func (tiq *TaskInstanceQuery) Select(fields ...string) *TaskInstanceSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.TaskInstance.Query(). Select(taskinstance.FieldCreateTime). Scan(ctx, &v)
func (*TaskInstanceQuery) Unique ¶
func (tiq *TaskInstanceQuery) Unique(unique bool) *TaskInstanceQuery
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 (*TaskInstanceQuery) Where ¶
func (tiq *TaskInstanceQuery) Where(ps ...predicate.TaskInstance) *TaskInstanceQuery
Where adds a new predicate for the TaskInstanceQuery builder.
func (*TaskInstanceQuery) WithItems ¶
func (tiq *TaskInstanceQuery) WithItems(opts ...func(*ItemQuery)) *TaskInstanceQuery
WithItems tells the query-builder to eager-load the nodes that are connected to the "items" edge. The optional arguments are used to configure the query builder of the edge.
func (*TaskInstanceQuery) WithTask ¶
func (tiq *TaskInstanceQuery) WithTask(opts ...func(*TaskQuery)) *TaskInstanceQuery
WithTask tells the query-builder to eager-load the nodes that are connected to the "task" edge. The optional arguments are used to configure the query builder of the edge.
type TaskInstanceSelect ¶
type TaskInstanceSelect struct { *TaskInstanceQuery // contains filtered or unexported fields }
TaskInstanceSelect is the builder for selecting fields of TaskInstance entities.
func (*TaskInstanceSelect) Bool ¶
func (tis *TaskInstanceSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TaskInstanceSelect) BoolX ¶
func (tis *TaskInstanceSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*TaskInstanceSelect) Bools ¶
func (tis *TaskInstanceSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TaskInstanceSelect) BoolsX ¶
func (tis *TaskInstanceSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*TaskInstanceSelect) Float64 ¶
func (tis *TaskInstanceSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TaskInstanceSelect) Float64X ¶
func (tis *TaskInstanceSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*TaskInstanceSelect) Float64s ¶
func (tis *TaskInstanceSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TaskInstanceSelect) Float64sX ¶
func (tis *TaskInstanceSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*TaskInstanceSelect) Int ¶
func (tis *TaskInstanceSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TaskInstanceSelect) IntX ¶
func (tis *TaskInstanceSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*TaskInstanceSelect) Ints ¶
func (tis *TaskInstanceSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TaskInstanceSelect) IntsX ¶
func (tis *TaskInstanceSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*TaskInstanceSelect) Scan ¶
func (tis *TaskInstanceSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*TaskInstanceSelect) ScanX ¶
func (tis *TaskInstanceSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*TaskInstanceSelect) String ¶
func (tis *TaskInstanceSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*TaskInstanceSelect) StringX ¶
func (tis *TaskInstanceSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type TaskInstanceUpdate ¶
type TaskInstanceUpdate struct {
// contains filtered or unexported fields
}
TaskInstanceUpdate is the builder for updating TaskInstance entities.
func (*TaskInstanceUpdate) AddItemIDs ¶
func (tiu *TaskInstanceUpdate) AddItemIDs(ids ...int) *TaskInstanceUpdate
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*TaskInstanceUpdate) AddItems ¶
func (tiu *TaskInstanceUpdate) AddItems(i ...*Item) *TaskInstanceUpdate
AddItems adds the "items" edges to the Item entity.
func (*TaskInstanceUpdate) ClearEndTime ¶
func (tiu *TaskInstanceUpdate) ClearEndTime() *TaskInstanceUpdate
ClearEndTime clears the value of the "end_time" field.
func (*TaskInstanceUpdate) ClearError ¶
func (tiu *TaskInstanceUpdate) ClearError() *TaskInstanceUpdate
ClearError clears the value of the "error" field.
func (*TaskInstanceUpdate) ClearItems ¶
func (tiu *TaskInstanceUpdate) ClearItems() *TaskInstanceUpdate
ClearItems clears all "items" edges to the Item entity.
func (*TaskInstanceUpdate) ClearMeta ¶
func (tiu *TaskInstanceUpdate) ClearMeta() *TaskInstanceUpdate
ClearMeta clears the value of the "meta" field.
func (*TaskInstanceUpdate) ClearSuccess ¶
func (tiu *TaskInstanceUpdate) ClearSuccess() *TaskInstanceUpdate
ClearSuccess clears the value of the "success" field.
func (*TaskInstanceUpdate) ClearTask ¶
func (tiu *TaskInstanceUpdate) ClearTask() *TaskInstanceUpdate
ClearTask clears the "task" edge to the Task entity.
func (*TaskInstanceUpdate) Exec ¶
func (tiu *TaskInstanceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskInstanceUpdate) ExecX ¶
func (tiu *TaskInstanceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskInstanceUpdate) Mutation ¶
func (tiu *TaskInstanceUpdate) Mutation() *TaskInstanceMutation
Mutation returns the TaskInstanceMutation object of the builder.
func (*TaskInstanceUpdate) RemoveItemIDs ¶
func (tiu *TaskInstanceUpdate) RemoveItemIDs(ids ...int) *TaskInstanceUpdate
RemoveItemIDs removes the "items" edge to Item entities by IDs.
func (*TaskInstanceUpdate) RemoveItems ¶
func (tiu *TaskInstanceUpdate) RemoveItems(i ...*Item) *TaskInstanceUpdate
RemoveItems removes "items" edges to Item entities.
func (*TaskInstanceUpdate) Save ¶
func (tiu *TaskInstanceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TaskInstanceUpdate) SaveX ¶
func (tiu *TaskInstanceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TaskInstanceUpdate) SetEndTime ¶
func (tiu *TaskInstanceUpdate) SetEndTime(t time.Time) *TaskInstanceUpdate
SetEndTime sets the "end_time" field.
func (*TaskInstanceUpdate) SetError ¶
func (tiu *TaskInstanceUpdate) SetError(s string) *TaskInstanceUpdate
SetError sets the "error" field.
func (*TaskInstanceUpdate) SetMeta ¶
func (tiu *TaskInstanceUpdate) SetMeta(m map[string]interface{}) *TaskInstanceUpdate
SetMeta sets the "meta" field.
func (*TaskInstanceUpdate) SetNillableEndTime ¶
func (tiu *TaskInstanceUpdate) SetNillableEndTime(t *time.Time) *TaskInstanceUpdate
SetNillableEndTime sets the "end_time" field if the given value is not nil.
func (*TaskInstanceUpdate) SetNillableError ¶
func (tiu *TaskInstanceUpdate) SetNillableError(s *string) *TaskInstanceUpdate
SetNillableError sets the "error" field if the given value is not nil.
func (*TaskInstanceUpdate) SetNillableRunning ¶
func (tiu *TaskInstanceUpdate) SetNillableRunning(b *bool) *TaskInstanceUpdate
SetNillableRunning sets the "running" field if the given value is not nil.
func (*TaskInstanceUpdate) SetNillableStartTime ¶
func (tiu *TaskInstanceUpdate) SetNillableStartTime(t *time.Time) *TaskInstanceUpdate
SetNillableStartTime sets the "start_time" field if the given value is not nil.
func (*TaskInstanceUpdate) SetNillableSuccess ¶
func (tiu *TaskInstanceUpdate) SetNillableSuccess(b *bool) *TaskInstanceUpdate
SetNillableSuccess sets the "success" field if the given value is not nil.
func (*TaskInstanceUpdate) SetRunning ¶
func (tiu *TaskInstanceUpdate) SetRunning(b bool) *TaskInstanceUpdate
SetRunning sets the "running" field.
func (*TaskInstanceUpdate) SetStartTime ¶
func (tiu *TaskInstanceUpdate) SetStartTime(t time.Time) *TaskInstanceUpdate
SetStartTime sets the "start_time" field.
func (*TaskInstanceUpdate) SetSuccess ¶
func (tiu *TaskInstanceUpdate) SetSuccess(b bool) *TaskInstanceUpdate
SetSuccess sets the "success" field.
func (*TaskInstanceUpdate) SetTask ¶
func (tiu *TaskInstanceUpdate) SetTask(t *Task) *TaskInstanceUpdate
SetTask sets the "task" edge to the Task entity.
func (*TaskInstanceUpdate) SetTaskID ¶
func (tiu *TaskInstanceUpdate) SetTaskID(id int) *TaskInstanceUpdate
SetTaskID sets the "task" edge to the Task entity by ID.
func (*TaskInstanceUpdate) SetUpdateTime ¶
func (tiu *TaskInstanceUpdate) SetUpdateTime(t time.Time) *TaskInstanceUpdate
SetUpdateTime sets the "update_time" field.
func (*TaskInstanceUpdate) Where ¶
func (tiu *TaskInstanceUpdate) Where(ps ...predicate.TaskInstance) *TaskInstanceUpdate
Where appends a list predicates to the TaskInstanceUpdate builder.
type TaskInstanceUpdateOne ¶
type TaskInstanceUpdateOne struct {
// contains filtered or unexported fields
}
TaskInstanceUpdateOne is the builder for updating a single TaskInstance entity.
func (*TaskInstanceUpdateOne) AddItemIDs ¶
func (tiuo *TaskInstanceUpdateOne) AddItemIDs(ids ...int) *TaskInstanceUpdateOne
AddItemIDs adds the "items" edge to the Item entity by IDs.
func (*TaskInstanceUpdateOne) AddItems ¶
func (tiuo *TaskInstanceUpdateOne) AddItems(i ...*Item) *TaskInstanceUpdateOne
AddItems adds the "items" edges to the Item entity.
func (*TaskInstanceUpdateOne) ClearEndTime ¶
func (tiuo *TaskInstanceUpdateOne) ClearEndTime() *TaskInstanceUpdateOne
ClearEndTime clears the value of the "end_time" field.
func (*TaskInstanceUpdateOne) ClearError ¶
func (tiuo *TaskInstanceUpdateOne) ClearError() *TaskInstanceUpdateOne
ClearError clears the value of the "error" field.
func (*TaskInstanceUpdateOne) ClearItems ¶
func (tiuo *TaskInstanceUpdateOne) ClearItems() *TaskInstanceUpdateOne
ClearItems clears all "items" edges to the Item entity.
func (*TaskInstanceUpdateOne) ClearMeta ¶
func (tiuo *TaskInstanceUpdateOne) ClearMeta() *TaskInstanceUpdateOne
ClearMeta clears the value of the "meta" field.
func (*TaskInstanceUpdateOne) ClearSuccess ¶
func (tiuo *TaskInstanceUpdateOne) ClearSuccess() *TaskInstanceUpdateOne
ClearSuccess clears the value of the "success" field.
func (*TaskInstanceUpdateOne) ClearTask ¶
func (tiuo *TaskInstanceUpdateOne) ClearTask() *TaskInstanceUpdateOne
ClearTask clears the "task" edge to the Task entity.
func (*TaskInstanceUpdateOne) Exec ¶
func (tiuo *TaskInstanceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TaskInstanceUpdateOne) ExecX ¶
func (tiuo *TaskInstanceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskInstanceUpdateOne) Mutation ¶
func (tiuo *TaskInstanceUpdateOne) Mutation() *TaskInstanceMutation
Mutation returns the TaskInstanceMutation object of the builder.
func (*TaskInstanceUpdateOne) RemoveItemIDs ¶
func (tiuo *TaskInstanceUpdateOne) RemoveItemIDs(ids ...int) *TaskInstanceUpdateOne
RemoveItemIDs removes the "items" edge to Item entities by IDs.
func (*TaskInstanceUpdateOne) RemoveItems ¶
func (tiuo *TaskInstanceUpdateOne) RemoveItems(i ...*Item) *TaskInstanceUpdateOne
RemoveItems removes "items" edges to Item entities.
func (*TaskInstanceUpdateOne) Save ¶
func (tiuo *TaskInstanceUpdateOne) Save(ctx context.Context) (*TaskInstance, error)
Save executes the query and returns the updated TaskInstance entity.
func (*TaskInstanceUpdateOne) SaveX ¶
func (tiuo *TaskInstanceUpdateOne) SaveX(ctx context.Context) *TaskInstance
SaveX is like Save, but panics if an error occurs.
func (*TaskInstanceUpdateOne) Select ¶
func (tiuo *TaskInstanceUpdateOne) Select(field string, fields ...string) *TaskInstanceUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TaskInstanceUpdateOne) SetEndTime ¶
func (tiuo *TaskInstanceUpdateOne) SetEndTime(t time.Time) *TaskInstanceUpdateOne
SetEndTime sets the "end_time" field.
func (*TaskInstanceUpdateOne) SetError ¶
func (tiuo *TaskInstanceUpdateOne) SetError(s string) *TaskInstanceUpdateOne
SetError sets the "error" field.
func (*TaskInstanceUpdateOne) SetMeta ¶
func (tiuo *TaskInstanceUpdateOne) SetMeta(m map[string]interface{}) *TaskInstanceUpdateOne
SetMeta sets the "meta" field.
func (*TaskInstanceUpdateOne) SetNillableEndTime ¶
func (tiuo *TaskInstanceUpdateOne) SetNillableEndTime(t *time.Time) *TaskInstanceUpdateOne
SetNillableEndTime sets the "end_time" field if the given value is not nil.
func (*TaskInstanceUpdateOne) SetNillableError ¶
func (tiuo *TaskInstanceUpdateOne) SetNillableError(s *string) *TaskInstanceUpdateOne
SetNillableError sets the "error" field if the given value is not nil.
func (*TaskInstanceUpdateOne) SetNillableRunning ¶
func (tiuo *TaskInstanceUpdateOne) SetNillableRunning(b *bool) *TaskInstanceUpdateOne
SetNillableRunning sets the "running" field if the given value is not nil.
func (*TaskInstanceUpdateOne) SetNillableStartTime ¶
func (tiuo *TaskInstanceUpdateOne) SetNillableStartTime(t *time.Time) *TaskInstanceUpdateOne
SetNillableStartTime sets the "start_time" field if the given value is not nil.
func (*TaskInstanceUpdateOne) SetNillableSuccess ¶
func (tiuo *TaskInstanceUpdateOne) SetNillableSuccess(b *bool) *TaskInstanceUpdateOne
SetNillableSuccess sets the "success" field if the given value is not nil.
func (*TaskInstanceUpdateOne) SetRunning ¶
func (tiuo *TaskInstanceUpdateOne) SetRunning(b bool) *TaskInstanceUpdateOne
SetRunning sets the "running" field.
func (*TaskInstanceUpdateOne) SetStartTime ¶
func (tiuo *TaskInstanceUpdateOne) SetStartTime(t time.Time) *TaskInstanceUpdateOne
SetStartTime sets the "start_time" field.
func (*TaskInstanceUpdateOne) SetSuccess ¶
func (tiuo *TaskInstanceUpdateOne) SetSuccess(b bool) *TaskInstanceUpdateOne
SetSuccess sets the "success" field.
func (*TaskInstanceUpdateOne) SetTask ¶
func (tiuo *TaskInstanceUpdateOne) SetTask(t *Task) *TaskInstanceUpdateOne
SetTask sets the "task" edge to the Task entity.
func (*TaskInstanceUpdateOne) SetTaskID ¶
func (tiuo *TaskInstanceUpdateOne) SetTaskID(id int) *TaskInstanceUpdateOne
SetTaskID sets the "task" edge to the Task entity by ID.
func (*TaskInstanceUpdateOne) SetUpdateTime ¶
func (tiuo *TaskInstanceUpdateOne) SetUpdateTime(t time.Time) *TaskInstanceUpdateOne
SetUpdateTime sets the "update_time" field.
type TaskInstances ¶
type TaskInstances []*TaskInstance
TaskInstances is a parsable slice of TaskInstance.
type TaskMutation ¶
type TaskMutation struct {
// contains filtered or unexported fields
}
TaskMutation represents an operation that mutates the Task nodes in the graph.
func (*TaskMutation) Active ¶
func (m *TaskMutation) Active() (r bool, exists bool)
Active returns the value of the "active" field in the mutation.
func (*TaskMutation) AddField ¶
func (m *TaskMutation) 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 (*TaskMutation) AddInstanceIDs ¶
func (m *TaskMutation) AddInstanceIDs(ids ...int)
AddInstanceIDs adds the "instances" edge to the TaskInstance entity by ids.
func (*TaskMutation) AddMetricIDs ¶
func (m *TaskMutation) AddMetricIDs(ids ...int)
AddMetricIDs adds the "metrics" edge to the Metric entity by ids.
func (*TaskMutation) AddTagIDs ¶
func (m *TaskMutation) AddTagIDs(ids ...int)
AddTagIDs adds the "tags" edge to the TaskTag entity by ids.
func (*TaskMutation) AddedEdges ¶
func (m *TaskMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TaskMutation) AddedField ¶
func (m *TaskMutation) 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 (*TaskMutation) AddedFields ¶
func (m *TaskMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TaskMutation) AddedIDs ¶
func (m *TaskMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TaskMutation) Args ¶
func (m *TaskMutation) Args() (r map[string]interface{}, exists bool)
Args returns the value of the "args" field in the mutation.
func (*TaskMutation) ArgsCleared ¶
func (m *TaskMutation) ArgsCleared() bool
ArgsCleared returns if the "args" field was cleared in this mutation.
func (*TaskMutation) CategoryCleared ¶
func (m *TaskMutation) CategoryCleared() bool
CategoryCleared reports if the "category" edge to the TaskCategory entity was cleared.
func (*TaskMutation) CategoryID ¶
func (m *TaskMutation) CategoryID() (id int, exists bool)
CategoryID returns the "category" edge ID in the mutation.
func (*TaskMutation) CategoryIDs ¶
func (m *TaskMutation) CategoryIDs() (ids []int)
CategoryIDs returns the "category" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CategoryID instead. It exists only for internal usage by the builders.
func (*TaskMutation) ClearArgs ¶
func (m *TaskMutation) ClearArgs()
ClearArgs clears the value of the "args" field.
func (*TaskMutation) ClearCategory ¶
func (m *TaskMutation) ClearCategory()
ClearCategory clears the "category" edge to the TaskCategory entity.
func (*TaskMutation) ClearDescription ¶
func (m *TaskMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*TaskMutation) ClearEdge ¶
func (m *TaskMutation) 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 (*TaskMutation) ClearField ¶
func (m *TaskMutation) 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 (*TaskMutation) ClearInstances ¶
func (m *TaskMutation) ClearInstances()
ClearInstances clears the "instances" edge to the TaskInstance entity.
func (*TaskMutation) ClearMetrics ¶
func (m *TaskMutation) ClearMetrics()
ClearMetrics clears the "metrics" edge to the Metric entity.
func (*TaskMutation) ClearSchedule ¶
func (m *TaskMutation) ClearSchedule()
ClearSchedule clears the value of the "schedule" field.
func (*TaskMutation) ClearTags ¶
func (m *TaskMutation) ClearTags()
ClearTags clears the "tags" edge to the TaskTag entity.
func (*TaskMutation) ClearedEdges ¶
func (m *TaskMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TaskMutation) ClearedFields ¶
func (m *TaskMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TaskMutation) Client ¶
func (m TaskMutation) 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 (*TaskMutation) Code ¶
func (m *TaskMutation) Code() (r string, exists bool)
Code returns the value of the "code" field in the mutation.
func (*TaskMutation) CreateTime ¶
func (m *TaskMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*TaskMutation) Description ¶
func (m *TaskMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*TaskMutation) DescriptionCleared ¶
func (m *TaskMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*TaskMutation) Display ¶
func (m *TaskMutation) Display() (r bool, exists bool)
Display returns the value of the "display" field in the mutation.
func (*TaskMutation) EdgeCleared ¶
func (m *TaskMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TaskMutation) Field ¶
func (m *TaskMutation) 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 (*TaskMutation) FieldCleared ¶
func (m *TaskMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TaskMutation) Fields ¶
func (m *TaskMutation) 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 (*TaskMutation) GetType ¶
func (m *TaskMutation) GetType() (r task.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*TaskMutation) ID ¶
func (m *TaskMutation) 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 (*TaskMutation) IDs ¶
func (m *TaskMutation) 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 (*TaskMutation) InstancesCleared ¶
func (m *TaskMutation) InstancesCleared() bool
InstancesCleared reports if the "instances" edge to the TaskInstance entity was cleared.
func (*TaskMutation) InstancesIDs ¶
func (m *TaskMutation) InstancesIDs() (ids []int)
InstancesIDs returns the "instances" edge IDs in the mutation.
func (*TaskMutation) MetricsCleared ¶
func (m *TaskMutation) MetricsCleared() bool
MetricsCleared reports if the "metrics" edge to the Metric entity was cleared.
func (*TaskMutation) MetricsIDs ¶
func (m *TaskMutation) MetricsIDs() (ids []int)
MetricsIDs returns the "metrics" edge IDs in the mutation.
func (*TaskMutation) OldActive ¶
func (m *TaskMutation) OldActive(ctx context.Context) (v bool, err error)
OldActive returns the old "active" field's value of the Task entity. If the Task 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 (*TaskMutation) OldArgs ¶
func (m *TaskMutation) OldArgs(ctx context.Context) (v map[string]interface{}, err error)
OldArgs returns the old "args" field's value of the Task entity. If the Task 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 (*TaskMutation) OldCode ¶
func (m *TaskMutation) OldCode(ctx context.Context) (v string, err error)
OldCode returns the old "code" field's value of the Task entity. If the Task 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 (*TaskMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Task entity. If the Task 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 (*TaskMutation) OldDescription ¶
func (m *TaskMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Task entity. If the Task 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 (*TaskMutation) OldDisplay ¶
func (m *TaskMutation) OldDisplay(ctx context.Context) (v bool, err error)
OldDisplay returns the old "display" field's value of the Task entity. If the Task 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 (*TaskMutation) 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 (*TaskMutation) OldSchedule ¶
func (m *TaskMutation) OldSchedule(ctx context.Context) (v string, err error)
OldSchedule returns the old "schedule" field's value of the Task entity. If the Task 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 (*TaskMutation) OldTitle ¶
func (m *TaskMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the Task entity. If the Task 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 (*TaskMutation) OldType ¶
OldType returns the old "type" field's value of the Task entity. If the Task 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 (*TaskMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Task entity. If the Task 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 (*TaskMutation) RemoveInstanceIDs ¶
func (m *TaskMutation) RemoveInstanceIDs(ids ...int)
RemoveInstanceIDs removes the "instances" edge to the TaskInstance entity by IDs.
func (*TaskMutation) RemoveMetricIDs ¶
func (m *TaskMutation) RemoveMetricIDs(ids ...int)
RemoveMetricIDs removes the "metrics" edge to the Metric entity by IDs.
func (*TaskMutation) RemoveTagIDs ¶
func (m *TaskMutation) RemoveTagIDs(ids ...int)
RemoveTagIDs removes the "tags" edge to the TaskTag entity by IDs.
func (*TaskMutation) RemovedEdges ¶
func (m *TaskMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TaskMutation) RemovedIDs ¶
func (m *TaskMutation) 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 (*TaskMutation) RemovedInstancesIDs ¶
func (m *TaskMutation) RemovedInstancesIDs() (ids []int)
RemovedInstances returns the removed IDs of the "instances" edge to the TaskInstance entity.
func (*TaskMutation) RemovedMetricsIDs ¶
func (m *TaskMutation) RemovedMetricsIDs() (ids []int)
RemovedMetrics returns the removed IDs of the "metrics" edge to the Metric entity.
func (*TaskMutation) RemovedTagsIDs ¶
func (m *TaskMutation) RemovedTagsIDs() (ids []int)
RemovedTags returns the removed IDs of the "tags" edge to the TaskTag entity.
func (*TaskMutation) ResetActive ¶
func (m *TaskMutation) ResetActive()
ResetActive resets all changes to the "active" field.
func (*TaskMutation) ResetArgs ¶
func (m *TaskMutation) ResetArgs()
ResetArgs resets all changes to the "args" field.
func (*TaskMutation) ResetCategory ¶
func (m *TaskMutation) ResetCategory()
ResetCategory resets all changes to the "category" edge.
func (*TaskMutation) ResetCode ¶
func (m *TaskMutation) ResetCode()
ResetCode resets all changes to the "code" field.
func (*TaskMutation) ResetCreateTime ¶
func (m *TaskMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*TaskMutation) ResetDescription ¶
func (m *TaskMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*TaskMutation) ResetDisplay ¶
func (m *TaskMutation) ResetDisplay()
ResetDisplay resets all changes to the "display" field.
func (*TaskMutation) ResetEdge ¶
func (m *TaskMutation) 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 (*TaskMutation) ResetField ¶
func (m *TaskMutation) 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 (*TaskMutation) ResetInstances ¶
func (m *TaskMutation) ResetInstances()
ResetInstances resets all changes to the "instances" edge.
func (*TaskMutation) ResetMetrics ¶
func (m *TaskMutation) ResetMetrics()
ResetMetrics resets all changes to the "metrics" edge.
func (*TaskMutation) ResetSchedule ¶
func (m *TaskMutation) ResetSchedule()
ResetSchedule resets all changes to the "schedule" field.
func (*TaskMutation) ResetTags ¶
func (m *TaskMutation) ResetTags()
ResetTags resets all changes to the "tags" edge.
func (*TaskMutation) ResetTitle ¶
func (m *TaskMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*TaskMutation) ResetType ¶
func (m *TaskMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*TaskMutation) ResetUpdateTime ¶
func (m *TaskMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*TaskMutation) Schedule ¶
func (m *TaskMutation) Schedule() (r string, exists bool)
Schedule returns the value of the "schedule" field in the mutation.
func (*TaskMutation) ScheduleCleared ¶
func (m *TaskMutation) ScheduleCleared() bool
ScheduleCleared returns if the "schedule" field was cleared in this mutation.
func (*TaskMutation) SetActive ¶
func (m *TaskMutation) SetActive(b bool)
SetActive sets the "active" field.
func (*TaskMutation) SetArgs ¶
func (m *TaskMutation) SetArgs(value map[string]interface{})
SetArgs sets the "args" field.
func (*TaskMutation) SetCategoryID ¶
func (m *TaskMutation) SetCategoryID(id int)
SetCategoryID sets the "category" edge to the TaskCategory entity by id.
func (*TaskMutation) SetCode ¶
func (m *TaskMutation) SetCode(s string)
SetCode sets the "code" field.
func (*TaskMutation) SetCreateTime ¶
func (m *TaskMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*TaskMutation) SetDescription ¶
func (m *TaskMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*TaskMutation) SetDisplay ¶
func (m *TaskMutation) SetDisplay(b bool)
SetDisplay sets the "display" field.
func (*TaskMutation) SetField ¶
func (m *TaskMutation) 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 (*TaskMutation) SetSchedule ¶
func (m *TaskMutation) SetSchedule(s string)
SetSchedule sets the "schedule" field.
func (*TaskMutation) SetTitle ¶
func (m *TaskMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*TaskMutation) SetType ¶
func (m *TaskMutation) SetType(t task.Type)
SetType sets the "type" field.
func (*TaskMutation) SetUpdateTime ¶
func (m *TaskMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*TaskMutation) TagsCleared ¶
func (m *TaskMutation) TagsCleared() bool
TagsCleared reports if the "tags" edge to the TaskTag entity was cleared.
func (*TaskMutation) TagsIDs ¶
func (m *TaskMutation) TagsIDs() (ids []int)
TagsIDs returns the "tags" edge IDs in the mutation.
func (*TaskMutation) Title ¶
func (m *TaskMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (TaskMutation) Tx ¶
func (m TaskMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TaskMutation) Type ¶
func (m *TaskMutation) Type() string
Type returns the node type of this mutation (Task).
func (*TaskMutation) UpdateTime ¶
func (m *TaskMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*TaskMutation) Where ¶
func (m *TaskMutation) Where(ps ...predicate.Task)
Where appends a list predicates to the TaskMutation builder.
type TaskQuery ¶
type TaskQuery struct {
// contains filtered or unexported fields
}
TaskQuery is the builder for querying Task entities.
func (*TaskQuery) Clone ¶
Clone returns a duplicate of the TaskQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TaskQuery) First ¶
First returns the first Task entity from the query. Returns a *NotFoundError when no Task was found.
func (*TaskQuery) FirstID ¶
FirstID returns the first Task ID from the query. Returns a *NotFoundError when no Task ID was found.
func (*TaskQuery) GroupBy ¶
func (tq *TaskQuery) GroupBy(field string, fields ...string) *TaskGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Task.Query(). GroupBy(task.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TaskQuery) Only ¶
Only returns a single Task entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Task entity is not found. Returns a *NotFoundError when no Task entities are found.
func (*TaskQuery) OnlyID ¶
OnlyID is like Only, but returns the only Task ID in the query. Returns a *NotSingularError when exactly one Task ID is not found. Returns a *NotFoundError when no entities are found.
func (*TaskQuery) QueryCategory ¶
func (tq *TaskQuery) QueryCategory() *TaskCategoryQuery
QueryCategory chains the current query on the "category" edge.
func (*TaskQuery) QueryInstances ¶
func (tq *TaskQuery) QueryInstances() *TaskInstanceQuery
QueryInstances chains the current query on the "instances" edge.
func (*TaskQuery) QueryMetrics ¶
func (tq *TaskQuery) QueryMetrics() *MetricQuery
QueryMetrics chains the current query on the "metrics" edge.
func (*TaskQuery) QueryTags ¶
func (tq *TaskQuery) QueryTags() *TaskTagQuery
QueryTags chains the current query on the "tags" edge.
func (*TaskQuery) Select ¶
func (tq *TaskQuery) Select(fields ...string) *TaskSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Task.Query(). Select(task.FieldCreateTime). Scan(ctx, &v)
func (*TaskQuery) 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 (*TaskQuery) WithCategory ¶
func (tq *TaskQuery) WithCategory(opts ...func(*TaskCategoryQuery)) *TaskQuery
WithCategory tells the query-builder to eager-load the nodes that are connected to the "category" edge. The optional arguments are used to configure the query builder of the edge.
func (*TaskQuery) WithInstances ¶
func (tq *TaskQuery) WithInstances(opts ...func(*TaskInstanceQuery)) *TaskQuery
WithInstances tells the query-builder to eager-load the nodes that are connected to the "instances" edge. The optional arguments are used to configure the query builder of the edge.
func (*TaskQuery) WithMetrics ¶
func (tq *TaskQuery) WithMetrics(opts ...func(*MetricQuery)) *TaskQuery
WithMetrics tells the query-builder to eager-load the nodes that are connected to the "metrics" edge. The optional arguments are used to configure the query builder of the edge.
func (*TaskQuery) WithTags ¶
func (tq *TaskQuery) WithTags(opts ...func(*TaskTagQuery)) *TaskQuery
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.
type TaskSelect ¶
type TaskSelect struct { *TaskQuery // contains filtered or unexported fields }
TaskSelect is the builder for selecting fields of Task entities.
func (*TaskSelect) Bool ¶
func (ts *TaskSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TaskSelect) BoolX ¶
func (ts *TaskSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*TaskSelect) Bools ¶
func (ts *TaskSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TaskSelect) BoolsX ¶
func (ts *TaskSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*TaskSelect) Float64 ¶
func (ts *TaskSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TaskSelect) Float64X ¶
func (ts *TaskSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*TaskSelect) Float64s ¶
func (ts *TaskSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TaskSelect) Float64sX ¶
func (ts *TaskSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*TaskSelect) Int ¶
func (ts *TaskSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TaskSelect) IntX ¶
func (ts *TaskSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*TaskSelect) Ints ¶
func (ts *TaskSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TaskSelect) IntsX ¶
func (ts *TaskSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*TaskSelect) Scan ¶
func (ts *TaskSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*TaskSelect) ScanX ¶
func (ts *TaskSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*TaskSelect) String ¶
func (ts *TaskSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*TaskSelect) StringX ¶
func (ts *TaskSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type TaskTag ¶
type TaskTag struct { // ID of the ent. ID int `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Display holds the value of the "display" field. Display bool `json:"display,omitempty"` // Meta holds the value of the "meta" field. Meta map[string]interface{} `json:"meta,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TaskTagQuery when eager-loading is set. Edges TaskTagEdges `json:"edges"` // contains filtered or unexported fields }
TaskTag is the model entity for the TaskTag schema.
func (*TaskTag) QueryTasks ¶
QueryTasks queries the "tasks" edge of the TaskTag entity.
func (*TaskTag) Unwrap ¶
Unwrap unwraps the TaskTag 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 (*TaskTag) Update ¶
func (tt *TaskTag) Update() *TaskTagUpdateOne
Update returns a builder for updating this TaskTag. Note that you need to call TaskTag.Unwrap() before calling this method if this TaskTag was returned from a transaction, and the transaction was committed or rolled back.
type TaskTagClient ¶
type TaskTagClient struct {
// contains filtered or unexported fields
}
TaskTagClient is a client for the TaskTag schema.
func NewTaskTagClient ¶
func NewTaskTagClient(c config) *TaskTagClient
NewTaskTagClient returns a client for the TaskTag from the given config.
func (*TaskTagClient) Create ¶
func (c *TaskTagClient) Create() *TaskTagCreate
Create returns a create builder for TaskTag.
func (*TaskTagClient) CreateBulk ¶
func (c *TaskTagClient) CreateBulk(builders ...*TaskTagCreate) *TaskTagCreateBulk
CreateBulk returns a builder for creating a bulk of TaskTag entities.
func (*TaskTagClient) Delete ¶
func (c *TaskTagClient) Delete() *TaskTagDelete
Delete returns a delete builder for TaskTag.
func (*TaskTagClient) DeleteOne ¶
func (c *TaskTagClient) DeleteOne(tt *TaskTag) *TaskTagDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*TaskTagClient) DeleteOneID ¶
func (c *TaskTagClient) DeleteOneID(id int) *TaskTagDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*TaskTagClient) GetX ¶
func (c *TaskTagClient) GetX(ctx context.Context, id int) *TaskTag
GetX is like Get, but panics if an error occurs.
func (*TaskTagClient) Hooks ¶
func (c *TaskTagClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TaskTagClient) Query ¶
func (c *TaskTagClient) Query() *TaskTagQuery
Query returns a query builder for TaskTag.
func (*TaskTagClient) QueryTasks ¶
func (c *TaskTagClient) QueryTasks(tt *TaskTag) *TaskQuery
QueryTasks queries the tasks edge of a TaskTag.
func (*TaskTagClient) Update ¶
func (c *TaskTagClient) Update() *TaskTagUpdate
Update returns an update builder for TaskTag.
func (*TaskTagClient) UpdateOne ¶
func (c *TaskTagClient) UpdateOne(tt *TaskTag) *TaskTagUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TaskTagClient) UpdateOneID ¶
func (c *TaskTagClient) UpdateOneID(id int) *TaskTagUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TaskTagClient) Use ¶
func (c *TaskTagClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tasktag.Hooks(f(g(h())))`.
type TaskTagCreate ¶
type TaskTagCreate struct {
// contains filtered or unexported fields
}
TaskTagCreate is the builder for creating a TaskTag entity.
func (*TaskTagCreate) AddTaskIDs ¶
func (ttc *TaskTagCreate) AddTaskIDs(ids ...int) *TaskTagCreate
AddTaskIDs adds the "tasks" edge to the Task entity by IDs.
func (*TaskTagCreate) AddTasks ¶
func (ttc *TaskTagCreate) AddTasks(t ...*Task) *TaskTagCreate
AddTasks adds the "tasks" edges to the Task entity.
func (*TaskTagCreate) Exec ¶
func (ttc *TaskTagCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskTagCreate) ExecX ¶
func (ttc *TaskTagCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskTagCreate) Mutation ¶
func (ttc *TaskTagCreate) Mutation() *TaskTagMutation
Mutation returns the TaskTagMutation object of the builder.
func (*TaskTagCreate) Save ¶
func (ttc *TaskTagCreate) Save(ctx context.Context) (*TaskTag, error)
Save creates the TaskTag in the database.
func (*TaskTagCreate) SaveX ¶
func (ttc *TaskTagCreate) SaveX(ctx context.Context) *TaskTag
SaveX calls Save and panics if Save returns an error.
func (*TaskTagCreate) SetCreateTime ¶
func (ttc *TaskTagCreate) SetCreateTime(t time.Time) *TaskTagCreate
SetCreateTime sets the "create_time" field.
func (*TaskTagCreate) SetDescription ¶
func (ttc *TaskTagCreate) SetDescription(s string) *TaskTagCreate
SetDescription sets the "description" field.
func (*TaskTagCreate) SetDisplay ¶
func (ttc *TaskTagCreate) SetDisplay(b bool) *TaskTagCreate
SetDisplay sets the "display" field.
func (*TaskTagCreate) SetMeta ¶
func (ttc *TaskTagCreate) SetMeta(m map[string]interface{}) *TaskTagCreate
SetMeta sets the "meta" field.
func (*TaskTagCreate) SetNillableCreateTime ¶
func (ttc *TaskTagCreate) SetNillableCreateTime(t *time.Time) *TaskTagCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*TaskTagCreate) SetNillableDescription ¶
func (ttc *TaskTagCreate) SetNillableDescription(s *string) *TaskTagCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*TaskTagCreate) SetNillableDisplay ¶
func (ttc *TaskTagCreate) SetNillableDisplay(b *bool) *TaskTagCreate
SetNillableDisplay sets the "display" field if the given value is not nil.
func (*TaskTagCreate) SetNillableUpdateTime ¶
func (ttc *TaskTagCreate) SetNillableUpdateTime(t *time.Time) *TaskTagCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*TaskTagCreate) SetTitle ¶
func (ttc *TaskTagCreate) SetTitle(s string) *TaskTagCreate
SetTitle sets the "title" field.
func (*TaskTagCreate) SetUpdateTime ¶
func (ttc *TaskTagCreate) SetUpdateTime(t time.Time) *TaskTagCreate
SetUpdateTime sets the "update_time" field.
type TaskTagCreateBulk ¶
type TaskTagCreateBulk struct {
// contains filtered or unexported fields
}
TaskTagCreateBulk is the builder for creating many TaskTag entities in bulk.
func (*TaskTagCreateBulk) Exec ¶
func (ttcb *TaskTagCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskTagCreateBulk) ExecX ¶
func (ttcb *TaskTagCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TaskTagDelete ¶
type TaskTagDelete struct {
// contains filtered or unexported fields
}
TaskTagDelete is the builder for deleting a TaskTag entity.
func (*TaskTagDelete) Exec ¶
func (ttd *TaskTagDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TaskTagDelete) ExecX ¶
func (ttd *TaskTagDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TaskTagDelete) Where ¶
func (ttd *TaskTagDelete) Where(ps ...predicate.TaskTag) *TaskTagDelete
Where appends a list predicates to the TaskTagDelete builder.
type TaskTagDeleteOne ¶
type TaskTagDeleteOne struct {
// contains filtered or unexported fields
}
TaskTagDeleteOne is the builder for deleting a single TaskTag entity.
func (*TaskTagDeleteOne) Exec ¶
func (ttdo *TaskTagDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TaskTagDeleteOne) ExecX ¶
func (ttdo *TaskTagDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TaskTagEdges ¶
type TaskTagEdges struct { // Tasks holds the value of the tasks edge. Tasks []*Task `json:"tasks,omitempty"` // contains filtered or unexported fields }
TaskTagEdges holds the relations/edges for other nodes in the graph.
func (TaskTagEdges) TasksOrErr ¶
func (e TaskTagEdges) TasksOrErr() ([]*Task, error)
TasksOrErr returns the Tasks value or an error if the edge was not loaded in eager-loading.
type TaskTagGroupBy ¶
type TaskTagGroupBy struct {
// contains filtered or unexported fields
}
TaskTagGroupBy is the group-by builder for TaskTag entities.
func (*TaskTagGroupBy) Aggregate ¶
func (ttgb *TaskTagGroupBy) Aggregate(fns ...AggregateFunc) *TaskTagGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TaskTagGroupBy) Bool ¶
func (ttgb *TaskTagGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TaskTagGroupBy) BoolX ¶
func (ttgb *TaskTagGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*TaskTagGroupBy) Bools ¶
func (ttgb *TaskTagGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*TaskTagGroupBy) BoolsX ¶
func (ttgb *TaskTagGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*TaskTagGroupBy) Float64 ¶
func (ttgb *TaskTagGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TaskTagGroupBy) Float64X ¶
func (ttgb *TaskTagGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*TaskTagGroupBy) Float64s ¶
func (ttgb *TaskTagGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*TaskTagGroupBy) Float64sX ¶
func (ttgb *TaskTagGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*TaskTagGroupBy) Int ¶
func (ttgb *TaskTagGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TaskTagGroupBy) IntX ¶
func (ttgb *TaskTagGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*TaskTagGroupBy) Ints ¶
func (ttgb *TaskTagGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*TaskTagGroupBy) IntsX ¶
func (ttgb *TaskTagGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*TaskTagGroupBy) Scan ¶
func (ttgb *TaskTagGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*TaskTagGroupBy) ScanX ¶
func (ttgb *TaskTagGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*TaskTagGroupBy) String ¶
func (ttgb *TaskTagGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*TaskTagGroupBy) StringX ¶
func (ttgb *TaskTagGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type TaskTagMutation ¶
type TaskTagMutation struct {
// contains filtered or unexported fields
}
TaskTagMutation represents an operation that mutates the TaskTag nodes in the graph.
func (*TaskTagMutation) AddField ¶
func (m *TaskTagMutation) 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 (*TaskTagMutation) AddTaskIDs ¶
func (m *TaskTagMutation) AddTaskIDs(ids ...int)
AddTaskIDs adds the "tasks" edge to the Task entity by ids.
func (*TaskTagMutation) AddedEdges ¶
func (m *TaskTagMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TaskTagMutation) AddedField ¶
func (m *TaskTagMutation) 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 (*TaskTagMutation) AddedFields ¶
func (m *TaskTagMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TaskTagMutation) AddedIDs ¶
func (m *TaskTagMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TaskTagMutation) ClearDescription ¶
func (m *TaskTagMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*TaskTagMutation) ClearEdge ¶
func (m *TaskTagMutation) 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 (*TaskTagMutation) ClearField ¶
func (m *TaskTagMutation) 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 (*TaskTagMutation) ClearMeta ¶
func (m *TaskTagMutation) ClearMeta()
ClearMeta clears the value of the "meta" field.
func (*TaskTagMutation) ClearTasks ¶
func (m *TaskTagMutation) ClearTasks()
ClearTasks clears the "tasks" edge to the Task entity.
func (*TaskTagMutation) ClearedEdges ¶
func (m *TaskTagMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TaskTagMutation) ClearedFields ¶
func (m *TaskTagMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TaskTagMutation) Client ¶
func (m TaskTagMutation) 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 (*TaskTagMutation) CreateTime ¶
func (m *TaskTagMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*TaskTagMutation) Description ¶
func (m *TaskTagMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*TaskTagMutation) DescriptionCleared ¶
func (m *TaskTagMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*TaskTagMutation) Display ¶
func (m *TaskTagMutation) Display() (r bool, exists bool)
Display returns the value of the "display" field in the mutation.
func (*TaskTagMutation) EdgeCleared ¶
func (m *TaskTagMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TaskTagMutation) Field ¶
func (m *TaskTagMutation) 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 (*TaskTagMutation) FieldCleared ¶
func (m *TaskTagMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TaskTagMutation) Fields ¶
func (m *TaskTagMutation) 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 (*TaskTagMutation) ID ¶
func (m *TaskTagMutation) 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 (*TaskTagMutation) IDs ¶
func (m *TaskTagMutation) 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 (*TaskTagMutation) Meta ¶
func (m *TaskTagMutation) Meta() (r map[string]interface{}, exists bool)
Meta returns the value of the "meta" field in the mutation.
func (*TaskTagMutation) MetaCleared ¶
func (m *TaskTagMutation) MetaCleared() bool
MetaCleared returns if the "meta" field was cleared in this mutation.
func (*TaskTagMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the TaskTag entity. If the TaskTag 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 (*TaskTagMutation) OldDescription ¶
func (m *TaskTagMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the TaskTag entity. If the TaskTag 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 (*TaskTagMutation) OldDisplay ¶
func (m *TaskTagMutation) OldDisplay(ctx context.Context) (v bool, err error)
OldDisplay returns the old "display" field's value of the TaskTag entity. If the TaskTag 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 (*TaskTagMutation) 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 (*TaskTagMutation) OldMeta ¶
func (m *TaskTagMutation) OldMeta(ctx context.Context) (v map[string]interface{}, err error)
OldMeta returns the old "meta" field's value of the TaskTag entity. If the TaskTag 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 (*TaskTagMutation) OldTitle ¶
func (m *TaskTagMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the TaskTag entity. If the TaskTag 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 (*TaskTagMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the TaskTag entity. If the TaskTag 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 (*TaskTagMutation) RemoveTaskIDs ¶
func (m *TaskTagMutation) RemoveTaskIDs(ids ...int)
RemoveTaskIDs removes the "tasks" edge to the Task entity by IDs.
func (*TaskTagMutation) RemovedEdges ¶
func (m *TaskTagMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TaskTagMutation) RemovedIDs ¶
func (m *TaskTagMutation) 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 (*TaskTagMutation) RemovedTasksIDs ¶
func (m *TaskTagMutation) RemovedTasksIDs() (ids []int)
RemovedTasks returns the removed IDs of the "tasks" edge to the Task entity.
func (*TaskTagMutation) ResetCreateTime ¶
func (m *TaskTagMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*TaskTagMutation) ResetDescription ¶
func (m *TaskTagMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*TaskTagMutation) ResetDisplay ¶
func (m *TaskTagMutation) ResetDisplay()
ResetDisplay resets all changes to the "display" field.
func (*TaskTagMutation) ResetEdge ¶
func (m *TaskTagMutation) 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 (*TaskTagMutation) ResetField ¶
func (m *TaskTagMutation) 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 (*TaskTagMutation) ResetMeta ¶
func (m *TaskTagMutation) ResetMeta()
ResetMeta resets all changes to the "meta" field.
func (*TaskTagMutation) ResetTasks ¶
func (m *TaskTagMutation) ResetTasks()
ResetTasks resets all changes to the "tasks" edge.
func (*TaskTagMutation) ResetTitle ¶
func (m *TaskTagMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*TaskTagMutation) ResetUpdateTime ¶
func (m *TaskTagMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*TaskTagMutation) SetCreateTime ¶
func (m *TaskTagMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*TaskTagMutation) SetDescription ¶
func (m *TaskTagMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*TaskTagMutation) SetDisplay ¶
func (m *TaskTagMutation) SetDisplay(b bool)
SetDisplay sets the "display" field.
func (*TaskTagMutation) SetField ¶
func (m *TaskTagMutation) 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 (*TaskTagMutation) SetMeta ¶
func (m *TaskTagMutation) SetMeta(value map[string]interface{})
SetMeta sets the "meta" field.
func (*TaskTagMutation) SetTitle ¶
func (m *TaskTagMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*TaskTagMutation) SetUpdateTime ¶
func (m *TaskTagMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*TaskTagMutation) TasksCleared ¶
func (m *TaskTagMutation) TasksCleared() bool
TasksCleared reports if the "tasks" edge to the Task entity was cleared.
func (*TaskTagMutation) TasksIDs ¶
func (m *TaskTagMutation) TasksIDs() (ids []int)
TasksIDs returns the "tasks" edge IDs in the mutation.
func (*TaskTagMutation) Title ¶
func (m *TaskTagMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (TaskTagMutation) Tx ¶
func (m TaskTagMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TaskTagMutation) Type ¶
func (m *TaskTagMutation) Type() string
Type returns the node type of this mutation (TaskTag).
func (*TaskTagMutation) UpdateTime ¶
func (m *TaskTagMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*TaskTagMutation) Where ¶
func (m *TaskTagMutation) Where(ps ...predicate.TaskTag)
Where appends a list predicates to the TaskTagMutation builder.
type TaskTagQuery ¶
type TaskTagQuery struct {
// contains filtered or unexported fields
}
TaskTagQuery is the builder for querying TaskTag entities.
func (*TaskTagQuery) All ¶
func (ttq *TaskTagQuery) All(ctx context.Context) ([]*TaskTag, error)
All executes the query and returns a list of TaskTags.
func (*TaskTagQuery) AllX ¶
func (ttq *TaskTagQuery) AllX(ctx context.Context) []*TaskTag
AllX is like All, but panics if an error occurs.
func (*TaskTagQuery) Clone ¶
func (ttq *TaskTagQuery) Clone() *TaskTagQuery
Clone returns a duplicate of the TaskTagQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TaskTagQuery) Count ¶
func (ttq *TaskTagQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TaskTagQuery) CountX ¶
func (ttq *TaskTagQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TaskTagQuery) Exist ¶
func (ttq *TaskTagQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TaskTagQuery) ExistX ¶
func (ttq *TaskTagQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TaskTagQuery) First ¶
func (ttq *TaskTagQuery) First(ctx context.Context) (*TaskTag, error)
First returns the first TaskTag entity from the query. Returns a *NotFoundError when no TaskTag was found.
func (*TaskTagQuery) FirstID ¶
func (ttq *TaskTagQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first TaskTag ID from the query. Returns a *NotFoundError when no TaskTag ID was found.
func (*TaskTagQuery) FirstIDX ¶
func (ttq *TaskTagQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*TaskTagQuery) FirstX ¶
func (ttq *TaskTagQuery) FirstX(ctx context.Context) *TaskTag
FirstX is like First, but panics if an error occurs.
func (*TaskTagQuery) GroupBy ¶
func (ttq *TaskTagQuery) GroupBy(field string, fields ...string) *TaskTagGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.TaskTag.Query(). GroupBy(tasktag.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TaskTagQuery) IDs ¶
func (ttq *TaskTagQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of TaskTag IDs.
func (*TaskTagQuery) IDsX ¶
func (ttq *TaskTagQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*TaskTagQuery) Limit ¶
func (ttq *TaskTagQuery) Limit(limit int) *TaskTagQuery
Limit adds a limit step to the query.
func (*TaskTagQuery) Offset ¶
func (ttq *TaskTagQuery) Offset(offset int) *TaskTagQuery
Offset adds an offset step to the query.
func (*TaskTagQuery) Only ¶
func (ttq *TaskTagQuery) Only(ctx context.Context) (*TaskTag, error)
Only returns a single TaskTag entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one TaskTag entity is not found. Returns a *NotFoundError when no TaskTag entities are found.
func (*TaskTagQuery) OnlyID ¶
func (ttq *TaskTagQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only TaskTag ID in the query. Returns a *NotSingularError when exactly one TaskTag ID is not found. Returns a *NotFoundError when no entities are found.
func (*TaskTagQuery) OnlyIDX ¶
func (ttq *TaskTagQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TaskTagQuery) OnlyX ¶
func (ttq *TaskTagQuery) OnlyX(ctx context.Context) *TaskTag
OnlyX is like Only, but panics if an error occurs.
func (*TaskTagQuery) Order ¶
func (ttq *TaskTagQuery) Order(o ...OrderFunc) *TaskTagQuery
Order adds an order step to the query.
func (*TaskTagQuery) QueryTasks ¶
func (ttq *TaskTagQuery) QueryTasks() *TaskQuery
QueryTasks chains the current query on the "tasks" edge.
func (*TaskTagQuery) Select ¶
func (ttq *TaskTagQuery) Select(fields ...string) *TaskTagSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.TaskTag.Query(). Select(tasktag.FieldCreateTime). Scan(ctx, &v)
func (*TaskTagQuery) Unique ¶
func (ttq *TaskTagQuery) Unique(unique bool) *TaskTagQuery
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 (*TaskTagQuery) Where ¶
func (ttq *TaskTagQuery) Where(ps ...predicate.TaskTag) *TaskTagQuery
Where adds a new predicate for the TaskTagQuery builder.
func (*TaskTagQuery) WithTasks ¶
func (ttq *TaskTagQuery) WithTasks(opts ...func(*TaskQuery)) *TaskTagQuery
WithTasks tells the query-builder to eager-load the nodes that are connected to the "tasks" edge. The optional arguments are used to configure the query builder of the edge.
type TaskTagSelect ¶
type TaskTagSelect struct { *TaskTagQuery // contains filtered or unexported fields }
TaskTagSelect is the builder for selecting fields of TaskTag entities.
func (*TaskTagSelect) Bool ¶
func (tts *TaskTagSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TaskTagSelect) BoolX ¶
func (tts *TaskTagSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*TaskTagSelect) Bools ¶
func (tts *TaskTagSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TaskTagSelect) BoolsX ¶
func (tts *TaskTagSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*TaskTagSelect) Float64 ¶
func (tts *TaskTagSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TaskTagSelect) Float64X ¶
func (tts *TaskTagSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*TaskTagSelect) Float64s ¶
func (tts *TaskTagSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TaskTagSelect) Float64sX ¶
func (tts *TaskTagSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*TaskTagSelect) Int ¶
func (tts *TaskTagSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TaskTagSelect) IntX ¶
func (tts *TaskTagSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*TaskTagSelect) Ints ¶
func (tts *TaskTagSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TaskTagSelect) IntsX ¶
func (tts *TaskTagSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*TaskTagSelect) Scan ¶
func (tts *TaskTagSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*TaskTagSelect) ScanX ¶
func (tts *TaskTagSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*TaskTagSelect) String ¶
func (tts *TaskTagSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*TaskTagSelect) StringX ¶
func (tts *TaskTagSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type TaskTagUpdate ¶
type TaskTagUpdate struct {
// contains filtered or unexported fields
}
TaskTagUpdate is the builder for updating TaskTag entities.
func (*TaskTagUpdate) AddTaskIDs ¶
func (ttu *TaskTagUpdate) AddTaskIDs(ids ...int) *TaskTagUpdate
AddTaskIDs adds the "tasks" edge to the Task entity by IDs.
func (*TaskTagUpdate) AddTasks ¶
func (ttu *TaskTagUpdate) AddTasks(t ...*Task) *TaskTagUpdate
AddTasks adds the "tasks" edges to the Task entity.
func (*TaskTagUpdate) ClearDescription ¶
func (ttu *TaskTagUpdate) ClearDescription() *TaskTagUpdate
ClearDescription clears the value of the "description" field.
func (*TaskTagUpdate) ClearMeta ¶
func (ttu *TaskTagUpdate) ClearMeta() *TaskTagUpdate
ClearMeta clears the value of the "meta" field.
func (*TaskTagUpdate) ClearTasks ¶
func (ttu *TaskTagUpdate) ClearTasks() *TaskTagUpdate
ClearTasks clears all "tasks" edges to the Task entity.
func (*TaskTagUpdate) Exec ¶
func (ttu *TaskTagUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskTagUpdate) ExecX ¶
func (ttu *TaskTagUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskTagUpdate) Mutation ¶
func (ttu *TaskTagUpdate) Mutation() *TaskTagMutation
Mutation returns the TaskTagMutation object of the builder.
func (*TaskTagUpdate) RemoveTaskIDs ¶
func (ttu *TaskTagUpdate) RemoveTaskIDs(ids ...int) *TaskTagUpdate
RemoveTaskIDs removes the "tasks" edge to Task entities by IDs.
func (*TaskTagUpdate) RemoveTasks ¶
func (ttu *TaskTagUpdate) RemoveTasks(t ...*Task) *TaskTagUpdate
RemoveTasks removes "tasks" edges to Task entities.
func (*TaskTagUpdate) Save ¶
func (ttu *TaskTagUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TaskTagUpdate) SaveX ¶
func (ttu *TaskTagUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TaskTagUpdate) SetDescription ¶
func (ttu *TaskTagUpdate) SetDescription(s string) *TaskTagUpdate
SetDescription sets the "description" field.
func (*TaskTagUpdate) SetDisplay ¶
func (ttu *TaskTagUpdate) SetDisplay(b bool) *TaskTagUpdate
SetDisplay sets the "display" field.
func (*TaskTagUpdate) SetMeta ¶
func (ttu *TaskTagUpdate) SetMeta(m map[string]interface{}) *TaskTagUpdate
SetMeta sets the "meta" field.
func (*TaskTagUpdate) SetNillableDescription ¶
func (ttu *TaskTagUpdate) SetNillableDescription(s *string) *TaskTagUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*TaskTagUpdate) SetNillableDisplay ¶
func (ttu *TaskTagUpdate) SetNillableDisplay(b *bool) *TaskTagUpdate
SetNillableDisplay sets the "display" field if the given value is not nil.
func (*TaskTagUpdate) SetTitle ¶
func (ttu *TaskTagUpdate) SetTitle(s string) *TaskTagUpdate
SetTitle sets the "title" field.
func (*TaskTagUpdate) SetUpdateTime ¶
func (ttu *TaskTagUpdate) SetUpdateTime(t time.Time) *TaskTagUpdate
SetUpdateTime sets the "update_time" field.
func (*TaskTagUpdate) Where ¶
func (ttu *TaskTagUpdate) Where(ps ...predicate.TaskTag) *TaskTagUpdate
Where appends a list predicates to the TaskTagUpdate builder.
type TaskTagUpdateOne ¶
type TaskTagUpdateOne struct {
// contains filtered or unexported fields
}
TaskTagUpdateOne is the builder for updating a single TaskTag entity.
func (*TaskTagUpdateOne) AddTaskIDs ¶
func (ttuo *TaskTagUpdateOne) AddTaskIDs(ids ...int) *TaskTagUpdateOne
AddTaskIDs adds the "tasks" edge to the Task entity by IDs.
func (*TaskTagUpdateOne) AddTasks ¶
func (ttuo *TaskTagUpdateOne) AddTasks(t ...*Task) *TaskTagUpdateOne
AddTasks adds the "tasks" edges to the Task entity.
func (*TaskTagUpdateOne) ClearDescription ¶
func (ttuo *TaskTagUpdateOne) ClearDescription() *TaskTagUpdateOne
ClearDescription clears the value of the "description" field.
func (*TaskTagUpdateOne) ClearMeta ¶
func (ttuo *TaskTagUpdateOne) ClearMeta() *TaskTagUpdateOne
ClearMeta clears the value of the "meta" field.
func (*TaskTagUpdateOne) ClearTasks ¶
func (ttuo *TaskTagUpdateOne) ClearTasks() *TaskTagUpdateOne
ClearTasks clears all "tasks" edges to the Task entity.
func (*TaskTagUpdateOne) Exec ¶
func (ttuo *TaskTagUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TaskTagUpdateOne) ExecX ¶
func (ttuo *TaskTagUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskTagUpdateOne) Mutation ¶
func (ttuo *TaskTagUpdateOne) Mutation() *TaskTagMutation
Mutation returns the TaskTagMutation object of the builder.
func (*TaskTagUpdateOne) RemoveTaskIDs ¶
func (ttuo *TaskTagUpdateOne) RemoveTaskIDs(ids ...int) *TaskTagUpdateOne
RemoveTaskIDs removes the "tasks" edge to Task entities by IDs.
func (*TaskTagUpdateOne) RemoveTasks ¶
func (ttuo *TaskTagUpdateOne) RemoveTasks(t ...*Task) *TaskTagUpdateOne
RemoveTasks removes "tasks" edges to Task entities.
func (*TaskTagUpdateOne) Save ¶
func (ttuo *TaskTagUpdateOne) Save(ctx context.Context) (*TaskTag, error)
Save executes the query and returns the updated TaskTag entity.
func (*TaskTagUpdateOne) SaveX ¶
func (ttuo *TaskTagUpdateOne) SaveX(ctx context.Context) *TaskTag
SaveX is like Save, but panics if an error occurs.
func (*TaskTagUpdateOne) Select ¶
func (ttuo *TaskTagUpdateOne) Select(field string, fields ...string) *TaskTagUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TaskTagUpdateOne) SetDescription ¶
func (ttuo *TaskTagUpdateOne) SetDescription(s string) *TaskTagUpdateOne
SetDescription sets the "description" field.
func (*TaskTagUpdateOne) SetDisplay ¶
func (ttuo *TaskTagUpdateOne) SetDisplay(b bool) *TaskTagUpdateOne
SetDisplay sets the "display" field.
func (*TaskTagUpdateOne) SetMeta ¶
func (ttuo *TaskTagUpdateOne) SetMeta(m map[string]interface{}) *TaskTagUpdateOne
SetMeta sets the "meta" field.
func (*TaskTagUpdateOne) SetNillableDescription ¶
func (ttuo *TaskTagUpdateOne) SetNillableDescription(s *string) *TaskTagUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*TaskTagUpdateOne) SetNillableDisplay ¶
func (ttuo *TaskTagUpdateOne) SetNillableDisplay(b *bool) *TaskTagUpdateOne
SetNillableDisplay sets the "display" field if the given value is not nil.
func (*TaskTagUpdateOne) SetTitle ¶
func (ttuo *TaskTagUpdateOne) SetTitle(s string) *TaskTagUpdateOne
SetTitle sets the "title" field.
func (*TaskTagUpdateOne) SetUpdateTime ¶
func (ttuo *TaskTagUpdateOne) SetUpdateTime(t time.Time) *TaskTagUpdateOne
SetUpdateTime sets the "update_time" field.
type TaskUpdate ¶
type TaskUpdate struct {
// contains filtered or unexported fields
}
TaskUpdate is the builder for updating Task entities.
func (*TaskUpdate) AddInstanceIDs ¶
func (tu *TaskUpdate) AddInstanceIDs(ids ...int) *TaskUpdate
AddInstanceIDs adds the "instances" edge to the TaskInstance entity by IDs.
func (*TaskUpdate) AddInstances ¶
func (tu *TaskUpdate) AddInstances(t ...*TaskInstance) *TaskUpdate
AddInstances adds the "instances" edges to the TaskInstance entity.
func (*TaskUpdate) AddMetricIDs ¶
func (tu *TaskUpdate) AddMetricIDs(ids ...int) *TaskUpdate
AddMetricIDs adds the "metrics" edge to the Metric entity by IDs.
func (*TaskUpdate) AddMetrics ¶
func (tu *TaskUpdate) AddMetrics(m ...*Metric) *TaskUpdate
AddMetrics adds the "metrics" edges to the Metric entity.
func (*TaskUpdate) AddTagIDs ¶
func (tu *TaskUpdate) AddTagIDs(ids ...int) *TaskUpdate
AddTagIDs adds the "tags" edge to the TaskTag entity by IDs.
func (*TaskUpdate) AddTags ¶
func (tu *TaskUpdate) AddTags(t ...*TaskTag) *TaskUpdate
AddTags adds the "tags" edges to the TaskTag entity.
func (*TaskUpdate) ClearArgs ¶
func (tu *TaskUpdate) ClearArgs() *TaskUpdate
ClearArgs clears the value of the "args" field.
func (*TaskUpdate) ClearCategory ¶
func (tu *TaskUpdate) ClearCategory() *TaskUpdate
ClearCategory clears the "category" edge to the TaskCategory entity.
func (*TaskUpdate) ClearDescription ¶
func (tu *TaskUpdate) ClearDescription() *TaskUpdate
ClearDescription clears the value of the "description" field.
func (*TaskUpdate) ClearInstances ¶
func (tu *TaskUpdate) ClearInstances() *TaskUpdate
ClearInstances clears all "instances" edges to the TaskInstance entity.
func (*TaskUpdate) ClearMetrics ¶
func (tu *TaskUpdate) ClearMetrics() *TaskUpdate
ClearMetrics clears all "metrics" edges to the Metric entity.
func (*TaskUpdate) ClearSchedule ¶
func (tu *TaskUpdate) ClearSchedule() *TaskUpdate
ClearSchedule clears the value of the "schedule" field.
func (*TaskUpdate) ClearTags ¶
func (tu *TaskUpdate) ClearTags() *TaskUpdate
ClearTags clears all "tags" edges to the TaskTag entity.
func (*TaskUpdate) Exec ¶
func (tu *TaskUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskUpdate) ExecX ¶
func (tu *TaskUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskUpdate) Mutation ¶
func (tu *TaskUpdate) Mutation() *TaskMutation
Mutation returns the TaskMutation object of the builder.
func (*TaskUpdate) RemoveInstanceIDs ¶
func (tu *TaskUpdate) RemoveInstanceIDs(ids ...int) *TaskUpdate
RemoveInstanceIDs removes the "instances" edge to TaskInstance entities by IDs.
func (*TaskUpdate) RemoveInstances ¶
func (tu *TaskUpdate) RemoveInstances(t ...*TaskInstance) *TaskUpdate
RemoveInstances removes "instances" edges to TaskInstance entities.
func (*TaskUpdate) RemoveMetricIDs ¶
func (tu *TaskUpdate) RemoveMetricIDs(ids ...int) *TaskUpdate
RemoveMetricIDs removes the "metrics" edge to Metric entities by IDs.
func (*TaskUpdate) RemoveMetrics ¶
func (tu *TaskUpdate) RemoveMetrics(m ...*Metric) *TaskUpdate
RemoveMetrics removes "metrics" edges to Metric entities.
func (*TaskUpdate) RemoveTagIDs ¶
func (tu *TaskUpdate) RemoveTagIDs(ids ...int) *TaskUpdate
RemoveTagIDs removes the "tags" edge to TaskTag entities by IDs.
func (*TaskUpdate) RemoveTags ¶
func (tu *TaskUpdate) RemoveTags(t ...*TaskTag) *TaskUpdate
RemoveTags removes "tags" edges to TaskTag entities.
func (*TaskUpdate) Save ¶
func (tu *TaskUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TaskUpdate) SaveX ¶
func (tu *TaskUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TaskUpdate) SetActive ¶
func (tu *TaskUpdate) SetActive(b bool) *TaskUpdate
SetActive sets the "active" field.
func (*TaskUpdate) SetArgs ¶
func (tu *TaskUpdate) SetArgs(m map[string]interface{}) *TaskUpdate
SetArgs sets the "args" field.
func (*TaskUpdate) SetCategory ¶
func (tu *TaskUpdate) SetCategory(t *TaskCategory) *TaskUpdate
SetCategory sets the "category" edge to the TaskCategory entity.
func (*TaskUpdate) SetCategoryID ¶
func (tu *TaskUpdate) SetCategoryID(id int) *TaskUpdate
SetCategoryID sets the "category" edge to the TaskCategory entity by ID.
func (*TaskUpdate) SetDescription ¶
func (tu *TaskUpdate) SetDescription(s string) *TaskUpdate
SetDescription sets the "description" field.
func (*TaskUpdate) SetDisplay ¶
func (tu *TaskUpdate) SetDisplay(b bool) *TaskUpdate
SetDisplay sets the "display" field.
func (*TaskUpdate) SetNillableActive ¶
func (tu *TaskUpdate) SetNillableActive(b *bool) *TaskUpdate
SetNillableActive sets the "active" field if the given value is not nil.
func (*TaskUpdate) SetNillableDescription ¶
func (tu *TaskUpdate) SetNillableDescription(s *string) *TaskUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*TaskUpdate) SetNillableDisplay ¶
func (tu *TaskUpdate) SetNillableDisplay(b *bool) *TaskUpdate
SetNillableDisplay sets the "display" field if the given value is not nil.
func (*TaskUpdate) SetNillableSchedule ¶
func (tu *TaskUpdate) SetNillableSchedule(s *string) *TaskUpdate
SetNillableSchedule sets the "schedule" field if the given value is not nil.
func (*TaskUpdate) SetSchedule ¶
func (tu *TaskUpdate) SetSchedule(s string) *TaskUpdate
SetSchedule sets the "schedule" field.
func (*TaskUpdate) SetTitle ¶
func (tu *TaskUpdate) SetTitle(s string) *TaskUpdate
SetTitle sets the "title" field.
func (*TaskUpdate) SetUpdateTime ¶
func (tu *TaskUpdate) SetUpdateTime(t time.Time) *TaskUpdate
SetUpdateTime sets the "update_time" field.
func (*TaskUpdate) Where ¶
func (tu *TaskUpdate) Where(ps ...predicate.Task) *TaskUpdate
Where appends a list predicates to the TaskUpdate builder.
type TaskUpdateOne ¶
type TaskUpdateOne struct {
// contains filtered or unexported fields
}
TaskUpdateOne is the builder for updating a single Task entity.
func (*TaskUpdateOne) AddInstanceIDs ¶
func (tuo *TaskUpdateOne) AddInstanceIDs(ids ...int) *TaskUpdateOne
AddInstanceIDs adds the "instances" edge to the TaskInstance entity by IDs.
func (*TaskUpdateOne) AddInstances ¶
func (tuo *TaskUpdateOne) AddInstances(t ...*TaskInstance) *TaskUpdateOne
AddInstances adds the "instances" edges to the TaskInstance entity.
func (*TaskUpdateOne) AddMetricIDs ¶
func (tuo *TaskUpdateOne) AddMetricIDs(ids ...int) *TaskUpdateOne
AddMetricIDs adds the "metrics" edge to the Metric entity by IDs.
func (*TaskUpdateOne) AddMetrics ¶
func (tuo *TaskUpdateOne) AddMetrics(m ...*Metric) *TaskUpdateOne
AddMetrics adds the "metrics" edges to the Metric entity.
func (*TaskUpdateOne) AddTagIDs ¶
func (tuo *TaskUpdateOne) AddTagIDs(ids ...int) *TaskUpdateOne
AddTagIDs adds the "tags" edge to the TaskTag entity by IDs.
func (*TaskUpdateOne) AddTags ¶
func (tuo *TaskUpdateOne) AddTags(t ...*TaskTag) *TaskUpdateOne
AddTags adds the "tags" edges to the TaskTag entity.
func (*TaskUpdateOne) ClearArgs ¶
func (tuo *TaskUpdateOne) ClearArgs() *TaskUpdateOne
ClearArgs clears the value of the "args" field.
func (*TaskUpdateOne) ClearCategory ¶
func (tuo *TaskUpdateOne) ClearCategory() *TaskUpdateOne
ClearCategory clears the "category" edge to the TaskCategory entity.
func (*TaskUpdateOne) ClearDescription ¶
func (tuo *TaskUpdateOne) ClearDescription() *TaskUpdateOne
ClearDescription clears the value of the "description" field.
func (*TaskUpdateOne) ClearInstances ¶
func (tuo *TaskUpdateOne) ClearInstances() *TaskUpdateOne
ClearInstances clears all "instances" edges to the TaskInstance entity.
func (*TaskUpdateOne) ClearMetrics ¶
func (tuo *TaskUpdateOne) ClearMetrics() *TaskUpdateOne
ClearMetrics clears all "metrics" edges to the Metric entity.
func (*TaskUpdateOne) ClearSchedule ¶
func (tuo *TaskUpdateOne) ClearSchedule() *TaskUpdateOne
ClearSchedule clears the value of the "schedule" field.
func (*TaskUpdateOne) ClearTags ¶
func (tuo *TaskUpdateOne) ClearTags() *TaskUpdateOne
ClearTags clears all "tags" edges to the TaskTag entity.
func (*TaskUpdateOne) Exec ¶
func (tuo *TaskUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TaskUpdateOne) ExecX ¶
func (tuo *TaskUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskUpdateOne) Mutation ¶
func (tuo *TaskUpdateOne) Mutation() *TaskMutation
Mutation returns the TaskMutation object of the builder.
func (*TaskUpdateOne) RemoveInstanceIDs ¶
func (tuo *TaskUpdateOne) RemoveInstanceIDs(ids ...int) *TaskUpdateOne
RemoveInstanceIDs removes the "instances" edge to TaskInstance entities by IDs.
func (*TaskUpdateOne) RemoveInstances ¶
func (tuo *TaskUpdateOne) RemoveInstances(t ...*TaskInstance) *TaskUpdateOne
RemoveInstances removes "instances" edges to TaskInstance entities.
func (*TaskUpdateOne) RemoveMetricIDs ¶
func (tuo *TaskUpdateOne) RemoveMetricIDs(ids ...int) *TaskUpdateOne
RemoveMetricIDs removes the "metrics" edge to Metric entities by IDs.
func (*TaskUpdateOne) RemoveMetrics ¶
func (tuo *TaskUpdateOne) RemoveMetrics(m ...*Metric) *TaskUpdateOne
RemoveMetrics removes "metrics" edges to Metric entities.
func (*TaskUpdateOne) RemoveTagIDs ¶
func (tuo *TaskUpdateOne) RemoveTagIDs(ids ...int) *TaskUpdateOne
RemoveTagIDs removes the "tags" edge to TaskTag entities by IDs.
func (*TaskUpdateOne) RemoveTags ¶
func (tuo *TaskUpdateOne) RemoveTags(t ...*TaskTag) *TaskUpdateOne
RemoveTags removes "tags" edges to TaskTag entities.
func (*TaskUpdateOne) Save ¶
func (tuo *TaskUpdateOne) Save(ctx context.Context) (*Task, error)
Save executes the query and returns the updated Task entity.
func (*TaskUpdateOne) SaveX ¶
func (tuo *TaskUpdateOne) SaveX(ctx context.Context) *Task
SaveX is like Save, but panics if an error occurs.
func (*TaskUpdateOne) Select ¶
func (tuo *TaskUpdateOne) Select(field string, fields ...string) *TaskUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TaskUpdateOne) SetActive ¶
func (tuo *TaskUpdateOne) SetActive(b bool) *TaskUpdateOne
SetActive sets the "active" field.
func (*TaskUpdateOne) SetArgs ¶
func (tuo *TaskUpdateOne) SetArgs(m map[string]interface{}) *TaskUpdateOne
SetArgs sets the "args" field.
func (*TaskUpdateOne) SetCategory ¶
func (tuo *TaskUpdateOne) SetCategory(t *TaskCategory) *TaskUpdateOne
SetCategory sets the "category" edge to the TaskCategory entity.
func (*TaskUpdateOne) SetCategoryID ¶
func (tuo *TaskUpdateOne) SetCategoryID(id int) *TaskUpdateOne
SetCategoryID sets the "category" edge to the TaskCategory entity by ID.
func (*TaskUpdateOne) SetDescription ¶
func (tuo *TaskUpdateOne) SetDescription(s string) *TaskUpdateOne
SetDescription sets the "description" field.
func (*TaskUpdateOne) SetDisplay ¶
func (tuo *TaskUpdateOne) SetDisplay(b bool) *TaskUpdateOne
SetDisplay sets the "display" field.
func (*TaskUpdateOne) SetNillableActive ¶
func (tuo *TaskUpdateOne) SetNillableActive(b *bool) *TaskUpdateOne
SetNillableActive sets the "active" field if the given value is not nil.
func (*TaskUpdateOne) SetNillableDescription ¶
func (tuo *TaskUpdateOne) SetNillableDescription(s *string) *TaskUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*TaskUpdateOne) SetNillableDisplay ¶
func (tuo *TaskUpdateOne) SetNillableDisplay(b *bool) *TaskUpdateOne
SetNillableDisplay sets the "display" field if the given value is not nil.
func (*TaskUpdateOne) SetNillableSchedule ¶
func (tuo *TaskUpdateOne) SetNillableSchedule(s *string) *TaskUpdateOne
SetNillableSchedule sets the "schedule" field if the given value is not nil.
func (*TaskUpdateOne) SetSchedule ¶
func (tuo *TaskUpdateOne) SetSchedule(s string) *TaskUpdateOne
SetSchedule sets the "schedule" field.
func (*TaskUpdateOne) SetTitle ¶
func (tuo *TaskUpdateOne) SetTitle(s string) *TaskUpdateOne
SetTitle sets the "title" field.
func (*TaskUpdateOne) SetUpdateTime ¶
func (tuo *TaskUpdateOne) SetUpdateTime(t time.Time) *TaskUpdateOne
SetUpdateTime sets the "update_time" field.
type Tx ¶
type Tx struct { // Dimension is the client for interacting with the Dimension builders. Dimension *DimensionClient // Item is the client for interacting with the Item builders. Item *ItemClient // Metric is the client for interacting with the Metric builders. Metric *MetricClient // Task is the client for interacting with the Task builders. Task *TaskClient // TaskCategory is the client for interacting with the TaskCategory builders. TaskCategory *TaskCategoryClient // TaskInstance is the client for interacting with the TaskInstance builders. TaskInstance *TaskInstanceClient // TaskTag is the client for interacting with the TaskTag builders. TaskTag *TaskTagClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files
¶
- client.go
- config.go
- context.go
- dimension.go
- dimension_create.go
- dimension_delete.go
- dimension_query.go
- dimension_update.go
- ent.go
- generate.go
- item.go
- item_create.go
- item_delete.go
- item_query.go
- item_update.go
- metric.go
- metric_create.go
- metric_delete.go
- metric_query.go
- metric_update.go
- mutation.go
- runtime.go
- task.go
- task_create.go
- task_delete.go
- task_query.go
- task_update.go
- taskcategory.go
- taskcategory_create.go
- taskcategory_delete.go
- taskcategory_query.go
- taskcategory_update.go
- taskinstance.go
- taskinstance_create.go
- taskinstance_delete.go
- taskinstance_query.go
- taskinstance_update.go
- tasktag.go
- tasktag_create.go
- tasktag_delete.go
- tasktag_query.go
- tasktag_update.go
- tx.go