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 Anomalies
- type Anomaly
- type AnomalyClient
- func (c *AnomalyClient) Create() *AnomalyCreate
- func (c *AnomalyClient) CreateBulk(builders ...*AnomalyCreate) *AnomalyCreateBulk
- func (c *AnomalyClient) Delete() *AnomalyDelete
- func (c *AnomalyClient) DeleteOne(a *Anomaly) *AnomalyDeleteOne
- func (c *AnomalyClient) DeleteOneID(id int) *AnomalyDeleteOne
- func (c *AnomalyClient) Get(ctx context.Context, id int) (*Anomaly, error)
- func (c *AnomalyClient) GetX(ctx context.Context, id int) *Anomaly
- func (c *AnomalyClient) Hooks() []Hook
- func (c *AnomalyClient) Query() *AnomalyQuery
- func (c *AnomalyClient) QueryDetectionJobInstance(a *Anomaly) *DetectionJobInstanceQuery
- func (c *AnomalyClient) Update() *AnomalyUpdate
- func (c *AnomalyClient) UpdateOne(a *Anomaly) *AnomalyUpdateOne
- func (c *AnomalyClient) UpdateOneID(id int) *AnomalyUpdateOne
- func (c *AnomalyClient) Use(hooks ...Hook)
- type AnomalyCreate
- func (ac *AnomalyCreate) Mutation() *AnomalyMutation
- func (ac *AnomalyCreate) Save(ctx context.Context) (*Anomaly, error)
- func (ac *AnomalyCreate) SaveX(ctx context.Context) *Anomaly
- func (ac *AnomalyCreate) SetCreateTime(t time.Time) *AnomalyCreate
- func (ac *AnomalyCreate) SetDetectionJobInstance(d *DetectionJobInstance) *AnomalyCreate
- func (ac *AnomalyCreate) SetDetectionJobInstanceID(id int) *AnomalyCreate
- func (ac *AnomalyCreate) SetNillableCreateTime(t *time.Time) *AnomalyCreate
- func (ac *AnomalyCreate) SetNillableProcessed(b *bool) *AnomalyCreate
- func (ac *AnomalyCreate) SetNillableUpdateTime(t *time.Time) *AnomalyCreate
- func (ac *AnomalyCreate) SetPeriodEnd(t time.Time) *AnomalyCreate
- func (ac *AnomalyCreate) SetPeriodStart(t time.Time) *AnomalyCreate
- func (ac *AnomalyCreate) SetProcessed(b bool) *AnomalyCreate
- func (ac *AnomalyCreate) SetType(s string) *AnomalyCreate
- func (ac *AnomalyCreate) SetUpdateTime(t time.Time) *AnomalyCreate
- func (ac *AnomalyCreate) SetValue(f float64) *AnomalyCreate
- type AnomalyCreateBulk
- type AnomalyDelete
- type AnomalyDeleteOne
- type AnomalyEdges
- type AnomalyGroupBy
- func (agb *AnomalyGroupBy) Aggregate(fns ...AggregateFunc) *AnomalyGroupBy
- func (agb *AnomalyGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (agb *AnomalyGroupBy) BoolX(ctx context.Context) bool
- func (agb *AnomalyGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (agb *AnomalyGroupBy) BoolsX(ctx context.Context) []bool
- func (agb *AnomalyGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (agb *AnomalyGroupBy) Float64X(ctx context.Context) float64
- func (agb *AnomalyGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (agb *AnomalyGroupBy) Float64sX(ctx context.Context) []float64
- func (agb *AnomalyGroupBy) Int(ctx context.Context) (_ int, err error)
- func (agb *AnomalyGroupBy) IntX(ctx context.Context) int
- func (agb *AnomalyGroupBy) Ints(ctx context.Context) ([]int, error)
- func (agb *AnomalyGroupBy) IntsX(ctx context.Context) []int
- func (agb *AnomalyGroupBy) Scan(ctx context.Context, v interface{}) error
- func (agb *AnomalyGroupBy) ScanX(ctx context.Context, v interface{})
- func (agb *AnomalyGroupBy) String(ctx context.Context) (_ string, err error)
- func (agb *AnomalyGroupBy) StringX(ctx context.Context) string
- func (agb *AnomalyGroupBy) Strings(ctx context.Context) ([]string, error)
- func (agb *AnomalyGroupBy) StringsX(ctx context.Context) []string
- type AnomalyMutation
- func (m *AnomalyMutation) AddField(name string, value ent.Value) error
- func (m *AnomalyMutation) AddValue(f float64)
- func (m *AnomalyMutation) AddedEdges() []string
- func (m *AnomalyMutation) AddedField(name string) (ent.Value, bool)
- func (m *AnomalyMutation) AddedFields() []string
- func (m *AnomalyMutation) AddedIDs(name string) []ent.Value
- func (m *AnomalyMutation) AddedValue() (r float64, exists bool)
- func (m *AnomalyMutation) ClearDetectionJobInstance()
- func (m *AnomalyMutation) ClearEdge(name string) error
- func (m *AnomalyMutation) ClearField(name string) error
- func (m *AnomalyMutation) ClearedEdges() []string
- func (m *AnomalyMutation) ClearedFields() []string
- func (m AnomalyMutation) Client() *Client
- func (m *AnomalyMutation) CreateTime() (r time.Time, exists bool)
- func (m *AnomalyMutation) DetectionJobInstanceCleared() bool
- func (m *AnomalyMutation) DetectionJobInstanceID() (id int, exists bool)
- func (m *AnomalyMutation) DetectionJobInstanceIDs() (ids []int)
- func (m *AnomalyMutation) EdgeCleared(name string) bool
- func (m *AnomalyMutation) Field(name string) (ent.Value, bool)
- func (m *AnomalyMutation) FieldCleared(name string) bool
- func (m *AnomalyMutation) Fields() []string
- func (m *AnomalyMutation) GetType() (r string, exists bool)
- func (m *AnomalyMutation) ID() (id int, exists bool)
- func (m *AnomalyMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *AnomalyMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AnomalyMutation) OldPeriodEnd(ctx context.Context) (v time.Time, err error)
- func (m *AnomalyMutation) OldPeriodStart(ctx context.Context) (v time.Time, err error)
- func (m *AnomalyMutation) OldProcessed(ctx context.Context) (v bool, err error)
- func (m *AnomalyMutation) OldType(ctx context.Context) (v string, err error)
- func (m *AnomalyMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *AnomalyMutation) OldValue(ctx context.Context) (v float64, err error)
- func (m *AnomalyMutation) Op() Op
- func (m *AnomalyMutation) PeriodEnd() (r time.Time, exists bool)
- func (m *AnomalyMutation) PeriodStart() (r time.Time, exists bool)
- func (m *AnomalyMutation) Processed() (r bool, exists bool)
- func (m *AnomalyMutation) RemovedEdges() []string
- func (m *AnomalyMutation) RemovedIDs(name string) []ent.Value
- func (m *AnomalyMutation) ResetCreateTime()
- func (m *AnomalyMutation) ResetDetectionJobInstance()
- func (m *AnomalyMutation) ResetEdge(name string) error
- func (m *AnomalyMutation) ResetField(name string) error
- func (m *AnomalyMutation) ResetPeriodEnd()
- func (m *AnomalyMutation) ResetPeriodStart()
- func (m *AnomalyMutation) ResetProcessed()
- func (m *AnomalyMutation) ResetType()
- func (m *AnomalyMutation) ResetUpdateTime()
- func (m *AnomalyMutation) ResetValue()
- func (m *AnomalyMutation) SetCreateTime(t time.Time)
- func (m *AnomalyMutation) SetDetectionJobInstanceID(id int)
- func (m *AnomalyMutation) SetField(name string, value ent.Value) error
- func (m *AnomalyMutation) SetPeriodEnd(t time.Time)
- func (m *AnomalyMutation) SetPeriodStart(t time.Time)
- func (m *AnomalyMutation) SetProcessed(b bool)
- func (m *AnomalyMutation) SetType(s string)
- func (m *AnomalyMutation) SetUpdateTime(t time.Time)
- func (m *AnomalyMutation) SetValue(f float64)
- func (m AnomalyMutation) Tx() (*Tx, error)
- func (m *AnomalyMutation) Type() string
- func (m *AnomalyMutation) UpdateTime() (r time.Time, exists bool)
- func (m *AnomalyMutation) Value() (r float64, exists bool)
- type AnomalyQuery
- func (aq *AnomalyQuery) All(ctx context.Context) ([]*Anomaly, error)
- func (aq *AnomalyQuery) AllX(ctx context.Context) []*Anomaly
- func (aq *AnomalyQuery) Clone() *AnomalyQuery
- func (aq *AnomalyQuery) Count(ctx context.Context) (int, error)
- func (aq *AnomalyQuery) CountX(ctx context.Context) int
- func (aq *AnomalyQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AnomalyQuery) ExistX(ctx context.Context) bool
- func (aq *AnomalyQuery) First(ctx context.Context) (*Anomaly, error)
- func (aq *AnomalyQuery) FirstID(ctx context.Context) (id int, err error)
- func (aq *AnomalyQuery) FirstIDX(ctx context.Context) int
- func (aq *AnomalyQuery) FirstX(ctx context.Context) *Anomaly
- func (aq *AnomalyQuery) GroupBy(field string, fields ...string) *AnomalyGroupBy
- func (aq *AnomalyQuery) IDs(ctx context.Context) ([]int, error)
- func (aq *AnomalyQuery) IDsX(ctx context.Context) []int
- func (aq *AnomalyQuery) Limit(limit int) *AnomalyQuery
- func (aq *AnomalyQuery) Offset(offset int) *AnomalyQuery
- func (aq *AnomalyQuery) Only(ctx context.Context) (*Anomaly, error)
- func (aq *AnomalyQuery) OnlyID(ctx context.Context) (id int, err error)
- func (aq *AnomalyQuery) OnlyIDX(ctx context.Context) int
- func (aq *AnomalyQuery) OnlyX(ctx context.Context) *Anomaly
- func (aq *AnomalyQuery) Order(o ...OrderFunc) *AnomalyQuery
- func (aq *AnomalyQuery) QueryDetectionJobInstance() *DetectionJobInstanceQuery
- func (aq *AnomalyQuery) Select(field string, fields ...string) *AnomalySelect
- func (aq *AnomalyQuery) Where(ps ...predicate.Anomaly) *AnomalyQuery
- func (aq *AnomalyQuery) WithDetectionJobInstance(opts ...func(*DetectionJobInstanceQuery)) *AnomalyQuery
- type AnomalySelect
- func (as *AnomalySelect) Bool(ctx context.Context) (_ bool, err error)
- func (as *AnomalySelect) BoolX(ctx context.Context) bool
- func (as *AnomalySelect) Bools(ctx context.Context) ([]bool, error)
- func (as *AnomalySelect) BoolsX(ctx context.Context) []bool
- func (as *AnomalySelect) Float64(ctx context.Context) (_ float64, err error)
- func (as *AnomalySelect) Float64X(ctx context.Context) float64
- func (as *AnomalySelect) Float64s(ctx context.Context) ([]float64, error)
- func (as *AnomalySelect) Float64sX(ctx context.Context) []float64
- func (as *AnomalySelect) Int(ctx context.Context) (_ int, err error)
- func (as *AnomalySelect) IntX(ctx context.Context) int
- func (as *AnomalySelect) Ints(ctx context.Context) ([]int, error)
- func (as *AnomalySelect) IntsX(ctx context.Context) []int
- func (as *AnomalySelect) Scan(ctx context.Context, v interface{}) error
- func (as *AnomalySelect) ScanX(ctx context.Context, v interface{})
- func (as *AnomalySelect) String(ctx context.Context) (_ string, err error)
- func (as *AnomalySelect) StringX(ctx context.Context) string
- func (as *AnomalySelect) Strings(ctx context.Context) ([]string, error)
- func (as *AnomalySelect) StringsX(ctx context.Context) []string
- type AnomalyUpdate
- func (au *AnomalyUpdate) AddValue(f float64) *AnomalyUpdate
- func (au *AnomalyUpdate) ClearDetectionJobInstance() *AnomalyUpdate
- func (au *AnomalyUpdate) Exec(ctx context.Context) error
- func (au *AnomalyUpdate) ExecX(ctx context.Context)
- func (au *AnomalyUpdate) Mutation() *AnomalyMutation
- func (au *AnomalyUpdate) Save(ctx context.Context) (int, error)
- func (au *AnomalyUpdate) SaveX(ctx context.Context) int
- func (au *AnomalyUpdate) SetDetectionJobInstance(d *DetectionJobInstance) *AnomalyUpdate
- func (au *AnomalyUpdate) SetDetectionJobInstanceID(id int) *AnomalyUpdate
- func (au *AnomalyUpdate) SetNillableProcessed(b *bool) *AnomalyUpdate
- func (au *AnomalyUpdate) SetPeriodEnd(t time.Time) *AnomalyUpdate
- func (au *AnomalyUpdate) SetPeriodStart(t time.Time) *AnomalyUpdate
- func (au *AnomalyUpdate) SetProcessed(b bool) *AnomalyUpdate
- func (au *AnomalyUpdate) SetType(s string) *AnomalyUpdate
- func (au *AnomalyUpdate) SetValue(f float64) *AnomalyUpdate
- func (au *AnomalyUpdate) Where(ps ...predicate.Anomaly) *AnomalyUpdate
- type AnomalyUpdateOne
- func (auo *AnomalyUpdateOne) AddValue(f float64) *AnomalyUpdateOne
- func (auo *AnomalyUpdateOne) ClearDetectionJobInstance() *AnomalyUpdateOne
- func (auo *AnomalyUpdateOne) Exec(ctx context.Context) error
- func (auo *AnomalyUpdateOne) ExecX(ctx context.Context)
- func (auo *AnomalyUpdateOne) Mutation() *AnomalyMutation
- func (auo *AnomalyUpdateOne) Save(ctx context.Context) (*Anomaly, error)
- func (auo *AnomalyUpdateOne) SaveX(ctx context.Context) *Anomaly
- func (auo *AnomalyUpdateOne) SetDetectionJobInstance(d *DetectionJobInstance) *AnomalyUpdateOne
- func (auo *AnomalyUpdateOne) SetDetectionJobInstanceID(id int) *AnomalyUpdateOne
- func (auo *AnomalyUpdateOne) SetNillableProcessed(b *bool) *AnomalyUpdateOne
- func (auo *AnomalyUpdateOne) SetPeriodEnd(t time.Time) *AnomalyUpdateOne
- func (auo *AnomalyUpdateOne) SetPeriodStart(t time.Time) *AnomalyUpdateOne
- func (auo *AnomalyUpdateOne) SetProcessed(b bool) *AnomalyUpdateOne
- func (auo *AnomalyUpdateOne) SetType(s string) *AnomalyUpdateOne
- func (auo *AnomalyUpdateOne) SetValue(f float64) *AnomalyUpdateOne
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type DetectionJob
- type DetectionJobClient
- func (c *DetectionJobClient) Create() *DetectionJobCreate
- func (c *DetectionJobClient) CreateBulk(builders ...*DetectionJobCreate) *DetectionJobCreateBulk
- func (c *DetectionJobClient) Delete() *DetectionJobDelete
- func (c *DetectionJobClient) DeleteOne(dj *DetectionJob) *DetectionJobDeleteOne
- func (c *DetectionJobClient) DeleteOneID(id int) *DetectionJobDeleteOne
- func (c *DetectionJobClient) Get(ctx context.Context, id int) (*DetectionJob, error)
- func (c *DetectionJobClient) GetX(ctx context.Context, id int) *DetectionJob
- func (c *DetectionJobClient) Hooks() []Hook
- func (c *DetectionJobClient) Query() *DetectionJobQuery
- func (c *DetectionJobClient) QueryInstance(dj *DetectionJob) *DetectionJobInstanceQuery
- func (c *DetectionJobClient) Update() *DetectionJobUpdate
- func (c *DetectionJobClient) UpdateOne(dj *DetectionJob) *DetectionJobUpdateOne
- func (c *DetectionJobClient) UpdateOneID(id int) *DetectionJobUpdateOne
- func (c *DetectionJobClient) Use(hooks ...Hook)
- type DetectionJobCreate
- func (djc *DetectionJobCreate) AddInstance(d ...*DetectionJobInstance) *DetectionJobCreate
- func (djc *DetectionJobCreate) AddInstanceIDs(ids ...int) *DetectionJobCreate
- func (djc *DetectionJobCreate) Mutation() *DetectionJobMutation
- func (djc *DetectionJobCreate) Save(ctx context.Context) (*DetectionJob, error)
- func (djc *DetectionJobCreate) SaveX(ctx context.Context) *DetectionJob
- func (djc *DetectionJobCreate) SetAttribute(s string) *DetectionJobCreate
- func (djc *DetectionJobCreate) SetCreateTime(t time.Time) *DetectionJobCreate
- func (djc *DetectionJobCreate) SetDescription(s string) *DetectionJobCreate
- func (djc *DetectionJobCreate) SetMethod(s string) *DetectionJobCreate
- func (djc *DetectionJobCreate) SetMetric(s string) *DetectionJobCreate
- func (djc *DetectionJobCreate) SetNillableCreateTime(t *time.Time) *DetectionJobCreate
- func (djc *DetectionJobCreate) SetNillableDescription(s *string) *DetectionJobCreate
- func (djc *DetectionJobCreate) SetNillableSchedule(s *string) *DetectionJobCreate
- func (djc *DetectionJobCreate) SetNillableUpdateTime(t *time.Time) *DetectionJobCreate
- func (djc *DetectionJobCreate) SetSchedule(s string) *DetectionJobCreate
- func (djc *DetectionJobCreate) SetSiteID(s string) *DetectionJobCreate
- func (djc *DetectionJobCreate) SetTimeAgo(s string) *DetectionJobCreate
- func (djc *DetectionJobCreate) SetTimeStep(s string) *DetectionJobCreate
- func (djc *DetectionJobCreate) SetUpdateTime(t time.Time) *DetectionJobCreate
- type DetectionJobCreateBulk
- type DetectionJobDelete
- type DetectionJobDeleteOne
- type DetectionJobEdges
- type DetectionJobGroupBy
- func (djgb *DetectionJobGroupBy) Aggregate(fns ...AggregateFunc) *DetectionJobGroupBy
- func (djgb *DetectionJobGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (djgb *DetectionJobGroupBy) BoolX(ctx context.Context) bool
- func (djgb *DetectionJobGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (djgb *DetectionJobGroupBy) BoolsX(ctx context.Context) []bool
- func (djgb *DetectionJobGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (djgb *DetectionJobGroupBy) Float64X(ctx context.Context) float64
- func (djgb *DetectionJobGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (djgb *DetectionJobGroupBy) Float64sX(ctx context.Context) []float64
- func (djgb *DetectionJobGroupBy) Int(ctx context.Context) (_ int, err error)
- func (djgb *DetectionJobGroupBy) IntX(ctx context.Context) int
- func (djgb *DetectionJobGroupBy) Ints(ctx context.Context) ([]int, error)
- func (djgb *DetectionJobGroupBy) IntsX(ctx context.Context) []int
- func (djgb *DetectionJobGroupBy) Scan(ctx context.Context, v interface{}) error
- func (djgb *DetectionJobGroupBy) ScanX(ctx context.Context, v interface{})
- func (djgb *DetectionJobGroupBy) String(ctx context.Context) (_ string, err error)
- func (djgb *DetectionJobGroupBy) StringX(ctx context.Context) string
- func (djgb *DetectionJobGroupBy) Strings(ctx context.Context) ([]string, error)
- func (djgb *DetectionJobGroupBy) StringsX(ctx context.Context) []string
- type DetectionJobInstance
- func (dji *DetectionJobInstance) QueryAnomalies() *AnomalyQuery
- func (dji *DetectionJobInstance) QueryDetectionJob() *DetectionJobQuery
- func (dji *DetectionJobInstance) String() string
- func (dji *DetectionJobInstance) Unwrap() *DetectionJobInstance
- func (dji *DetectionJobInstance) Update() *DetectionJobInstanceUpdateOne
- type DetectionJobInstanceClient
- func (c *DetectionJobInstanceClient) Create() *DetectionJobInstanceCreate
- func (c *DetectionJobInstanceClient) CreateBulk(builders ...*DetectionJobInstanceCreate) *DetectionJobInstanceCreateBulk
- func (c *DetectionJobInstanceClient) Delete() *DetectionJobInstanceDelete
- func (c *DetectionJobInstanceClient) DeleteOne(dji *DetectionJobInstance) *DetectionJobInstanceDeleteOne
- func (c *DetectionJobInstanceClient) DeleteOneID(id int) *DetectionJobInstanceDeleteOne
- func (c *DetectionJobInstanceClient) Get(ctx context.Context, id int) (*DetectionJobInstance, error)
- func (c *DetectionJobInstanceClient) GetX(ctx context.Context, id int) *DetectionJobInstance
- func (c *DetectionJobInstanceClient) Hooks() []Hook
- func (c *DetectionJobInstanceClient) Query() *DetectionJobInstanceQuery
- func (c *DetectionJobInstanceClient) QueryAnomalies(dji *DetectionJobInstance) *AnomalyQuery
- func (c *DetectionJobInstanceClient) QueryDetectionJob(dji *DetectionJobInstance) *DetectionJobQuery
- func (c *DetectionJobInstanceClient) Update() *DetectionJobInstanceUpdate
- func (c *DetectionJobInstanceClient) UpdateOne(dji *DetectionJobInstance) *DetectionJobInstanceUpdateOne
- func (c *DetectionJobInstanceClient) UpdateOneID(id int) *DetectionJobInstanceUpdateOne
- func (c *DetectionJobInstanceClient) Use(hooks ...Hook)
- type DetectionJobInstanceCreate
- func (djic *DetectionJobInstanceCreate) AddAnomalies(a ...*Anomaly) *DetectionJobInstanceCreate
- func (djic *DetectionJobInstanceCreate) AddAnomalyIDs(ids ...int) *DetectionJobInstanceCreate
- func (djic *DetectionJobInstanceCreate) Mutation() *DetectionJobInstanceMutation
- func (djic *DetectionJobInstanceCreate) Save(ctx context.Context) (*DetectionJobInstance, error)
- func (djic *DetectionJobInstanceCreate) SaveX(ctx context.Context) *DetectionJobInstance
- func (djic *DetectionJobInstanceCreate) SetCreateTime(t time.Time) *DetectionJobInstanceCreate
- func (djic *DetectionJobInstanceCreate) SetDetectionJob(d *DetectionJob) *DetectionJobInstanceCreate
- func (djic *DetectionJobInstanceCreate) SetDetectionJobID(id int) *DetectionJobInstanceCreate
- func (djic *DetectionJobInstanceCreate) SetFinishedAt(t time.Time) *DetectionJobInstanceCreate
- func (djic *DetectionJobInstanceCreate) SetNillableCreateTime(t *time.Time) *DetectionJobInstanceCreate
- func (djic *DetectionJobInstanceCreate) SetNillableFinishedAt(t *time.Time) *DetectionJobInstanceCreate
- func (djic *DetectionJobInstanceCreate) SetNillableStartedAt(t *time.Time) *DetectionJobInstanceCreate
- func (djic *DetectionJobInstanceCreate) SetNillableUpdateTime(t *time.Time) *DetectionJobInstanceCreate
- func (djic *DetectionJobInstanceCreate) SetStartedAt(t time.Time) *DetectionJobInstanceCreate
- func (djic *DetectionJobInstanceCreate) SetUpdateTime(t time.Time) *DetectionJobInstanceCreate
- type DetectionJobInstanceCreateBulk
- type DetectionJobInstanceDelete
- type DetectionJobInstanceDeleteOne
- type DetectionJobInstanceEdges
- type DetectionJobInstanceGroupBy
- func (djigb *DetectionJobInstanceGroupBy) Aggregate(fns ...AggregateFunc) *DetectionJobInstanceGroupBy
- func (djigb *DetectionJobInstanceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (djigb *DetectionJobInstanceGroupBy) BoolX(ctx context.Context) bool
- func (djigb *DetectionJobInstanceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (djigb *DetectionJobInstanceGroupBy) BoolsX(ctx context.Context) []bool
- func (djigb *DetectionJobInstanceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (djigb *DetectionJobInstanceGroupBy) Float64X(ctx context.Context) float64
- func (djigb *DetectionJobInstanceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (djigb *DetectionJobInstanceGroupBy) Float64sX(ctx context.Context) []float64
- func (djigb *DetectionJobInstanceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (djigb *DetectionJobInstanceGroupBy) IntX(ctx context.Context) int
- func (djigb *DetectionJobInstanceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (djigb *DetectionJobInstanceGroupBy) IntsX(ctx context.Context) []int
- func (djigb *DetectionJobInstanceGroupBy) Scan(ctx context.Context, v interface{}) error
- func (djigb *DetectionJobInstanceGroupBy) ScanX(ctx context.Context, v interface{})
- func (djigb *DetectionJobInstanceGroupBy) String(ctx context.Context) (_ string, err error)
- func (djigb *DetectionJobInstanceGroupBy) StringX(ctx context.Context) string
- func (djigb *DetectionJobInstanceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (djigb *DetectionJobInstanceGroupBy) StringsX(ctx context.Context) []string
- type DetectionJobInstanceMutation
- func (m *DetectionJobInstanceMutation) AddAnomalyIDs(ids ...int)
- func (m *DetectionJobInstanceMutation) AddField(name string, value ent.Value) error
- func (m *DetectionJobInstanceMutation) AddedEdges() []string
- func (m *DetectionJobInstanceMutation) AddedField(name string) (ent.Value, bool)
- func (m *DetectionJobInstanceMutation) AddedFields() []string
- func (m *DetectionJobInstanceMutation) AddedIDs(name string) []ent.Value
- func (m *DetectionJobInstanceMutation) AnomaliesCleared() bool
- func (m *DetectionJobInstanceMutation) AnomaliesIDs() (ids []int)
- func (m *DetectionJobInstanceMutation) ClearAnomalies()
- func (m *DetectionJobInstanceMutation) ClearDetectionJob()
- func (m *DetectionJobInstanceMutation) ClearEdge(name string) error
- func (m *DetectionJobInstanceMutation) ClearField(name string) error
- func (m *DetectionJobInstanceMutation) ClearFinishedAt()
- func (m *DetectionJobInstanceMutation) ClearStartedAt()
- func (m *DetectionJobInstanceMutation) ClearedEdges() []string
- func (m *DetectionJobInstanceMutation) ClearedFields() []string
- func (m DetectionJobInstanceMutation) Client() *Client
- func (m *DetectionJobInstanceMutation) CreateTime() (r time.Time, exists bool)
- func (m *DetectionJobInstanceMutation) DetectionJobCleared() bool
- func (m *DetectionJobInstanceMutation) DetectionJobID() (id int, exists bool)
- func (m *DetectionJobInstanceMutation) DetectionJobIDs() (ids []int)
- func (m *DetectionJobInstanceMutation) EdgeCleared(name string) bool
- func (m *DetectionJobInstanceMutation) Field(name string) (ent.Value, bool)
- func (m *DetectionJobInstanceMutation) FieldCleared(name string) bool
- func (m *DetectionJobInstanceMutation) Fields() []string
- func (m *DetectionJobInstanceMutation) FinishedAt() (r time.Time, exists bool)
- func (m *DetectionJobInstanceMutation) FinishedAtCleared() bool
- func (m *DetectionJobInstanceMutation) ID() (id int, exists bool)
- func (m *DetectionJobInstanceMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *DetectionJobInstanceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DetectionJobInstanceMutation) OldFinishedAt(ctx context.Context) (v *time.Time, err error)
- func (m *DetectionJobInstanceMutation) OldStartedAt(ctx context.Context) (v *time.Time, err error)
- func (m *DetectionJobInstanceMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *DetectionJobInstanceMutation) Op() Op
- func (m *DetectionJobInstanceMutation) RemoveAnomalyIDs(ids ...int)
- func (m *DetectionJobInstanceMutation) RemovedAnomaliesIDs() (ids []int)
- func (m *DetectionJobInstanceMutation) RemovedEdges() []string
- func (m *DetectionJobInstanceMutation) RemovedIDs(name string) []ent.Value
- func (m *DetectionJobInstanceMutation) ResetAnomalies()
- func (m *DetectionJobInstanceMutation) ResetCreateTime()
- func (m *DetectionJobInstanceMutation) ResetDetectionJob()
- func (m *DetectionJobInstanceMutation) ResetEdge(name string) error
- func (m *DetectionJobInstanceMutation) ResetField(name string) error
- func (m *DetectionJobInstanceMutation) ResetFinishedAt()
- func (m *DetectionJobInstanceMutation) ResetStartedAt()
- func (m *DetectionJobInstanceMutation) ResetUpdateTime()
- func (m *DetectionJobInstanceMutation) SetCreateTime(t time.Time)
- func (m *DetectionJobInstanceMutation) SetDetectionJobID(id int)
- func (m *DetectionJobInstanceMutation) SetField(name string, value ent.Value) error
- func (m *DetectionJobInstanceMutation) SetFinishedAt(t time.Time)
- func (m *DetectionJobInstanceMutation) SetStartedAt(t time.Time)
- func (m *DetectionJobInstanceMutation) SetUpdateTime(t time.Time)
- func (m *DetectionJobInstanceMutation) StartedAt() (r time.Time, exists bool)
- func (m *DetectionJobInstanceMutation) StartedAtCleared() bool
- func (m DetectionJobInstanceMutation) Tx() (*Tx, error)
- func (m *DetectionJobInstanceMutation) Type() string
- func (m *DetectionJobInstanceMutation) UpdateTime() (r time.Time, exists bool)
- type DetectionJobInstanceQuery
- func (djiq *DetectionJobInstanceQuery) All(ctx context.Context) ([]*DetectionJobInstance, error)
- func (djiq *DetectionJobInstanceQuery) AllX(ctx context.Context) []*DetectionJobInstance
- func (djiq *DetectionJobInstanceQuery) Clone() *DetectionJobInstanceQuery
- func (djiq *DetectionJobInstanceQuery) Count(ctx context.Context) (int, error)
- func (djiq *DetectionJobInstanceQuery) CountX(ctx context.Context) int
- func (djiq *DetectionJobInstanceQuery) Exist(ctx context.Context) (bool, error)
- func (djiq *DetectionJobInstanceQuery) ExistX(ctx context.Context) bool
- func (djiq *DetectionJobInstanceQuery) First(ctx context.Context) (*DetectionJobInstance, error)
- func (djiq *DetectionJobInstanceQuery) FirstID(ctx context.Context) (id int, err error)
- func (djiq *DetectionJobInstanceQuery) FirstIDX(ctx context.Context) int
- func (djiq *DetectionJobInstanceQuery) FirstX(ctx context.Context) *DetectionJobInstance
- func (djiq *DetectionJobInstanceQuery) GroupBy(field string, fields ...string) *DetectionJobInstanceGroupBy
- func (djiq *DetectionJobInstanceQuery) IDs(ctx context.Context) ([]int, error)
- func (djiq *DetectionJobInstanceQuery) IDsX(ctx context.Context) []int
- func (djiq *DetectionJobInstanceQuery) Limit(limit int) *DetectionJobInstanceQuery
- func (djiq *DetectionJobInstanceQuery) Offset(offset int) *DetectionJobInstanceQuery
- func (djiq *DetectionJobInstanceQuery) Only(ctx context.Context) (*DetectionJobInstance, error)
- func (djiq *DetectionJobInstanceQuery) OnlyID(ctx context.Context) (id int, err error)
- func (djiq *DetectionJobInstanceQuery) OnlyIDX(ctx context.Context) int
- func (djiq *DetectionJobInstanceQuery) OnlyX(ctx context.Context) *DetectionJobInstance
- func (djiq *DetectionJobInstanceQuery) Order(o ...OrderFunc) *DetectionJobInstanceQuery
- func (djiq *DetectionJobInstanceQuery) QueryAnomalies() *AnomalyQuery
- func (djiq *DetectionJobInstanceQuery) QueryDetectionJob() *DetectionJobQuery
- func (djiq *DetectionJobInstanceQuery) Select(field string, fields ...string) *DetectionJobInstanceSelect
- func (djiq *DetectionJobInstanceQuery) Where(ps ...predicate.DetectionJobInstance) *DetectionJobInstanceQuery
- func (djiq *DetectionJobInstanceQuery) WithAnomalies(opts ...func(*AnomalyQuery)) *DetectionJobInstanceQuery
- func (djiq *DetectionJobInstanceQuery) WithDetectionJob(opts ...func(*DetectionJobQuery)) *DetectionJobInstanceQuery
- type DetectionJobInstanceSelect
- func (djis *DetectionJobInstanceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (djis *DetectionJobInstanceSelect) BoolX(ctx context.Context) bool
- func (djis *DetectionJobInstanceSelect) Bools(ctx context.Context) ([]bool, error)
- func (djis *DetectionJobInstanceSelect) BoolsX(ctx context.Context) []bool
- func (djis *DetectionJobInstanceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (djis *DetectionJobInstanceSelect) Float64X(ctx context.Context) float64
- func (djis *DetectionJobInstanceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (djis *DetectionJobInstanceSelect) Float64sX(ctx context.Context) []float64
- func (djis *DetectionJobInstanceSelect) Int(ctx context.Context) (_ int, err error)
- func (djis *DetectionJobInstanceSelect) IntX(ctx context.Context) int
- func (djis *DetectionJobInstanceSelect) Ints(ctx context.Context) ([]int, error)
- func (djis *DetectionJobInstanceSelect) IntsX(ctx context.Context) []int
- func (djis *DetectionJobInstanceSelect) Scan(ctx context.Context, v interface{}) error
- func (djis *DetectionJobInstanceSelect) ScanX(ctx context.Context, v interface{})
- func (djis *DetectionJobInstanceSelect) String(ctx context.Context) (_ string, err error)
- func (djis *DetectionJobInstanceSelect) StringX(ctx context.Context) string
- func (djis *DetectionJobInstanceSelect) Strings(ctx context.Context) ([]string, error)
- func (djis *DetectionJobInstanceSelect) StringsX(ctx context.Context) []string
- type DetectionJobInstanceUpdate
- func (djiu *DetectionJobInstanceUpdate) AddAnomalies(a ...*Anomaly) *DetectionJobInstanceUpdate
- func (djiu *DetectionJobInstanceUpdate) AddAnomalyIDs(ids ...int) *DetectionJobInstanceUpdate
- func (djiu *DetectionJobInstanceUpdate) ClearAnomalies() *DetectionJobInstanceUpdate
- func (djiu *DetectionJobInstanceUpdate) ClearDetectionJob() *DetectionJobInstanceUpdate
- func (djiu *DetectionJobInstanceUpdate) ClearFinishedAt() *DetectionJobInstanceUpdate
- func (djiu *DetectionJobInstanceUpdate) ClearStartedAt() *DetectionJobInstanceUpdate
- func (djiu *DetectionJobInstanceUpdate) Exec(ctx context.Context) error
- func (djiu *DetectionJobInstanceUpdate) ExecX(ctx context.Context)
- func (djiu *DetectionJobInstanceUpdate) Mutation() *DetectionJobInstanceMutation
- func (djiu *DetectionJobInstanceUpdate) RemoveAnomalies(a ...*Anomaly) *DetectionJobInstanceUpdate
- func (djiu *DetectionJobInstanceUpdate) RemoveAnomalyIDs(ids ...int) *DetectionJobInstanceUpdate
- func (djiu *DetectionJobInstanceUpdate) Save(ctx context.Context) (int, error)
- func (djiu *DetectionJobInstanceUpdate) SaveX(ctx context.Context) int
- func (djiu *DetectionJobInstanceUpdate) SetDetectionJob(d *DetectionJob) *DetectionJobInstanceUpdate
- func (djiu *DetectionJobInstanceUpdate) SetDetectionJobID(id int) *DetectionJobInstanceUpdate
- func (djiu *DetectionJobInstanceUpdate) SetFinishedAt(t time.Time) *DetectionJobInstanceUpdate
- func (djiu *DetectionJobInstanceUpdate) SetNillableFinishedAt(t *time.Time) *DetectionJobInstanceUpdate
- func (djiu *DetectionJobInstanceUpdate) SetNillableStartedAt(t *time.Time) *DetectionJobInstanceUpdate
- func (djiu *DetectionJobInstanceUpdate) SetStartedAt(t time.Time) *DetectionJobInstanceUpdate
- func (djiu *DetectionJobInstanceUpdate) Where(ps ...predicate.DetectionJobInstance) *DetectionJobInstanceUpdate
- type DetectionJobInstanceUpdateOne
- func (djiuo *DetectionJobInstanceUpdateOne) AddAnomalies(a ...*Anomaly) *DetectionJobInstanceUpdateOne
- func (djiuo *DetectionJobInstanceUpdateOne) AddAnomalyIDs(ids ...int) *DetectionJobInstanceUpdateOne
- func (djiuo *DetectionJobInstanceUpdateOne) ClearAnomalies() *DetectionJobInstanceUpdateOne
- func (djiuo *DetectionJobInstanceUpdateOne) ClearDetectionJob() *DetectionJobInstanceUpdateOne
- func (djiuo *DetectionJobInstanceUpdateOne) ClearFinishedAt() *DetectionJobInstanceUpdateOne
- func (djiuo *DetectionJobInstanceUpdateOne) ClearStartedAt() *DetectionJobInstanceUpdateOne
- func (djiuo *DetectionJobInstanceUpdateOne) Exec(ctx context.Context) error
- func (djiuo *DetectionJobInstanceUpdateOne) ExecX(ctx context.Context)
- func (djiuo *DetectionJobInstanceUpdateOne) Mutation() *DetectionJobInstanceMutation
- func (djiuo *DetectionJobInstanceUpdateOne) RemoveAnomalies(a ...*Anomaly) *DetectionJobInstanceUpdateOne
- func (djiuo *DetectionJobInstanceUpdateOne) RemoveAnomalyIDs(ids ...int) *DetectionJobInstanceUpdateOne
- func (djiuo *DetectionJobInstanceUpdateOne) Save(ctx context.Context) (*DetectionJobInstance, error)
- func (djiuo *DetectionJobInstanceUpdateOne) SaveX(ctx context.Context) *DetectionJobInstance
- func (djiuo *DetectionJobInstanceUpdateOne) SetDetectionJob(d *DetectionJob) *DetectionJobInstanceUpdateOne
- func (djiuo *DetectionJobInstanceUpdateOne) SetDetectionJobID(id int) *DetectionJobInstanceUpdateOne
- func (djiuo *DetectionJobInstanceUpdateOne) SetFinishedAt(t time.Time) *DetectionJobInstanceUpdateOne
- func (djiuo *DetectionJobInstanceUpdateOne) SetNillableFinishedAt(t *time.Time) *DetectionJobInstanceUpdateOne
- func (djiuo *DetectionJobInstanceUpdateOne) SetNillableStartedAt(t *time.Time) *DetectionJobInstanceUpdateOne
- func (djiuo *DetectionJobInstanceUpdateOne) SetStartedAt(t time.Time) *DetectionJobInstanceUpdateOne
- type DetectionJobInstances
- type DetectionJobMutation
- func (m *DetectionJobMutation) AddField(name string, value ent.Value) error
- func (m *DetectionJobMutation) AddInstanceIDs(ids ...int)
- func (m *DetectionJobMutation) AddedEdges() []string
- func (m *DetectionJobMutation) AddedField(name string) (ent.Value, bool)
- func (m *DetectionJobMutation) AddedFields() []string
- func (m *DetectionJobMutation) AddedIDs(name string) []ent.Value
- func (m *DetectionJobMutation) Attribute() (r string, exists bool)
- func (m *DetectionJobMutation) ClearDescription()
- func (m *DetectionJobMutation) ClearEdge(name string) error
- func (m *DetectionJobMutation) ClearField(name string) error
- func (m *DetectionJobMutation) ClearInstance()
- func (m *DetectionJobMutation) ClearSchedule()
- func (m *DetectionJobMutation) ClearedEdges() []string
- func (m *DetectionJobMutation) ClearedFields() []string
- func (m DetectionJobMutation) Client() *Client
- func (m *DetectionJobMutation) CreateTime() (r time.Time, exists bool)
- func (m *DetectionJobMutation) Description() (r string, exists bool)
- func (m *DetectionJobMutation) DescriptionCleared() bool
- func (m *DetectionJobMutation) EdgeCleared(name string) bool
- func (m *DetectionJobMutation) Field(name string) (ent.Value, bool)
- func (m *DetectionJobMutation) FieldCleared(name string) bool
- func (m *DetectionJobMutation) Fields() []string
- func (m *DetectionJobMutation) ID() (id int, exists bool)
- func (m *DetectionJobMutation) InstanceCleared() bool
- func (m *DetectionJobMutation) InstanceIDs() (ids []int)
- func (m *DetectionJobMutation) Method() (r string, exists bool)
- func (m *DetectionJobMutation) Metric() (r string, exists bool)
- func (m *DetectionJobMutation) OldAttribute(ctx context.Context) (v string, err error)
- func (m *DetectionJobMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *DetectionJobMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *DetectionJobMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DetectionJobMutation) OldMethod(ctx context.Context) (v string, err error)
- func (m *DetectionJobMutation) OldMetric(ctx context.Context) (v string, err error)
- func (m *DetectionJobMutation) OldSchedule(ctx context.Context) (v *string, err error)
- func (m *DetectionJobMutation) OldSiteID(ctx context.Context) (v string, err error)
- func (m *DetectionJobMutation) OldTimeAgo(ctx context.Context) (v string, err error)
- func (m *DetectionJobMutation) OldTimeStep(ctx context.Context) (v string, err error)
- func (m *DetectionJobMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *DetectionJobMutation) Op() Op
- func (m *DetectionJobMutation) RemoveInstanceIDs(ids ...int)
- func (m *DetectionJobMutation) RemovedEdges() []string
- func (m *DetectionJobMutation) RemovedIDs(name string) []ent.Value
- func (m *DetectionJobMutation) RemovedInstanceIDs() (ids []int)
- func (m *DetectionJobMutation) ResetAttribute()
- func (m *DetectionJobMutation) ResetCreateTime()
- func (m *DetectionJobMutation) ResetDescription()
- func (m *DetectionJobMutation) ResetEdge(name string) error
- func (m *DetectionJobMutation) ResetField(name string) error
- func (m *DetectionJobMutation) ResetInstance()
- func (m *DetectionJobMutation) ResetMethod()
- func (m *DetectionJobMutation) ResetMetric()
- func (m *DetectionJobMutation) ResetSchedule()
- func (m *DetectionJobMutation) ResetSiteID()
- func (m *DetectionJobMutation) ResetTimeAgo()
- func (m *DetectionJobMutation) ResetTimeStep()
- func (m *DetectionJobMutation) ResetUpdateTime()
- func (m *DetectionJobMutation) Schedule() (r string, exists bool)
- func (m *DetectionJobMutation) ScheduleCleared() bool
- func (m *DetectionJobMutation) SetAttribute(s string)
- func (m *DetectionJobMutation) SetCreateTime(t time.Time)
- func (m *DetectionJobMutation) SetDescription(s string)
- func (m *DetectionJobMutation) SetField(name string, value ent.Value) error
- func (m *DetectionJobMutation) SetMethod(s string)
- func (m *DetectionJobMutation) SetMetric(s string)
- func (m *DetectionJobMutation) SetSchedule(s string)
- func (m *DetectionJobMutation) SetSiteID(s string)
- func (m *DetectionJobMutation) SetTimeAgo(s string)
- func (m *DetectionJobMutation) SetTimeStep(s string)
- func (m *DetectionJobMutation) SetUpdateTime(t time.Time)
- func (m *DetectionJobMutation) SiteID() (r string, exists bool)
- func (m *DetectionJobMutation) TimeAgo() (r string, exists bool)
- func (m *DetectionJobMutation) TimeStep() (r string, exists bool)
- func (m DetectionJobMutation) Tx() (*Tx, error)
- func (m *DetectionJobMutation) Type() string
- func (m *DetectionJobMutation) UpdateTime() (r time.Time, exists bool)
- type DetectionJobQuery
- func (djq *DetectionJobQuery) All(ctx context.Context) ([]*DetectionJob, error)
- func (djq *DetectionJobQuery) AllX(ctx context.Context) []*DetectionJob
- func (djq *DetectionJobQuery) Clone() *DetectionJobQuery
- func (djq *DetectionJobQuery) Count(ctx context.Context) (int, error)
- func (djq *DetectionJobQuery) CountX(ctx context.Context) int
- func (djq *DetectionJobQuery) Exist(ctx context.Context) (bool, error)
- func (djq *DetectionJobQuery) ExistX(ctx context.Context) bool
- func (djq *DetectionJobQuery) First(ctx context.Context) (*DetectionJob, error)
- func (djq *DetectionJobQuery) FirstID(ctx context.Context) (id int, err error)
- func (djq *DetectionJobQuery) FirstIDX(ctx context.Context) int
- func (djq *DetectionJobQuery) FirstX(ctx context.Context) *DetectionJob
- func (djq *DetectionJobQuery) GroupBy(field string, fields ...string) *DetectionJobGroupBy
- func (djq *DetectionJobQuery) IDs(ctx context.Context) ([]int, error)
- func (djq *DetectionJobQuery) IDsX(ctx context.Context) []int
- func (djq *DetectionJobQuery) Limit(limit int) *DetectionJobQuery
- func (djq *DetectionJobQuery) Offset(offset int) *DetectionJobQuery
- func (djq *DetectionJobQuery) Only(ctx context.Context) (*DetectionJob, error)
- func (djq *DetectionJobQuery) OnlyID(ctx context.Context) (id int, err error)
- func (djq *DetectionJobQuery) OnlyIDX(ctx context.Context) int
- func (djq *DetectionJobQuery) OnlyX(ctx context.Context) *DetectionJob
- func (djq *DetectionJobQuery) Order(o ...OrderFunc) *DetectionJobQuery
- func (djq *DetectionJobQuery) QueryInstance() *DetectionJobInstanceQuery
- func (djq *DetectionJobQuery) Select(field string, fields ...string) *DetectionJobSelect
- func (djq *DetectionJobQuery) Where(ps ...predicate.DetectionJob) *DetectionJobQuery
- func (djq *DetectionJobQuery) WithInstance(opts ...func(*DetectionJobInstanceQuery)) *DetectionJobQuery
- type DetectionJobSelect
- func (djs *DetectionJobSelect) Bool(ctx context.Context) (_ bool, err error)
- func (djs *DetectionJobSelect) BoolX(ctx context.Context) bool
- func (djs *DetectionJobSelect) Bools(ctx context.Context) ([]bool, error)
- func (djs *DetectionJobSelect) BoolsX(ctx context.Context) []bool
- func (djs *DetectionJobSelect) Float64(ctx context.Context) (_ float64, err error)
- func (djs *DetectionJobSelect) Float64X(ctx context.Context) float64
- func (djs *DetectionJobSelect) Float64s(ctx context.Context) ([]float64, error)
- func (djs *DetectionJobSelect) Float64sX(ctx context.Context) []float64
- func (djs *DetectionJobSelect) Int(ctx context.Context) (_ int, err error)
- func (djs *DetectionJobSelect) IntX(ctx context.Context) int
- func (djs *DetectionJobSelect) Ints(ctx context.Context) ([]int, error)
- func (djs *DetectionJobSelect) IntsX(ctx context.Context) []int
- func (djs *DetectionJobSelect) Scan(ctx context.Context, v interface{}) error
- func (djs *DetectionJobSelect) ScanX(ctx context.Context, v interface{})
- func (djs *DetectionJobSelect) String(ctx context.Context) (_ string, err error)
- func (djs *DetectionJobSelect) StringX(ctx context.Context) string
- func (djs *DetectionJobSelect) Strings(ctx context.Context) ([]string, error)
- func (djs *DetectionJobSelect) StringsX(ctx context.Context) []string
- type DetectionJobUpdate
- func (dju *DetectionJobUpdate) AddInstance(d ...*DetectionJobInstance) *DetectionJobUpdate
- func (dju *DetectionJobUpdate) AddInstanceIDs(ids ...int) *DetectionJobUpdate
- func (dju *DetectionJobUpdate) ClearDescription() *DetectionJobUpdate
- func (dju *DetectionJobUpdate) ClearInstance() *DetectionJobUpdate
- func (dju *DetectionJobUpdate) ClearSchedule() *DetectionJobUpdate
- func (dju *DetectionJobUpdate) Exec(ctx context.Context) error
- func (dju *DetectionJobUpdate) ExecX(ctx context.Context)
- func (dju *DetectionJobUpdate) Mutation() *DetectionJobMutation
- func (dju *DetectionJobUpdate) RemoveInstance(d ...*DetectionJobInstance) *DetectionJobUpdate
- func (dju *DetectionJobUpdate) RemoveInstanceIDs(ids ...int) *DetectionJobUpdate
- func (dju *DetectionJobUpdate) Save(ctx context.Context) (int, error)
- func (dju *DetectionJobUpdate) SaveX(ctx context.Context) int
- func (dju *DetectionJobUpdate) SetAttribute(s string) *DetectionJobUpdate
- func (dju *DetectionJobUpdate) SetDescription(s string) *DetectionJobUpdate
- func (dju *DetectionJobUpdate) SetMethod(s string) *DetectionJobUpdate
- func (dju *DetectionJobUpdate) SetMetric(s string) *DetectionJobUpdate
- func (dju *DetectionJobUpdate) SetNillableDescription(s *string) *DetectionJobUpdate
- func (dju *DetectionJobUpdate) SetNillableSchedule(s *string) *DetectionJobUpdate
- func (dju *DetectionJobUpdate) SetSchedule(s string) *DetectionJobUpdate
- func (dju *DetectionJobUpdate) SetSiteID(s string) *DetectionJobUpdate
- func (dju *DetectionJobUpdate) SetTimeAgo(s string) *DetectionJobUpdate
- func (dju *DetectionJobUpdate) SetTimeStep(s string) *DetectionJobUpdate
- func (dju *DetectionJobUpdate) Where(ps ...predicate.DetectionJob) *DetectionJobUpdate
- type DetectionJobUpdateOne
- func (djuo *DetectionJobUpdateOne) AddInstance(d ...*DetectionJobInstance) *DetectionJobUpdateOne
- func (djuo *DetectionJobUpdateOne) AddInstanceIDs(ids ...int) *DetectionJobUpdateOne
- func (djuo *DetectionJobUpdateOne) ClearDescription() *DetectionJobUpdateOne
- func (djuo *DetectionJobUpdateOne) ClearInstance() *DetectionJobUpdateOne
- func (djuo *DetectionJobUpdateOne) ClearSchedule() *DetectionJobUpdateOne
- func (djuo *DetectionJobUpdateOne) Exec(ctx context.Context) error
- func (djuo *DetectionJobUpdateOne) ExecX(ctx context.Context)
- func (djuo *DetectionJobUpdateOne) Mutation() *DetectionJobMutation
- func (djuo *DetectionJobUpdateOne) RemoveInstance(d ...*DetectionJobInstance) *DetectionJobUpdateOne
- func (djuo *DetectionJobUpdateOne) RemoveInstanceIDs(ids ...int) *DetectionJobUpdateOne
- func (djuo *DetectionJobUpdateOne) Save(ctx context.Context) (*DetectionJob, error)
- func (djuo *DetectionJobUpdateOne) SaveX(ctx context.Context) *DetectionJob
- func (djuo *DetectionJobUpdateOne) SetAttribute(s string) *DetectionJobUpdateOne
- func (djuo *DetectionJobUpdateOne) SetDescription(s string) *DetectionJobUpdateOne
- func (djuo *DetectionJobUpdateOne) SetMethod(s string) *DetectionJobUpdateOne
- func (djuo *DetectionJobUpdateOne) SetMetric(s string) *DetectionJobUpdateOne
- func (djuo *DetectionJobUpdateOne) SetNillableDescription(s *string) *DetectionJobUpdateOne
- func (djuo *DetectionJobUpdateOne) SetNillableSchedule(s *string) *DetectionJobUpdateOne
- func (djuo *DetectionJobUpdateOne) SetSchedule(s string) *DetectionJobUpdateOne
- func (djuo *DetectionJobUpdateOne) SetSiteID(s string) *DetectionJobUpdateOne
- func (djuo *DetectionJobUpdateOne) SetTimeAgo(s string) *DetectionJobUpdateOne
- func (djuo *DetectionJobUpdateOne) SetTimeStep(s string) *DetectionJobUpdateOne
- type DetectionJobs
- type Hook
- 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 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. TypeAnomaly = "Anomaly" TypeDetectionJob = "DetectionJob" TypeDetectionJobInstance = "DetectionJobInstance" )
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 validaton 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 Anomaly ¶
type Anomaly 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 string `json:"type,omitempty"`
// Value holds the value of the "value" field.
Value float64 `json:"value,omitempty"`
// Processed holds the value of the "processed" field.
Processed bool `json:"processed,omitempty"`
// PeriodStart holds the value of the "period_start" field.
PeriodStart time.Time `json:"period_start,omitempty"`
// PeriodEnd holds the value of the "period_end" field.
PeriodEnd time.Time `json:"period_end,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the AnomalyQuery when eager-loading is set.
Edges AnomalyEdges `json:"edges"`
// contains filtered or unexported fields
}
Anomaly is the model entity for the Anomaly schema.
func (*Anomaly) QueryDetectionJobInstance ¶
func (a *Anomaly) QueryDetectionJobInstance() *DetectionJobInstanceQuery
QueryDetectionJobInstance queries the "detection_job_instance" edge of the Anomaly entity.
func (*Anomaly) Unwrap ¶
Unwrap unwraps the Anomaly 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 (*Anomaly) Update ¶
func (a *Anomaly) Update() *AnomalyUpdateOne
Update returns a builder for updating this Anomaly. Note that you need to call Anomaly.Unwrap() before calling this method if this Anomaly was returned from a transaction, and the transaction was committed or rolled back.
type AnomalyClient ¶
type AnomalyClient struct {
// contains filtered or unexported fields
}
AnomalyClient is a client for the Anomaly schema.
func NewAnomalyClient ¶
func NewAnomalyClient(c config) *AnomalyClient
NewAnomalyClient returns a client for the Anomaly from the given config.
func (*AnomalyClient) Create ¶
func (c *AnomalyClient) Create() *AnomalyCreate
Create returns a create builder for Anomaly.
func (*AnomalyClient) CreateBulk ¶
func (c *AnomalyClient) CreateBulk(builders ...*AnomalyCreate) *AnomalyCreateBulk
CreateBulk returns a builder for creating a bulk of Anomaly entities.
func (*AnomalyClient) Delete ¶
func (c *AnomalyClient) Delete() *AnomalyDelete
Delete returns a delete builder for Anomaly.
func (*AnomalyClient) DeleteOne ¶
func (c *AnomalyClient) DeleteOne(a *Anomaly) *AnomalyDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*AnomalyClient) DeleteOneID ¶
func (c *AnomalyClient) DeleteOneID(id int) *AnomalyDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*AnomalyClient) GetX ¶
func (c *AnomalyClient) GetX(ctx context.Context, id int) *Anomaly
GetX is like Get, but panics if an error occurs.
func (*AnomalyClient) Hooks ¶
func (c *AnomalyClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AnomalyClient) Query ¶
func (c *AnomalyClient) Query() *AnomalyQuery
Query returns a query builder for Anomaly.
func (*AnomalyClient) QueryDetectionJobInstance ¶
func (c *AnomalyClient) QueryDetectionJobInstance(a *Anomaly) *DetectionJobInstanceQuery
QueryDetectionJobInstance queries the detection_job_instance edge of a Anomaly.
func (*AnomalyClient) Update ¶
func (c *AnomalyClient) Update() *AnomalyUpdate
Update returns an update builder for Anomaly.
func (*AnomalyClient) UpdateOne ¶
func (c *AnomalyClient) UpdateOne(a *Anomaly) *AnomalyUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AnomalyClient) UpdateOneID ¶
func (c *AnomalyClient) UpdateOneID(id int) *AnomalyUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AnomalyClient) Use ¶
func (c *AnomalyClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `anomaly.Hooks(f(g(h())))`.
type AnomalyCreate ¶
type AnomalyCreate struct {
// contains filtered or unexported fields
}
AnomalyCreate is the builder for creating a Anomaly entity.
func (*AnomalyCreate) Mutation ¶
func (ac *AnomalyCreate) Mutation() *AnomalyMutation
Mutation returns the AnomalyMutation object of the builder.
func (*AnomalyCreate) Save ¶
func (ac *AnomalyCreate) Save(ctx context.Context) (*Anomaly, error)
Save creates the Anomaly in the database.
func (*AnomalyCreate) SaveX ¶
func (ac *AnomalyCreate) SaveX(ctx context.Context) *Anomaly
SaveX calls Save and panics if Save returns an error.
func (*AnomalyCreate) SetCreateTime ¶
func (ac *AnomalyCreate) SetCreateTime(t time.Time) *AnomalyCreate
SetCreateTime sets the "create_time" field.
func (*AnomalyCreate) SetDetectionJobInstance ¶
func (ac *AnomalyCreate) SetDetectionJobInstance(d *DetectionJobInstance) *AnomalyCreate
SetDetectionJobInstance sets the "detection_job_instance" edge to the DetectionJobInstance entity.
func (*AnomalyCreate) SetDetectionJobInstanceID ¶
func (ac *AnomalyCreate) SetDetectionJobInstanceID(id int) *AnomalyCreate
SetDetectionJobInstanceID sets the "detection_job_instance" edge to the DetectionJobInstance entity by ID.
func (*AnomalyCreate) SetNillableCreateTime ¶
func (ac *AnomalyCreate) SetNillableCreateTime(t *time.Time) *AnomalyCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*AnomalyCreate) SetNillableProcessed ¶
func (ac *AnomalyCreate) SetNillableProcessed(b *bool) *AnomalyCreate
SetNillableProcessed sets the "processed" field if the given value is not nil.
func (*AnomalyCreate) SetNillableUpdateTime ¶
func (ac *AnomalyCreate) SetNillableUpdateTime(t *time.Time) *AnomalyCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*AnomalyCreate) SetPeriodEnd ¶
func (ac *AnomalyCreate) SetPeriodEnd(t time.Time) *AnomalyCreate
SetPeriodEnd sets the "period_end" field.
func (*AnomalyCreate) SetPeriodStart ¶
func (ac *AnomalyCreate) SetPeriodStart(t time.Time) *AnomalyCreate
SetPeriodStart sets the "period_start" field.
func (*AnomalyCreate) SetProcessed ¶
func (ac *AnomalyCreate) SetProcessed(b bool) *AnomalyCreate
SetProcessed sets the "processed" field.
func (*AnomalyCreate) SetType ¶
func (ac *AnomalyCreate) SetType(s string) *AnomalyCreate
SetType sets the "type" field.
func (*AnomalyCreate) SetUpdateTime ¶
func (ac *AnomalyCreate) SetUpdateTime(t time.Time) *AnomalyCreate
SetUpdateTime sets the "update_time" field.
func (*AnomalyCreate) SetValue ¶
func (ac *AnomalyCreate) SetValue(f float64) *AnomalyCreate
SetValue sets the "value" field.
type AnomalyCreateBulk ¶
type AnomalyCreateBulk struct {
// contains filtered or unexported fields
}
AnomalyCreateBulk is the builder for creating many Anomaly entities in bulk.
type AnomalyDelete ¶
type AnomalyDelete struct {
// contains filtered or unexported fields
}
AnomalyDelete is the builder for deleting a Anomaly entity.
func (*AnomalyDelete) Exec ¶
func (ad *AnomalyDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AnomalyDelete) ExecX ¶
func (ad *AnomalyDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AnomalyDelete) Where ¶
func (ad *AnomalyDelete) Where(ps ...predicate.Anomaly) *AnomalyDelete
Where adds a new predicate to the AnomalyDelete builder.
type AnomalyDeleteOne ¶
type AnomalyDeleteOne struct {
// contains filtered or unexported fields
}
AnomalyDeleteOne is the builder for deleting a single Anomaly entity.
func (*AnomalyDeleteOne) Exec ¶
func (ado *AnomalyDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AnomalyDeleteOne) ExecX ¶
func (ado *AnomalyDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AnomalyEdges ¶
type AnomalyEdges struct {
// DetectionJobInstance holds the value of the detection_job_instance edge.
DetectionJobInstance *DetectionJobInstance `json:"detection_job_instance,omitempty"`
// contains filtered or unexported fields
}
AnomalyEdges holds the relations/edges for other nodes in the graph.
func (AnomalyEdges) DetectionJobInstanceOrErr ¶
func (e AnomalyEdges) DetectionJobInstanceOrErr() (*DetectionJobInstance, error)
DetectionJobInstanceOrErr returns the DetectionJobInstance value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type AnomalyGroupBy ¶
type AnomalyGroupBy struct {
// contains filtered or unexported fields
}
AnomalyGroupBy is the group-by builder for Anomaly entities.
func (*AnomalyGroupBy) Aggregate ¶
func (agb *AnomalyGroupBy) Aggregate(fns ...AggregateFunc) *AnomalyGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AnomalyGroupBy) Bool ¶
func (agb *AnomalyGroupBy) 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 (*AnomalyGroupBy) BoolX ¶
func (agb *AnomalyGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*AnomalyGroupBy) Bools ¶
func (agb *AnomalyGroupBy) 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 (*AnomalyGroupBy) BoolsX ¶
func (agb *AnomalyGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*AnomalyGroupBy) Float64 ¶
func (agb *AnomalyGroupBy) 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 (*AnomalyGroupBy) Float64X ¶
func (agb *AnomalyGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*AnomalyGroupBy) Float64s ¶
func (agb *AnomalyGroupBy) 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 (*AnomalyGroupBy) Float64sX ¶
func (agb *AnomalyGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*AnomalyGroupBy) Int ¶
func (agb *AnomalyGroupBy) 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 (*AnomalyGroupBy) IntX ¶
func (agb *AnomalyGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*AnomalyGroupBy) Ints ¶
func (agb *AnomalyGroupBy) 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 (*AnomalyGroupBy) IntsX ¶
func (agb *AnomalyGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*AnomalyGroupBy) Scan ¶
func (agb *AnomalyGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*AnomalyGroupBy) ScanX ¶
func (agb *AnomalyGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*AnomalyGroupBy) String ¶
func (agb *AnomalyGroupBy) 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 (*AnomalyGroupBy) StringX ¶
func (agb *AnomalyGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type AnomalyMutation ¶
type AnomalyMutation struct {
// contains filtered or unexported fields
}
AnomalyMutation represents an operation that mutates the Anomaly nodes in the graph.
func (*AnomalyMutation) AddField ¶
func (m *AnomalyMutation) 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 (*AnomalyMutation) AddValue ¶
func (m *AnomalyMutation) AddValue(f float64)
AddValue adds f to the "value" field.
func (*AnomalyMutation) AddedEdges ¶
func (m *AnomalyMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AnomalyMutation) AddedField ¶
func (m *AnomalyMutation) 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 (*AnomalyMutation) AddedFields ¶
func (m *AnomalyMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AnomalyMutation) AddedIDs ¶
func (m *AnomalyMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AnomalyMutation) AddedValue ¶
func (m *AnomalyMutation) AddedValue() (r float64, exists bool)
AddedValue returns the value that was added to the "value" field in this mutation.
func (*AnomalyMutation) ClearDetectionJobInstance ¶
func (m *AnomalyMutation) ClearDetectionJobInstance()
ClearDetectionJobInstance clears the "detection_job_instance" edge to the DetectionJobInstance entity.
func (*AnomalyMutation) ClearEdge ¶
func (m *AnomalyMutation) 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 (*AnomalyMutation) ClearField ¶
func (m *AnomalyMutation) 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 (*AnomalyMutation) ClearedEdges ¶
func (m *AnomalyMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AnomalyMutation) ClearedFields ¶
func (m *AnomalyMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AnomalyMutation) Client ¶
func (m AnomalyMutation) 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 (*AnomalyMutation) CreateTime ¶
func (m *AnomalyMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*AnomalyMutation) DetectionJobInstanceCleared ¶
func (m *AnomalyMutation) DetectionJobInstanceCleared() bool
DetectionJobInstanceCleared returns if the "detection_job_instance" edge to the DetectionJobInstance entity was cleared.
func (*AnomalyMutation) DetectionJobInstanceID ¶
func (m *AnomalyMutation) DetectionJobInstanceID() (id int, exists bool)
DetectionJobInstanceID returns the "detection_job_instance" edge ID in the mutation.
func (*AnomalyMutation) DetectionJobInstanceIDs ¶
func (m *AnomalyMutation) DetectionJobInstanceIDs() (ids []int)
DetectionJobInstanceIDs returns the "detection_job_instance" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DetectionJobInstanceID instead. It exists only for internal usage by the builders.
func (*AnomalyMutation) EdgeCleared ¶
func (m *AnomalyMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AnomalyMutation) Field ¶
func (m *AnomalyMutation) 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 (*AnomalyMutation) FieldCleared ¶
func (m *AnomalyMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AnomalyMutation) Fields ¶
func (m *AnomalyMutation) 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 (*AnomalyMutation) GetType ¶
func (m *AnomalyMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*AnomalyMutation) ID ¶
func (m *AnomalyMutation) 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.
func (*AnomalyMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Anomaly entity. If the Anomaly 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 (*AnomalyMutation) 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 (*AnomalyMutation) OldPeriodEnd ¶
OldPeriodEnd returns the old "period_end" field's value of the Anomaly entity. If the Anomaly 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 (*AnomalyMutation) OldPeriodStart ¶
OldPeriodStart returns the old "period_start" field's value of the Anomaly entity. If the Anomaly 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 (*AnomalyMutation) OldProcessed ¶
func (m *AnomalyMutation) OldProcessed(ctx context.Context) (v bool, err error)
OldProcessed returns the old "processed" field's value of the Anomaly entity. If the Anomaly 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 (*AnomalyMutation) OldType ¶
func (m *AnomalyMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" field's value of the Anomaly entity. If the Anomaly 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 (*AnomalyMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Anomaly entity. If the Anomaly 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 (*AnomalyMutation) OldValue ¶
func (m *AnomalyMutation) OldValue(ctx context.Context) (v float64, err error)
OldValue returns the old "value" field's value of the Anomaly entity. If the Anomaly 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 (*AnomalyMutation) PeriodEnd ¶
func (m *AnomalyMutation) PeriodEnd() (r time.Time, exists bool)
PeriodEnd returns the value of the "period_end" field in the mutation.
func (*AnomalyMutation) PeriodStart ¶
func (m *AnomalyMutation) PeriodStart() (r time.Time, exists bool)
PeriodStart returns the value of the "period_start" field in the mutation.
func (*AnomalyMutation) Processed ¶
func (m *AnomalyMutation) Processed() (r bool, exists bool)
Processed returns the value of the "processed" field in the mutation.
func (*AnomalyMutation) RemovedEdges ¶
func (m *AnomalyMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AnomalyMutation) RemovedIDs ¶
func (m *AnomalyMutation) 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 (*AnomalyMutation) ResetCreateTime ¶
func (m *AnomalyMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*AnomalyMutation) ResetDetectionJobInstance ¶
func (m *AnomalyMutation) ResetDetectionJobInstance()
ResetDetectionJobInstance resets all changes to the "detection_job_instance" edge.
func (*AnomalyMutation) ResetEdge ¶
func (m *AnomalyMutation) 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 (*AnomalyMutation) ResetField ¶
func (m *AnomalyMutation) 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 (*AnomalyMutation) ResetPeriodEnd ¶
func (m *AnomalyMutation) ResetPeriodEnd()
ResetPeriodEnd resets all changes to the "period_end" field.
func (*AnomalyMutation) ResetPeriodStart ¶
func (m *AnomalyMutation) ResetPeriodStart()
ResetPeriodStart resets all changes to the "period_start" field.
func (*AnomalyMutation) ResetProcessed ¶
func (m *AnomalyMutation) ResetProcessed()
ResetProcessed resets all changes to the "processed" field.
func (*AnomalyMutation) ResetType ¶
func (m *AnomalyMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*AnomalyMutation) ResetUpdateTime ¶
func (m *AnomalyMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*AnomalyMutation) ResetValue ¶
func (m *AnomalyMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*AnomalyMutation) SetCreateTime ¶
func (m *AnomalyMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*AnomalyMutation) SetDetectionJobInstanceID ¶
func (m *AnomalyMutation) SetDetectionJobInstanceID(id int)
SetDetectionJobInstanceID sets the "detection_job_instance" edge to the DetectionJobInstance entity by id.
func (*AnomalyMutation) SetField ¶
func (m *AnomalyMutation) 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 (*AnomalyMutation) SetPeriodEnd ¶
func (m *AnomalyMutation) SetPeriodEnd(t time.Time)
SetPeriodEnd sets the "period_end" field.
func (*AnomalyMutation) SetPeriodStart ¶
func (m *AnomalyMutation) SetPeriodStart(t time.Time)
SetPeriodStart sets the "period_start" field.
func (*AnomalyMutation) SetProcessed ¶
func (m *AnomalyMutation) SetProcessed(b bool)
SetProcessed sets the "processed" field.
func (*AnomalyMutation) SetType ¶
func (m *AnomalyMutation) SetType(s string)
SetType sets the "type" field.
func (*AnomalyMutation) SetUpdateTime ¶
func (m *AnomalyMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*AnomalyMutation) SetValue ¶
func (m *AnomalyMutation) SetValue(f float64)
SetValue sets the "value" field.
func (AnomalyMutation) Tx ¶
func (m AnomalyMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AnomalyMutation) Type ¶
func (m *AnomalyMutation) Type() string
Type returns the node type of this mutation (Anomaly).
func (*AnomalyMutation) UpdateTime ¶
func (m *AnomalyMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*AnomalyMutation) Value ¶
func (m *AnomalyMutation) Value() (r float64, exists bool)
Value returns the value of the "value" field in the mutation.
type AnomalyQuery ¶
type AnomalyQuery struct {
// contains filtered or unexported fields
}
AnomalyQuery is the builder for querying Anomaly entities.
func (*AnomalyQuery) All ¶
func (aq *AnomalyQuery) All(ctx context.Context) ([]*Anomaly, error)
All executes the query and returns a list of Anomalies.
func (*AnomalyQuery) AllX ¶
func (aq *AnomalyQuery) AllX(ctx context.Context) []*Anomaly
AllX is like All, but panics if an error occurs.
func (*AnomalyQuery) Clone ¶
func (aq *AnomalyQuery) Clone() *AnomalyQuery
Clone returns a duplicate of the AnomalyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AnomalyQuery) Count ¶
func (aq *AnomalyQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AnomalyQuery) CountX ¶
func (aq *AnomalyQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AnomalyQuery) Exist ¶
func (aq *AnomalyQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AnomalyQuery) ExistX ¶
func (aq *AnomalyQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AnomalyQuery) First ¶
func (aq *AnomalyQuery) First(ctx context.Context) (*Anomaly, error)
First returns the first Anomaly entity from the query. Returns a *NotFoundError when no Anomaly was found.
func (*AnomalyQuery) FirstID ¶
func (aq *AnomalyQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Anomaly ID from the query. Returns a *NotFoundError when no Anomaly ID was found.
func (*AnomalyQuery) FirstIDX ¶
func (aq *AnomalyQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*AnomalyQuery) FirstX ¶
func (aq *AnomalyQuery) FirstX(ctx context.Context) *Anomaly
FirstX is like First, but panics if an error occurs.
func (*AnomalyQuery) GroupBy ¶
func (aq *AnomalyQuery) GroupBy(field string, fields ...string) *AnomalyGroupBy
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.Anomaly.Query().
GroupBy(anomaly.FieldCreateTime).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*AnomalyQuery) IDs ¶
func (aq *AnomalyQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Anomaly IDs.
func (*AnomalyQuery) IDsX ¶
func (aq *AnomalyQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*AnomalyQuery) Limit ¶
func (aq *AnomalyQuery) Limit(limit int) *AnomalyQuery
Limit adds a limit step to the query.
func (*AnomalyQuery) Offset ¶
func (aq *AnomalyQuery) Offset(offset int) *AnomalyQuery
Offset adds an offset step to the query.
func (*AnomalyQuery) Only ¶
func (aq *AnomalyQuery) Only(ctx context.Context) (*Anomaly, error)
Only returns a single Anomaly entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Anomaly entity is not found. Returns a *NotFoundError when no Anomaly entities are found.
func (*AnomalyQuery) OnlyID ¶
func (aq *AnomalyQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Anomaly ID in the query. Returns a *NotSingularError when exactly one Anomaly ID is not found. Returns a *NotFoundError when no entities are found.
func (*AnomalyQuery) OnlyIDX ¶
func (aq *AnomalyQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AnomalyQuery) OnlyX ¶
func (aq *AnomalyQuery) OnlyX(ctx context.Context) *Anomaly
OnlyX is like Only, but panics if an error occurs.
func (*AnomalyQuery) Order ¶
func (aq *AnomalyQuery) Order(o ...OrderFunc) *AnomalyQuery
Order adds an order step to the query.
func (*AnomalyQuery) QueryDetectionJobInstance ¶
func (aq *AnomalyQuery) QueryDetectionJobInstance() *DetectionJobInstanceQuery
QueryDetectionJobInstance chains the current query on the "detection_job_instance" edge.
func (*AnomalyQuery) Select ¶
func (aq *AnomalyQuery) Select(field string, fields ...string) *AnomalySelect
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.Anomaly.Query().
Select(anomaly.FieldCreateTime).
Scan(ctx, &v)
func (*AnomalyQuery) Where ¶
func (aq *AnomalyQuery) Where(ps ...predicate.Anomaly) *AnomalyQuery
Where adds a new predicate for the AnomalyQuery builder.
func (*AnomalyQuery) WithDetectionJobInstance ¶
func (aq *AnomalyQuery) WithDetectionJobInstance(opts ...func(*DetectionJobInstanceQuery)) *AnomalyQuery
WithDetectionJobInstance tells the query-builder to eager-load the nodes that are connected to the "detection_job_instance" edge. The optional arguments are used to configure the query builder of the edge.
type AnomalySelect ¶
type AnomalySelect struct {
*AnomalyQuery
// contains filtered or unexported fields
}
AnomalySelect is the builder for selecting fields of Anomaly entities.
func (*AnomalySelect) Bool ¶
func (as *AnomalySelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AnomalySelect) BoolX ¶
func (as *AnomalySelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*AnomalySelect) Bools ¶
func (as *AnomalySelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AnomalySelect) BoolsX ¶
func (as *AnomalySelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*AnomalySelect) Float64 ¶
func (as *AnomalySelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AnomalySelect) Float64X ¶
func (as *AnomalySelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*AnomalySelect) Float64s ¶
func (as *AnomalySelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AnomalySelect) Float64sX ¶
func (as *AnomalySelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*AnomalySelect) Int ¶
func (as *AnomalySelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AnomalySelect) IntX ¶
func (as *AnomalySelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*AnomalySelect) Ints ¶
func (as *AnomalySelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AnomalySelect) IntsX ¶
func (as *AnomalySelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*AnomalySelect) Scan ¶
func (as *AnomalySelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*AnomalySelect) ScanX ¶
func (as *AnomalySelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*AnomalySelect) String ¶
func (as *AnomalySelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*AnomalySelect) StringX ¶
func (as *AnomalySelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type AnomalyUpdate ¶
type AnomalyUpdate struct {
// contains filtered or unexported fields
}
AnomalyUpdate is the builder for updating Anomaly entities.
func (*AnomalyUpdate) AddValue ¶
func (au *AnomalyUpdate) AddValue(f float64) *AnomalyUpdate
AddValue adds f to the "value" field.
func (*AnomalyUpdate) ClearDetectionJobInstance ¶
func (au *AnomalyUpdate) ClearDetectionJobInstance() *AnomalyUpdate
ClearDetectionJobInstance clears the "detection_job_instance" edge to the DetectionJobInstance entity.
func (*AnomalyUpdate) Exec ¶
func (au *AnomalyUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AnomalyUpdate) ExecX ¶
func (au *AnomalyUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AnomalyUpdate) Mutation ¶
func (au *AnomalyUpdate) Mutation() *AnomalyMutation
Mutation returns the AnomalyMutation object of the builder.
func (*AnomalyUpdate) Save ¶
func (au *AnomalyUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AnomalyUpdate) SaveX ¶
func (au *AnomalyUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AnomalyUpdate) SetDetectionJobInstance ¶
func (au *AnomalyUpdate) SetDetectionJobInstance(d *DetectionJobInstance) *AnomalyUpdate
SetDetectionJobInstance sets the "detection_job_instance" edge to the DetectionJobInstance entity.
func (*AnomalyUpdate) SetDetectionJobInstanceID ¶
func (au *AnomalyUpdate) SetDetectionJobInstanceID(id int) *AnomalyUpdate
SetDetectionJobInstanceID sets the "detection_job_instance" edge to the DetectionJobInstance entity by ID.
func (*AnomalyUpdate) SetNillableProcessed ¶
func (au *AnomalyUpdate) SetNillableProcessed(b *bool) *AnomalyUpdate
SetNillableProcessed sets the "processed" field if the given value is not nil.
func (*AnomalyUpdate) SetPeriodEnd ¶
func (au *AnomalyUpdate) SetPeriodEnd(t time.Time) *AnomalyUpdate
SetPeriodEnd sets the "period_end" field.
func (*AnomalyUpdate) SetPeriodStart ¶
func (au *AnomalyUpdate) SetPeriodStart(t time.Time) *AnomalyUpdate
SetPeriodStart sets the "period_start" field.
func (*AnomalyUpdate) SetProcessed ¶
func (au *AnomalyUpdate) SetProcessed(b bool) *AnomalyUpdate
SetProcessed sets the "processed" field.
func (*AnomalyUpdate) SetType ¶
func (au *AnomalyUpdate) SetType(s string) *AnomalyUpdate
SetType sets the "type" field.
func (*AnomalyUpdate) SetValue ¶
func (au *AnomalyUpdate) SetValue(f float64) *AnomalyUpdate
SetValue sets the "value" field.
func (*AnomalyUpdate) Where ¶
func (au *AnomalyUpdate) Where(ps ...predicate.Anomaly) *AnomalyUpdate
Where adds a new predicate for the AnomalyUpdate builder.
type AnomalyUpdateOne ¶
type AnomalyUpdateOne struct {
// contains filtered or unexported fields
}
AnomalyUpdateOne is the builder for updating a single Anomaly entity.
func (*AnomalyUpdateOne) AddValue ¶
func (auo *AnomalyUpdateOne) AddValue(f float64) *AnomalyUpdateOne
AddValue adds f to the "value" field.
func (*AnomalyUpdateOne) ClearDetectionJobInstance ¶
func (auo *AnomalyUpdateOne) ClearDetectionJobInstance() *AnomalyUpdateOne
ClearDetectionJobInstance clears the "detection_job_instance" edge to the DetectionJobInstance entity.
func (*AnomalyUpdateOne) Exec ¶
func (auo *AnomalyUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AnomalyUpdateOne) ExecX ¶
func (auo *AnomalyUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AnomalyUpdateOne) Mutation ¶
func (auo *AnomalyUpdateOne) Mutation() *AnomalyMutation
Mutation returns the AnomalyMutation object of the builder.
func (*AnomalyUpdateOne) Save ¶
func (auo *AnomalyUpdateOne) Save(ctx context.Context) (*Anomaly, error)
Save executes the query and returns the updated Anomaly entity.
func (*AnomalyUpdateOne) SaveX ¶
func (auo *AnomalyUpdateOne) SaveX(ctx context.Context) *Anomaly
SaveX is like Save, but panics if an error occurs.
func (*AnomalyUpdateOne) SetDetectionJobInstance ¶
func (auo *AnomalyUpdateOne) SetDetectionJobInstance(d *DetectionJobInstance) *AnomalyUpdateOne
SetDetectionJobInstance sets the "detection_job_instance" edge to the DetectionJobInstance entity.
func (*AnomalyUpdateOne) SetDetectionJobInstanceID ¶
func (auo *AnomalyUpdateOne) SetDetectionJobInstanceID(id int) *AnomalyUpdateOne
SetDetectionJobInstanceID sets the "detection_job_instance" edge to the DetectionJobInstance entity by ID.
func (*AnomalyUpdateOne) SetNillableProcessed ¶
func (auo *AnomalyUpdateOne) SetNillableProcessed(b *bool) *AnomalyUpdateOne
SetNillableProcessed sets the "processed" field if the given value is not nil.
func (*AnomalyUpdateOne) SetPeriodEnd ¶
func (auo *AnomalyUpdateOne) SetPeriodEnd(t time.Time) *AnomalyUpdateOne
SetPeriodEnd sets the "period_end" field.
func (*AnomalyUpdateOne) SetPeriodStart ¶
func (auo *AnomalyUpdateOne) SetPeriodStart(t time.Time) *AnomalyUpdateOne
SetPeriodStart sets the "period_start" field.
func (*AnomalyUpdateOne) SetProcessed ¶
func (auo *AnomalyUpdateOne) SetProcessed(b bool) *AnomalyUpdateOne
SetProcessed sets the "processed" field.
func (*AnomalyUpdateOne) SetType ¶
func (auo *AnomalyUpdateOne) SetType(s string) *AnomalyUpdateOne
SetType sets the "type" field.
func (*AnomalyUpdateOne) SetValue ¶
func (auo *AnomalyUpdateOne) SetValue(f float64) *AnomalyUpdateOne
SetValue sets the "value" field.
type Client ¶
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// Anomaly is the client for interacting with the Anomaly builders.
Anomaly *AnomalyClient
// DetectionJob is the client for interacting with the DetectionJob builders.
DetectionJob *DetectionJobClient
// DetectionJobInstance is the client for interacting with the DetectionJobInstance builders.
DetectionJobInstance *DetectionJobInstanceClient
// 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(). Anomaly. 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(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 DetectionJob ¶
type DetectionJob 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"`
// Schedule holds the value of the "schedule" field.
Schedule *string `json:"schedule,omitempty"`
// Method holds the value of the "method" field.
Method string `json:"method,omitempty"`
// SiteID holds the value of the "site_id" field.
SiteID string `json:"site_id,omitempty"`
// Metric holds the value of the "metric" field.
Metric string `json:"metric,omitempty"`
// Attribute holds the value of the "attribute" field.
Attribute string `json:"attribute,omitempty"`
// TimeAgo holds the value of the "time_ago" field.
TimeAgo string `json:"time_ago,omitempty"`
// TimeStep holds the value of the "time_step" field.
TimeStep string `json:"time_step,omitempty"`
// Description holds the value of the "description" field.
Description string `json:"description,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the DetectionJobQuery when eager-loading is set.
Edges DetectionJobEdges `json:"edges"`
// contains filtered or unexported fields
}
DetectionJob is the model entity for the DetectionJob schema.
func (*DetectionJob) QueryInstance ¶
func (dj *DetectionJob) QueryInstance() *DetectionJobInstanceQuery
QueryInstance queries the "instance" edge of the DetectionJob entity.
func (*DetectionJob) String ¶
func (dj *DetectionJob) String() string
String implements the fmt.Stringer.
func (*DetectionJob) Unwrap ¶
func (dj *DetectionJob) Unwrap() *DetectionJob
Unwrap unwraps the DetectionJob 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 (*DetectionJob) Update ¶
func (dj *DetectionJob) Update() *DetectionJobUpdateOne
Update returns a builder for updating this DetectionJob. Note that you need to call DetectionJob.Unwrap() before calling this method if this DetectionJob was returned from a transaction, and the transaction was committed or rolled back.
type DetectionJobClient ¶
type DetectionJobClient struct {
// contains filtered or unexported fields
}
DetectionJobClient is a client for the DetectionJob schema.
func NewDetectionJobClient ¶
func NewDetectionJobClient(c config) *DetectionJobClient
NewDetectionJobClient returns a client for the DetectionJob from the given config.
func (*DetectionJobClient) Create ¶
func (c *DetectionJobClient) Create() *DetectionJobCreate
Create returns a create builder for DetectionJob.
func (*DetectionJobClient) CreateBulk ¶
func (c *DetectionJobClient) CreateBulk(builders ...*DetectionJobCreate) *DetectionJobCreateBulk
CreateBulk returns a builder for creating a bulk of DetectionJob entities.
func (*DetectionJobClient) Delete ¶
func (c *DetectionJobClient) Delete() *DetectionJobDelete
Delete returns a delete builder for DetectionJob.
func (*DetectionJobClient) DeleteOne ¶
func (c *DetectionJobClient) DeleteOne(dj *DetectionJob) *DetectionJobDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*DetectionJobClient) DeleteOneID ¶
func (c *DetectionJobClient) DeleteOneID(id int) *DetectionJobDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*DetectionJobClient) Get ¶
func (c *DetectionJobClient) Get(ctx context.Context, id int) (*DetectionJob, error)
Get returns a DetectionJob entity by its id.
func (*DetectionJobClient) GetX ¶
func (c *DetectionJobClient) GetX(ctx context.Context, id int) *DetectionJob
GetX is like Get, but panics if an error occurs.
func (*DetectionJobClient) Hooks ¶
func (c *DetectionJobClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DetectionJobClient) Query ¶
func (c *DetectionJobClient) Query() *DetectionJobQuery
Query returns a query builder for DetectionJob.
func (*DetectionJobClient) QueryInstance ¶
func (c *DetectionJobClient) QueryInstance(dj *DetectionJob) *DetectionJobInstanceQuery
QueryInstance queries the instance edge of a DetectionJob.
func (*DetectionJobClient) Update ¶
func (c *DetectionJobClient) Update() *DetectionJobUpdate
Update returns an update builder for DetectionJob.
func (*DetectionJobClient) UpdateOne ¶
func (c *DetectionJobClient) UpdateOne(dj *DetectionJob) *DetectionJobUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DetectionJobClient) UpdateOneID ¶
func (c *DetectionJobClient) UpdateOneID(id int) *DetectionJobUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DetectionJobClient) Use ¶
func (c *DetectionJobClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `detectionjob.Hooks(f(g(h())))`.
type DetectionJobCreate ¶
type DetectionJobCreate struct {
// contains filtered or unexported fields
}
DetectionJobCreate is the builder for creating a DetectionJob entity.
func (*DetectionJobCreate) AddInstance ¶
func (djc *DetectionJobCreate) AddInstance(d ...*DetectionJobInstance) *DetectionJobCreate
AddInstance adds the "instance" edges to the DetectionJobInstance entity.
func (*DetectionJobCreate) AddInstanceIDs ¶
func (djc *DetectionJobCreate) AddInstanceIDs(ids ...int) *DetectionJobCreate
AddInstanceIDs adds the "instance" edge to the DetectionJobInstance entity by IDs.
func (*DetectionJobCreate) Mutation ¶
func (djc *DetectionJobCreate) Mutation() *DetectionJobMutation
Mutation returns the DetectionJobMutation object of the builder.
func (*DetectionJobCreate) Save ¶
func (djc *DetectionJobCreate) Save(ctx context.Context) (*DetectionJob, error)
Save creates the DetectionJob in the database.
func (*DetectionJobCreate) SaveX ¶
func (djc *DetectionJobCreate) SaveX(ctx context.Context) *DetectionJob
SaveX calls Save and panics if Save returns an error.
func (*DetectionJobCreate) SetAttribute ¶
func (djc *DetectionJobCreate) SetAttribute(s string) *DetectionJobCreate
SetAttribute sets the "attribute" field.
func (*DetectionJobCreate) SetCreateTime ¶
func (djc *DetectionJobCreate) SetCreateTime(t time.Time) *DetectionJobCreate
SetCreateTime sets the "create_time" field.
func (*DetectionJobCreate) SetDescription ¶
func (djc *DetectionJobCreate) SetDescription(s string) *DetectionJobCreate
SetDescription sets the "description" field.
func (*DetectionJobCreate) SetMethod ¶
func (djc *DetectionJobCreate) SetMethod(s string) *DetectionJobCreate
SetMethod sets the "method" field.
func (*DetectionJobCreate) SetMetric ¶
func (djc *DetectionJobCreate) SetMetric(s string) *DetectionJobCreate
SetMetric sets the "metric" field.
func (*DetectionJobCreate) SetNillableCreateTime ¶
func (djc *DetectionJobCreate) SetNillableCreateTime(t *time.Time) *DetectionJobCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*DetectionJobCreate) SetNillableDescription ¶
func (djc *DetectionJobCreate) SetNillableDescription(s *string) *DetectionJobCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*DetectionJobCreate) SetNillableSchedule ¶
func (djc *DetectionJobCreate) SetNillableSchedule(s *string) *DetectionJobCreate
SetNillableSchedule sets the "schedule" field if the given value is not nil.
func (*DetectionJobCreate) SetNillableUpdateTime ¶
func (djc *DetectionJobCreate) SetNillableUpdateTime(t *time.Time) *DetectionJobCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*DetectionJobCreate) SetSchedule ¶
func (djc *DetectionJobCreate) SetSchedule(s string) *DetectionJobCreate
SetSchedule sets the "schedule" field.
func (*DetectionJobCreate) SetSiteID ¶
func (djc *DetectionJobCreate) SetSiteID(s string) *DetectionJobCreate
SetSiteID sets the "site_id" field.
func (*DetectionJobCreate) SetTimeAgo ¶
func (djc *DetectionJobCreate) SetTimeAgo(s string) *DetectionJobCreate
SetTimeAgo sets the "time_ago" field.
func (*DetectionJobCreate) SetTimeStep ¶
func (djc *DetectionJobCreate) SetTimeStep(s string) *DetectionJobCreate
SetTimeStep sets the "time_step" field.
func (*DetectionJobCreate) SetUpdateTime ¶
func (djc *DetectionJobCreate) SetUpdateTime(t time.Time) *DetectionJobCreate
SetUpdateTime sets the "update_time" field.
type DetectionJobCreateBulk ¶
type DetectionJobCreateBulk struct {
// contains filtered or unexported fields
}
DetectionJobCreateBulk is the builder for creating many DetectionJob entities in bulk.
func (*DetectionJobCreateBulk) Save ¶
func (djcb *DetectionJobCreateBulk) Save(ctx context.Context) ([]*DetectionJob, error)
Save creates the DetectionJob entities in the database.
func (*DetectionJobCreateBulk) SaveX ¶
func (djcb *DetectionJobCreateBulk) SaveX(ctx context.Context) []*DetectionJob
SaveX is like Save, but panics if an error occurs.
type DetectionJobDelete ¶
type DetectionJobDelete struct {
// contains filtered or unexported fields
}
DetectionJobDelete is the builder for deleting a DetectionJob entity.
func (*DetectionJobDelete) Exec ¶
func (djd *DetectionJobDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DetectionJobDelete) ExecX ¶
func (djd *DetectionJobDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DetectionJobDelete) Where ¶
func (djd *DetectionJobDelete) Where(ps ...predicate.DetectionJob) *DetectionJobDelete
Where adds a new predicate to the DetectionJobDelete builder.
type DetectionJobDeleteOne ¶
type DetectionJobDeleteOne struct {
// contains filtered or unexported fields
}
DetectionJobDeleteOne is the builder for deleting a single DetectionJob entity.
func (*DetectionJobDeleteOne) Exec ¶
func (djdo *DetectionJobDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DetectionJobDeleteOne) ExecX ¶
func (djdo *DetectionJobDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DetectionJobEdges ¶
type DetectionJobEdges struct {
// Instance holds the value of the instance edge.
Instance []*DetectionJobInstance `json:"instance,omitempty"`
// contains filtered or unexported fields
}
DetectionJobEdges holds the relations/edges for other nodes in the graph.
func (DetectionJobEdges) InstanceOrErr ¶
func (e DetectionJobEdges) InstanceOrErr() ([]*DetectionJobInstance, error)
InstanceOrErr returns the Instance value or an error if the edge was not loaded in eager-loading.
type DetectionJobGroupBy ¶
type DetectionJobGroupBy struct {
// contains filtered or unexported fields
}
DetectionJobGroupBy is the group-by builder for DetectionJob entities.
func (*DetectionJobGroupBy) Aggregate ¶
func (djgb *DetectionJobGroupBy) Aggregate(fns ...AggregateFunc) *DetectionJobGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DetectionJobGroupBy) Bool ¶
func (djgb *DetectionJobGroupBy) 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 (*DetectionJobGroupBy) BoolX ¶
func (djgb *DetectionJobGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DetectionJobGroupBy) Bools ¶
func (djgb *DetectionJobGroupBy) 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 (*DetectionJobGroupBy) BoolsX ¶
func (djgb *DetectionJobGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DetectionJobGroupBy) Float64 ¶
func (djgb *DetectionJobGroupBy) 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 (*DetectionJobGroupBy) Float64X ¶
func (djgb *DetectionJobGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DetectionJobGroupBy) Float64s ¶
func (djgb *DetectionJobGroupBy) 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 (*DetectionJobGroupBy) Float64sX ¶
func (djgb *DetectionJobGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DetectionJobGroupBy) Int ¶
func (djgb *DetectionJobGroupBy) 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 (*DetectionJobGroupBy) IntX ¶
func (djgb *DetectionJobGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DetectionJobGroupBy) Ints ¶
func (djgb *DetectionJobGroupBy) 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 (*DetectionJobGroupBy) IntsX ¶
func (djgb *DetectionJobGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DetectionJobGroupBy) Scan ¶
func (djgb *DetectionJobGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*DetectionJobGroupBy) ScanX ¶
func (djgb *DetectionJobGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DetectionJobGroupBy) String ¶
func (djgb *DetectionJobGroupBy) 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 (*DetectionJobGroupBy) StringX ¶
func (djgb *DetectionJobGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DetectionJobInstance ¶
type DetectionJobInstance 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"`
// StartedAt holds the value of the "started_at" field.
StartedAt *time.Time `json:"started_at,omitempty"`
// FinishedAt holds the value of the "finished_at" field.
FinishedAt *time.Time `json:"finished_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the DetectionJobInstanceQuery when eager-loading is set.
Edges DetectionJobInstanceEdges `json:"edges"`
// contains filtered or unexported fields
}
DetectionJobInstance is the model entity for the DetectionJobInstance schema.
func (*DetectionJobInstance) QueryAnomalies ¶
func (dji *DetectionJobInstance) QueryAnomalies() *AnomalyQuery
QueryAnomalies queries the "anomalies" edge of the DetectionJobInstance entity.
func (*DetectionJobInstance) QueryDetectionJob ¶
func (dji *DetectionJobInstance) QueryDetectionJob() *DetectionJobQuery
QueryDetectionJob queries the "detection_job" edge of the DetectionJobInstance entity.
func (*DetectionJobInstance) String ¶
func (dji *DetectionJobInstance) String() string
String implements the fmt.Stringer.
func (*DetectionJobInstance) Unwrap ¶
func (dji *DetectionJobInstance) Unwrap() *DetectionJobInstance
Unwrap unwraps the DetectionJobInstance 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 (*DetectionJobInstance) Update ¶
func (dji *DetectionJobInstance) Update() *DetectionJobInstanceUpdateOne
Update returns a builder for updating this DetectionJobInstance. Note that you need to call DetectionJobInstance.Unwrap() before calling this method if this DetectionJobInstance was returned from a transaction, and the transaction was committed or rolled back.
type DetectionJobInstanceClient ¶
type DetectionJobInstanceClient struct {
// contains filtered or unexported fields
}
DetectionJobInstanceClient is a client for the DetectionJobInstance schema.
func NewDetectionJobInstanceClient ¶
func NewDetectionJobInstanceClient(c config) *DetectionJobInstanceClient
NewDetectionJobInstanceClient returns a client for the DetectionJobInstance from the given config.
func (*DetectionJobInstanceClient) Create ¶
func (c *DetectionJobInstanceClient) Create() *DetectionJobInstanceCreate
Create returns a create builder for DetectionJobInstance.
func (*DetectionJobInstanceClient) CreateBulk ¶
func (c *DetectionJobInstanceClient) CreateBulk(builders ...*DetectionJobInstanceCreate) *DetectionJobInstanceCreateBulk
CreateBulk returns a builder for creating a bulk of DetectionJobInstance entities.
func (*DetectionJobInstanceClient) Delete ¶
func (c *DetectionJobInstanceClient) Delete() *DetectionJobInstanceDelete
Delete returns a delete builder for DetectionJobInstance.
func (*DetectionJobInstanceClient) DeleteOne ¶
func (c *DetectionJobInstanceClient) DeleteOne(dji *DetectionJobInstance) *DetectionJobInstanceDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*DetectionJobInstanceClient) DeleteOneID ¶
func (c *DetectionJobInstanceClient) DeleteOneID(id int) *DetectionJobInstanceDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*DetectionJobInstanceClient) Get ¶
func (c *DetectionJobInstanceClient) Get(ctx context.Context, id int) (*DetectionJobInstance, error)
Get returns a DetectionJobInstance entity by its id.
func (*DetectionJobInstanceClient) GetX ¶
func (c *DetectionJobInstanceClient) GetX(ctx context.Context, id int) *DetectionJobInstance
GetX is like Get, but panics if an error occurs.
func (*DetectionJobInstanceClient) Hooks ¶
func (c *DetectionJobInstanceClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DetectionJobInstanceClient) Query ¶
func (c *DetectionJobInstanceClient) Query() *DetectionJobInstanceQuery
Query returns a query builder for DetectionJobInstance.
func (*DetectionJobInstanceClient) QueryAnomalies ¶
func (c *DetectionJobInstanceClient) QueryAnomalies(dji *DetectionJobInstance) *AnomalyQuery
QueryAnomalies queries the anomalies edge of a DetectionJobInstance.
func (*DetectionJobInstanceClient) QueryDetectionJob ¶
func (c *DetectionJobInstanceClient) QueryDetectionJob(dji *DetectionJobInstance) *DetectionJobQuery
QueryDetectionJob queries the detection_job edge of a DetectionJobInstance.
func (*DetectionJobInstanceClient) Update ¶
func (c *DetectionJobInstanceClient) Update() *DetectionJobInstanceUpdate
Update returns an update builder for DetectionJobInstance.
func (*DetectionJobInstanceClient) UpdateOne ¶
func (c *DetectionJobInstanceClient) UpdateOne(dji *DetectionJobInstance) *DetectionJobInstanceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DetectionJobInstanceClient) UpdateOneID ¶
func (c *DetectionJobInstanceClient) UpdateOneID(id int) *DetectionJobInstanceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DetectionJobInstanceClient) Use ¶
func (c *DetectionJobInstanceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `detectionjobinstance.Hooks(f(g(h())))`.
type DetectionJobInstanceCreate ¶
type DetectionJobInstanceCreate struct {
// contains filtered or unexported fields
}
DetectionJobInstanceCreate is the builder for creating a DetectionJobInstance entity.
func (*DetectionJobInstanceCreate) AddAnomalies ¶
func (djic *DetectionJobInstanceCreate) AddAnomalies(a ...*Anomaly) *DetectionJobInstanceCreate
AddAnomalies adds the "anomalies" edges to the Anomaly entity.
func (*DetectionJobInstanceCreate) AddAnomalyIDs ¶
func (djic *DetectionJobInstanceCreate) AddAnomalyIDs(ids ...int) *DetectionJobInstanceCreate
AddAnomalyIDs adds the "anomalies" edge to the Anomaly entity by IDs.
func (*DetectionJobInstanceCreate) Mutation ¶
func (djic *DetectionJobInstanceCreate) Mutation() *DetectionJobInstanceMutation
Mutation returns the DetectionJobInstanceMutation object of the builder.
func (*DetectionJobInstanceCreate) Save ¶
func (djic *DetectionJobInstanceCreate) Save(ctx context.Context) (*DetectionJobInstance, error)
Save creates the DetectionJobInstance in the database.
func (*DetectionJobInstanceCreate) SaveX ¶
func (djic *DetectionJobInstanceCreate) SaveX(ctx context.Context) *DetectionJobInstance
SaveX calls Save and panics if Save returns an error.
func (*DetectionJobInstanceCreate) SetCreateTime ¶
func (djic *DetectionJobInstanceCreate) SetCreateTime(t time.Time) *DetectionJobInstanceCreate
SetCreateTime sets the "create_time" field.
func (*DetectionJobInstanceCreate) SetDetectionJob ¶
func (djic *DetectionJobInstanceCreate) SetDetectionJob(d *DetectionJob) *DetectionJobInstanceCreate
SetDetectionJob sets the "detection_job" edge to the DetectionJob entity.
func (*DetectionJobInstanceCreate) SetDetectionJobID ¶
func (djic *DetectionJobInstanceCreate) SetDetectionJobID(id int) *DetectionJobInstanceCreate
SetDetectionJobID sets the "detection_job" edge to the DetectionJob entity by ID.
func (*DetectionJobInstanceCreate) SetFinishedAt ¶
func (djic *DetectionJobInstanceCreate) SetFinishedAt(t time.Time) *DetectionJobInstanceCreate
SetFinishedAt sets the "finished_at" field.
func (*DetectionJobInstanceCreate) SetNillableCreateTime ¶
func (djic *DetectionJobInstanceCreate) SetNillableCreateTime(t *time.Time) *DetectionJobInstanceCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*DetectionJobInstanceCreate) SetNillableFinishedAt ¶
func (djic *DetectionJobInstanceCreate) SetNillableFinishedAt(t *time.Time) *DetectionJobInstanceCreate
SetNillableFinishedAt sets the "finished_at" field if the given value is not nil.
func (*DetectionJobInstanceCreate) SetNillableStartedAt ¶
func (djic *DetectionJobInstanceCreate) SetNillableStartedAt(t *time.Time) *DetectionJobInstanceCreate
SetNillableStartedAt sets the "started_at" field if the given value is not nil.
func (*DetectionJobInstanceCreate) SetNillableUpdateTime ¶
func (djic *DetectionJobInstanceCreate) SetNillableUpdateTime(t *time.Time) *DetectionJobInstanceCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*DetectionJobInstanceCreate) SetStartedAt ¶
func (djic *DetectionJobInstanceCreate) SetStartedAt(t time.Time) *DetectionJobInstanceCreate
SetStartedAt sets the "started_at" field.
func (*DetectionJobInstanceCreate) SetUpdateTime ¶
func (djic *DetectionJobInstanceCreate) SetUpdateTime(t time.Time) *DetectionJobInstanceCreate
SetUpdateTime sets the "update_time" field.
type DetectionJobInstanceCreateBulk ¶
type DetectionJobInstanceCreateBulk struct {
// contains filtered or unexported fields
}
DetectionJobInstanceCreateBulk is the builder for creating many DetectionJobInstance entities in bulk.
func (*DetectionJobInstanceCreateBulk) Save ¶
func (djicb *DetectionJobInstanceCreateBulk) Save(ctx context.Context) ([]*DetectionJobInstance, error)
Save creates the DetectionJobInstance entities in the database.
func (*DetectionJobInstanceCreateBulk) SaveX ¶
func (djicb *DetectionJobInstanceCreateBulk) SaveX(ctx context.Context) []*DetectionJobInstance
SaveX is like Save, but panics if an error occurs.
type DetectionJobInstanceDelete ¶
type DetectionJobInstanceDelete struct {
// contains filtered or unexported fields
}
DetectionJobInstanceDelete is the builder for deleting a DetectionJobInstance entity.
func (*DetectionJobInstanceDelete) Exec ¶
func (djid *DetectionJobInstanceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DetectionJobInstanceDelete) ExecX ¶
func (djid *DetectionJobInstanceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DetectionJobInstanceDelete) Where ¶
func (djid *DetectionJobInstanceDelete) Where(ps ...predicate.DetectionJobInstance) *DetectionJobInstanceDelete
Where adds a new predicate to the DetectionJobInstanceDelete builder.
type DetectionJobInstanceDeleteOne ¶
type DetectionJobInstanceDeleteOne struct {
// contains filtered or unexported fields
}
DetectionJobInstanceDeleteOne is the builder for deleting a single DetectionJobInstance entity.
func (*DetectionJobInstanceDeleteOne) Exec ¶
func (djido *DetectionJobInstanceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DetectionJobInstanceDeleteOne) ExecX ¶
func (djido *DetectionJobInstanceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DetectionJobInstanceEdges ¶
type DetectionJobInstanceEdges struct {
// Anomalies holds the value of the anomalies edge.
Anomalies []*Anomaly `json:"anomalies,omitempty"`
// DetectionJob holds the value of the detection_job edge.
DetectionJob *DetectionJob `json:"detection_job,omitempty"`
// contains filtered or unexported fields
}
DetectionJobInstanceEdges holds the relations/edges for other nodes in the graph.
func (DetectionJobInstanceEdges) AnomaliesOrErr ¶
func (e DetectionJobInstanceEdges) AnomaliesOrErr() ([]*Anomaly, error)
AnomaliesOrErr returns the Anomalies value or an error if the edge was not loaded in eager-loading.
func (DetectionJobInstanceEdges) DetectionJobOrErr ¶
func (e DetectionJobInstanceEdges) DetectionJobOrErr() (*DetectionJob, error)
DetectionJobOrErr returns the DetectionJob value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DetectionJobInstanceGroupBy ¶
type DetectionJobInstanceGroupBy struct {
// contains filtered or unexported fields
}
DetectionJobInstanceGroupBy is the group-by builder for DetectionJobInstance entities.
func (*DetectionJobInstanceGroupBy) Aggregate ¶
func (djigb *DetectionJobInstanceGroupBy) Aggregate(fns ...AggregateFunc) *DetectionJobInstanceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DetectionJobInstanceGroupBy) Bool ¶
func (djigb *DetectionJobInstanceGroupBy) 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 (*DetectionJobInstanceGroupBy) BoolX ¶
func (djigb *DetectionJobInstanceGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DetectionJobInstanceGroupBy) Bools ¶
func (djigb *DetectionJobInstanceGroupBy) 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 (*DetectionJobInstanceGroupBy) BoolsX ¶
func (djigb *DetectionJobInstanceGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DetectionJobInstanceGroupBy) Float64 ¶
func (djigb *DetectionJobInstanceGroupBy) 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 (*DetectionJobInstanceGroupBy) Float64X ¶
func (djigb *DetectionJobInstanceGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DetectionJobInstanceGroupBy) Float64s ¶
func (djigb *DetectionJobInstanceGroupBy) 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 (*DetectionJobInstanceGroupBy) Float64sX ¶
func (djigb *DetectionJobInstanceGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DetectionJobInstanceGroupBy) Int ¶
func (djigb *DetectionJobInstanceGroupBy) 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 (*DetectionJobInstanceGroupBy) IntX ¶
func (djigb *DetectionJobInstanceGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DetectionJobInstanceGroupBy) Ints ¶
func (djigb *DetectionJobInstanceGroupBy) 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 (*DetectionJobInstanceGroupBy) IntsX ¶
func (djigb *DetectionJobInstanceGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DetectionJobInstanceGroupBy) Scan ¶
func (djigb *DetectionJobInstanceGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*DetectionJobInstanceGroupBy) ScanX ¶
func (djigb *DetectionJobInstanceGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DetectionJobInstanceGroupBy) String ¶
func (djigb *DetectionJobInstanceGroupBy) 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 (*DetectionJobInstanceGroupBy) StringX ¶
func (djigb *DetectionJobInstanceGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DetectionJobInstanceMutation ¶
type DetectionJobInstanceMutation struct {
// contains filtered or unexported fields
}
DetectionJobInstanceMutation represents an operation that mutates the DetectionJobInstance nodes in the graph.
func (*DetectionJobInstanceMutation) AddAnomalyIDs ¶
func (m *DetectionJobInstanceMutation) AddAnomalyIDs(ids ...int)
AddAnomalyIDs adds the "anomalies" edge to the Anomaly entity by ids.
func (*DetectionJobInstanceMutation) AddField ¶
func (m *DetectionJobInstanceMutation) 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 (*DetectionJobInstanceMutation) AddedEdges ¶
func (m *DetectionJobInstanceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DetectionJobInstanceMutation) AddedField ¶
func (m *DetectionJobInstanceMutation) 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 (*DetectionJobInstanceMutation) AddedFields ¶
func (m *DetectionJobInstanceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DetectionJobInstanceMutation) AddedIDs ¶
func (m *DetectionJobInstanceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DetectionJobInstanceMutation) AnomaliesCleared ¶
func (m *DetectionJobInstanceMutation) AnomaliesCleared() bool
AnomaliesCleared returns if the "anomalies" edge to the Anomaly entity was cleared.
func (*DetectionJobInstanceMutation) AnomaliesIDs ¶
func (m *DetectionJobInstanceMutation) AnomaliesIDs() (ids []int)
AnomaliesIDs returns the "anomalies" edge IDs in the mutation.
func (*DetectionJobInstanceMutation) ClearAnomalies ¶
func (m *DetectionJobInstanceMutation) ClearAnomalies()
ClearAnomalies clears the "anomalies" edge to the Anomaly entity.
func (*DetectionJobInstanceMutation) ClearDetectionJob ¶
func (m *DetectionJobInstanceMutation) ClearDetectionJob()
ClearDetectionJob clears the "detection_job" edge to the DetectionJob entity.
func (*DetectionJobInstanceMutation) ClearEdge ¶
func (m *DetectionJobInstanceMutation) 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 (*DetectionJobInstanceMutation) ClearField ¶
func (m *DetectionJobInstanceMutation) 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 (*DetectionJobInstanceMutation) ClearFinishedAt ¶
func (m *DetectionJobInstanceMutation) ClearFinishedAt()
ClearFinishedAt clears the value of the "finished_at" field.
func (*DetectionJobInstanceMutation) ClearStartedAt ¶
func (m *DetectionJobInstanceMutation) ClearStartedAt()
ClearStartedAt clears the value of the "started_at" field.
func (*DetectionJobInstanceMutation) ClearedEdges ¶
func (m *DetectionJobInstanceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DetectionJobInstanceMutation) ClearedFields ¶
func (m *DetectionJobInstanceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DetectionJobInstanceMutation) Client ¶
func (m DetectionJobInstanceMutation) 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 (*DetectionJobInstanceMutation) CreateTime ¶
func (m *DetectionJobInstanceMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*DetectionJobInstanceMutation) DetectionJobCleared ¶
func (m *DetectionJobInstanceMutation) DetectionJobCleared() bool
DetectionJobCleared returns if the "detection_job" edge to the DetectionJob entity was cleared.
func (*DetectionJobInstanceMutation) DetectionJobID ¶
func (m *DetectionJobInstanceMutation) DetectionJobID() (id int, exists bool)
DetectionJobID returns the "detection_job" edge ID in the mutation.
func (*DetectionJobInstanceMutation) DetectionJobIDs ¶
func (m *DetectionJobInstanceMutation) DetectionJobIDs() (ids []int)
DetectionJobIDs returns the "detection_job" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DetectionJobID instead. It exists only for internal usage by the builders.
func (*DetectionJobInstanceMutation) EdgeCleared ¶
func (m *DetectionJobInstanceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DetectionJobInstanceMutation) Field ¶
func (m *DetectionJobInstanceMutation) 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 (*DetectionJobInstanceMutation) FieldCleared ¶
func (m *DetectionJobInstanceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DetectionJobInstanceMutation) Fields ¶
func (m *DetectionJobInstanceMutation) 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 (*DetectionJobInstanceMutation) FinishedAt ¶
func (m *DetectionJobInstanceMutation) FinishedAt() (r time.Time, exists bool)
FinishedAt returns the value of the "finished_at" field in the mutation.
func (*DetectionJobInstanceMutation) FinishedAtCleared ¶
func (m *DetectionJobInstanceMutation) FinishedAtCleared() bool
FinishedAtCleared returns if the "finished_at" field was cleared in this mutation.
func (*DetectionJobInstanceMutation) ID ¶
func (m *DetectionJobInstanceMutation) 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.
func (*DetectionJobInstanceMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the DetectionJobInstance entity. If the DetectionJobInstance 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 (*DetectionJobInstanceMutation) OldField ¶
func (m *DetectionJobInstanceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*DetectionJobInstanceMutation) OldFinishedAt ¶
OldFinishedAt returns the old "finished_at" field's value of the DetectionJobInstance entity. If the DetectionJobInstance 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 (*DetectionJobInstanceMutation) OldStartedAt ¶
OldStartedAt returns the old "started_at" field's value of the DetectionJobInstance entity. If the DetectionJobInstance 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 (*DetectionJobInstanceMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the DetectionJobInstance entity. If the DetectionJobInstance 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 (*DetectionJobInstanceMutation) Op ¶
func (m *DetectionJobInstanceMutation) Op() Op
Op returns the operation name.
func (*DetectionJobInstanceMutation) RemoveAnomalyIDs ¶
func (m *DetectionJobInstanceMutation) RemoveAnomalyIDs(ids ...int)
RemoveAnomalyIDs removes the "anomalies" edge to the Anomaly entity by IDs.
func (*DetectionJobInstanceMutation) RemovedAnomaliesIDs ¶
func (m *DetectionJobInstanceMutation) RemovedAnomaliesIDs() (ids []int)
RemovedAnomalies returns the removed IDs of the "anomalies" edge to the Anomaly entity.
func (*DetectionJobInstanceMutation) RemovedEdges ¶
func (m *DetectionJobInstanceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DetectionJobInstanceMutation) RemovedIDs ¶
func (m *DetectionJobInstanceMutation) 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 (*DetectionJobInstanceMutation) ResetAnomalies ¶
func (m *DetectionJobInstanceMutation) ResetAnomalies()
ResetAnomalies resets all changes to the "anomalies" edge.
func (*DetectionJobInstanceMutation) ResetCreateTime ¶
func (m *DetectionJobInstanceMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*DetectionJobInstanceMutation) ResetDetectionJob ¶
func (m *DetectionJobInstanceMutation) ResetDetectionJob()
ResetDetectionJob resets all changes to the "detection_job" edge.
func (*DetectionJobInstanceMutation) ResetEdge ¶
func (m *DetectionJobInstanceMutation) 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 (*DetectionJobInstanceMutation) ResetField ¶
func (m *DetectionJobInstanceMutation) 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 (*DetectionJobInstanceMutation) ResetFinishedAt ¶
func (m *DetectionJobInstanceMutation) ResetFinishedAt()
ResetFinishedAt resets all changes to the "finished_at" field.
func (*DetectionJobInstanceMutation) ResetStartedAt ¶
func (m *DetectionJobInstanceMutation) ResetStartedAt()
ResetStartedAt resets all changes to the "started_at" field.
func (*DetectionJobInstanceMutation) ResetUpdateTime ¶
func (m *DetectionJobInstanceMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*DetectionJobInstanceMutation) SetCreateTime ¶
func (m *DetectionJobInstanceMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*DetectionJobInstanceMutation) SetDetectionJobID ¶
func (m *DetectionJobInstanceMutation) SetDetectionJobID(id int)
SetDetectionJobID sets the "detection_job" edge to the DetectionJob entity by id.
func (*DetectionJobInstanceMutation) SetField ¶
func (m *DetectionJobInstanceMutation) 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 (*DetectionJobInstanceMutation) SetFinishedAt ¶
func (m *DetectionJobInstanceMutation) SetFinishedAt(t time.Time)
SetFinishedAt sets the "finished_at" field.
func (*DetectionJobInstanceMutation) SetStartedAt ¶
func (m *DetectionJobInstanceMutation) SetStartedAt(t time.Time)
SetStartedAt sets the "started_at" field.
func (*DetectionJobInstanceMutation) SetUpdateTime ¶
func (m *DetectionJobInstanceMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*DetectionJobInstanceMutation) StartedAt ¶
func (m *DetectionJobInstanceMutation) StartedAt() (r time.Time, exists bool)
StartedAt returns the value of the "started_at" field in the mutation.
func (*DetectionJobInstanceMutation) StartedAtCleared ¶
func (m *DetectionJobInstanceMutation) StartedAtCleared() bool
StartedAtCleared returns if the "started_at" field was cleared in this mutation.
func (DetectionJobInstanceMutation) Tx ¶
func (m DetectionJobInstanceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DetectionJobInstanceMutation) Type ¶
func (m *DetectionJobInstanceMutation) Type() string
Type returns the node type of this mutation (DetectionJobInstance).
func (*DetectionJobInstanceMutation) UpdateTime ¶
func (m *DetectionJobInstanceMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
type DetectionJobInstanceQuery ¶
type DetectionJobInstanceQuery struct {
// contains filtered or unexported fields
}
DetectionJobInstanceQuery is the builder for querying DetectionJobInstance entities.
func (*DetectionJobInstanceQuery) All ¶
func (djiq *DetectionJobInstanceQuery) All(ctx context.Context) ([]*DetectionJobInstance, error)
All executes the query and returns a list of DetectionJobInstances.
func (*DetectionJobInstanceQuery) AllX ¶
func (djiq *DetectionJobInstanceQuery) AllX(ctx context.Context) []*DetectionJobInstance
AllX is like All, but panics if an error occurs.
func (*DetectionJobInstanceQuery) Clone ¶
func (djiq *DetectionJobInstanceQuery) Clone() *DetectionJobInstanceQuery
Clone returns a duplicate of the DetectionJobInstanceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DetectionJobInstanceQuery) Count ¶
func (djiq *DetectionJobInstanceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DetectionJobInstanceQuery) CountX ¶
func (djiq *DetectionJobInstanceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DetectionJobInstanceQuery) Exist ¶
func (djiq *DetectionJobInstanceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DetectionJobInstanceQuery) ExistX ¶
func (djiq *DetectionJobInstanceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DetectionJobInstanceQuery) First ¶
func (djiq *DetectionJobInstanceQuery) First(ctx context.Context) (*DetectionJobInstance, error)
First returns the first DetectionJobInstance entity from the query. Returns a *NotFoundError when no DetectionJobInstance was found.
func (*DetectionJobInstanceQuery) FirstID ¶
func (djiq *DetectionJobInstanceQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first DetectionJobInstance ID from the query. Returns a *NotFoundError when no DetectionJobInstance ID was found.
func (*DetectionJobInstanceQuery) FirstIDX ¶
func (djiq *DetectionJobInstanceQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DetectionJobInstanceQuery) FirstX ¶
func (djiq *DetectionJobInstanceQuery) FirstX(ctx context.Context) *DetectionJobInstance
FirstX is like First, but panics if an error occurs.
func (*DetectionJobInstanceQuery) GroupBy ¶
func (djiq *DetectionJobInstanceQuery) GroupBy(field string, fields ...string) *DetectionJobInstanceGroupBy
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.DetectionJobInstance.Query().
GroupBy(detectionjobinstance.FieldCreateTime).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*DetectionJobInstanceQuery) IDs ¶
func (djiq *DetectionJobInstanceQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of DetectionJobInstance IDs.
func (*DetectionJobInstanceQuery) IDsX ¶
func (djiq *DetectionJobInstanceQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DetectionJobInstanceQuery) Limit ¶
func (djiq *DetectionJobInstanceQuery) Limit(limit int) *DetectionJobInstanceQuery
Limit adds a limit step to the query.
func (*DetectionJobInstanceQuery) Offset ¶
func (djiq *DetectionJobInstanceQuery) Offset(offset int) *DetectionJobInstanceQuery
Offset adds an offset step to the query.
func (*DetectionJobInstanceQuery) Only ¶
func (djiq *DetectionJobInstanceQuery) Only(ctx context.Context) (*DetectionJobInstance, error)
Only returns a single DetectionJobInstance entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one DetectionJobInstance entity is not found. Returns a *NotFoundError when no DetectionJobInstance entities are found.
func (*DetectionJobInstanceQuery) OnlyID ¶
func (djiq *DetectionJobInstanceQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only DetectionJobInstance ID in the query. Returns a *NotSingularError when exactly one DetectionJobInstance ID is not found. Returns a *NotFoundError when no entities are found.
func (*DetectionJobInstanceQuery) OnlyIDX ¶
func (djiq *DetectionJobInstanceQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DetectionJobInstanceQuery) OnlyX ¶
func (djiq *DetectionJobInstanceQuery) OnlyX(ctx context.Context) *DetectionJobInstance
OnlyX is like Only, but panics if an error occurs.
func (*DetectionJobInstanceQuery) Order ¶
func (djiq *DetectionJobInstanceQuery) Order(o ...OrderFunc) *DetectionJobInstanceQuery
Order adds an order step to the query.
func (*DetectionJobInstanceQuery) QueryAnomalies ¶
func (djiq *DetectionJobInstanceQuery) QueryAnomalies() *AnomalyQuery
QueryAnomalies chains the current query on the "anomalies" edge.
func (*DetectionJobInstanceQuery) QueryDetectionJob ¶
func (djiq *DetectionJobInstanceQuery) QueryDetectionJob() *DetectionJobQuery
QueryDetectionJob chains the current query on the "detection_job" edge.
func (*DetectionJobInstanceQuery) Select ¶
func (djiq *DetectionJobInstanceQuery) Select(field string, fields ...string) *DetectionJobInstanceSelect
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.DetectionJobInstance.Query().
Select(detectionjobinstance.FieldCreateTime).
Scan(ctx, &v)
func (*DetectionJobInstanceQuery) Where ¶
func (djiq *DetectionJobInstanceQuery) Where(ps ...predicate.DetectionJobInstance) *DetectionJobInstanceQuery
Where adds a new predicate for the DetectionJobInstanceQuery builder.
func (*DetectionJobInstanceQuery) WithAnomalies ¶
func (djiq *DetectionJobInstanceQuery) WithAnomalies(opts ...func(*AnomalyQuery)) *DetectionJobInstanceQuery
WithAnomalies tells the query-builder to eager-load the nodes that are connected to the "anomalies" edge. The optional arguments are used to configure the query builder of the edge.
func (*DetectionJobInstanceQuery) WithDetectionJob ¶
func (djiq *DetectionJobInstanceQuery) WithDetectionJob(opts ...func(*DetectionJobQuery)) *DetectionJobInstanceQuery
WithDetectionJob tells the query-builder to eager-load the nodes that are connected to the "detection_job" edge. The optional arguments are used to configure the query builder of the edge.
type DetectionJobInstanceSelect ¶
type DetectionJobInstanceSelect struct {
*DetectionJobInstanceQuery
// contains filtered or unexported fields
}
DetectionJobInstanceSelect is the builder for selecting fields of DetectionJobInstance entities.
func (*DetectionJobInstanceSelect) Bool ¶
func (djis *DetectionJobInstanceSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DetectionJobInstanceSelect) BoolX ¶
func (djis *DetectionJobInstanceSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DetectionJobInstanceSelect) Bools ¶
func (djis *DetectionJobInstanceSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DetectionJobInstanceSelect) BoolsX ¶
func (djis *DetectionJobInstanceSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DetectionJobInstanceSelect) Float64 ¶
func (djis *DetectionJobInstanceSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DetectionJobInstanceSelect) Float64X ¶
func (djis *DetectionJobInstanceSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DetectionJobInstanceSelect) Float64s ¶
func (djis *DetectionJobInstanceSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DetectionJobInstanceSelect) Float64sX ¶
func (djis *DetectionJobInstanceSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DetectionJobInstanceSelect) Int ¶
func (djis *DetectionJobInstanceSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DetectionJobInstanceSelect) IntX ¶
func (djis *DetectionJobInstanceSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DetectionJobInstanceSelect) Ints ¶
func (djis *DetectionJobInstanceSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DetectionJobInstanceSelect) IntsX ¶
func (djis *DetectionJobInstanceSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DetectionJobInstanceSelect) Scan ¶
func (djis *DetectionJobInstanceSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*DetectionJobInstanceSelect) ScanX ¶
func (djis *DetectionJobInstanceSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DetectionJobInstanceSelect) String ¶
func (djis *DetectionJobInstanceSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*DetectionJobInstanceSelect) StringX ¶
func (djis *DetectionJobInstanceSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DetectionJobInstanceUpdate ¶
type DetectionJobInstanceUpdate struct {
// contains filtered or unexported fields
}
DetectionJobInstanceUpdate is the builder for updating DetectionJobInstance entities.
func (*DetectionJobInstanceUpdate) AddAnomalies ¶
func (djiu *DetectionJobInstanceUpdate) AddAnomalies(a ...*Anomaly) *DetectionJobInstanceUpdate
AddAnomalies adds the "anomalies" edges to the Anomaly entity.
func (*DetectionJobInstanceUpdate) AddAnomalyIDs ¶
func (djiu *DetectionJobInstanceUpdate) AddAnomalyIDs(ids ...int) *DetectionJobInstanceUpdate
AddAnomalyIDs adds the "anomalies" edge to the Anomaly entity by IDs.
func (*DetectionJobInstanceUpdate) ClearAnomalies ¶
func (djiu *DetectionJobInstanceUpdate) ClearAnomalies() *DetectionJobInstanceUpdate
ClearAnomalies clears all "anomalies" edges to the Anomaly entity.
func (*DetectionJobInstanceUpdate) ClearDetectionJob ¶
func (djiu *DetectionJobInstanceUpdate) ClearDetectionJob() *DetectionJobInstanceUpdate
ClearDetectionJob clears the "detection_job" edge to the DetectionJob entity.
func (*DetectionJobInstanceUpdate) ClearFinishedAt ¶
func (djiu *DetectionJobInstanceUpdate) ClearFinishedAt() *DetectionJobInstanceUpdate
ClearFinishedAt clears the value of the "finished_at" field.
func (*DetectionJobInstanceUpdate) ClearStartedAt ¶
func (djiu *DetectionJobInstanceUpdate) ClearStartedAt() *DetectionJobInstanceUpdate
ClearStartedAt clears the value of the "started_at" field.
func (*DetectionJobInstanceUpdate) Exec ¶
func (djiu *DetectionJobInstanceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DetectionJobInstanceUpdate) ExecX ¶
func (djiu *DetectionJobInstanceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DetectionJobInstanceUpdate) Mutation ¶
func (djiu *DetectionJobInstanceUpdate) Mutation() *DetectionJobInstanceMutation
Mutation returns the DetectionJobInstanceMutation object of the builder.
func (*DetectionJobInstanceUpdate) RemoveAnomalies ¶
func (djiu *DetectionJobInstanceUpdate) RemoveAnomalies(a ...*Anomaly) *DetectionJobInstanceUpdate
RemoveAnomalies removes "anomalies" edges to Anomaly entities.
func (*DetectionJobInstanceUpdate) RemoveAnomalyIDs ¶
func (djiu *DetectionJobInstanceUpdate) RemoveAnomalyIDs(ids ...int) *DetectionJobInstanceUpdate
RemoveAnomalyIDs removes the "anomalies" edge to Anomaly entities by IDs.
func (*DetectionJobInstanceUpdate) Save ¶
func (djiu *DetectionJobInstanceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DetectionJobInstanceUpdate) SaveX ¶
func (djiu *DetectionJobInstanceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DetectionJobInstanceUpdate) SetDetectionJob ¶
func (djiu *DetectionJobInstanceUpdate) SetDetectionJob(d *DetectionJob) *DetectionJobInstanceUpdate
SetDetectionJob sets the "detection_job" edge to the DetectionJob entity.
func (*DetectionJobInstanceUpdate) SetDetectionJobID ¶
func (djiu *DetectionJobInstanceUpdate) SetDetectionJobID(id int) *DetectionJobInstanceUpdate
SetDetectionJobID sets the "detection_job" edge to the DetectionJob entity by ID.
func (*DetectionJobInstanceUpdate) SetFinishedAt ¶
func (djiu *DetectionJobInstanceUpdate) SetFinishedAt(t time.Time) *DetectionJobInstanceUpdate
SetFinishedAt sets the "finished_at" field.
func (*DetectionJobInstanceUpdate) SetNillableFinishedAt ¶
func (djiu *DetectionJobInstanceUpdate) SetNillableFinishedAt(t *time.Time) *DetectionJobInstanceUpdate
SetNillableFinishedAt sets the "finished_at" field if the given value is not nil.
func (*DetectionJobInstanceUpdate) SetNillableStartedAt ¶
func (djiu *DetectionJobInstanceUpdate) SetNillableStartedAt(t *time.Time) *DetectionJobInstanceUpdate
SetNillableStartedAt sets the "started_at" field if the given value is not nil.
func (*DetectionJobInstanceUpdate) SetStartedAt ¶
func (djiu *DetectionJobInstanceUpdate) SetStartedAt(t time.Time) *DetectionJobInstanceUpdate
SetStartedAt sets the "started_at" field.
func (*DetectionJobInstanceUpdate) Where ¶
func (djiu *DetectionJobInstanceUpdate) Where(ps ...predicate.DetectionJobInstance) *DetectionJobInstanceUpdate
Where adds a new predicate for the DetectionJobInstanceUpdate builder.
type DetectionJobInstanceUpdateOne ¶
type DetectionJobInstanceUpdateOne struct {
// contains filtered or unexported fields
}
DetectionJobInstanceUpdateOne is the builder for updating a single DetectionJobInstance entity.
func (*DetectionJobInstanceUpdateOne) AddAnomalies ¶
func (djiuo *DetectionJobInstanceUpdateOne) AddAnomalies(a ...*Anomaly) *DetectionJobInstanceUpdateOne
AddAnomalies adds the "anomalies" edges to the Anomaly entity.
func (*DetectionJobInstanceUpdateOne) AddAnomalyIDs ¶
func (djiuo *DetectionJobInstanceUpdateOne) AddAnomalyIDs(ids ...int) *DetectionJobInstanceUpdateOne
AddAnomalyIDs adds the "anomalies" edge to the Anomaly entity by IDs.
func (*DetectionJobInstanceUpdateOne) ClearAnomalies ¶
func (djiuo *DetectionJobInstanceUpdateOne) ClearAnomalies() *DetectionJobInstanceUpdateOne
ClearAnomalies clears all "anomalies" edges to the Anomaly entity.
func (*DetectionJobInstanceUpdateOne) ClearDetectionJob ¶
func (djiuo *DetectionJobInstanceUpdateOne) ClearDetectionJob() *DetectionJobInstanceUpdateOne
ClearDetectionJob clears the "detection_job" edge to the DetectionJob entity.
func (*DetectionJobInstanceUpdateOne) ClearFinishedAt ¶
func (djiuo *DetectionJobInstanceUpdateOne) ClearFinishedAt() *DetectionJobInstanceUpdateOne
ClearFinishedAt clears the value of the "finished_at" field.
func (*DetectionJobInstanceUpdateOne) ClearStartedAt ¶
func (djiuo *DetectionJobInstanceUpdateOne) ClearStartedAt() *DetectionJobInstanceUpdateOne
ClearStartedAt clears the value of the "started_at" field.
func (*DetectionJobInstanceUpdateOne) Exec ¶
func (djiuo *DetectionJobInstanceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DetectionJobInstanceUpdateOne) ExecX ¶
func (djiuo *DetectionJobInstanceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DetectionJobInstanceUpdateOne) Mutation ¶
func (djiuo *DetectionJobInstanceUpdateOne) Mutation() *DetectionJobInstanceMutation
Mutation returns the DetectionJobInstanceMutation object of the builder.
func (*DetectionJobInstanceUpdateOne) RemoveAnomalies ¶
func (djiuo *DetectionJobInstanceUpdateOne) RemoveAnomalies(a ...*Anomaly) *DetectionJobInstanceUpdateOne
RemoveAnomalies removes "anomalies" edges to Anomaly entities.
func (*DetectionJobInstanceUpdateOne) RemoveAnomalyIDs ¶
func (djiuo *DetectionJobInstanceUpdateOne) RemoveAnomalyIDs(ids ...int) *DetectionJobInstanceUpdateOne
RemoveAnomalyIDs removes the "anomalies" edge to Anomaly entities by IDs.
func (*DetectionJobInstanceUpdateOne) Save ¶
func (djiuo *DetectionJobInstanceUpdateOne) Save(ctx context.Context) (*DetectionJobInstance, error)
Save executes the query and returns the updated DetectionJobInstance entity.
func (*DetectionJobInstanceUpdateOne) SaveX ¶
func (djiuo *DetectionJobInstanceUpdateOne) SaveX(ctx context.Context) *DetectionJobInstance
SaveX is like Save, but panics if an error occurs.
func (*DetectionJobInstanceUpdateOne) SetDetectionJob ¶
func (djiuo *DetectionJobInstanceUpdateOne) SetDetectionJob(d *DetectionJob) *DetectionJobInstanceUpdateOne
SetDetectionJob sets the "detection_job" edge to the DetectionJob entity.
func (*DetectionJobInstanceUpdateOne) SetDetectionJobID ¶
func (djiuo *DetectionJobInstanceUpdateOne) SetDetectionJobID(id int) *DetectionJobInstanceUpdateOne
SetDetectionJobID sets the "detection_job" edge to the DetectionJob entity by ID.
func (*DetectionJobInstanceUpdateOne) SetFinishedAt ¶
func (djiuo *DetectionJobInstanceUpdateOne) SetFinishedAt(t time.Time) *DetectionJobInstanceUpdateOne
SetFinishedAt sets the "finished_at" field.
func (*DetectionJobInstanceUpdateOne) SetNillableFinishedAt ¶
func (djiuo *DetectionJobInstanceUpdateOne) SetNillableFinishedAt(t *time.Time) *DetectionJobInstanceUpdateOne
SetNillableFinishedAt sets the "finished_at" field if the given value is not nil.
func (*DetectionJobInstanceUpdateOne) SetNillableStartedAt ¶
func (djiuo *DetectionJobInstanceUpdateOne) SetNillableStartedAt(t *time.Time) *DetectionJobInstanceUpdateOne
SetNillableStartedAt sets the "started_at" field if the given value is not nil.
func (*DetectionJobInstanceUpdateOne) SetStartedAt ¶
func (djiuo *DetectionJobInstanceUpdateOne) SetStartedAt(t time.Time) *DetectionJobInstanceUpdateOne
SetStartedAt sets the "started_at" field.
type DetectionJobInstances ¶
type DetectionJobInstances []*DetectionJobInstance
DetectionJobInstances is a parsable slice of DetectionJobInstance.
type DetectionJobMutation ¶
type DetectionJobMutation struct {
// contains filtered or unexported fields
}
DetectionJobMutation represents an operation that mutates the DetectionJob nodes in the graph.
func (*DetectionJobMutation) AddField ¶
func (m *DetectionJobMutation) 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 (*DetectionJobMutation) AddInstanceIDs ¶
func (m *DetectionJobMutation) AddInstanceIDs(ids ...int)
AddInstanceIDs adds the "instance" edge to the DetectionJobInstance entity by ids.
func (*DetectionJobMutation) AddedEdges ¶
func (m *DetectionJobMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DetectionJobMutation) AddedField ¶
func (m *DetectionJobMutation) 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 (*DetectionJobMutation) AddedFields ¶
func (m *DetectionJobMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DetectionJobMutation) AddedIDs ¶
func (m *DetectionJobMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DetectionJobMutation) Attribute ¶
func (m *DetectionJobMutation) Attribute() (r string, exists bool)
Attribute returns the value of the "attribute" field in the mutation.
func (*DetectionJobMutation) ClearDescription ¶
func (m *DetectionJobMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*DetectionJobMutation) ClearEdge ¶
func (m *DetectionJobMutation) 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 (*DetectionJobMutation) ClearField ¶
func (m *DetectionJobMutation) 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 (*DetectionJobMutation) ClearInstance ¶
func (m *DetectionJobMutation) ClearInstance()
ClearInstance clears the "instance" edge to the DetectionJobInstance entity.
func (*DetectionJobMutation) ClearSchedule ¶
func (m *DetectionJobMutation) ClearSchedule()
ClearSchedule clears the value of the "schedule" field.
func (*DetectionJobMutation) ClearedEdges ¶
func (m *DetectionJobMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DetectionJobMutation) ClearedFields ¶
func (m *DetectionJobMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DetectionJobMutation) Client ¶
func (m DetectionJobMutation) 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 (*DetectionJobMutation) CreateTime ¶
func (m *DetectionJobMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*DetectionJobMutation) Description ¶
func (m *DetectionJobMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*DetectionJobMutation) DescriptionCleared ¶
func (m *DetectionJobMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*DetectionJobMutation) EdgeCleared ¶
func (m *DetectionJobMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DetectionJobMutation) Field ¶
func (m *DetectionJobMutation) 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 (*DetectionJobMutation) FieldCleared ¶
func (m *DetectionJobMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DetectionJobMutation) Fields ¶
func (m *DetectionJobMutation) 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 (*DetectionJobMutation) ID ¶
func (m *DetectionJobMutation) 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.
func (*DetectionJobMutation) InstanceCleared ¶
func (m *DetectionJobMutation) InstanceCleared() bool
InstanceCleared returns if the "instance" edge to the DetectionJobInstance entity was cleared.
func (*DetectionJobMutation) InstanceIDs ¶
func (m *DetectionJobMutation) InstanceIDs() (ids []int)
InstanceIDs returns the "instance" edge IDs in the mutation.
func (*DetectionJobMutation) Method ¶
func (m *DetectionJobMutation) Method() (r string, exists bool)
Method returns the value of the "method" field in the mutation.
func (*DetectionJobMutation) Metric ¶
func (m *DetectionJobMutation) Metric() (r string, exists bool)
Metric returns the value of the "metric" field in the mutation.
func (*DetectionJobMutation) OldAttribute ¶
func (m *DetectionJobMutation) OldAttribute(ctx context.Context) (v string, err error)
OldAttribute returns the old "attribute" field's value of the DetectionJob entity. If the DetectionJob 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 (*DetectionJobMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the DetectionJob entity. If the DetectionJob 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 (*DetectionJobMutation) OldDescription ¶
func (m *DetectionJobMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the DetectionJob entity. If the DetectionJob 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 (*DetectionJobMutation) 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 (*DetectionJobMutation) OldMethod ¶
func (m *DetectionJobMutation) OldMethod(ctx context.Context) (v string, err error)
OldMethod returns the old "method" field's value of the DetectionJob entity. If the DetectionJob 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 (*DetectionJobMutation) OldMetric ¶
func (m *DetectionJobMutation) OldMetric(ctx context.Context) (v string, err error)
OldMetric returns the old "metric" field's value of the DetectionJob entity. If the DetectionJob 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 (*DetectionJobMutation) OldSchedule ¶
func (m *DetectionJobMutation) OldSchedule(ctx context.Context) (v *string, err error)
OldSchedule returns the old "schedule" field's value of the DetectionJob entity. If the DetectionJob 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 (*DetectionJobMutation) OldSiteID ¶
func (m *DetectionJobMutation) OldSiteID(ctx context.Context) (v string, err error)
OldSiteID returns the old "site_id" field's value of the DetectionJob entity. If the DetectionJob 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 (*DetectionJobMutation) OldTimeAgo ¶
func (m *DetectionJobMutation) OldTimeAgo(ctx context.Context) (v string, err error)
OldTimeAgo returns the old "time_ago" field's value of the DetectionJob entity. If the DetectionJob 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 (*DetectionJobMutation) OldTimeStep ¶
func (m *DetectionJobMutation) OldTimeStep(ctx context.Context) (v string, err error)
OldTimeStep returns the old "time_step" field's value of the DetectionJob entity. If the DetectionJob 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 (*DetectionJobMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the DetectionJob entity. If the DetectionJob 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 (*DetectionJobMutation) Op ¶
func (m *DetectionJobMutation) Op() Op
Op returns the operation name.
func (*DetectionJobMutation) RemoveInstanceIDs ¶
func (m *DetectionJobMutation) RemoveInstanceIDs(ids ...int)
RemoveInstanceIDs removes the "instance" edge to the DetectionJobInstance entity by IDs.
func (*DetectionJobMutation) RemovedEdges ¶
func (m *DetectionJobMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DetectionJobMutation) RemovedIDs ¶
func (m *DetectionJobMutation) 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 (*DetectionJobMutation) RemovedInstanceIDs ¶
func (m *DetectionJobMutation) RemovedInstanceIDs() (ids []int)
RemovedInstance returns the removed IDs of the "instance" edge to the DetectionJobInstance entity.
func (*DetectionJobMutation) ResetAttribute ¶
func (m *DetectionJobMutation) ResetAttribute()
ResetAttribute resets all changes to the "attribute" field.
func (*DetectionJobMutation) ResetCreateTime ¶
func (m *DetectionJobMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*DetectionJobMutation) ResetDescription ¶
func (m *DetectionJobMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*DetectionJobMutation) ResetEdge ¶
func (m *DetectionJobMutation) 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 (*DetectionJobMutation) ResetField ¶
func (m *DetectionJobMutation) 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 (*DetectionJobMutation) ResetInstance ¶
func (m *DetectionJobMutation) ResetInstance()
ResetInstance resets all changes to the "instance" edge.
func (*DetectionJobMutation) ResetMethod ¶
func (m *DetectionJobMutation) ResetMethod()
ResetMethod resets all changes to the "method" field.
func (*DetectionJobMutation) ResetMetric ¶
func (m *DetectionJobMutation) ResetMetric()
ResetMetric resets all changes to the "metric" field.
func (*DetectionJobMutation) ResetSchedule ¶
func (m *DetectionJobMutation) ResetSchedule()
ResetSchedule resets all changes to the "schedule" field.
func (*DetectionJobMutation) ResetSiteID ¶
func (m *DetectionJobMutation) ResetSiteID()
ResetSiteID resets all changes to the "site_id" field.
func (*DetectionJobMutation) ResetTimeAgo ¶
func (m *DetectionJobMutation) ResetTimeAgo()
ResetTimeAgo resets all changes to the "time_ago" field.
func (*DetectionJobMutation) ResetTimeStep ¶
func (m *DetectionJobMutation) ResetTimeStep()
ResetTimeStep resets all changes to the "time_step" field.
func (*DetectionJobMutation) ResetUpdateTime ¶
func (m *DetectionJobMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*DetectionJobMutation) Schedule ¶
func (m *DetectionJobMutation) Schedule() (r string, exists bool)
Schedule returns the value of the "schedule" field in the mutation.
func (*DetectionJobMutation) ScheduleCleared ¶
func (m *DetectionJobMutation) ScheduleCleared() bool
ScheduleCleared returns if the "schedule" field was cleared in this mutation.
func (*DetectionJobMutation) SetAttribute ¶
func (m *DetectionJobMutation) SetAttribute(s string)
SetAttribute sets the "attribute" field.
func (*DetectionJobMutation) SetCreateTime ¶
func (m *DetectionJobMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*DetectionJobMutation) SetDescription ¶
func (m *DetectionJobMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*DetectionJobMutation) SetField ¶
func (m *DetectionJobMutation) 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 (*DetectionJobMutation) SetMethod ¶
func (m *DetectionJobMutation) SetMethod(s string)
SetMethod sets the "method" field.
func (*DetectionJobMutation) SetMetric ¶
func (m *DetectionJobMutation) SetMetric(s string)
SetMetric sets the "metric" field.
func (*DetectionJobMutation) SetSchedule ¶
func (m *DetectionJobMutation) SetSchedule(s string)
SetSchedule sets the "schedule" field.
func (*DetectionJobMutation) SetSiteID ¶
func (m *DetectionJobMutation) SetSiteID(s string)
SetSiteID sets the "site_id" field.
func (*DetectionJobMutation) SetTimeAgo ¶
func (m *DetectionJobMutation) SetTimeAgo(s string)
SetTimeAgo sets the "time_ago" field.
func (*DetectionJobMutation) SetTimeStep ¶
func (m *DetectionJobMutation) SetTimeStep(s string)
SetTimeStep sets the "time_step" field.
func (*DetectionJobMutation) SetUpdateTime ¶
func (m *DetectionJobMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*DetectionJobMutation) SiteID ¶
func (m *DetectionJobMutation) SiteID() (r string, exists bool)
SiteID returns the value of the "site_id" field in the mutation.
func (*DetectionJobMutation) TimeAgo ¶
func (m *DetectionJobMutation) TimeAgo() (r string, exists bool)
TimeAgo returns the value of the "time_ago" field in the mutation.
func (*DetectionJobMutation) TimeStep ¶
func (m *DetectionJobMutation) TimeStep() (r string, exists bool)
TimeStep returns the value of the "time_step" field in the mutation.
func (DetectionJobMutation) Tx ¶
func (m DetectionJobMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DetectionJobMutation) Type ¶
func (m *DetectionJobMutation) Type() string
Type returns the node type of this mutation (DetectionJob).
func (*DetectionJobMutation) UpdateTime ¶
func (m *DetectionJobMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
type DetectionJobQuery ¶
type DetectionJobQuery struct {
// contains filtered or unexported fields
}
DetectionJobQuery is the builder for querying DetectionJob entities.
func (*DetectionJobQuery) All ¶
func (djq *DetectionJobQuery) All(ctx context.Context) ([]*DetectionJob, error)
All executes the query and returns a list of DetectionJobs.
func (*DetectionJobQuery) AllX ¶
func (djq *DetectionJobQuery) AllX(ctx context.Context) []*DetectionJob
AllX is like All, but panics if an error occurs.
func (*DetectionJobQuery) Clone ¶
func (djq *DetectionJobQuery) Clone() *DetectionJobQuery
Clone returns a duplicate of the DetectionJobQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DetectionJobQuery) Count ¶
func (djq *DetectionJobQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DetectionJobQuery) CountX ¶
func (djq *DetectionJobQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DetectionJobQuery) Exist ¶
func (djq *DetectionJobQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DetectionJobQuery) ExistX ¶
func (djq *DetectionJobQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DetectionJobQuery) First ¶
func (djq *DetectionJobQuery) First(ctx context.Context) (*DetectionJob, error)
First returns the first DetectionJob entity from the query. Returns a *NotFoundError when no DetectionJob was found.
func (*DetectionJobQuery) FirstID ¶
func (djq *DetectionJobQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first DetectionJob ID from the query. Returns a *NotFoundError when no DetectionJob ID was found.
func (*DetectionJobQuery) FirstIDX ¶
func (djq *DetectionJobQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DetectionJobQuery) FirstX ¶
func (djq *DetectionJobQuery) FirstX(ctx context.Context) *DetectionJob
FirstX is like First, but panics if an error occurs.
func (*DetectionJobQuery) GroupBy ¶
func (djq *DetectionJobQuery) GroupBy(field string, fields ...string) *DetectionJobGroupBy
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.DetectionJob.Query().
GroupBy(detectionjob.FieldCreateTime).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*DetectionJobQuery) IDs ¶
func (djq *DetectionJobQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of DetectionJob IDs.
func (*DetectionJobQuery) IDsX ¶
func (djq *DetectionJobQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DetectionJobQuery) Limit ¶
func (djq *DetectionJobQuery) Limit(limit int) *DetectionJobQuery
Limit adds a limit step to the query.
func (*DetectionJobQuery) Offset ¶
func (djq *DetectionJobQuery) Offset(offset int) *DetectionJobQuery
Offset adds an offset step to the query.
func (*DetectionJobQuery) Only ¶
func (djq *DetectionJobQuery) Only(ctx context.Context) (*DetectionJob, error)
Only returns a single DetectionJob entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one DetectionJob entity is not found. Returns a *NotFoundError when no DetectionJob entities are found.
func (*DetectionJobQuery) OnlyID ¶
func (djq *DetectionJobQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only DetectionJob ID in the query. Returns a *NotSingularError when exactly one DetectionJob ID is not found. Returns a *NotFoundError when no entities are found.
func (*DetectionJobQuery) OnlyIDX ¶
func (djq *DetectionJobQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DetectionJobQuery) OnlyX ¶
func (djq *DetectionJobQuery) OnlyX(ctx context.Context) *DetectionJob
OnlyX is like Only, but panics if an error occurs.
func (*DetectionJobQuery) Order ¶
func (djq *DetectionJobQuery) Order(o ...OrderFunc) *DetectionJobQuery
Order adds an order step to the query.
func (*DetectionJobQuery) QueryInstance ¶
func (djq *DetectionJobQuery) QueryInstance() *DetectionJobInstanceQuery
QueryInstance chains the current query on the "instance" edge.
func (*DetectionJobQuery) Select ¶
func (djq *DetectionJobQuery) Select(field string, fields ...string) *DetectionJobSelect
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.DetectionJob.Query().
Select(detectionjob.FieldCreateTime).
Scan(ctx, &v)
func (*DetectionJobQuery) Where ¶
func (djq *DetectionJobQuery) Where(ps ...predicate.DetectionJob) *DetectionJobQuery
Where adds a new predicate for the DetectionJobQuery builder.
func (*DetectionJobQuery) WithInstance ¶
func (djq *DetectionJobQuery) WithInstance(opts ...func(*DetectionJobInstanceQuery)) *DetectionJobQuery
WithInstance tells the query-builder to eager-load the nodes that are connected to the "instance" edge. The optional arguments are used to configure the query builder of the edge.
type DetectionJobSelect ¶
type DetectionJobSelect struct {
*DetectionJobQuery
// contains filtered or unexported fields
}
DetectionJobSelect is the builder for selecting fields of DetectionJob entities.
func (*DetectionJobSelect) Bool ¶
func (djs *DetectionJobSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DetectionJobSelect) BoolX ¶
func (djs *DetectionJobSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*DetectionJobSelect) Bools ¶
func (djs *DetectionJobSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DetectionJobSelect) BoolsX ¶
func (djs *DetectionJobSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*DetectionJobSelect) Float64 ¶
func (djs *DetectionJobSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DetectionJobSelect) Float64X ¶
func (djs *DetectionJobSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*DetectionJobSelect) Float64s ¶
func (djs *DetectionJobSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DetectionJobSelect) Float64sX ¶
func (djs *DetectionJobSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*DetectionJobSelect) Int ¶
func (djs *DetectionJobSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DetectionJobSelect) IntX ¶
func (djs *DetectionJobSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*DetectionJobSelect) Ints ¶
func (djs *DetectionJobSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DetectionJobSelect) IntsX ¶
func (djs *DetectionJobSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*DetectionJobSelect) Scan ¶
func (djs *DetectionJobSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*DetectionJobSelect) ScanX ¶
func (djs *DetectionJobSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*DetectionJobSelect) String ¶
func (djs *DetectionJobSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*DetectionJobSelect) StringX ¶
func (djs *DetectionJobSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type DetectionJobUpdate ¶
type DetectionJobUpdate struct {
// contains filtered or unexported fields
}
DetectionJobUpdate is the builder for updating DetectionJob entities.
func (*DetectionJobUpdate) AddInstance ¶
func (dju *DetectionJobUpdate) AddInstance(d ...*DetectionJobInstance) *DetectionJobUpdate
AddInstance adds the "instance" edges to the DetectionJobInstance entity.
func (*DetectionJobUpdate) AddInstanceIDs ¶
func (dju *DetectionJobUpdate) AddInstanceIDs(ids ...int) *DetectionJobUpdate
AddInstanceIDs adds the "instance" edge to the DetectionJobInstance entity by IDs.
func (*DetectionJobUpdate) ClearDescription ¶
func (dju *DetectionJobUpdate) ClearDescription() *DetectionJobUpdate
ClearDescription clears the value of the "description" field.
func (*DetectionJobUpdate) ClearInstance ¶
func (dju *DetectionJobUpdate) ClearInstance() *DetectionJobUpdate
ClearInstance clears all "instance" edges to the DetectionJobInstance entity.
func (*DetectionJobUpdate) ClearSchedule ¶
func (dju *DetectionJobUpdate) ClearSchedule() *DetectionJobUpdate
ClearSchedule clears the value of the "schedule" field.
func (*DetectionJobUpdate) Exec ¶
func (dju *DetectionJobUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DetectionJobUpdate) ExecX ¶
func (dju *DetectionJobUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DetectionJobUpdate) Mutation ¶
func (dju *DetectionJobUpdate) Mutation() *DetectionJobMutation
Mutation returns the DetectionJobMutation object of the builder.
func (*DetectionJobUpdate) RemoveInstance ¶
func (dju *DetectionJobUpdate) RemoveInstance(d ...*DetectionJobInstance) *DetectionJobUpdate
RemoveInstance removes "instance" edges to DetectionJobInstance entities.
func (*DetectionJobUpdate) RemoveInstanceIDs ¶
func (dju *DetectionJobUpdate) RemoveInstanceIDs(ids ...int) *DetectionJobUpdate
RemoveInstanceIDs removes the "instance" edge to DetectionJobInstance entities by IDs.
func (*DetectionJobUpdate) Save ¶
func (dju *DetectionJobUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DetectionJobUpdate) SaveX ¶
func (dju *DetectionJobUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DetectionJobUpdate) SetAttribute ¶
func (dju *DetectionJobUpdate) SetAttribute(s string) *DetectionJobUpdate
SetAttribute sets the "attribute" field.
func (*DetectionJobUpdate) SetDescription ¶
func (dju *DetectionJobUpdate) SetDescription(s string) *DetectionJobUpdate
SetDescription sets the "description" field.
func (*DetectionJobUpdate) SetMethod ¶
func (dju *DetectionJobUpdate) SetMethod(s string) *DetectionJobUpdate
SetMethod sets the "method" field.
func (*DetectionJobUpdate) SetMetric ¶
func (dju *DetectionJobUpdate) SetMetric(s string) *DetectionJobUpdate
SetMetric sets the "metric" field.
func (*DetectionJobUpdate) SetNillableDescription ¶
func (dju *DetectionJobUpdate) SetNillableDescription(s *string) *DetectionJobUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*DetectionJobUpdate) SetNillableSchedule ¶
func (dju *DetectionJobUpdate) SetNillableSchedule(s *string) *DetectionJobUpdate
SetNillableSchedule sets the "schedule" field if the given value is not nil.
func (*DetectionJobUpdate) SetSchedule ¶
func (dju *DetectionJobUpdate) SetSchedule(s string) *DetectionJobUpdate
SetSchedule sets the "schedule" field.
func (*DetectionJobUpdate) SetSiteID ¶
func (dju *DetectionJobUpdate) SetSiteID(s string) *DetectionJobUpdate
SetSiteID sets the "site_id" field.
func (*DetectionJobUpdate) SetTimeAgo ¶
func (dju *DetectionJobUpdate) SetTimeAgo(s string) *DetectionJobUpdate
SetTimeAgo sets the "time_ago" field.
func (*DetectionJobUpdate) SetTimeStep ¶
func (dju *DetectionJobUpdate) SetTimeStep(s string) *DetectionJobUpdate
SetTimeStep sets the "time_step" field.
func (*DetectionJobUpdate) Where ¶
func (dju *DetectionJobUpdate) Where(ps ...predicate.DetectionJob) *DetectionJobUpdate
Where adds a new predicate for the DetectionJobUpdate builder.
type DetectionJobUpdateOne ¶
type DetectionJobUpdateOne struct {
// contains filtered or unexported fields
}
DetectionJobUpdateOne is the builder for updating a single DetectionJob entity.
func (*DetectionJobUpdateOne) AddInstance ¶
func (djuo *DetectionJobUpdateOne) AddInstance(d ...*DetectionJobInstance) *DetectionJobUpdateOne
AddInstance adds the "instance" edges to the DetectionJobInstance entity.
func (*DetectionJobUpdateOne) AddInstanceIDs ¶
func (djuo *DetectionJobUpdateOne) AddInstanceIDs(ids ...int) *DetectionJobUpdateOne
AddInstanceIDs adds the "instance" edge to the DetectionJobInstance entity by IDs.
func (*DetectionJobUpdateOne) ClearDescription ¶
func (djuo *DetectionJobUpdateOne) ClearDescription() *DetectionJobUpdateOne
ClearDescription clears the value of the "description" field.
func (*DetectionJobUpdateOne) ClearInstance ¶
func (djuo *DetectionJobUpdateOne) ClearInstance() *DetectionJobUpdateOne
ClearInstance clears all "instance" edges to the DetectionJobInstance entity.
func (*DetectionJobUpdateOne) ClearSchedule ¶
func (djuo *DetectionJobUpdateOne) ClearSchedule() *DetectionJobUpdateOne
ClearSchedule clears the value of the "schedule" field.
func (*DetectionJobUpdateOne) Exec ¶
func (djuo *DetectionJobUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DetectionJobUpdateOne) ExecX ¶
func (djuo *DetectionJobUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DetectionJobUpdateOne) Mutation ¶
func (djuo *DetectionJobUpdateOne) Mutation() *DetectionJobMutation
Mutation returns the DetectionJobMutation object of the builder.
func (*DetectionJobUpdateOne) RemoveInstance ¶
func (djuo *DetectionJobUpdateOne) RemoveInstance(d ...*DetectionJobInstance) *DetectionJobUpdateOne
RemoveInstance removes "instance" edges to DetectionJobInstance entities.
func (*DetectionJobUpdateOne) RemoveInstanceIDs ¶
func (djuo *DetectionJobUpdateOne) RemoveInstanceIDs(ids ...int) *DetectionJobUpdateOne
RemoveInstanceIDs removes the "instance" edge to DetectionJobInstance entities by IDs.
func (*DetectionJobUpdateOne) Save ¶
func (djuo *DetectionJobUpdateOne) Save(ctx context.Context) (*DetectionJob, error)
Save executes the query and returns the updated DetectionJob entity.
func (*DetectionJobUpdateOne) SaveX ¶
func (djuo *DetectionJobUpdateOne) SaveX(ctx context.Context) *DetectionJob
SaveX is like Save, but panics if an error occurs.
func (*DetectionJobUpdateOne) SetAttribute ¶
func (djuo *DetectionJobUpdateOne) SetAttribute(s string) *DetectionJobUpdateOne
SetAttribute sets the "attribute" field.
func (*DetectionJobUpdateOne) SetDescription ¶
func (djuo *DetectionJobUpdateOne) SetDescription(s string) *DetectionJobUpdateOne
SetDescription sets the "description" field.
func (*DetectionJobUpdateOne) SetMethod ¶
func (djuo *DetectionJobUpdateOne) SetMethod(s string) *DetectionJobUpdateOne
SetMethod sets the "method" field.
func (*DetectionJobUpdateOne) SetMetric ¶
func (djuo *DetectionJobUpdateOne) SetMetric(s string) *DetectionJobUpdateOne
SetMetric sets the "metric" field.
func (*DetectionJobUpdateOne) SetNillableDescription ¶
func (djuo *DetectionJobUpdateOne) SetNillableDescription(s *string) *DetectionJobUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*DetectionJobUpdateOne) SetNillableSchedule ¶
func (djuo *DetectionJobUpdateOne) SetNillableSchedule(s *string) *DetectionJobUpdateOne
SetNillableSchedule sets the "schedule" field if the given value is not nil.
func (*DetectionJobUpdateOne) SetSchedule ¶
func (djuo *DetectionJobUpdateOne) SetSchedule(s string) *DetectionJobUpdateOne
SetSchedule sets the "schedule" field.
func (*DetectionJobUpdateOne) SetSiteID ¶
func (djuo *DetectionJobUpdateOne) SetSiteID(s string) *DetectionJobUpdateOne
SetSiteID sets the "site_id" field.
func (*DetectionJobUpdateOne) SetTimeAgo ¶
func (djuo *DetectionJobUpdateOne) SetTimeAgo(s string) *DetectionJobUpdateOne
SetTimeAgo sets the "time_ago" field.
func (*DetectionJobUpdateOne) SetTimeStep ¶
func (djuo *DetectionJobUpdateOne) SetTimeStep(s string) *DetectionJobUpdateOne
SetTimeStep sets the "time_step" field.
type DetectionJobs ¶
type DetectionJobs []*DetectionJob
DetectionJobs is a parsable slice of DetectionJob.
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(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 Rollbacker method.
type Tx ¶
type Tx struct {
// Anomaly is the client for interacting with the Anomaly builders.
Anomaly *AnomalyClient
// DetectionJob is the client for interacting with the DetectionJob builders.
DetectionJob *DetectionJobClient
// DetectionJobInstance is the client for interacting with the DetectionJobInstance builders.
DetectionJobInstance *DetectionJobInstanceClient
// 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 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
¶
- anomaly.go
- anomaly_create.go
- anomaly_delete.go
- anomaly_query.go
- anomaly_update.go
- client.go
- config.go
- context.go
- detectionjob.go
- detectionjob_create.go
- detectionjob_delete.go
- detectionjob_query.go
- detectionjob_update.go
- detectionjobinstance.go
- detectionjobinstance_create.go
- detectionjobinstance_delete.go
- detectionjobinstance_query.go
- detectionjobinstance_update.go
- ent.go
- generate.go
- mutation.go
- runtime.go
- tx.go